Ssd.pytorch: FileNotFoundError: [Errno 2] No such file or directory: 'COCO_ROOT/annotations/instances_trainval35k.json'

Created on 31 Mar 2018  ·  20Comments  ·  Source: amdegroot/ssd.pytorch

When I run train.py It shows an error: FileNotFoundError: [Errno 2] No such file or directory: 'COCO_ROOT/annotations/instances_trainval35k.json' but only have 'instances_trainval35k.json.zip' in that place.Whaat's wrong???

Most helpful comment

I'm not able to download the file "https://s3.amazonaws.com/amdegroot-datasets/instances_trainval35k.json.zip". The COCO data preparation script tries to download this file, but I end up with a "instances_trainval35k.json.zip" that just contains an error message.

All 20 comments

@amdegroot
loading annotations into memory...
Traceback (most recent call last):
File "train.py", line 259, in
train()
File "train.py", line 82, in train
MEANS))
File "/home/chenzw/tensor/ssd/data/coco.py", line 92, in __init__
INSTANCES_SET.format(image_set)))
File "/home/chenzw/anaconda3/envs/tensor3/lib/python3.5/site-packages/pycocotools/coco.py", line 84, in __init__
dataset = json.load(open(annotation_file, 'r'))
FileNotFoundError: [Errno 2] No such file or directory: 'COCO_ROOT/annotations/instances_trainval35k.json'

I have the same problem, have you solved the problem?

I have the same problem too, did you guys fix it?

@amdegroot I have the same problem also, was this solved?

I'm not able to download the file "https://s3.amazonaws.com/amdegroot-datasets/instances_trainval35k.json.zip". The COCO data preparation script tries to download this file, but I end up with a "instances_trainval35k.json.zip" that just contains an error message.

@landersson too, have someone solved it?

-------------------------------update-----------------------------
could find clue in "https://github.com/matterport/Mask_RCNN/blob/master/samples/coco/coco.py"

@AllenMao can you please explain how to fix it?

@AllenMao Thank you very much!
I was able to make it train on coco, but unfortunately, whatever i do i cannot make it evaluate on coco. do you have any suggestion on that ?

@isalirezag i update coco.py, and update eval.py in this repository. evaluate coco with below:
COCODetection(args.voc_root, ['minival'], BaseTransform(300, dataset_mean), COCOAnnotationTransform())

@Bigwode

You can download that file below.

https://dl.dropboxusercontent.com/s/s3tw5zcg7395368/instances_valminusminival2014.json.zip

After download that, just rename filename and paste it at correct directory.

@seongkyun It is just valminusminival2014.json, it contains 35k val images.
However, coco trainval35k datasets include 82k train images + 35k val images. So if you rename it, you just use 35k val images to train rather than trainval35k dataset

@ujsyehao I've got it. Then if i want to use whole the images (82k + 32k) for training phase, which file should I use? or is there any link to download correct json file?

@ujsyehao
@seongkyun

Thank you for your analysis!
Have you found a solution?

Same problem, can anyone fix it?

zip“instances_trainval35k.json.zip” and put "instances_trainval35k.json" in correct file

@YLONl But the thing is that file you've told "instances_trainval35k.json.zip" is the incorrect file. Nobody can not unzip or run that "*.json" file even just deleting the ".zip" in the filename.

@Bigwode

You can download that file below.

https://dl.dropboxusercontent.com/s/s3tw5zcg7395368/instances_valminusminival2014.json.zip

After download that, just rename filename and paste it at correct directory.

this solution works for me.

file instances_valminusminival2014.json and instances_trainval35k.json should be the same file just with different name. Besides, I dont think there are 35k images in the trainval35k folder. Does anybody know what's the real meaning of 35k?

@ujsyehao I've got it. Then if i want to use whole the images (82k + 32k) for training phase, which file should I use? or is there any link to download correct json file?

I'm with the same question in mind. Does anyone know how to do it?

@ShangyinGao, as you can see in the next picture, it is more than 120k photos.
image

Was this page helpful?
0 / 5 - 0 ratings