FastDeploy
latest
Fast & Easy to Deploy!
|
All C++ FastDeploy Vision Models APIs are defined inside this namespace. More...
Namespaces | |
classification | |
All object classification model APIs are defined inside this namespace. | |
detection | |
All object detection model APIs are defined inside this namespace. | |
facedet | |
All object face detection model APIs are defined inside this namespace. | |
keypointdetection | |
All keypoint detection model APIs are defined inside this namespace. | |
matting | |
All image/video matting model APIs are defined inside this namespace. | |
ocr | |
All OCR series model APIs are defined inside this namespace. | |
segmentation | |
All segmentation model APIs are defined inside this namespace. | |
Classes | |
class | BGR2GRAY |
Processor for tansform images from BGR to GRAY. More... | |
class | BGR2RGB |
Processor for tansform images from BGR to RGB. More... | |
class | Cast |
Processor for cast images with given type deafault is float. More... | |
class | CenterCrop |
Processor for crop images in center with given type deafault is float. More... | |
struct | ClassifyResult |
Classify result structure for all the image classify models. More... | |
class | Convert |
Processor for convert images with given paramters. More... | |
class | ConvertAndPermute |
Processor for convert images with given paramters and permute images from HWC to CHW. More... | |
class | Crop |
Processor for crop images with given paramters. More... | |
struct | DetectionResult |
Detection result structure for all the object detection models and instance segmentation models. More... | |
struct | FaceAlignmentResult |
Face Alignment result structure for all the face alignment models. More... | |
struct | FaceDetectionResult |
Face detection result structure for all the face detection models. More... | |
struct | FaceRecognitionResult |
Face recognition result structure for all the Face recognition models. More... | |
struct | FDMatBatch |
FDMatBatch contains batch data for preprocess. More... | |
struct | HeadPoseResult |
HeadPose result structure for all the headpose models. More... | |
class | HWC2CHW |
Processor for transform images from HWC to CHW. More... | |
struct | KeyPointDetectionResult |
KeyPoint Detection result structure for all the keypoint detection models. More... | |
class | LimitByStride |
Processor for LimitByStride images with given paramters. More... | |
class | LimitShort |
Processor for Limit images by short edge with given paramters. More... | |
struct | Mask |
struct | Mat |
FDMat is a structure for replace cv::Mat. More... | |
struct | MattingResult |
Matting result structure for all the Matting models. More... | |
struct | MOTResult |
MOT(Multi-Object Tracking) result structure for all the MOT models. More... | |
class | Normalize |
Processor for Normalize images with given paramters. More... | |
class | NormalizeAndPermute |
Processor for Normalize and Permute images from HWC to CHW. More... | |
class | Pad |
Processor for padding images. More... | |
class | PadToSize |
Processor for padding images to given size. More... | |
class | Processor |
Processor base class for processors in fastdeploy/vision/common/processors. More... | |
class | ProcessorManager |
ProcessorManager for Preprocess. More... | |
class | Resize |
Processor for Resize images. More... | |
class | ResizeByShort |
Processor for resize images by short edge. More... | |
class | RGB2BGR |
Processor for tansform images from RGB to BGR. More... | |
class | RGB2GRAY |
Processor for tansform images from RGB to GRAY. More... | |
struct | SegmentationResult |
Segmentation result structure for all the segmentation models. More... | |
class | StridePad |
Processor for padding images with stride. More... | |
Functions | |
void | EnableFlyCV () |
Enable using FlyCV to process image while deploy vision models. Currently, FlyCV in only available on ARM(Linux aarch64/Android), so will fallback to using OpenCV in other platform. | |
void | DisableFlyCV () |
Disable using FlyCV to process image while deploy vision models. | |
void | SetProcLibCpuNumThreads (int threads) |
Set the cpu num threads of ProcLib. | |
cv::Mat | VisClassification (const cv::Mat &im, const ClassifyResult &result, int top_k=5, float score_threshold=0.0f, float font_size=0.5f) |
Show the visualized results for classification models. More... | |
cv::Mat | VisClassification (const cv::Mat &im, const ClassifyResult &result, const std::vector< std::string > &labels, int top_k=5, float score_threshold=0.0f, float font_size=0.5f) |
Show the visualized results with custom labels for classification models. More... | |
cv::Mat | VisDetection (const cv::Mat &im, const DetectionResult &result, float score_threshold=0.0, int line_size=1, float font_size=0.5f) |
Show the visualized results for detection models. More... | |
cv::Mat | VisDetection (const cv::Mat &im, const DetectionResult &result, const std::vector< std::string > &labels, float score_threshold=0.0, int line_size=1, float font_size=0.5f) |
Show the visualized results with custom labels for detection models. More... | |
cv::Mat | VisFaceAlignment (const cv::Mat &im, const FaceAlignmentResult &result, int line_size=1) |
Show the visualized results for face alignment models. More... | |
cv::Mat | VisFaceDetection (const cv::Mat &im, const FaceDetectionResult &result, int line_size=1, float font_size=0.5f) |
Show the visualized results for face detection models. More... | |
cv::Mat | VisKeypointDetection (const cv::Mat &im, const KeyPointDetectionResult &results, float conf_threshold=0.5f) |
Show the visualized results for key point detection models. More... | |
cv::Mat | VisMatting (const cv::Mat &im, const MattingResult &result, bool transparent_background=false, float transparent_threshold=0.999, bool remove_small_connected_area=false) |
Show the visualized results for matting models. More... | |
cv::Mat | VisOcr (const cv::Mat &im, const OCRResult &ocr_result, const float score_threshold=0) |
Show the visualized results for Ocr models. More... | |
cv::Mat | VisSegmentation (const cv::Mat &im, const SegmentationResult &result, float weight=0.5) |
Show the visualized results for segmentation models. More... | |
cv::Mat | SwapBackground (const cv::Mat &im, const cv::Mat &background, const MattingResult &result, bool remove_small_connected_area=false) |
Swap the image background with MattingResult. More... | |
cv::Mat | SwapBackground (const cv::Mat &im, const cv::Mat &background, const SegmentationResult &result, int background_label) |
Swap the image background with SegmentationResult. More... | |
All C++ FastDeploy Vision Models APIs are defined inside this namespace.
FASTDEPLOY_DECL cv::Mat fastdeploy::vision::SwapBackground | ( | const cv::Mat & | im, |
const cv::Mat & | background, | ||
const MattingResult & | result, | ||
bool | remove_small_connected_area = false |
||
) |
Swap the image background with MattingResult.
[in] | im | the input image data, comes from cv::imread(), is a 3-D array with layout HWC, BGR format |
[in] | background | the background image data, comes from cv::imread(), is a 3-D array with layout HWC, BGR format |
[in] | result | the MattingResult produced by model |
[in] | remove_small_connected_area | if remove_small_connected_area==true, the visualized result will not include the small connected areas |
FASTDEPLOY_DECL cv::Mat fastdeploy::vision::SwapBackground | ( | const cv::Mat & | im, |
const cv::Mat & | background, | ||
const SegmentationResult & | result, | ||
int | background_label | ||
) |
Swap the image background with SegmentationResult.
[in] | im | the input image data, comes from cv::imread(), is a 3-D array with layout HWC, BGR format |
[in] | background | the background image data, comes from cv::imread(), is a 3-D array with layout HWC, BGR format |
[in] | result | the SegmentationResult produced by model |
[in] | background_label | the background label number in SegmentationResult |
FASTDEPLOY_DECL cv::Mat fastdeploy::vision::VisClassification | ( | const cv::Mat & | im, |
const ClassifyResult & | result, | ||
int | top_k = 5 , |
||
float | score_threshold = 0.0f , |
||
float | font_size = 0.5f |
||
) |
Show the visualized results for classification models.
[in] | im | the input image data, comes from cv::imread(), is a 3-D array with layout HWC, BGR format |
[in] | result | the result produced by model |
[in] | top_k | the length of return values, e.g., if topk==2, the result will include the 2 most possible class label for input image. |
[in] | score_threshold | threshold for top_k scores, the class will not be shown if the score is less than score_threshold |
[in] | font_size | font size |
FASTDEPLOY_DECL cv::Mat fastdeploy::vision::VisClassification | ( | const cv::Mat & | im, |
const ClassifyResult & | result, | ||
const std::vector< std::string > & | labels, | ||
int | top_k = 5 , |
||
float | score_threshold = 0.0f , |
||
float | font_size = 0.5f |
||
) |
Show the visualized results with custom labels for classification models.
[in] | im | the input image data, comes from cv::imread(), is a 3-D array with layout HWC, BGR format |
[in] | result | the result produced by model |
[in] | labels | custom labels for user, the visualized result will show the corresponding custom labels |
[in] | top_k | the length of return values, e.g., if topk==2, the result will include the 2 most possible class label for input image. |
[in] | score_threshold | threshold for top_k scores, the class will not be shown if the score is less than score_threshold |
[in] | font_size | font size |
FASTDEPLOY_DECL cv::Mat fastdeploy::vision::VisDetection | ( | const cv::Mat & | im, |
const DetectionResult & | result, | ||
float | score_threshold = 0.0 , |
||
int | line_size = 1 , |
||
float | font_size = 0.5f |
||
) |
Show the visualized results for detection models.
[in] | im | the input image data, comes from cv::imread(), is a 3-D array with layout HWC, BGR format |
[in] | result | the result produced by model |
[in] | score_threshold | threshold for result scores, the bounding box will not be shown if the score is less than score_threshold |
[in] | line_size | line size for bounding boxes |
[in] | font_size | font size for text |
FASTDEPLOY_DECL cv::Mat fastdeploy::vision::VisDetection | ( | const cv::Mat & | im, |
const DetectionResult & | result, | ||
const std::vector< std::string > & | labels, | ||
float | score_threshold = 0.0 , |
||
int | line_size = 1 , |
||
float | font_size = 0.5f |
||
) |
Show the visualized results with custom labels for detection models.
[in] | im | the input image data, comes from cv::imread(), is a 3-D array with layout HWC, BGR format |
[in] | result | the result produced by model |
[in] | labels | the visualized result will show the bounding box contain class label |
[in] | score_threshold | threshold for result scores, the bounding box will not be shown if the score is less than score_threshold |
[in] | line_size | line size for bounding boxes |
[in] | font_size | font size for text |
FASTDEPLOY_DECL cv::Mat fastdeploy::vision::VisFaceAlignment | ( | const cv::Mat & | im, |
const FaceAlignmentResult & | result, | ||
int | line_size = 1 |
||
) |
Show the visualized results for face alignment models.
[in] | im | the input image data, comes from cv::imread(), is a 3-D array with layout HWC, BGR format |
[in] | result | the result produced by model |
[in] | line_size | line size for circle point |
FASTDEPLOY_DECL cv::Mat fastdeploy::vision::VisFaceDetection | ( | const cv::Mat & | im, |
const FaceDetectionResult & | result, | ||
int | line_size = 1 , |
||
float | font_size = 0.5f |
||
) |
Show the visualized results for face detection models.
[in] | im | the input image data, comes from cv::imread(), is a 3-D array with layout HWC, BGR format |
[in] | result | the result produced by model |
[in] | line_size | line size for bounding boxes |
[in] | font_size | font size for text |
FASTDEPLOY_DECL cv::Mat fastdeploy::vision::VisKeypointDetection | ( | const cv::Mat & | im, |
const KeyPointDetectionResult & | results, | ||
float | conf_threshold = 0.5f |
||
) |
Show the visualized results for key point detection models.
[in] | im | the input image data, comes from cv::imread(), is a 3-D array with layout HWC, BGR format |
[in] | results | the result produced by model |
[in] | conf_threshold | threshold for result scores, the result will not be shown if the score is less than conf_threshold |
FASTDEPLOY_DECL cv::Mat fastdeploy::vision::VisMatting | ( | const cv::Mat & | im, |
const MattingResult & | result, | ||
bool | transparent_background = false , |
||
float | transparent_threshold = 0.999 , |
||
bool | remove_small_connected_area = false |
||
) |
Show the visualized results for matting models.
[in] | im | the input image data, comes from cv::imread(), is a 3-D array with layout HWC, BGR format |
[in] | result | the result produced by model |
[in] | transparent_background | if transparent_background==true, the background will with transparent color |
[in] | transparent_threshold | since the alpha value in MattringResult is a float between [0, 1], transparent_threshold is used to filter background pixel |
[in] | remove_small_connected_area | if remove_small_connected_area==true, the visualized result will not include the small connected areas |
FASTDEPLOY_DECL cv::Mat fastdeploy::vision::VisOcr | ( | const cv::Mat & | im, |
const OCRResult & | ocr_result, | ||
const float | score_threshold = 0 |
||
) |
Show the visualized results for Ocr models.
[in] | im | the input image data, comes from cv::imread(), is a 3-D array with layout HWC, BGR format |
[in] | result | the result produced by model |
FASTDEPLOY_DECL cv::Mat fastdeploy::vision::VisSegmentation | ( | const cv::Mat & | im, |
const SegmentationResult & | result, | ||
float | weight = 0.5 |
||
) |
Show the visualized results for segmentation models.
[in] | im | the input image data, comes from cv::imread(), is a 3-D array with layout HWC, BGR format |
[in] | result | the result produced by model |
[in] | weight | transparent weight of visualized result image |