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

idx issue #11

Open
mmuneeburahman opened this issue Feb 4, 2023 · 2 comments
Open

idx issue #11

mmuneeburahman opened this issue Feb 4, 2023 · 2 comments

Comments

@mmuneeburahman
Copy link

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????

@alph-a07
Copy link

were you able to train the model successfully?

@RishabhBajaj25
Copy link

You have to run utils/generate_idx.py to generate the .csv file for your training set.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants