CharlesShang / FastMaskRCNN

Mask RCNN in TensorFlow
Apache License 2.0
3.1k stars 1.1k forks source link

Unpacking COCO into .data/coco #120

Closed AndrewKemendo closed 7 years ago

AndrewKemendo commented 7 years ago

Per the README I placed all of the COCO zip files into .data/ and then ran

python download_and_convert_data.py

I kept getting path errors looking for DIRs that didn't exist

IOError: [Errno 2] No such file or directory: 'data/coco/annotations/instances_tr ain2014.json'

Then I unpacked instances_train2014.zip into .data/coco and it worked until I got a new error:

IOError: [Errno 2] No such file or directory: u'data/coco/train2014/COCO_train201 4_000000262145.jpg'

Then I unpacked train2014.zip into .data/coco and ran it again and it is working to convert the images via GPU.

Is there a DIR list for where others need to be unpacked? I am worried that it's going to get through these and then throw a new error and I'm going to have to start over.

If there is a known DIR list then could we append download_and_convert_data.py to unpack to the right directories like so?

import zipfile
   zip_ref = zipfile.ZipFile(path_to_zip_file, 'r')
   zip_ref.extractall(directory_to_extract_to)
   zip_ref.close()

Does anyone have that DIR list or should they all unpack to .data/coco?

Tetsujinfr commented 7 years ago

The five coco 2014 dataset I did download and I unzipped under coco create subfolders with the following names: "annotations", "records", "test2014", "train2014" and "val2014". So you look ok. Maybe you need to sudo your python call if for whatever reason the permissions on the folders are restricted.

Tets

AndrewKemendo commented 7 years ago

Thanks. Yea it worked out with those two being unpacked. I might push a change to download_and_convert or at least the README if people would be interested.