1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- #ifndef __YOLOCROWDAPP_H
- #define __YOLOCROWDAPP_H
- #include "yolocrowd.hpp"
- #include "YoloCrowdCfg.h"
- #include "Locks.h"
- #include "ExHeaders.h"
- NAMESPACE_MAS_BEGIN
- NAMESPACE_YOLOCROWD_BEGIN
- class YoloCrowdApp {
-
- public:
- static YoloCrowdApp* Instance();
- static void DestroyInstance();
-
- TZ_INT Initialize(const std::string& initParam);
- TZ_INT Dispose();
-
- TZ_INT DoDetect(cv::Mat& input,
- TargetInfo& targets,
- std::vector<int>& objClass,
- std::vector<std::vector<float>>& objPos);
-
- private:
- YoloCrowdApp();
- ~YoloCrowdApp();
- void warmup();
- TZ_BOOL m_inited;
- TZ_INT m_usecnt;
- TZ_INT m_gpuid;
- TZ_INT m_maxObjects;
- TZ_DOUBLE m_confidenceThreshold;
- TZ_DOUBLE m_NMSThreshold;
- std::string m_modelPath;
- SPtr<YoloCrowd::Infer> m_engine;
- static tzc::Mutex _mutex;
- static YoloCrowdApp* _instance;
- };
- NAMESPACE_YOLOCROWD_END
- NAMESPACE_MAS_END
- #endif
|