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

TypeError: object of type 'AspectRatioGroupedDataset' has no len() #42

Open
wz1421 opened this issue Dec 9, 2024 · 3 comments
Open

Comments

@wz1421
Copy link

wz1421 commented Dec 9, 2024

Dear Authors:

Hi, thank you so much for your work and making it open source. It is amazing.

I have encountered an issue in the XdecoderPipeline.py when trying to finetune the model, I had this TypeError: object of type 'AspectRatioGroupedDataset' has no len(), I was wondering if anyone has encountered this and how I could solve it. Thank you! (I am running it on a mac)

Image

@theodore-zhao
Copy link
Contributor

Hi,

I remember seeing this error once and it was resolved by using the right environment and config setup. A few things to check:

  1. Make sure the environment is correctly setup.
  2. Check the dataset registration and make sure they are included in the config file. You can debug by running the raw code (there is a demo dataset already registered so you can directly run the code for validation.

Let me know if these help you solve the problem, and happy to answer any further questions.

@wz1421
Copy link
Author

wz1421 commented Dec 10, 2024

Hi,

I remember seeing this error once and it was resolved by using the right environment and config setup. A few things to check:

  1. Make sure the environment is correctly setup.
  2. Check the dataset registration and make sure they are included in the config file. You can debug by running the raw code (there is a demo dataset already registered so you can directly run the code for validation.

Let me know if these help you solve the problem, and happy to answer any further questions.

Hi! Thank you so much for your prompt reply, and the issue has been resolved. I reinstalled and installed Detectron2, then ran the code again with the demo datasets. However, the process terminated, and I suspect it might be due to my MacBook not having enough memory. Do you know what the minimum requirements are for the memory in terms of fine-tuning the model? I want to ensure that my system is capable of handling it. Thank you!

@theodore-zhao
Copy link
Contributor

Glad the issue was resolved! The minimum requirement to run the model was V100 in our experiments. If there is CUDA out of memory issue, you can reduce the batch size for training in train.sh (the default value was 4).

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