A toolkit for OAK-D stereo cameras featuring real-time collision avoidance, object detection, and device management. Built with DepthAI v3.
| Script | Description |
|---|---|
collision_avoidance.py |
Real-time collision avoidance using stereo depth with grid-based spatial analysis |
detection_network.py |
YOLOv6-nano object detection with live bounding boxes and FPS tracking |
device_info.py |
Device diagnostics — sensors, calibration, intrinsics, and bootloader info |
device_manager.py |
GUI-based device management for configuration, flashing, and network setup |
OAK-D Camera (PoE or USB) — tested with OAK-D-W-POE
Requires Python 3.10+ and uv.
git clone https://github.com/gabe-zhang/oak-camera-toolkit.git
cd oak-camera-toolkit
uv syncSet your camera's IP address:
cp .env.example .env # Edit .env with your camera's IP address
# Or
export OAK_DEVICE_IP=<your-camera-ip>Then run:
# Collision avoidance
uv run collision_avoidance.py
# Object detection
uv run detection_network.py
# Device info
uv run device_info.py
# Device manager GUI
uv run device_manager.pyDivides the camera's field of view into a 15x9 grid (135 regions) and calculates real-time distances using stereo depth. Objects within the critical distance are highlighted with red overlays.
Runs YOLOv6-nano inference on the RGB camera with real-time bounding boxes, class labels, and confidence scores.
Default settings in collision_avoidance.py:
| Parameter | Default | Description |
|---|---|---|
| Critical Distance | 2.0m | Adjustable via slider (0.5m–5m) |
| Depth Range | 0.2m–10m | SpatialLocationCalculator thresholds |
| Grid Size | 15 x 9 | Spatial analysis regions |
| Stereo Preset | ROBOTICS | Optimized for outdoor/mobile use |
device_manager.py is from the DepthAI Python repository by Luxonis, licensed under the MIT License.