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

Refactor hand estimation #221

Merged
merged 18 commits into from
Sep 7, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ PAZ is used in the following examples (links to **real-time demos** and training
|---------------------------|--------------------------| -----------------------|
|<img src="https://raw.githubusercontent.com/oarriaga/altamira-data/master/images/emotion.gif" width="250">| <img src="https://raw.githubusercontent.com/oarriaga/altamira-data/master/images/keypoints.png" width="410">| <img src="https://raw.githubusercontent.com/oarriaga/altamira-data/master/images/mask.png" width="400">|

|[Semantic segmentation](https://github.com/oarriaga/paz/tree/master/examples/semantic_segmentation) | [Hand pose estimation](https://github.com/oarriaga/paz/tree/master/examples/minimal_hand) | [Human pose estimation](https://github.com/oarriaga/paz/tree/master/examples/human_pose_estimation_2D) |
|[Semantic segmentation](https://github.com/oarriaga/paz/tree/master/examples/semantic_segmentation) | [Hand pose estimation](https://github.com/oarriaga/paz/tree/master/examples/hand_pose_estimation) | [Human pose estimation](https://github.com/oarriaga/paz/tree/master/examples/human_pose_estimation_2D) |
|---------------------------|-----------------------|-----------------|
| <img src="https://raw.githubusercontent.com/oarriaga/altamira-data/master/images/semantic_segmentation.png" width="325">| <img src="https://raw.githubusercontent.com/oarriaga/altamira-data/master/images/minimal_hand_example.jpg" width="330"> |<img src="https://raw.githubusercontent.com/oarriaga/altamira-data/master/images/human_pose.gif" width="250"> |

| [3D keypoint discovery](https://github.com/oarriaga/paz/tree/master/examples/discovery_of_latent_keypoints) | [Hand closure detection](https://github.com/oarriaga/paz/tree/master/examples/minimal_hand) | [6D pose estimation](https://github.com/oarriaga/paz/tree/master/examples/pix2pose) |
| [3D keypoint discovery](https://github.com/oarriaga/paz/tree/master/examples/discovery_of_latent_keypoints) | [Hand closure detection](https://github.com/oarriaga/paz/tree/master/examples/hand_pose_estimation) | [6D pose estimation](https://github.com/oarriaga/paz/tree/master/examples/pix2pose) |
|---------------------------|-----------------------| --------------------------|
|<img src="https://raw.githubusercontent.com/oarriaga/altamira-data/master/images/discovery_keypoints.png" width="335"> | <img src="https://raw.githubusercontent.com/oarriaga/altamira-data/master/images/hand_closure_detection.gif" width="250">| <img src="https://raw.githubusercontent.com/oarriaga/altamira-data/master/images/pix2pose_example.jpg" width="330"> |

Expand Down
6 changes: 4 additions & 2 deletions docs/structure.py
Original file line number Diff line number Diff line change
Expand Up @@ -504,7 +504,8 @@
'page': 'processors/pose.md',
'classes': [
processors.SolvePNP,
processors.SolveChangingObjectPnPRANSAC
processors.SolveChangingObjectPnPRANSAC,
processors.Translation3DFromBoxWidth
]
},

Expand Down Expand Up @@ -551,7 +552,8 @@
processors.UnwrapDictionary,
processors.Scale,
processors.AppendValues,
processors.BooleanToTextMessage
processors.BooleanToTextMessage,
processors.PrintTopics
]
},

Expand Down
2 changes: 1 addition & 1 deletion examples/hand_detection/pose_demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
help='Camera device ID')
args = parser.parse_args()

pipeline = SSD512MinimalHandPose(right_hand=False, offsets=[0.25, 0.25])
pipeline = SSD512MinimalHandPose(right_hand=False, offsets=[0.5, 0.5])
camera = Camera(args.camera_id)
player = VideoPlayer((640, 480), pipeline, camera)
player.run()
312 changes: 0 additions & 312 deletions examples/hand_pose_estimation/HandPoseEstimation.py

This file was deleted.

25 changes: 25 additions & 0 deletions examples/hand_pose_estimation/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
### This example detects hand pose from an image.

To test the live hand pose estimation from camera, run:
```py
python demo.py
```

To test the hand pose estimation on image, run:
```py
python demo_image.py
```

To test the live hand closure status with the pose estimation from camera, run:
```py
python is_open_demo.py
```

To test the live hand pose estimation from camera and visualize keypoints in 3D, run (This module has an extra dependency of matplotlib):
```py
python demo3D.py
```

### Additional notes
To test a more robust hand pose estimation and open / close classification try out the "paz/examples/hand_detection/pose_demo.py"

Loading