YOLOV3.h 869 Bytes
Newer Older
Your Name's avatar
Your Name committed
1
2
3
4
#ifndef __DETECTOR_YOLOV3_H__
#define __DETECTOR_YOLOV3_H__

#include <migraphx/program.hpp>
liucong's avatar
liucong committed
5
#include <CommonDefinition.h>
Your Name's avatar
Your Name committed
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34

namespace migraphxSamples
{

typedef struct _YOLOV3Parameter
{
    int numberOfClasses;
    float confidenceThreshold;
    float nmsThreshold;
    float objectThreshold;

}YOLOV3Parameter;

class DetectorYOLOV3
{
public:
    DetectorYOLOV3();
    
    ~DetectorYOLOV3();

    ErrorCode Initialize(InitializationParameterOfDetector initializationParameterOfDetector);

    ErrorCode Detect(const cv::Mat &srcImage, std::vector<ResultOfDetection> &resultsOfDetection);

private:
    cv::FileStorage configurationFile;

    migraphx::program net;
    cv::Size inputSize;
liucong's avatar
liucong committed
35
    std::string inputName;
Your Name's avatar
Your Name committed
36
37
38
    migraphx::shape inputShape;
    
    bool useFP16;
liucong's avatar
liucong committed
39
    std::vector<std::string> classNames;
Your Name's avatar
Your Name committed
40
41
42
43
44
45
46
47
48

    YOLOV3Parameter yolov3Parameter;
};

}


#endif