CSL-YOLO icon indicating copy to clipboard operation
CSL-YOLO copied to clipboard

get error in loading datasets

Open jiujiangluck opened this issue 2 years ago • 7 comments

Traceback (most recent call last): File "/usr/lib/python3.6/threading.py", line 916, in _bootstrap_inner self.run() File "/usr/lib/python3.6/threading.py", line 864, in run self._target(*self._args, **self._kwargs) File "/project/train/src_repo/CSL-YOLO/tools/thread_pool.py", line 22, in _Thread if(parameter==None):result=function() File "/project/train/src_repo/CSL-YOLO/data_generator.py", line 180, in _ReadFunction batch_data=self._data_gen() File "/project/train/src_repo/CSL-YOLO/data_generator.py", line 31, in call return self.Read() File "/project/train/src_repo/CSL-YOLO/data_generator.py", line 142, in Read img_1,bboxes_1=self._GetImgAndBboxes(file_name_1) File "/project/train/src_repo/CSL-YOLO/data_generator.py", line 46, in _GetImgAndBboxes bboxes=JSON2Bboxes(json_path) File "/project/train/src_repo/CSL-YOLO/tools/bboxes_io.py", line 4, in JSON2Bboxes with open(json_path,"r") as json_fin: FileNotFoundError: [Errno 2] No such file or directory: './dataset/coco/train/json/.json'

By the way, the description about how to train is wrong

jiujiangluck avatar Jul 17 '21 07:07 jiujiangluck

Thank you for your reminder. I have updated the description of the script. The problem seems to be that the file path cannot be found. Are you sure to put the data in the default location?

D0352276 avatar Jul 17 '21 07:07 D0352276

I only modified the input size........

jiujiangluck avatar Jul 17 '21 07:07 jiujiangluck

Is the path where you execute the program in the root directory of "CSL-YOLO"?

D0352276 avatar Jul 17 '21 08:07 D0352276

Yes

jiujiangluck avatar Jul 17 '21 08:07 jiujiangluck

Please git pull to make sure it is the latest version, and then execute python3 main.py -t cfg/train_coco.cfg by default.

D0352276 avatar Jul 17 '21 08:07 D0352276

I just git clone about 2 hous ago.

jiujiangluck avatar Jul 17 '21 08:07 jiujiangluck

Try setting batch_size to 2 ? This error is probably because os.listdir() failed to list the files in "dataset/coco/train/json".

D0352276 avatar Jul 17 '21 08:07 D0352276