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

It seems to be a bug in both branch master and hagridv2-1m #83

Closed
NOTGOOOOD opened this issue Feb 7, 2025 · 2 comments
Closed

It seems to be a bug in both branch master and hagridv2-1m #83

NOTGOOOOD opened this issue Feb 7, 2025 · 2 comments

Comments

@NOTGOOOOD
Copy link

When I train the code with following command, the program reports an error.

python run.py -c train -p configs/SSDLiteMobileNetV3Large.yaml

I found that the error occurs in the dataset.py

Traceback (most recent call last):
  File "/home/project/Hagrid/run.py", line 88, in <module>
    run(args)
  File "/home/project/Hagrid/run.py", line 54, in run
    train_dataloader, val_dataloader, test_dataloader, model = load_train_objects(config, args.command, args.n_gpu)
  File "/home/project/Hagrid/custom_utils/train_utils.py", line 89, in load_train_objects
    train_dataset[0]
  File "/home/project/Hagrid/dataset/dataset.py", line 175, in __getitem__
    for i in range(len(row["united_bbox"])):
TypeError: object of type 'NoneType' has no len()

It seems to be a bug in both branch master and hagridv2-1m.
Because the united_bbox row in .json file usually is None.

The code works well with the following adjustments. But I'm not sure if this will train correctly, because I'm not sure what the united_bbox does

Image

@AntonNuzhdin
Copy link
Collaborator

Hello! Thank you for your interest in HaGRID.

I have reviewed the training process for SSDLiteMobileNetV3Large and did not encounter the errors you mentioned. Could you please verify that you have downloaded the correct version of the annotation files (from the master branch)?

@NOTGOOOOD
Copy link
Author

Hello! Thank you for your interest in HaGRID.

I have reviewed the training process for SSDLiteMobileNetV3Large and did not encounter the errors you mentioned. Could you please verify that you have downloaded the correct version of the annotation files (from the master branch)?

Hello! Thank you for your replay.

Yes, I'm sure the annotation file is downloaded from the master branch. And I tried it agin, it does have some gestures with NULL united_bbox.

Image

Finally, I'm guessing this could be a problem caused by a different python version. My conda environment with Python 3.8, which is lower than master branch. It is possible that higher versions of Python will make additional judgments about len(null)

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

2 participants