Add Functions for Visualizing COCO Predictions and Ground Truth#2792
Merged
n-poulsen merged 20 commits intoDeepLabCut:pytorch_dlcfrom Dec 2, 2024
Merged
Add Functions for Visualizing COCO Predictions and Ground Truth#2792n-poulsen merged 20 commits intoDeepLabCut:pytorch_dlcfrom
n-poulsen merged 20 commits intoDeepLabCut:pytorch_dlcfrom
Conversation
…e redunant snapshots at the end
Co-authored-by: n-poulsen <45132115+n-poulsen@users.noreply.github.com>
n-poulsen
suggested changes
Nov 22, 2024
b2077ee to
1fdd31e
Compare
This reverts commit f670407.
n-poulsen
suggested changes
Dec 2, 2024
Contributor
n-poulsen
left a comment
There was a problem hiding this comment.
A few last tweaks, but otherwise this looks good to me!
Co-authored-by: n-poulsen <45132115+n-poulsen@users.noreply.github.com>
Co-authored-by: n-poulsen <45132115+n-poulsen@users.noreply.github.com>
Co-authored-by: n-poulsen <45132115+n-poulsen@users.noreply.github.com>
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.
Add Functions for Visualizing COCO Predictions and Ground Truth
Summary
This PR introduces two new functions to simplify the visualization of COCO-format predictions and their comparison with ground truth (GT) annotations.
Changes
visualize_coco_predictions:predictions: An object in the same format as returned by evaluate(*).test_file_json: Path to the COCO-format test set JSON file with GT annotations.num_samples: Number of samples to visualize.output_dir: Directory to save visualization outputs.draw_skeleton: Option to draw skeleton connections between keypoints.plot_gt_and_predictionsfunction for visualization.plot_gt_and_predictions:image_path: Path to the imagegt_bodyparts,pred_bodyparts: Keypoint arrays for ground truth and predictions.output_dir: Directory to save the labeled images.dot_size,colormap, and confidence thresholds.bodypartorindividualcoloring).Motivation
Testing
Acknowledgments
Special thanks to @n-poulsen for his valuable guidance and support!