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

Add RGB gesture recognition #436

Merged
merged 41 commits into from
Jun 29, 2023
Merged

Add RGB gesture recognition #436

merged 41 commits into from
Jun 29, 2023

Conversation

katerynaCh
Copy link
Collaborator

@katerynaCh katerynaCh commented May 16, 2023

This PR implements RGB-based hands gesture recognition (detection) based on hagrid dataset for 18 hand gestures.

We currently provide one pretrained model. ROS1/ROS2 nodes are included, as well as a webcam demo.

Algorithmically it relies on existing implementation of nanodet (I thought it is better from application perspective to create a dedicated learner for gesture recognition, but please let me know if you think otherwise and I change it, and just provide necessary model/dataset processing/configs as part of nanodet learner).

@katerynaCh katerynaCh changed the title ---- Add RGB gesture recognition May 16, 2023
@katerynaCh katerynaCh added test sources Run style checks test tools Test the toolkit methods and removed test sources Run style checks test tools Test the toolkit methods labels May 17, 2023
@katerynaCh katerynaCh added the test sources Run style checks label May 18, 2023
@katerynaCh katerynaCh added the test tools Test the toolkit methods label May 18, 2023
@katerynaCh katerynaCh marked this pull request as ready for review May 28, 2023 16:51
katerynaCh and others added 6 commits June 8, 2023 18:30
Co-authored-by: Stefania Pedrazzi <stefaniapedrazzi@users.noreply.github.com>
Co-authored-by: Stefania Pedrazzi <stefaniapedrazzi@users.noreply.github.com>
…e_recognition.py

Co-authored-by: Stefania Pedrazzi <stefaniapedrazzi@users.noreply.github.com>
…nition_node.py

Co-authored-by: Stefania Pedrazzi <stefaniapedrazzi@users.noreply.github.com>
@katerynaCh
Copy link
Collaborator Author

I didn't had time to test the examples yet, but here are some initial comments. I'm also trying to fix the test suite on the master/develop branches so that we could then run the tests in this branch.

Thank you! I have incorporated the changes.

Copy link
Collaborator

@stefaniapedrazzi stefaniapedrazzi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@tsampazk tsampazk self-requested a review June 22, 2023 09:50
@tsampazk
Copy link
Collaborator

Hey @katerynaCh, thank you for the new tool. I will do a thorough review soon. Taking a quick look, i noticed that doc entries for the ROS1/2 nodes seem to be missing. In the meantime, could you please add entries in the index lists here (ros1) and here (ros2) that link to corresponding sections here and here?

Let me know if you have any issues i can assist with!

Copy link
Collaborator

@tsampazk tsampazk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @katerynaCh! I went ahead and applied various minor fixes that i will list below.

  1. Tool webcam demo works really well, just fixed the max-hands argument type that was passed as a str and threw an error when trying to change it via command line
  2. Added some checks in the learner download method so the model doesn't get redownloaded if it already exists
  3. Renamed the demo to webcam_demo to match most common naming in other tools
  4. ROS1 node worked out of the box, just renamed the topics to match naming in other nodes (modified the doc appropriately too)
  5. ROS2 node had an issue in the bridge conversion and threw an error which i fixed with a try/except because i am almost certain that if i straight up applied the float conversion, other ROS nodes will break, so that takes care of it.
  6. Similar to ROS1 i modified the topic names to match other nodes (in the doc too) and changed the run command to the correct one (also noticed that some other tools had the same issue in the run command and fixed it).

All-in-all everything else looks good to me, thanks!

Copy link
Collaborator

@stefaniapedrazzi stefaniapedrazzi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@katerynaCh
Copy link
Collaborator Author

Thank you @tsampazk @stefaniapedrazzi !

@katerynaCh katerynaCh merged commit ff74f27 into develop Jun 29, 2023
@katerynaCh katerynaCh deleted the gesture branch June 29, 2023 12:07
lucamarchionni pushed a commit to lucamarchionni/opendr that referenced this pull request Jun 10, 2024
* init commit

* uncomment debug

* demo fixes

* demo fixes

* ros2 node

* learner update

* added test

* added docs and dependencies

* update demo readme

* added readme

* minor learner fix

* linter fixes

* linter fixes

* linter fixes

* license fix

* demo fix

* docs fix

* Add test to tests_suite.yml

* Add test to tests_suite_develop.yml

* Add test to test_packages.yml

* Update docs/reference/gesture-recognition-learner.md

Co-authored-by: Stefania Pedrazzi <stefaniapedrazzi@users.noreply.github.com>

* Update docs/reference/gesture-recognition-learner.md

Co-authored-by: Stefania Pedrazzi <stefaniapedrazzi@users.noreply.github.com>

* Update docs/reference/index.md

Co-authored-by: Stefania Pedrazzi <stefaniapedrazzi@users.noreply.github.com>

* Update projects/python/perception/gesture_recognition/README.md

Co-authored-by: Stefania Pedrazzi <stefaniapedrazzi@users.noreply.github.com>

* Update tests/sources/tools/perception/gesture_recognition/test_gesture_recognition.py

Co-authored-by: Stefania Pedrazzi <stefaniapedrazzi@users.noreply.github.com>

* Update projects/opendr_ws/src/opendr_perception/scripts/gesture_recognition_node.py

Co-authored-by: Stefania Pedrazzi <stefaniapedrazzi@users.noreply.github.com>

* added performance profiling to ROS1 node

* style fix

* Fixed argument type

* Already exists check before re-downloading

* Renamed demo to webcam_demo

* Renamed demo to webcam_demo in readme

* added ROS/ROS2 node documentation and changed output topic names

* ROS2 README fix

* Added backwards compatible float conversion in ROS2 bridge to_ros_boxes

* Some minor fixes in ROS1 gesture topic names

* Some minor fixes in ROS1 gesture topic names and learner link in doc

* Some minor fixes in ROS2 gesture topic names

* Some minor fixes in ROS2 gesture learner link, run command, topic names in doc

---------

Co-authored-by: Stefania Pedrazzi <stefaniapedrazzi@users.noreply.github.com>
Co-authored-by: tsampazk <27914645+tsampazk@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
test sources Run style checks test tools Test the toolkit methods
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants