preprocessor_seg.h 563 字节
Newer Older
W
wuzewu 已提交
1 2 3
#pragma once

#include "preprocessor.h"
4
#include "utils/utils.h"
W
wuzewu 已提交
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24

namespace PaddleSolution {

class SegPreProcessor : public ImagePreProcessor {

public:
    SegPreProcessor() : _config(nullptr){
    };

    bool init(std::shared_ptr<PaddleSolution::PaddleSegModelConfigPaser> config);

    bool single_process(const std::string &fname, float* data, int* ori_w, int* ori_h);

    bool batch_process(const std::vector<std::string>& imgs, float* data, int* ori_w, int* ori_h);

private:
    std::shared_ptr<PaddleSolution::PaddleSegModelConfigPaser> _config;
};

}