-
Notifications
You must be signed in to change notification settings - Fork 98
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
IndexError: index 1 is out of bounds for dimension 0 with size 1 #2
Comments
It looks like you're trying to train a new dataset using the pretrained weights (and the classes less than both COCO and Objects365). Currently, the code logic maps the Objects365 classes to COCO during finetuning if the categories are different. If you want to map to your own custom classes, you can customize the self.obj365_ids. Also, I’ve just updated the code in src/solver/_solver.py. Now, the mismatched class heads will be automatically skipped. You can choose the appropriate solution based on your situation. |
It seems that this issue is related to the PIL library rather than the model itself. During training, the model randomly resizes all images to a range of 400x400 to 800x800 to improve generalization. However, during inference, as long as there is enough GPU memory, there are no specific size restrictions. The problem arises from PIL's limitations on image sizes, and is clearly written in the Error Log. I recommend checking the script located at tools/dataset/resize_obj365.py for preprocessing large images. This script can help you resize the images before training to avoid the decompression bomb error. |
Yes. This issue is related to PIL. So I added |
You're welcome. Have a nice day~ |
Optional Custom Finetune Tutorial is added: eed6df6 |
Thank you for your efforts,
This issue occur when I train model with custom dataset. I did follow your guild
The text was updated successfully, but these errors were encountered: