-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Implement missing arguments for PyTorch models #2816
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
Merged
Merged
Conversation
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
maximpavliv
suggested changes
Dec 18, 2024
deeplabcut/pose_estimation_pytorch/apis/convert_detections_to_tracklets.py
Outdated
Show resolved
Hide resolved
Co-authored-by: maximpavliv <[email protected]>
Co-authored-by: maximpavliv <[email protected]>
Co-authored-by: maximpavliv <[email protected]>
Co-authored-by: maximpavliv <[email protected]>
Co-authored-by: maximpavliv <[email protected]>
maximpavliv
approved these changes
Dec 19, 2024
Contributor
maximpavliv
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
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.
This pull request implements features for API methods that were not yet available for PyTorch models.
deeplabcut.analyze_imagesThe
analyze_time_lapse_framesmethod is added to the PyTorch API, such that it can be called with PyTorch models in the same way as it was for TensorFlow models. Below the hood, it calls theanalyze_imagesmethod.The
analyze_images(which can only be called for PyTorch models -analyze_time_lapse_framesshould still be used for TensorFlow models) is added to thecompat.pyso that it can be called as:New features are also added to the
analyze_imagesmethod as well:plottingparameter. Predictions are plot in the same format as when called withevaluate_network, the only difference being there is no ground truth to plot. The plotting parameters are taken from the project configuration file, andpcutoff,bbox_pcutoffandplot_skeletonallow to dynamically edit some of the parameters controlling plotting.DataFrame, as with other outputs in DeepLabCut. The predictions can also be saved inCSVfiles with thesave_as_csvparameter.deeplabcut.analyze_videosThe
in_random_orderandn_tracksparameters are implemented for video analysis with PyTorch models.Dynamic cropping (through the
dynamicargument) is now available foranalyze_videoswith PyTorch models. This function is implemented through aDynamicCroppercropper class, which is fully tested.The
greedy,calibrateandwindow_sizearguments still need to be implemented. They are only valid for PAF-models, and require that more information is added to the_full.picklefile when running video analysis. This will be done in a subsequent pull request.deeplabcut.train_networkThe
keepdeconvweightsargument is implemented, which allows to continue. Two additional arguments are added to the method:epochsandsave_epochs. These arguments could already be passed, but making them explicit makes it clearer for users how they can be used.