16 #include "fastdeploy/fastdeploy_model.h" 17 #include "fastdeploy/vision/common/processors/transform.h" 18 #include "fastdeploy/vision/common/result.h" 36 MODNet(
const std::string& model_file,
const std::string& params_file =
"",
40 std::string
ModelName()
const {
return "matting/MODNet"; }
70 std::map<std::string, std::array<int, 2>>* im_info);
72 bool Postprocess(std::vector<FDTensor>& infer_result,
MattingResult* result,
73 const std::map<std::string, std::array<int, 2>>& im_info);
Option object used when create a new Runtime object.
Definition: runtime_option.h:40
Base model object for all the vision models.
Definition: fastdeploy_model.h:21
ModelFormat
Definition: enum_variables.h:67
FDTensor object used to represend data matrix.
Definition: fd_tensor.h:31
std::string ModelName() const
Get model's name.
Definition: modnet.h:40
std::vector< int > size
Argument for image preprocessing step, tuple of (width, height), decide the target size after resize...
Definition: modnet.h:45
std::vector< float > alpha
Argument for image preprocessing step, parameters for normalization, size should be the the same as c...
Definition: modnet.h:49
Matting result structure for all the Matting models.
Definition: result.h:331
FDMat is a structure for replace cv::Mat.
Definition: mat.h:34
bool swap_rb
Argument for image preprocessing step, whether to swap the B and R channel, such as BGR->RGB...
Definition: modnet.h:57
Model with ONNX format.
Definition: enum_variables.h:70
std::vector< float > beta
Argument for image preprocessing step, parameters for normalization, size should be the the same as c...
Definition: modnet.h:53
All C++ FastDeploy APIs are defined inside this namespace.
Definition: option.h:16
MODNet model object used when to load a MODNet model exported by MODNet.
Definition: modnet.h:27