mirror of
https://github.com/PaddlePaddle/FastDeploy.git
synced 2025-11-03 11:02:01 +08:00
[Other] Add MattingResult Free() (#705)
* add onnx_ort_runtime demo * rm in requirements * support batch eval * fixed MattingResults bug * move assignment for DetectionResult * integrated x2paddle * add model convert readme * update readme * re-lint * add processor api * Add MattingResult Free
This commit is contained in:
@@ -378,6 +378,13 @@ MattingResult::MattingResult(const MattingResult& res) {
|
||||
}
|
||||
|
||||
void MattingResult::Clear() {
|
||||
alpha.clear();
|
||||
foreground.clear();
|
||||
shape.clear();
|
||||
contain_foreground = false;
|
||||
}
|
||||
|
||||
void MattingResult::Free() {
|
||||
std::vector<float>().swap(alpha);
|
||||
std::vector<float>().swap(foreground);
|
||||
std::vector<int64_t>().swap(shape);
|
||||
|
||||
@@ -316,9 +316,12 @@ struct FASTDEPLOY_DECL MattingResult : public BaseResult {
|
||||
|
||||
MattingResult() {}
|
||||
MattingResult(const MattingResult& res);
|
||||
/// Clear detection result
|
||||
/// Clear matting result
|
||||
void Clear();
|
||||
|
||||
/// Free matting result
|
||||
void Free();
|
||||
|
||||
void Reserve(int size);
|
||||
|
||||
void Resize(int size);
|
||||
|
||||
Reference in New Issue
Block a user