Skip to content
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

predict() support for pose estimation models #1142

Merged
merged 23 commits into from
Jun 11, 2023
Merged
Changes from 1 commit
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
a0a3330
Adding predict
BloodAxe Jun 6, 2023
62c38b8
Predict
BloodAxe Jun 6, 2023
90c0566
Predict
BloodAxe Jun 6, 2023
447e7f5
Adding predict
BloodAxe Jun 6, 2023
e9cbb12
Adding predict
BloodAxe Jun 7, 2023
117bb78
Adding joint information to dataset configs
BloodAxe Jun 7, 2023
38f9066
Merge branch 'master' into feature/SG-910-predict-for-pose
BloodAxe Jun 7, 2023
3971a88
Added makefile target recipe_accuracy_tests
BloodAxe Jun 7, 2023
10b2dd8
Remove temp files
BloodAxe Jun 7, 2023
3bfe555
Rename variables for better clarity
BloodAxe Jun 7, 2023
16c29cc
Move predict() related files to super_gradients.training.utils.predict
BloodAxe Jun 7, 2023
c319886
Move predict() related files to super_gradients.training.utils.predict
BloodAxe Jun 7, 2023
fb9f7d9
Rename file poses.py -> pose_estimation.py
BloodAxe Jun 7, 2023
e27d373
Rename joint_colors/joint_links -> edge_colors/edge_links
BloodAxe Jun 7, 2023
c181f46
Disable showing bounding box by default
BloodAxe Jun 7, 2023
6d914b5
Allow passing edge & keypoints as None, in this case colors will be g…
BloodAxe Jun 8, 2023
d2f8494
Update docstrings
BloodAxe Jun 8, 2023
670c1c2
Fix test
BloodAxe Jun 8, 2023
3fedce2
Merge branch 'master' into feature/SG-910-predict-for-pose
BloodAxe Jun 8, 2023
d40b48a
Added unit tests to verify settings preprocesisng params from dataset…
BloodAxe Jun 9, 2023
4a6293f
Merge remote-tracking branch 'origin/feature/SG-910-predict-for-pose'…
BloodAxe Jun 9, 2023
02d1931
_pad_image cannot work with pad_value that is tuple (r,g,b).
BloodAxe Jun 9, 2023
19f1061
Fix pad_value in keypoints transforms to accept single scalar value t…
BloodAxe Jun 11, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
_pad_image cannot work with pad_value that is tuple (r,g,b).
So we change the keypoint transforms defaults in config to use single scalar value
BloodAxe committed Jun 9, 2023

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit 02d19310f99235496c30a1b126f8a87f548e8b84
6 changes: 0 additions & 6 deletions src/super_gradients/training/transforms/utils.py
Original file line number Diff line number Diff line change
@@ -101,12 +101,6 @@ def _pad_image(image: np.ndarray, padding_coordinates: PaddingCoordinates, pad_v
pad_h = (padding_coordinates.top, padding_coordinates.bottom)
pad_w = (padding_coordinates.left, padding_coordinates.right)

# If computed padding are zero, we do early quit, since np.pad fails to do no-op with somewhat cryptic message
# ValueError: operands could not be broadcast together with
# remapped shapes [original->remapped]: (3,) and requested shape (3,2)
if pad_h == (0, 0) and pad_w == (0, 0):
return image

if len(image.shape) == 3:
return np.pad(image, (pad_h, pad_w, (0, 0)), "constant", constant_values=pad_value)
else: