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

Exception if image size is not 640x640 #70

Open
sstainba opened this issue Jul 31, 2022 · 2 comments
Open

Exception if image size is not 640x640 #70

sstainba opened this issue Jul 31, 2022 · 2 comments

Comments

@sstainba
Copy link

Inherited from the YoloModel base class per instructions, but images are 1280x1024. Set this as the value for the height/width on the new class but this causes an exception to be thrown when attempting to predict the objects.

@Red007Master
Copy link

Inherited from the YoloModel base class per instructions, but images are 1280x1024. Set this as the value for the height/width on the new class but this causes an exception to be thrown when attempting to predict the objects.

"640x640" don't for input images but it's size that you trained your model for:
!python train.py --img 640 --batch 16 --epochs 3000 --data data.yaml --cfg ./models/customModel.yaml --weights '' --cache

"--img 640"=you need 640x640 (this is size that your model is trained and your input images will be resized to that size)

@sstainba
Copy link
Author

The model was trained with 1280x1024. The problem was the model export, actually. I didn't realize the export script needed the same size arguments to set the correct input size. I re-exported the model and it worked fine after that.

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