Skip to content

Commit

Permalink
Merge pull request #221 from oarriaga/refactor_hand_estimation
Browse files Browse the repository at this point in the history
Refactor hand estimation
  • Loading branch information
oarriaga authored Sep 7, 2022
2 parents 34ba528 + 1815585 commit 2ddf824
Show file tree
Hide file tree
Showing 36 changed files with 139 additions and 3,091 deletions.
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

0 comments on commit 2ddf824

Please sign in to comment.