Skip to content

idx issue #11

@mmuneeburahman

Description

@mmuneeburahman

After starting the docker container, when I run a command to train a model. It gives this error

Traceback (most recent call last):
  File "main.py", line 10, in <module>
    from data_loading.data_module import DataModule
  File "/workspace/xview2/data_loading/data_module.py", line 5, in <module>
    from data_loading.pytorch_loader import fetch_pytorch_loader
  File "/workspace/xview2/data_loading/pytorch_loader.py", line 5, in <module>
    import albumentations as A
  File "/opt/conda/lib/python3.8/site-packages/albumentations/__init__.py", line 5, in <module>
    from .core.composition import *
  File "/opt/conda/lib/python3.8/site-packages/albumentations/core/composition.py", line 8, in <module>
    from albumentations.augmentations.keypoints_utils import KeypointsProcessor
  File "/opt/conda/lib/python3.8/site-packages/albumentations/augmentations/__init__.py", line 4, in <module>
    from .functional import *
  File "/opt/conda/lib/python3.8/site-packages/albumentations/augmentations/functional.py", line 7, in <module>
    import cv2
  File "/opt/conda/lib/python3.8/site-packages/cv2/__init__.py", line 5, in <module>
    from .cv2 import *

I resolved this issue with the command

apt-get install libgl1

But then I am getting an index error, After printing the idx, in the TrainPreDataset.getitem function, this is the output.

Epoch 0:   0%|                                                                                 | 0/652 [00:00<?, ?it/s]
------>idx:  7880
------>idx:  3611
------>idx:  2916
------>idx:  6289
------>idx:  8301
------>idx:  4774
------>idx:  2625
------>idx:  7334
------>idx:  7379
------>idx:  8538
------>idx:  5376
------>idx:  1684
------>idx:  4964
------>idx:  1204
------>idx:  4311
------>idx:  452
Traceback (most recent call last):
  File "main.py", line 114, in <module>
------>idx:  557
    trainer.fit(model, data_module)

These idx are read from the utils/index.csv which contains 8566 entries, but the total images in my data are 8130. I don't how this csv file is used. ANY SOLUTION????

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions