Skip to content

Test/xyz accuracy#12

Open
JunzhL wants to merge 12 commits into
mainfrom
test/xyz-accuracy
Open

Test/xyz accuracy#12
JunzhL wants to merge 12 commits into
mainfrom
test/xyz-accuracy

Conversation

@JunzhL

@JunzhL JunzhL commented Jun 16, 2026

Copy link
Copy Markdown

First test for XYZ accuracy for the OAK-D camera.

Qstrich and others added 12 commits March 16, 2026 21:19
- 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.

![calibration](https://github.com/UWARG/ML-CV-Target-Tracking/raw/depthai1/documentation/accuracy/calibration.png)

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>
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 commit introduces several new binary image files for z-coordinate calibration at various distances (0.5m, 1.0m, 1.5m, 2.0m, 2.5m) and an overall accuracy graph. These visualizations will aid in the analysis and validation of the calibration process.

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>
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