Closed ZJU-lishuang closed 3 years ago
This warning does not affect the training process. The image data may be corrupted in Linux
.
If you fix it, you should re-read and rewrite each image in Windows
using OpenCV or Matlab.
How to generate val_gt_loc.txt? I don't find the relative code in this project.
It is just an auxiliary file for visualization and offline evaluation. If you need it, we will upload it ASAP.
Thanks for your attention!
I have converted SHHB to NWPU format.But when I train the dataset,the val_loader need the val_gt_loc.txt file.
sigma_s = gt_data['sigma'][:,0]
sigma_l = gt_data['sigma'][:,1]
What is the meaning of the sigma parameter?
sigma_s = gt_data['sigma'][:,0] sigma_l = gt_data['sigma'][:,1]
What is the meaning of the sigma parameter?
Please see the NWPU-Crowd paper for the details.
I have converted SHHB to NWPU format.But when I train the dataset,the val_loader need the val_gt_loc.txt file.
Shanghai A and B's processed data and parameters will be upload in 2 days. I have been busy graduating in recent days, please understand.
How about the mae/mse in the Shanghai B?
best loc model: F1 of ~86%, MAE/MSE of ~15/~33 best cnt model: F1 of ~85%, MAE/MSE of ~11/~25
I have converted SHHB to NWPU format.But when I train the dataset,the val_loader need the val_gt_loc.txt file.
The SHHA/B's training parameters have been uploaded in this repo ./saved_exp_results
and the processed data is available at https://mailnwpueducn-my.sharepoint.com/:f:/g/personal/gjy3035_mail_nwpu_edu_cn/EliCeOckaZVBgez6n8ZWvr4BNdwPauFJgbm88MGhHid25w?e=rtogwc .
Thanks for your attention!
In case this helps anyone in the future, here's how I removed all EXIF data from my dataset, which removed the PIL warnings.
# remove corrupt exif data
from PIL import Image
file_names = get_image_files(path)
def remove_exif(image_name):
image = Image.open(image_name)
if not image.getexif():
return
print('removing EXIF from', image_name, '...')
data = list(image.getdata())
image_without_exif = Image.new(image.mode, image.size)
image_without_exif.putdata(data)
image_without_exif.save(image_name)
for file in file_names:
remove_exif(file)
print('done')
@maraoz Thanks for your share!
When using
img = Image.open(0440.jpg)
,there is the warning. How to fix it?