open-mmlab / mmdetection

OpenMMLab Detection Toolbox and Benchmark
https://mmdetection.readthedocs.io
Apache License 2.0
29.28k stars 9.41k forks source link

Problem on training process #3968

Closed Hyeonminro closed 3 years ago

Hyeonminro commented 3 years ago

Describe the bug I ran through the training process that described on documentation and I faced this error message

Reproduction

  1. What command or script did you run? python tools/train.py configs/mask_rcnn/mask_rcnn_r50_fpn_1x_coil.py

  2. Did you make any modifications on the code or config? Did you understand what you have modified? I changed the my own data set into COCO data format and than modified my data path(data root) in config file (/config/base/model, /config/base/data) then run the train.py file

  3. What dataset did you use? my own dataset that labeled with labelme

Environment

sys.platform: linux Python: 3.7.7 (default, Mar 26 2020, 15:48:22) [GCC 7.3.0] CUDA available: True CUDA_HOME: /usr/local/cuda-10.2 NVCC: Cuda compilation tools, release 10.2, V10.2.89 GPU 0: Tesla V100-PCIE-16GB GCC: gcc (Ubuntu 5.4.0-6ubuntu1~16.04.12) 5.4.0 20160609 PyTorch: 1.5.0 PyTorch compiling details: PyTorch built with:

TorchVision: 0.6.0a0+82fd1c8 OpenCV: 4.2.0 MMCV: 0.5.1 MMDetection: 2.0.0+3c021b1 MMDetection Compiler: GCC 5.4 MMDetection CUDA Compiler: 10.2

Error traceback Traceback (most recent call last): File "tools/train.py", line 159, in main() File "tools/train.py", line 155, in main meta=meta) File "/home/pirl/mmdetection/mmdet/apis/train.py", line 165, in train_detector runner.run(data_loaders, cfg.workflow, cfg.total_epochs) File "/home/pirl/anaconda3/envs/segmen/lib/python3.7/site-packages/mmcv-0.5.1-py3.7-linux-x86_64.egg/mmcv/runner/runner.py", line 383, in run epoch_runner(data_loaders[i], **kwargs) File "/home/pirl/anaconda3/envs/segmen/lib/python3.7/site-packages/mmcv-0.5.1-py3.7-linux-x86_64.egg/mmcv/runner/runner.py", line 278, in train for i, data_batch in enumerate(data_loader): File "/home/pirl/anaconda3/envs/segmen/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 345, in next data = self._next_data() File "/home/pirl/anaconda3/envs/segmen/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 856, in _next_data return self._process_data(data) File "/home/pirl/anaconda3/envs/segmen/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 881, in _process_data data.reraise() File "/home/pirl/anaconda3/envs/segmen/lib/python3.7/site-packages/torch/_utils.py", line 395, in reraise raise self.exc_type(msg) FileNotFoundError: Caught FileNotFoundError in DataLoader worker process 0. Original Traceback (most recent call last): File "/home/pirl/anaconda3/envs/segmen/lib/python3.7/site-packages/torch/utils/data/_utils/worker.py", line 178, in _worker_loop data = fetcher.fetch(index) File "/home/pirl/anaconda3/envs/segmen/lib/python3.7/site-packages/torch/utils/data/_utils/fetch.py", line 44, in fetch data = [self.dataset[idx] for idx in possibly_batched_index] File "/home/pirl/anaconda3/envs/segmen/lib/python3.7/site-packages/torch/utils/data/_utils/fetch.py", line 44, in data = [self.dataset[idx] for idx in possibly_batched_index] File "/home/pirl/mmdetection/mmdet/datasets/custom.py", line 140, in getitem data = self.prepare_train_img(idx) File "/home/pirl/mmdetection/mmdet/datasets/custom.py", line 153, in prepare_train_img return self.pipeline(results) File "/home/pirl/mmdetection/mmdet/datasets/pipelines/compose.py", line 25, in call data = t(data) File "/home/pirl/mmdetection/mmdet/datasets/pipelines/loading.py", line 24, in call img = mmcv.imread(filename, self.color_type) File "/home/pirl/anaconda3/envs/segmen/lib/python3.7/site-packages/mmcv-0.5.1-py3.7-linux-x86_64.egg/mmcv/image/io.py", line 85, in imread f'img file does not exist: {img_or_path}') File "/home/pirl/anaconda3/envs/segmen/lib/python3.7/site-packages/mmcv-0.5.1-py3.7-linux-x86_64.egg/mmcv/utils/path.py", line 25, in check_file_exist raise FileNotFoundError(msg_tmpl.format(filename)) FileNotFoundError: img file does not exist: data/custom/coil/train/JPEGImages\Cam12 04.jpg

Bug fix If you have already identified the reason, you can provide the information here. If you are willing to create a PR to fix it, please also leave a comment here and that would be much appreciated!

yhcao6 commented 3 years ago

Just as the error suggests the img file does not exist, you can check it by running bash command ls data/custom/coil/train/JPEGImages\Cam12 04.jpg