Conversation
- Introduced spatial detection settings in config.yaml, including model path and thresholds. - Updated main_2025.py to load and utilize spatial detection and object tracking components in the pipeline. - Added blobconverter and pyyaml as dependencies in requirements-pytorch.txt. Co-Authored-By: Yujie Meng <192458226+Yujie-Meng@users.noreply.github.com> Co-Authored-By: Yujie Meng <yujiemengca@gmail.com> Co-Authored-By: Yujie <yujiemengca@gmail.com>
…proach - Brings in ultralytics + depthai into requirements.txt from stereodepth - Drops depthai_detector.py (Pipeline 2.0 class) in favour of existing spatial_detection_node.py / object_tracker_node.py functional approach - Removes tests/unit/test_pipeline_nodes.py Co-authored-by: Yujie Meng <192458226+Yujie-Meng@users.noreply.github.com> Co-authored-by: Yujie Meng <yujiemengca@gmail.com> Co-authored-by: Yujie <yujiemengca@gmail.com>
- Fix dead xout_rgb: switch color_cam.video → preview so bbox coords align - Add rgb_queue read + cv2 bbox overlay and imshow in main loop - Make model_path required in create_spatial_detection_network (no fallback) - Drop blobconverter dep; add opencv-python to requirements-pytorch.txt - Update config.yaml: model_path now required, documents conversion path Co-authored-by: Yujie Meng <192458226+Yujie-Meng@users.noreply.github.com> Co-authored-by: Yujie Meng <yujiemengca@gmail.com> Co-authored-by: Yujie <yujiemengca@gmail.com>
Replace deprecated MonoCamera/ColorCamera with Camera.build(), YoloSpatialDetectionNetwork with SpatialDetectionNetwork.build() using Luxonis model zoo, XLinkOut with createOutputQueue(), and dai.Device with dai.Pipeline context manager. Co-authored-by: Yujie Meng <192458226+Yujie-Meng@users.noreply.github.com> Co-authored-by: Yujie Meng <yujiemengca@gmail.com> Co-authored-by: Yujie <yujiemengca@gmail.com>
Resolves missing-function-docstring warning causing CI exit code 16. Co-authored-by: Yujie Meng <192458226+Yujie-Meng@users.noreply.github.com>
…estimate Co-authored-by: Yujie Meng <192458226+Yujie-Meng@users.noreply.github.com> Co-authored-by: Yujie Meng <yujiemengca@gmail.com> Co-authored-by: Yujie <yujiemengca@gmail.com> Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Replaces the two-bucket constant offset (27/74mm split at 750mm) with a piecewise-linear interpolation over 4 measured anchors (0.5/1.0/1.5/2.0m) that tapers smoothly to zero past 2.2m, where the camera's factory calibration is trusted. The previous scheme over-corrected at 2m, turning a -31mm raw bias into -105mm; the new one avoids this by capturing the genuine non-monotonicity of the bias profile. Residual bias after calibration (vs. raw): | Distance | Raw | Calibrated | |----------|--------|------------| | 0.5m | +27.5 | -0.14 | | 1.0m | +75.1 | +0.12 | | 1.5m | +73.2 | +0.48 | | 2.0m | -48.7 | -3.61 | Also commits the underlying test logs (2026-04-30, 2026-05-07) and the calibration visualization for reproducibility.  Co-authored-by: Yujie Meng <192458226+Yujie-Meng@users.noreply.github.com> Co-authored-by: Yujie Meng <yujiemengca@gmail.com> Co-authored-by: Yujie <yujiemengca@gmail.com>
CI failed black --check on the previous commit (column-aligned tuples and an extra blank line). Reformat to satisfy the checker; no semantic change. Co-authored-by: Yujie Meng <192458226+Yujie-Meng@users.noreply.github.com> Co-authored-by: Yujie Meng <yujiemengca@gmail.com> Co-authored-by: Yujie <yujiemengca@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Migrate OAK-D pipeline to DepthAI 3.x (Pipeline 2.0)
Reference docs
Summary
YoloSpatialDetectionNetwork+ custom blob withSpatialDetectionNetwork.build()using Luxonis model zoo (yolov6-nano)MonoCamera/ColorCamerawithCamera.build(CAM_A/B/C)XLinkOutnodes — usecreateOutputQueue()directly on node outputsdai.Device(pipeline)withdai.Pipeline()context manager +pipeline.start()scripts/download_model.py(dead code — model auto-downloads from zoo on first run)Hardware-tested on OAK-D (MyriadX)
Setup requirements:
$env:DEPTHAI_WATCHDOG=0before running (disables MyriadX watchdog that kills device during model load)usbipd bind, runusbipd unbind --busid <id>first to restore the native Windows USB driverRun commands:
Proof — terminal output from hardware test (2026-04-01):
Key debugging findings
X_LINK_DEVICE_NOT_FOUNDSTATE=Shared)usbipd unbind --busid <id>YoloSpatialDetectionNetworkAttributeErrorSpatialDetectionNetwork.build()with model zooFiles changed
main_2025.py— 3.x pipeline API (dai.Pipeline(),createOutputQueue(),pipeline.isRunning())modules/target_tracking/stereo_node.py—Camera.build(CAM_B/C)+requestOutput((640,400))modules/target_tracking/spatial_detection_node.py—SpatialDetectionNetwork.build(cam, stereo, "yolov6-nano")modules/target_tracking/object_tracker_node.py— type hint updateconfig.yaml—model_name: "yolov6-nano"replacesmodel_pathrequirements-pytorch.txt—depthai>=3.5.0.gitignore— addedvenv_win/,models/,.cache/,*.txtscripts/download_model.py(dead code)