Skip to content
This repository has been archived by the owner on Oct 31, 2023. It is now read-only.

I can't load pictures #89

Closed
197sh0ta opened this issue Nov 1, 2018 · 2 comments
Closed

I can't load pictures #89

197sh0ta opened this issue Nov 1, 2018 · 2 comments

Comments

@197sh0ta
Copy link

197sh0ta commented Nov 1, 2018

❓ Questions and Help

When I try train_net.py with COCO datasets according to the README.
I can't load pictures like below. The pic exists in val_2014 directory.
Do you have idea about it ?
So I'm sorry if I asked questions about strange things.
Thank you for in advance.

loading annotations into memory...
Done (t=8.15s)
creating index...
index created!
loading annotations into memory...
Done (t=3.18s)
creating index...
index created!
2018-11-01 20:05:41,426 maskrcnn_benchmark.trainer INFO: Start training
Traceback (most recent call last):
File "tools/train_net.py", line 170, in
main()
File "tools/train_net.py", line 163, in main
model = train(cfg, args.local_rank, args.distributed)
File "tools/train_net.py", line 73, in train
arguments,
File "/home/ikedalab/Documents/pytorch/maskrcnn-benchmark/maskrcnn_benchmark/engine/trainer.py", line 56, in do_train
for iteration, (images, targets, _) in enumerate(data_loader, start_iter):
File "/home/ikedalab/anaconda3/envs/maskrcnn/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 637, in next
return self._process_next_batch(batch)
File "/home/ikedalab/anaconda3/envs/maskrcnn/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 658, in _process_next_batch
raise batch.exc_type(batch.exc_msg)
FileNotFoundError: Traceback (most recent call last):
File "/home/ikedalab/anaconda3/envs/maskrcnn/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 138, in _worker_loop
samples = collate_fn([dataset[i] for i in batch_indices])
File "/home/ikedalab/anaconda3/envs/maskrcnn/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 138, in
samples = collate_fn([dataset[i] for i in batch_indices])
File "/home/ikedalab/anaconda3/envs/maskrcnn/lib/python3.7/site-packages/torch/utils/data/dataset.py", line 81, in getitem
return self.datasets[dataset_idx][sample_idx]
File "/home/ikedalab/Documents/pytorch/maskrcnn-benchmark/maskrcnn_benchmark/data/datasets/coco.py", line 36, in getitem
img, anno = super(COCODataset, self).getitem(idx)
File "/home/ikedalab/anaconda3/envs/maskrcnn/lib/python3.7/site-packages/torchvision-0.2.1-py3.7.egg/torchvision/datasets/coco.py", line 117, in getitem
img = Image.open(os.path.join(self.root, path)).convert('RGB')
File "/home/ikedalab/anaconda3/envs/maskrcnn/lib/python3.7/site-packages/PIL/Image.py", line 2609, in open
fp = builtins.open(filename, "rb")
FileNotFoundError: [Errno 2] No such file or directory: 'datasets/coco/val2014/COCO_val2014_000000068120.jpg'

@fmassa
Copy link
Contributor

fmassa commented Nov 1, 2018

Did you do the symlinks as explained in the README? And are you running the code from the maskrcnn-benchmark folder?

@197sh0ta
Copy link
Author

197sh0ta commented Nov 2, 2018

That's right!! Thank you!!!

@197sh0ta 197sh0ta closed this as completed Nov 2, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants