facebookresearch / maskrcnn-benchmark

Fast, modular reference implementation of Instance Segmentation and Object Detection algorithms in PyTorch.
MIT License
9.3k stars 2.49k forks source link

i use coco 2014 to train rpn network, when training happen same train image can't load, did any body know? #73

Closed mmxuan18 closed 6 years ago

mmxuan18 commented 6 years ago

❓ Questions and Help

i ls coco/train2014 dir has 82385 images, and i debug to cocoapi load annotation json parse 82783 images. in coco api has filter image has no annotation , but do't has filter has annotation but image not exist? i down load instances_minival2014.json instances_valminusminival2014.json from internet, will this has same problem? image

fmassa commented 6 years ago

Did you set the symlinks for the dataset, as explained in the README?

mmxuan18 commented 6 years ago

@fmassa yes i do that as readme, and i train success serval steps image image

fmassa commented 6 years ago

This is very weird, looks like your image folders doesn't match the annotations, or that some images were not downloaded

This shouldn't happen with a new download from the COCO website.

mmxuan18 commented 6 years ago

@fmassa the axel breakpoint resume cause some image not download, i doesn't check the final md5, redownload from coco fix my fault. very thanks

aishetty commented 5 years ago

I have the same issue. I have a new download from COCO website as well.

_loading annotations into memory... Done (t=4.30s) creating index... index created! 2019-06-21 13:32:46,203 maskrcnn_benchmark.utils.miscellaneous WARNING: Dataset [ConcatDataset] has no categories attribute, labels.json file won't be created 2019-06-21 13:32:46,482 maskrcnn_benchmark.trainer INFO: Start training Traceback (most recent call last): File "./tools/train_net.py", line 191, in main() File "./tools/train_net.py", line 184, in main model = train(cfg, args.local_rank, args.distributed) File "./tools/train_net.py", line 85, in train arguments, File "/home/aishwarya/thesis/facebook-detectron/maskrcnn-benchmark/maskrcnn_benchmark/engine/trainer.py", line 57, in dotrain for iteration, (images, targets, ) in enumerate(data_loader, start_iter): File "/usr/local/lib/python3.6/dist-packages/torch/utils/data/dataloader.py", line 582, in next return self._process_next_batch(batch) File "/usr/local/lib/python3.6/dist-packages/torch/utils/data/dataloader.py", line 608, in_process_next_batch raise batch.exc_type(batch.exc_msg) FileNotFoundError: Traceback (most recent call last): File "/usr/local/lib/python3.6/dist-packages/torch/utils/data/_utils/worker.py", line 99, in _worker_loop samples = collate_fn([dataset[i] for i in batch_indices]) File "/usr/local/lib/python3.6/dist-packages/torch/utils/data/_utils/worker.py", line 99, in samples = collate_fn([dataset[i] for i in batch_indices]) File "/usr/local/lib/python3.6/dist-packages/torch/utils/data/dataset.py", line 85, in getitem return self.datasets[dataset_idx][sample_idx] File "/home/aishwarya/thesis/facebook-detectron/maskrcnn-benchmark/maskrcnn_benchmark/data/datasets/coco.py", line 69, in getitem img, anno = super(COCODataset, self).getitem(idx) File "/usr/local/lib/python3.6/dist-packages/torchvision/datasets/coco.py", line 112, in getitem img = Image.open(os.path.join(self.root, path)).convert('RGB') File "/usr/local/lib/python3.6/dist-packages/PIL/Image.py", line 2652, in open fp = builtins.open(filename, "rb") FileNotFoundError: [Errno 2] No such file or directory: 'datasets/coco/train2014/COCO_train2014000000365261.jpg'

Kindly help out with this. This happens during training. I have followed all the steps in the ReadMe