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

Hand tracker component #1042

Draft
wants to merge 10 commits into
base: develop
Choose a base branch
from
Draft

Hand tracker component #1042

wants to merge 10 commits into from

Conversation

Erol444
Copy link
Member

@Erol444 Erol444 commented May 27, 2023

Started integrating @geaxgx's depthai-hand-tracker into the SDK.

TODO:

  • Move HandTrackerRenderer logic into SDK's Visualizer
  • Support 3D hand landmarks (calculation & visualization)
  • Support body pre-focusing
  • Code cleanup
  • Support different model sizes (hand landmarks: lite/full/sparse, perhaps palm_detection_192x192)

Demo

2023-05-27.17-05-43.mp4

Code example

from depthai_sdk import OakCamera
from depthai_sdk.components.hand_tracker.renderer import HandTrackerRenderer
from depthai_sdk.classes.packets import HandTrackerPacket
import cv2

with OakCamera() as oak:
    color = oak.create_camera('color')

    handtracker = oak.create_hand_tracker(color)

    render = HandTrackerRenderer(handtracker)
    def cb(packet: HandTrackerPacket):
        render.draw(packet.color_frame, packet.hands)
        cv2.imshow("Hand tracking", render.frame)

    oak.callback(handtracker, cb)
    oak.visualize(handtracker.out.palm_detection)
    oak.visualize(handtracker.out.palm_crop)

    # oak.show_graph()
    oak.start(blocking=True)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants