Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

._.DS_Store Image Not Found in gtf.Train(num_epochs=3) YOLO #60

Closed
VedantKhairnar opened this issue Aug 23, 2020 · 2 comments
Closed

._.DS_Store Image Not Found in gtf.Train(num_epochs=3) YOLO #60

VedantKhairnar opened this issue Aug 23, 2020 · 2 comments
Labels
help wanted Extra attention is needed solution added Solution added to the raised issue

Comments

@VedantKhairnar
Copy link

Getting the following Assertion Error while training model for Object Detection in YOLO Format
To reach the colab file, click here

Executing Line : gtf.Train(num_epochs=3)

Using CUDA Apex device0 _CudaDeviceProperties(name='Tesla K80', total_memory=11441MB)

Using multi-scale 288 - 640
Caching labels (3135 found, 0 missing, 935 empty, 0 duplicate, for 4071 images): 100%|██████████| 4070/4070 [00:00<00:00, 5703.77it/s]
Caching labels (3135 found, 0 missing, 935 empty, 0 duplicate, for 4071 images): 100%|██████████| 4070/4070 [00:00<00:00, 6226.00it/s]Model Summary: 222 layers, 6.15291e+07 parameters, 6.15291e+07 gradients
Using 2 dataloader workers
Starting training for 3 epochs...

     Epoch   gpu_mem      GIoU       obj       cls     total   targets  img_size

  0%|          | 0/2035 [00:00<?, ?it/s]/usr/local/lib/python3.6/dist-packages/torch/cuda/memory.py:346: FutureWarning: torch.cuda.memory_cached has been renamed to torch.cuda.memory_reserved
  FutureWarning)
       0/2     1.97G      6.18      3.94       132       142         9       512:   6%|▌         | 115/2035 [01:21<24:56,  1.28it/s]
---------------------------------------------------------------------------
AssertionError                            Traceback (most recent call last)
<ipython-input-38-54da62eea228> in <module>()
----> 1 gtf.Train(num_epochs=3)

6 frames
/usr/local/lib/python3.6/dist-packages/torch/_utils.py in reraise(self)
    393             # (https://bugs.python.org/issue2651), so we work around it.
    394             msg = KeyErrorMessage(msg)
--> 395         raise self.exc_type(msg)

AssertionError: Caught AssertionError in DataLoader worker process 1.
Original Traceback (most recent call last):
  File "/usr/local/lib/python3.6/dist-packages/torch/utils/data/_utils/worker.py", line 185, in _worker_loop
    data = fetcher.fetch(index)
  File "/usr/local/lib/python3.6/dist-packages/torch/utils/data/_utils/fetch.py", line 44, in fetch
    data = [self.dataset[idx] for idx in possibly_batched_index]
  File "/usr/local/lib/python3.6/dist-packages/torch/utils/data/_utils/fetch.py", line 44, in <listcomp>
    data = [self.dataset[idx] for idx in possibly_batched_index]
  File "/content/Monk_Object_Detection/7_yolov3/lib/utils/datasets.py", line 435, in __getitem__
    img, labels = load_mosaic(self, index)
  File "/content/Monk_Object_Detection/7_yolov3/lib/utils/datasets.py", line 554, in load_mosaic
    img, _, (h, w) = load_image(self, index)
  File "/content/Monk_Object_Detection/7_yolov3/lib/utils/datasets.py", line 527, in load_image
    assert img is not None, 'Image Not Found ' + img_path
AssertionError: Image Not Found /content/hand_dataset/training_dataset/training_data/images/._.DS_Store

@abhi-kumar
Copy link
Contributor

remove .DS_Store files from any directory if any.... They are created while porting folders/zipped files from mac to linux system. image folders should contain only images, label folders should contain only annotation files

@VedantKhairnar
Copy link
Author

Total 2 such files were generated- ._.DS_Store and .DS_Store. Removing them solved the issue.
One can check for other files using

ls -a

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed solution added Solution added to the raised issue
Projects
None yet
Development

No branches or pull requests

2 participants