Files
FastDeploy/docs/api/vision_results/matting_result_CN.md
HCQ14 61c2f87e0c [Doc] Update English version of some documents (#1084)
* Create README_CN.md

* Update README.md

* Update README_CN.md

* Create README_CN.md

* Update README.md

* Create README_CN.md

* Update README.md

* Create README_CN.md

* Update README.md

* Create README_CN.md

* Update README.md

* Create README_CN.md

* Update README.md

* Create README_CN.md

* Update README.md

* Create README_CN.md

* Update README.md

* Update README.md

* Update README_CN.md

* Create README_CN.md

* Update README.md

* Update README.md

* Update and rename README_en.md to README_CN.md

* Update WebDemo.md

* Update and rename WebDemo_en.md to WebDemo_CN.md

* Update and rename DEVELOPMENT_cn.md to DEVELOPMENT_CN.md

* Update DEVELOPMENT_CN.md

* Update DEVELOPMENT.md

* Update RNN.md

* Update and rename RNN_EN.md to RNN_CN.md

* Update README.md

* Update and rename README_en.md to README_CN.md

* Update README.md

* Update and rename README_en.md to README_CN.md

* Update README.md

* Update README_cn.md

* Rename README_cn.md to README_CN.md

* Update README.md

* Update README_cn.md

* Rename README_cn.md to README_CN.md

* Update export.md

* Update and rename export_EN.md to export_CN.md

* Update README.md

* Update README.md

* Create README_CN.md

* Update README.md

* Update README.md

* Update kunlunxin.md

* Update classification_result.md

* Update classification_result_EN.md

* Rename classification_result_EN.md to classification_result_CN.md

* Update detection_result.md

* Update and rename detection_result_EN.md to detection_result_CN.md

* Update face_alignment_result.md

* Update and rename face_alignment_result_EN.md to face_alignment_result_CN.md

* Update face_detection_result.md

* Update and rename face_detection_result_EN.md to face_detection_result_CN.md

* Update face_recognition_result.md

* Update and rename face_recognition_result_EN.md to face_recognition_result_CN.md

* Update headpose_result.md

* Update and rename headpose_result_EN.md to headpose_result_CN.md

* Update keypointdetection_result.md

* Update and rename keypointdetection_result_EN.md to keypointdetection_result_CN.md

* Update matting_result.md

* Update and rename matting_result_EN.md to matting_result_CN.md

* Update mot_result.md

* Update and rename mot_result_EN.md to mot_result_CN.md

* Update ocr_result.md

* Update and rename ocr_result_EN.md to ocr_result_CN.md

* Update segmentation_result.md

* Update and rename segmentation_result_EN.md to segmentation_result_CN.md

* Update README.md

* Update README.md

* Update quantize.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md
2023-01-06 18:01:34 +08:00

1.9 KiB
Raw Blame History

中文 English

MattingResult 抠图结果

MattingResult 代码定义在fastdeploy/vision/common/result.h用于表明模型预测的alpha透明度的值预测的前景等。

C++ 定义

fastdeploy::vision::MattingResult

struct MattingResult {
  std::vector<float> alpha;
  std::vector<float> foreground;
  std::vector<int64_t> shape;
  bool contain_foreground = false;
  void Clear();
  std::string Str();
};
  • alpha: 是一维向量为预测的alpha透明度的值值域为[0.,1.]长度为hxwh,w为输入图像的高和宽
  • foreground: 是一维向量,为预测的前景,值域为[0.,255.]长度为hxwxch,w为输入图像的高和宽c一般为3foreground不是一定有的只有模型本身预测了前景这个属性才会有效
  • contain_foreground: 表示预测的结果是否包含前景
  • shape: 表示输出结果的shape当contain_foreground为falseshape只包含(h,w)当contain_foreground为trueshape包含(h,w,c), c一般为3
  • Clear(): 成员函数,用于清除结构体中存储的结果
  • Str(): 成员函数将结构体中的信息以字符串形式输出用于Debug

Python 定义

fastdeploy.vision.MattingResult

  • alpha(list of float): 是一维向量为预测的alpha透明度的值值域为[0.,1.]长度为hxwh,w为输入图像的高和宽
  • foreground(list of float): 是一维向量,为预测的前景,值域为[0.,255.]长度为hxwxch,w为输入图像的高和宽c一般为3foreground不是一定有的只有模型本身预测了前景这个属性才会有效
  • contain_foreground(bool): 表示预测的结果是否包含前景
  • shape(list of int): 表示输出结果的shape当contain_foreground为falseshape只包含(h,w)当contain_foreground为trueshape包含(h,w,c), c一般为3