跳到主要内容

GetDynamicBatch

GetInputShape

函数功能

获得输入张量的形状。

函数原型

std::vector<std::vector<int64_t>> GetInputShape() const;

父主题: ModelInferenceProcessor

GetOutputShape

函数功能

获得输出张量的形状。

函数原型

std::vector<std::vector<int64_t>> GetOutputShape() const;

父主题: ModelInferenceProcessor

GetDynamicBatch

函数功能

获取动态Batch。

函数原型

std::vector<int64_t> GetDynamicBatch() const;

父主题: ModelInferenceProcessor

GetDynamicGearInfo

函数功能

获得模型支持的动态输入档位信息,支持动态Batch、动态分辨率和分档动态维度模型。

函数原型

std::vector<std::vector<uint64_t>> GetDynamicGearInfo();

返回参数说明

数据结构说明
std::vector<std::vector<uint64_t>>模型支持的输入Tensor档位信息。
- **std::vector<std::vector<uint64_t>>**为所有档位信息。
- **std::vector<uint64_t>**为某一档的具体值。
返回数据结构为空,表示获取分档信息失败或者模型不属于函数功能中描述的三种模型之一,具体的原因可查看报错信息确认。 例如,模型为动态分辨率模型,**std::vector<uint64_t>**为某一档的高、宽值。

父主题: ModelInferenceProcessor

NmsSortByArea

函数功能

根据面积大小过滤重复目标。

函数原型

void NmsSortByArea(std::vector<DetectBox>& detBoxes, const float iouThresh, const IOUMethod method = UNION);
void NmsSortByArea(std::vector<ObjectInfo>& detBoxes, const float iouThresh, const IOUMethod method = UNION);

参数说明

参数名输入/输出说明
detBoxes输入/输出待过滤DetectBox(中心点) / ObjectInfo(边角点)。输出过滤后的目标信息。
iouThresh输入过滤阀值。
method输入IOU计算方式:
- MAX 重叠区域除以两者中面积大的。
- MIN 重叠区域除以两者中面积小的。
- UNION 重叠区域除以两者面积并集。
- DIOU 重叠区域除以两者面积并集减去距离的交并比。

父主题: Nms

NmsSort

函数功能

根据置信度大小过滤重复目标。

函数原型

void NmsSort(std::vector<DetectBox>& detBoxes, float iouThresh, IOUMethod method = UNION);
void NmsSort(std::vector<ObjectInfo>& detBoxes, float iouThresh, IOUMethod method = UNION);

参数说明

参数名输入/输出说明
detBoxes输出待过滤DetectBox(中心点) / ObjectInfo(边角点)。输出过滤后的目标信息。
iouThresh输入过滤阀值。
method输入IOU计算方式:
- MAX 重叠区域除以两者中面积大的。
- MIN 重叠区域除以两者中面积小的。
- UNION 重叠区域除以两者面积并集。
- DIOU 重叠区域除以两者面积并集减去距离的交并比。

父主题: Nms

在线提单