Skip to content

Making detector.py robust to other yolov5 versions#51

Merged
agentmorris merged 1 commit intomainfrom
yolov5-import-fix
Nov 25, 2025
Merged

Making detector.py robust to other yolov5 versions#51
agentmorris merged 1 commit intomainfrom
yolov5-import-fix

Conversation

@agentmorris
Copy link
Collaborator

@agentmorris agentmorris commented Nov 24, 2025

This PR is a no-op when using a typical speciesnet environment. But if someone does this:

pip install speciesnet
pip install megadetector

...slightly conflicting versions of yolov5 get installed, and prior to this PR, this caused errors in speciesnet's detector.py. This PR makes speciesnet robust to those differences.

For posterity, the reason we never noticed this before is that this issue does not come up when the packages are installed in the opposite order:

pip install megadetector
pip install speciesnet

@agentmorris agentmorris merged commit 7ab64e4 into main Nov 25, 2025
18 checks passed
@agentmorris agentmorris deleted the yolov5-import-fix branch November 25, 2025 00:42
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

Successfully merging this pull request may close these issues.

1 participant