feat(tracker-native): multi-scale acquisition substitutes for the float16 detector
The pose_detector.tflite is float16-quantized, which tf2onnx 1.16.1/1.17/git-main all fail to convert (misreads float16 constants -> 'reshape 96 into (16,1,1,24)'). Rather than block on that upstream tool bug for an acquisition-only model, PoseEstimator::acquire() runs the landmark model over a few candidate ROIs (scales x vertical positions) and keeps the best presence. Headless on grace_hopper it reaches 0.730 presence - matching the detector's 0.731 - so acquisition quality is recovered. Worker now acquire()s until locked, then single-run tracks via the aux-landmark ROI.
This commit is contained in:
1 parent
f2783ce903
commit
5239ae5b81
4 files changed
+29
-3
No files matched your search
@@ -130,7 +130,8 @@ void WorkerLoop(std::wstring symlink, int req_w, int req_h) {
|
||||
PipelineConfig cfg;
|
||||
FramePipeline pipeline(g_app.shm_base, cfg);
|
||||
|
||||
Roi roi = PoseEstimator::bootstrap_roi(req_w, req_h);
|
||||
Roi roi{};
|
||||
bool have_lock = false;
|
||||
std::vector<uint8_t> bgra;
|
||||
std::vector<uint8_t> rgb;
|
||||
int w = 0, h = 0;
|
||||
@@ -154,9 +155,11 @@ void WorkerLoop(std::wstring symlink, int req_w, int req_h) {
|
||||
rgb[i * 3 + 2] = bgra[i * 4 + 0];
|
||||
}
|
||||
|
||||
PoseResult pose = estimator.run(rgb.data(), w, h, roi);
|
||||
PoseResult pose = have_lock ? estimator.run(rgb.data(), w, h, roi)
|
||||
: estimator.acquire(rgb.data(), w, h);
|
||||
const bool tracked = pose.valid && pose.presence >= cfg.presence_threshold;
|
||||
roi = tracked ? pose.next_roi : PoseEstimator::bootstrap_roi(w, h);
|
||||
have_lock = tracked;
|
||||
if (tracked) roi = pose.next_roi;
|
||||
|
||||
LARGE_INTEGER now;
|
||||
QueryPerformanceCounter(&now);
|
||||
|
||||
Reference in new issue
Block a user