Add person model into RTMPOSE

This commit is contained in:
2026-05-14 19:05:20 +10:00
parent ee8f0d1163
commit 8e4d9a9e5d
5 changed files with 478 additions and 36 deletions
+16
View File
@@ -3,6 +3,7 @@
#pragma once
#include "ANSEngineCommon.h"
#include "ONNXEngine.h"
#include "ANSONNXYOLO.h" // internal person-detector front-end (top-down pipeline)
namespace ANSCENTER {
@@ -144,6 +145,21 @@ namespace ANSCENTER {
// member here on another thread.
std::shared_ptr<ONNXRtmPose> m_ortEngine;
// ── Optional internal person detector (top-down pipeline) ───────
// RTMPose is a top-down single-person estimator. If the model
// folder bundles person.onnx + person.names alongside the pose
// model, we auto-load an ANSONNXYOLO person detector and run pose
// ONCE PER DETECTED PERSON. When those files are missing the
// wrapper falls back to whole-image pose so single-person test
// inputs (selfies, fitness clips) still work.
std::unique_ptr<ANSONNXYOLO> m_personDetector;
// Look for person.onnx + person.names in `modelFolder`. Loads
// m_personDetector and returns true on success; returns false
// (without logging an error) if either file is missing — caller
// should treat that as "no detector, fall back to whole-image".
bool TryLoadPersonDetector(const std::string& modelFolder);
bool InitOrtEngine();
bool InitOrtEngine(ANSCENTER::EngineType engineType);
void WarmUpEngine();