lsc-cnn icon indicating copy to clipboard operation
lsc-cnn copied to clipboard

can't execute the code for ucf-qrtf dataset

Open ruchikalalit opened this issue 3 years ago • 2 comments

Dear paper authors, I am not able to execute the code for ucf-qnrf dataset, I am executing the code on windows, pycharm professsional 2019. Code for shanghaitech dataset is working fine but, I am getting the following error in case of other dataset

In data_reader.init: Can't read meta data in ../dataset/qnrf_dotmaps_predictionScale_2; call genDatasetFiles.

{'test': ['../dataset/UCF-QNRF_ECCV18/Test/images', '../dataset/UCF-QNRF_ECCV18/Test/ground_truth'], 'train': ['../dataset/UCF-QNRF_ECCV18/Train/images', '../dataset/UCF-QNRF_ECCV18/Train/ground_truth']} <readData.DataReader object at 0x0000019C881DFE88> CREATING DATASET... In data_reader.genDatasetFiles: Deleted old ../dataset/qnrf_dotmaps_predictionScale_2\test. In data_reader.genDatasetFiles: ../dataset/qnrf_dotmaps_predictionScale_2\test created. In data_reader.genDatasetFiles: Deleted old ../dataset/qnrf_dotmaps_predictionScale_2\train. In data_reader.genDatasetFiles: ../dataset/qnrf_dotmaps_predictionScale_2\train created. In data_reader.genDatasetFiles: Deleted old ../dataset/qnrf_dotmaps_predictionScale_2\test_valid. In data_reader.genDatasetFiles: ../dataset/qnrf_dotmaps_predictionScale_2\test_valid created. Processing img_0001.jpg ... Traceback (most recent call last): File "D:/crowd_count_code_sumit/crowd_code/mainPro.py", line 1122, in train() File "D:/crowd_count_code_sumit/crowd_code/mainPro.py", line 1015, in train test_batch_size=1) File "D:\crowd_count_code_sumit\crowd_code\readData.py", line 198, in genDatasetFiles self._dump_all_test_images(set_name) File "D:\crowd_count_code_sumit\crowd_code\readData.py", line 824, in _dump_all_test_images data = self._read_image_and_gt_prediction(paths, file_name, kernel) File "D:\crowd_count_code_sumit\crowd_code\readData.py", line 788, in _read_image_and_gt_prediction gt_annotation_points = data_mat['image_info'][0, 0]['location'][0, 0] KeyError: 'image_info'

Process finished with exit code 1

please help in removing this error

ruchikalalit avatar Sep 24 '20 07:09 ruchikalalit

Can you once again check the data_mat variable and print out it's keys(). From the error above it shows that your data_mat has different dictionary structure.

pvskand avatar Sep 26 '20 23:09 pvskand

Hello, has this problem been solved? Can you tell me how to solve it? Thank you

jjj1998 avatar Oct 19 '20 02:10 jjj1998