DeepLabV3.h 1014 Bytes
Newer Older
shangxl's avatar
shangxl committed
1
2
3
4
5
6
7
8
#ifndef __DEEPLABV3_H__
#define __DEEPLABV3_H__

#include <migraphx/program.hpp>
#include <CommonDefinition.h>



9
namespace migraphxSamples{
shangxl's avatar
shangxl committed
10
11
12
13
14
15
16
17
18

 class DeepLabV3{
    public:
    DeepLabV3();

    ~DeepLabV3();

    ErrorCode Initialize(InitializationParameterOfSegmentation initParamOfSegmentationUnet);

19
    ErrorCode Segmentation(std::vector<cv::Mat> srcImages, std::vector<cv::Mat> & maskImages);
shangxl's avatar
shangxl committed
20
21
22
23
24
25
26
27

    private:
    cv::FileStorage configurationFile;

    migraphx::program net;
    cv::Size inputSize;
    std::string inputName;
    migraphx::shape inputShape;
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
    std::string outputName;
    migraphx::shape outputShape;
    std::string outputName2;
    migraphx::shape outputShape2;

    std::unordered_map<std::string, migraphx::argument> modalDataMap;
    void* inputBufferDevice;
    void* outputBufferDevice;
    void* outputBufferDevice2;
    void* outputBufferHost;
    void* outputBufferHost2;

    bool useInt8;
    bool useFP16;
    bool useOffloadCopy;

shangxl's avatar
shangxl committed
44
45
46
47
48
49
 };   

} // namespace migraphxSamples


#endif