6 Star 20 Fork 13

OAKChina/depthai-experiments

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
apps/conference-demos/rgb-depth-detections
collecting-training-data
collision-avoidance
coronamask
depth-test_z-acc_spatial-noise
depth-testing
depthai-inference-engine
gaze-estimation
gen2-AI-rearview-mirror
gen2-age-gender
gen2-anomaly-detection
gen2-blur-faces
gen2-bounding-box-filtering/kalman
gen2-box_measurement
gen2-calc-spatials-on-host
gen2-camera-demo
gen2-class-saver-jpeg
gen2-collecting-training-data
gen2-color-isp-raw
gen2-container-encoding
gen2-coronamask
gen2-crestereo-stereo-matching
gen2-crowdcounting
gen2-cumulative-object-counting
gen2-custom-models
gen2-deeplabv3_depth
gen2-deeplabv3_multiclass
gen2-deeplabv3_person
gen2-deepsort-tracking
gen2-depth-driven-focus
gen2-depth-mbnv2
gen2-depth-people-counting
gen2-display-detections
gen2-efficientDet
gen2-efficientnet-classification
gen2-emotion-recognition
gen2-face-detection
gen2-face-recognition
gen2-facemesh
gen2-fast-depth
gen2-fatigue-detection
gen2-fire-detection
gen2-foxglove
gen2-full-fov-nn
gen2-gaze-estimation
gen2-head-posture-detection
api
README.md
main.py
requirements.txt
gen2-human-machine-safety
gen2-human-pose
gen2-image-quality-assessment
gen2-lanenet
gen2-license-plate-recognition
gen2-lossless-zooming
gen2-mask-detection
gen2-maskrcnn-resnet50
gen2-mega-depth
gen2-mjpeg-streaming
gen2-mobile-object-localizer
gen2-multiple-devices
gen2-nanosam
gen2-objectron
gen2-ocr
gen2-palm-detection
gen2-pedestrian-reidentification
gen2-people-counter
gen2-people-tracker
gen2-pipeline-analyser
gen2-play-encoded-stream
gen2-poe-mqtt
gen2-poe-tcp-streaming
gen2-pointcloud
gen2-qr-code-scanner
gen2-qt-gui
gen2-record-replay
gen2-rerun
gen2-road-segmentation
gen2-roboflow-integration
gen2-rtsp-streaming
gen2-seven-segment-recognition
gen2-social-distancing
gen2-stereo-on-host
gen2-syncing
gen2-text-blur
gen2-tf-image-classification
gen2-triangulation
gen2-webrtc-streaming
gen2-wls-filter
gen2-yolo
imu-publishing
mjpeg-streaming
parser
pcl-projection-rgb
pedestrian-reidentification
people-counter
people-tracker
point-cloud-projection
random-scripts
reshaping-openvino-model
rtsp-streaming
stereo_on_host
triangulation-3D-visualizer
two-stage-inference
.gitignore
.gitmodules
LICENSE
README.md
README.zh-CN.md
克隆/下载
贡献代码
同步代码
Loading...
README

Head posture detection

This example demonstrates how to run 2 stage inference with DepthAI library. It recognizes head pose detection of all detected faces on the frame. Demo uses face-detection-retail-0004 model to detect faces, crops them on the device using Script node, and then sends face frames to head-pose-estimation-adas-0001 model which estimates head pose (yaw, pitch, tilt).

Demo

Head pose estimation

How it works

  1. Color camera produces high-res frames, sends them to host, Script node and downscale ImageManip node
  2. Downscale ImageManip will downscale from high-res frame to 300x300, required by 1st NN in this pipeline; object detection model
  3. 300x300 frames are sent from downscale ImageManip node to the object detection model (MobileNetSpatialDetectionNetwork)
  4. Object detections are sent to the Script node
  5. Script node first syncs object detections msg with frame. It then goes through all detections and creates ImageManipConfig for each detected face. These configs then get sent to ImageManip together with synced high-res frame
  6. ImageManip will crop only the face out of the original frame. It will also resize the face frame to required size (60,60) by the head pose recognition NN model
  7. Face frames get send to the 2nd NN - head pose NN model. NN recognition results are sent back to the host
  8. Frames, object detections, and recognition results are all synced on the host side and then displayed to the user

2-stage NN pipeline graph

image

DepthAI Pipeline Graph was used to generate this image.

Pre-requisites

python3 -m pip install -r requirements.txt

Usage

Run python3 main.py

马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Python
1
https://gitee.com/oakchina/depthai-experiments.git
git@gitee.com:oakchina/depthai-experiments.git
oakchina
depthai-experiments
depthai-experiments
master

搜索帮助

371d5123 14472233 46e8bd33 14472233