A split-screen touchless driving game controlled entirely by wrist movement, built on a two-stage palm detection and hand landmark pipeline running on Qualcomm QIM SDK with QNN HTP acceleration.
Introduction
“TouchlessDrive” is a touchless car game that turns a player’s raised hands into a virtual steering wheel. Using a single USB camera, the system tracks both wrists and interprets the line between them as the steering input. When the player tilts their hands left or right, the on-screen car responds in real time. The experience is displayed in a split-screen layout, with the live camera feed shown alongside the game interface. Under the hood, TouchlessDrive runs on a two-stage hand-tracking pipeline built with the Qualcomm QIM SDK. First, a palm detection model identifies each hand in the frame. Then, a hand-landmark model extracts precise keypoints, including the wrist locations used for steering. Both models run through the QNN TFLite delegate, offloading inference to the on-device HTP instead of the CPU. This helps keep the game loop responsive and capable of real-time performance. The project highlights how the QIM SDK’s metadata pipeline can power interactive application logic beyond traditional video analytics. In TouchlessDrive, AI-generated hand keypoints are transformed directly into game-controller input, enabling a natural, controller-free gaming experience.Use Case Overview
Hand Tracking
Virtual Steering Wheel
Steering-to-Motion Mapping
Split-Screen Rendering
Game Loop
Pipeline diagram

Elements used in pipeline
How it works
Capture and Mirror
Two-Stage Hand Tracking
qtimetatransform uses the roi-palmd module to convert each detected region into an aligned crop, which the hand landmark model then processes to extract per-hand keypoints, most importantly the wrist.Wrist Extraction
appsink callback receives the landmark metadata for every frame and pulls out the wrist keypoint (keypoint ID 0) for each tracked hand. When two hands are present, the pair with the largest horizontal separation is selected as the active steering pair.Steering Angle Calculation
Game Update
Split-Screen Composition
Setup Requirements
Hardware

Software
Flash your Qualcomm Edge device by following the device setup and flashing instructions here, then install the Python and GStreamer prerequisites (python3, gstreamer1.0, python3-gi) needed to run the pipeline.
The palm detection and hand landmark TFLite models, along with their label and settings files, are the same assets used by the hand gesture recognition pipeline. See that post’s model download steps for the palm and hand landmark model files.
Try me
Try me
- C++
- Python
demo_car_game/main.ccPre-built application on device: /usr/bin/qimsdk_demo_car_gameDownload Required Files
Download the gesture recognizer task bundle from Google MediaPipe to obtain the palm detection and hand landmark models:.zip archive, extract it on your host machine before copying: unzip filename.zipCopy Files to Device
Connect a USB camera
/dev/video2 (update the --input-config value below if your camera is exposed on a different node).Run the application
Application Function Breakdown
The TouchlessDrive application is organized into a handful of function groups, each responsible for one stage of the hand-to-steering flow:- Metadata parsing: extracts the wrist keypoint (ID 0) for each tracked hand from the raw landmark metadata stream, handling frames where zero, one, or two hands are detected.
- Steering pair selection: when two hands are present, selects the pair with the largest horizontal separation as the active steering wheel, discarding stray or partial detections.
- Steering angle calculation: computes the tilt angle of the line between the two wrist points, maps it to a clamped steering value, and smooths it across frames to filter out landmark jitter.
- Game state and physics: advances the car’s horizontal position based on the current steering value, scrolls obstacles down the lane, runs collision checks, and manages the crash/restart state machine.
- Rendering: a Cairo drawing callback composes the split-screen output each frame — the camera feed with the wrist line and steering-wheel indicator on the left, and the road, car, obstacles, and score on the right.
- Pipeline setup: assembles the two-stage palm detection and hand landmark QIM SDK pipeline and wires the
appsinkcallback and Cairo overlay into the runtime before the pipeline starts.
Expected Output
Running the application opens a full-screen split view:- Left panel: live camera feed with the tracked wrist-to-wrist line and a steering-wheel indicator overlaid.
- Right panel: the driving game, including a scrolling road, the player-controlled car, incoming obstacles, and a running score.
Ctrl+C to stop the application.

