Repository navigation
Conversation
Author
|
@microsoft-github-policy-service agree |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Following up on #28 and the discussion with Zhongqi on Discord, this adds a first set of tests and a workflow that runs them on pull requests and on pushes to
main.What's included
tests/: 33 unit tests that run in a few seconds and don't download any model weights (they also pass offline). They use small generated images and hand-built detection results:MegaDetectorV6: an unknownversionraises a clear error, the default version is valid, class namesutils.post_process: detection JSON (contents, excluded categories, relative paths), Timelapse JSON ([x, y, width, height]boxes, categories,max_detection_conf), sorting intoAnimal/andNo_animal/(including the threshold), crops (names and sizes), annotated images, and keeping camera subfolders withinput_dirdata: image file extensions,letterbox(size, aspect ratio, padding) and the transforms.github/workflows/tests.yml: runs the tests on Python 3.10 and 3.12, with the actions pinned to the same commit SHAs aspublish.yml.Note on dependencies
The workflow installs
soundfile,librosaandsetuptools<82explicitly, becauseimport PytorchWildlifefails without them (#26). I leftpyproject.tomlunchanged so that fix can be handled in #26; once it's merged, these can be removed from the workflow.Running locally