-
Notifications
You must be signed in to change notification settings - Fork 252
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
HerdNet requires input images of 512x512 at minimum #553
Comments
Hello @calebrob6, Thank you for reporting this issue. You are correct that HerdNet requires a minimum image size of 512x512 due to the default parameters of the stitcher, and inputting an image with smaller dimensions causes a runtime error. To resolve this, I have implemented a ResizeIfSmaller class that resizes an image to the minimum required size if it is smaller. This ensures compatibility with the default stitcher parameters without manual resizing. Here's the code for the class:
You can use this class to preprocess your images before feeding them into HerdNet. This should prevent the error you were experiencing. To incorporate this fix into your workflow, please pull the latest changes from the repository. I am going to close this issue now, but please feel free to reopen it if the problem persists or if you have any more questions. Best regards, |
Search before asking
Bug
Following https://github.com/microsoft/CameraTraps/blob/main/demo/image_detection_demo_herdnet.ipynb with a path to an image that is 256x256 results in the following error:
Resizing the image to 512x512 makes this error go away. It seems to be caused by the default parameters of the stitcher.
Environment
No response
Minimal Reproducible Example
No response
Additional
No response
Are you willing to submit a PR?
The text was updated successfully, but these errors were encountered: