Fix model optimisation

This commit is contained in:
2026-04-09 08:09:02 +10:00
parent 34854d87f4
commit eeb205779a
10 changed files with 688 additions and 160 deletions

View File

@@ -213,6 +213,12 @@ namespace ANSCENTER {
// ONNX Runtime inference engine
std::unique_ptr<ONNXYOLO> m_ortEngine;
// DML device-lost recovery: when DirectML's GPU device is removed
// (HRESULT 887A0005), the session is permanently broken. We detect
// this once, attempt a CPU-fallback recreation, and suppress further
// error-log flooding.
bool _dmlDeviceLost{ false };
// Internal detection pipeline
std::vector<Object> DetectObjects(const cv::Mat& inputImage,
const std::string& camera_id);