Add unitest
This commit is contained in:
@@ -461,9 +461,9 @@ bool ANSCustomFS::Initialize(const std::string& modelDirectory, float detectionS
|
||||
_motiondetector = ANSLIBPtr(ANSCENTER::ANSLIB::Create(), &ANSCENTER::ANSLIB::Destroy);
|
||||
|
||||
|
||||
_detectorModelType = 4; // TENSORRT
|
||||
_detectorModelType = 31; // TENSORRT
|
||||
_detectorDetectionType = 1; // DETECTION
|
||||
_filterModelType = 4; // TENSORRT
|
||||
_filterModelType = 31; // TENSORRT
|
||||
_filterDetectionType = 1; // DETECTION
|
||||
_motionModelType = 19; // Motion detection (generic CPU)
|
||||
_motionDetectionType = 1; // DETECTION
|
||||
@@ -472,17 +472,17 @@ bool ANSCustomFS::Initialize(const std::string& modelDirectory, float detectionS
|
||||
engineType = _detector->GetEngineType();
|
||||
if (engineType == 1) {
|
||||
// NVIDIA GPU: Use TensorRT
|
||||
_detectorModelType = 4; // TENSORRT
|
||||
_detectorModelType = 31; // TENSORRT
|
||||
_detectorDetectionType = 1; // DETECTION
|
||||
_filterModelType = 4; // TENSORRT
|
||||
_filterModelType = 31; // TENSORRT
|
||||
_filterDetectionType = 1; // DETECTION
|
||||
std::cout << "NVIDIA GPU detected. Using TensorRT" << std::endl;
|
||||
}
|
||||
else {
|
||||
// CPU/Other: Use OpenVINO
|
||||
_detectorModelType = 17; // OPENVINO
|
||||
_detectorModelType = 30; // OPENVINO
|
||||
_detectorDetectionType = 1; // DETECTION
|
||||
_filterModelType = 17; //Yolo v12
|
||||
_filterModelType = 30; //Yolo v12
|
||||
_filterDetectionType = 1; // DETECTION
|
||||
std::cout << "CPU detected. Using OpenVINO and ONNX" << std::endl;
|
||||
|
||||
@@ -556,7 +556,7 @@ bool ANSCustomFS::Initialize(const std::string& modelDirectory, float detectionS
|
||||
return false;
|
||||
}
|
||||
|
||||
// Load motion detector model (background subtraction / frame differencing)
|
||||
// Load motion detector model (optional — not used in Stage A tracker-based pipeline)
|
||||
float motionScoreThreshold = MOTION_SENSITIVITY;
|
||||
float motionConfThreshold = 0.5f;
|
||||
float motionNMSThreshold = 0.5f;
|
||||
@@ -570,8 +570,8 @@ bool ANSCustomFS::Initialize(const std::string& modelDirectory, float detectionS
|
||||
"", // Empty model directory - motion detector is algorithmic
|
||||
motionDetectorLabels);
|
||||
if (motionResult != 1) {
|
||||
std::cerr << "ANSCustomFS::Initialize: Failed to load motion detector model." << std::endl;
|
||||
return false;
|
||||
std::cerr << "ANSCustomFS::Initialize: Warning - Motion detector not loaded (not required for Stage A)." << std::endl;
|
||||
// Non-fatal: motion detector is not used in the tracker-based Stage A pipeline
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user