Initial commit to add all 3 custom projects

This commit is contained in:
2026-03-30 21:43:47 +11:00
commit fed40b0c90
29 changed files with 3127 additions and 0 deletions

View File

@@ -0,0 +1,33 @@
#include "ANSLIB.h"
//#define FNS_DEBUG
class CUSTOM_API ANSCustomHMD : public IANSCustomClass
{
private:
using ANSLIBPtr = std::unique_ptr<ANSCENTER::ANSLIB, decltype(&ANSCENTER::ANSLIB::Destroy)>;
std::recursive_mutex _mutex;
int engineType{ 0 };
ANSLIBPtr _detector{ nullptr, &ANSCENTER::ANSLIB::Destroy };
ANSLIBPtr _classifier{ nullptr, &ANSCENTER::ANSLIB::Destroy };
// ----- Model config -----
int _detectorModelType;
int _detectorDetectionType;
int _classifierModelType;
int _classifierDetectionType;
std::string _classifierLabels;
bool _isInitialized{ false };
bool _readROIs{ false };
public:
bool Initialize(const std::string& modelDiretory, float detectionScoreThreshold, std::string& labelMap) override;
bool OptimizeModel(bool fp16) override;
bool ConfigureParameters(CustomParams& param) override;
std::vector<CustomObject> RunInference(const cv::Mat& input) override;
std::vector<CustomObject> RunInference(const cv::Mat& input, const std::string& camera_id) override;
bool Destroy() override;
ANSCustomHMD();
~ANSCustomHMD();
};