-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Add feature to evaluate network for specfic, named snapshots. #2508
Open
Tetra-quark
wants to merge
28
commits into
DeepLabCut:main
Choose a base branch
from
Tetra-quark:evaluate_by_snapshot
base: main
Could not load branches
Branch not found: {{ refName }}
Could not load tags
Nothing to show
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains 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
…isting functionality. - Replace snapindex with more explicit snapshot_name. snapshotindex from config is used to identify the snapshot name instead. - Refactor logic for snapshotindex allowed values. Add limit to negative index values.
- Replace snapshots_to_evaluate numpy indexing with list loop - Raise error if no snapshots are found
# Conflicts: # deeplabcut/pose_estimation_tensorflow/core/evaluate.py
* Improve snapshots_to_evaluate docstring * Get training_iterations from snapshot_name * Rename trainingsiterations -> training_iterations
* Create get_available_requested_snapshots for obtaining specified snapshot names (new feature). * Create get_snapshots_by_index to handle the original implementation. * Minor improvements and fixes
* Add snapshots_to_evaluate parameter to multi-animal evaluation * Minor renaming
* add evaluate_by_snapshot branch for testing purposes
* Better typehint for int or str * Raise IndexError instead of ValueError
* Add list_sorted_existing_snapshots to auxiliaryfunctions.py. * Update several files to use the newly refactored function. * Preserve same exception handling, albeit with modified message to be more general and concise.
* Add new snapshot auxiliary function usage. * Preserve continuation of loop if no snapshots are found.
* Update name for all usages * Minor change to function docstring * Remove redundant sorting in evaluate_multianimal.py
* Test snapshots present and returned in order * Test snapshots not found
Tetra-quark
changed the title
Evaluate Network for specfic, named snapshots. Closes DeepLabCut/DeepLabCut#2356
Evaluate network for specfic, named snapshots.
Feb 6, 2024
Tetra-quark
changed the title
Evaluate network for specfic, named snapshots.
Add feature to evaluate network for specfic, named snapshots.
Feb 6, 2024
@n-poulsen and @jeylau let's prioritize this -- I think it's a great addition, and can be worked into DLC3.0 |
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.
Adds a feature to pass a list of snapshot names
snapshots_to_evaluate
to theevaluate_network
function as an alternative to using thesnapshotindex
parameter in the mainconfig.yaml
file.The new parameter allows multiple, explicitly named snapshots to be evaluated where previously only a single snapshot or
"all"
could be chosen.This pull request closes #2356.
Overview of changes:
snapshots_to_evaluate
parameter to both single and multi-animal evaluation.get_available_requested_snapshots
to handle thesnapshots_to_evaluate
parameter.get_snapshots_by_index
to refactor existingsnapshotindex
from config file functionality.get_snapshots_from_folder
to refactor getting an ordered list of snapshots from the train folder.testscript.py
to usesnapshots_to_evaluate
inevaluate_network
(however in doing so I have disabled thesnapshotindex
method, both should be in the test ideally).Example usage: