119 lines
4.4 KiB
C++
119 lines
4.4 KiB
C++
|
|
#include <iostream>
|
|
#include <opencv2/imgproc.hpp>
|
|
#include <opencv2/opencv.hpp>
|
|
#include <opencv2/dnn.hpp>
|
|
#include "boost/property_tree/ptree.hpp"
|
|
#include "boost/property_tree/json_parser.hpp"
|
|
#include "boost/foreach.hpp"
|
|
#include "boost/optional.hpp"
|
|
#include <string>
|
|
#include <regex>
|
|
#include <filesystem>
|
|
#include "ANSODEngine.h"
|
|
#include "openvino/openvino.hpp"
|
|
#include <iostream>
|
|
#include <opencv2/highgui.hpp>
|
|
#include <opencv2/core.hpp>
|
|
#include <opencv2/imgproc.hpp>
|
|
#include "format_reader/include/format_reader_ptr.h"
|
|
#include <iterator>
|
|
#include <memory>
|
|
#include <sstream>
|
|
#include <string>
|
|
#include <vector>
|
|
#include <openvino/op/transpose.hpp>
|
|
#include <openvino/core/node.hpp>
|
|
#include <opencv2/dnn.hpp>
|
|
#include <fstream>
|
|
//#include "inference_engine.hpp"
|
|
#include <filesystem>
|
|
#include "ANSPOSE.h"
|
|
#include "ANSSAM.h"
|
|
#include "ANSEngineCommon.h"
|
|
#include "ANSLPR.h"
|
|
#include "ANSLPR_CPU.h"
|
|
#include <stdlib.h>
|
|
|
|
using namespace cv;
|
|
using namespace dnn;
|
|
template<typename T>
|
|
T GetOptionalValue(const boost::property_tree::ptree& pt, std::string attribute, T defaultValue) {
|
|
if (pt.count(attribute)) {
|
|
return pt.get<T>(attribute);
|
|
}
|
|
return defaultValue;
|
|
}
|
|
template <typename T>
|
|
T GetData(const boost::property_tree::ptree& pt, const std::string& key)
|
|
{
|
|
T ret;
|
|
if (boost::optional<T> data = pt.get_optional<T>(key))
|
|
{
|
|
ret = data.get();
|
|
}
|
|
else
|
|
{
|
|
throw std::runtime_error("Could not read the data from ptree: [key: " + key + "]");
|
|
}
|
|
return ret;
|
|
}
|
|
int GPUYolov10EngineUnitTest(std::string modelFilePath, std::string videoFilePath);
|
|
int OpenVINOYolov10EngineUnitTest(std::string modelFilePath, std::string videoFilePath);
|
|
int OpenVINOYolov10EngineUnitTestLoop(std::string modelFilePath, std::string videoFilePath);
|
|
int GPUEngineUnitTest(std::string modelFilePath, std::string videoFilePath);
|
|
int ONNXEngineUnitTest(std::string modelFilePath, std::string videoFilePath);
|
|
int GPUEngineImageTest(std::string modelFilePath, std::string imageFilePath);
|
|
int OpenVINOEngineUnitTest(std::string modelFilePath, std::string videoFilePath);
|
|
int FacialDetectorTest(std::string modelFilePath, std::string imagePath);
|
|
int AnomalibTest(std::string abmodelFilePath, std::string abImageFilePath);
|
|
int HumanPoseTest(std::string modelFilePath, std::string imagePath);
|
|
int HumanPoseImageTest(std::string modelFilePath, std::string imagePath);
|
|
int ANSSAMTest(std::string modelFilePath, std::string imagePath);
|
|
int ODHUBAPITest(std::string modelFilePath, std::string videoFilePath);
|
|
int ODHUBOpenCVAPITest(std::string modelFilePath, std::string videoFilePath);
|
|
int ALPRPipeLineTest(std::string modelFilePath, std::string videoFilePath);
|
|
int ODHUBAPIImageTest(std::string modelFilePath, std::string imageFilePath);
|
|
int ODHUBCVAPIImageTest(std::string modelFilePath, std::string imageFilePath);
|
|
int CustomCodeImageTest(std::string modelFilePath, std::string imageFilePath);
|
|
int UnitTests();
|
|
int FallDetection();
|
|
int HeadDetection();
|
|
int FireNSmokeDetection();
|
|
int VehicleDetection();
|
|
void TestODHUB();
|
|
void DissemTest();
|
|
int DissemParallelTest(std::string modelFilePath, std::string imageFilePath);
|
|
int CustomTest();
|
|
int CocoTest();
|
|
int PersonHead();
|
|
int GenericModelTest();
|
|
int FaceDetector(std::string modelFilePath, std::string videoFilePath);
|
|
int TiledInferenceTest(std::string modelFilePath, std::string imageFilePath);
|
|
int NormalInferenceTest(std::string modelFilePath, std::string imageFilePath);
|
|
int TiledInferenceTest();
|
|
int MotionDetection(std::string modelFilePath, std::string videoFilePath);
|
|
int MotionDetectionForFireNSmoke();
|
|
int StressTest();
|
|
int GPU11EngineImageTest(std::string modelFilePath, std::string imageFilePath);
|
|
int GPU11EngineUnitTest(std::string modelFilePath, std::string videoFilePath);
|
|
int Yolov11RT_Test();
|
|
int Yolov10RT_Test();
|
|
int OpenVINOCLEngineImageTest(std::string modelFilePath, std::string imageFilePath);
|
|
int TENSORRTCLEngineImageTest(std::string modelFilePath, std::string imageFilePath);
|
|
int TestCL();
|
|
int Engine_Test();
|
|
int SegEngineImageTest(std::string modelFilePath, std::string imageFilePath);
|
|
int SegmentationTest();
|
|
int Yolov8EngineUnitTest(std::string modelFilePath, std::string videoFilePath);
|
|
int Yolov5EngineUnitTest(std::string modelFilePath, std::string videoFilePath);
|
|
int Yolov12EngineUnitTest(std::string modelFilePath, std::string videoFilePath);
|
|
int LocSetTest();
|
|
int RectifierTest();
|
|
int FaceTest();
|
|
int FaceOVTest();
|
|
int FaceYoloTest();
|
|
int TestYOLOV12();
|
|
int PPETest();
|
|
int RVATest();
|
|
int CustomModel_StressTest_FilePlayer(); |