DynamicInfo
ImageConstrainInfo
功能
图片对齐相关参数。
结构定义
struct ImageConstrainInfo {
uint32_t minWidthStride;
uint32_t maxWidthStride;
uint32_t minHeightStride;
uint32_t maxHeightStride;
uint32_t widthStrideAlign;
uint32_t heightStrideAlign;
uint32_t widthAlign;
uint32_t heightAlign;
float ratio;
uint32_t pixelBit;
};
参数说明
| 参数名 | 说明 |
|---|---|
| minWidthStride | 宽对齐最小值。 |
| maxWidthStride | 宽对齐最大值。 |
| minHeightStride | 高对齐最小值。 |
| maxHeightStride | 高对齐最大值。 |
| widthStrideAlign | 宽对齐的对齐方式。 |
| heightStrideAlign | 高对齐的对齐方式。 |
| widthAlign | 宽对齐方式。 |
| heightAlign | 高对齐方式。 |
| ratio | 比例。 |
| pixelBit | 像数点数据。 |
父主题: 通用数据结构
ImageSize
功能
图片尺寸信息。
结构定义
namespace MxBase{
struct ImageSize {
size_t height;
size_t width;
ImageSize() = default;
ImageSize(size_t height, size_t width)
{
this->width = width;
this->height = height;
}
}
namespace MxTools{
struct ImageSize {
size_t height;
size_t width;
size_t area;
ImageSize(int height, int width)
{
this->width = static_cast<size_t>(width);
this->height = static_cast<size_t>(height);
this->area = static_cast<size_t>(height * width);
}
}
参数说明
| 参数名 | 说明 |
|---|---|
| height | 图片的高。 |
| width | 图片的宽。 |
父主题: 通用数据结构
DynamicInfo
功能
模型支持的类型。
结构定义
struct DynamicInfo {
DynamicType dynamicType = DYNAMIC_BATCH;
size_t batchSize;
ImageSize imageSize = {};
std::vector<std::vector<uint32_t>> shape = {};
};
参数说明
| 参数名 | 说明 |
|---|---|
| dynamicType | 动态类型描述。 |
| batchSize | batch大小。 |
| imageSize | 图像大小。 |
| shape | 动态Batch的形状。 |
父主题: 通用数据结构
RoiBox
功能
定义裁剪框。
结构定义
struct RoiBox {
float x0;
float y0;
float x1;
float y1;
};
参数说明
| 参数名 | 说明 |
|---|---|
| x0 | 左上角横坐标。 |
| y0 | 左上角纵坐标。 |
| x1 | 右下角横坐标。 |
| y1 | 右下角纵坐标。 |
父主题: 通用数据结构
TextObjDetectInfo
功能
定义检测框的四个坐标点和置信度
结构定义
struct TextObjDetectInfo {
float x0;
float y0;
float x1;
float y1;
float x2;
float y2;
float x3;
float y3;
float confidence;
};
参数说明
| 参数名 | 说明 |
|---|---|
| x0 | 检测框其中一个横坐标。 |
| y0 | 检测框其中一个纵坐标。 |
| x1 | 检测框其中一个横坐标。 |
| y1 | 检测框其中一个纵坐标。 |
| x2 | 检测框其中一个横坐标。 |
| y2 | 检测框其中一个纵坐标。 |
| x3 | 检测框其中一个横坐标。 |
| y4 | 检测框其中一个纵坐标。 |
| confidence | 置信度。 |
父主题: 通用数据结构
TensorDataType
功能
TensorDataType枚举类。
结构定义
enum TensorDataType {
TENSOR_DTYPE_UNDEFINED = -1,
TENSOR_DTYPE_FLOAT32 = 0,
TENSOR_DTYPE_FLOAT16 = 1,
TENSOR_DTYPE_INT8 = 2,
TENSOR_DTYPE_INT32 = 3,
TENSOR_DTYPE_UINT8 = 4,
TENSOR_DTYPE_INT16 = 6,
TENSOR_DTYPE_UINT16 = 7,
TENSOR_DTYPE_UINT32 = 8,
TENSOR_DTYPE_INT64 = 9,
TENSOR_DTYPE_UINT64 = 10,
TENSOR_DTYPE_DOUBLE64 = 11,
TENSOR_DTYPE_BOOL = 12
};
父主题: 通用数据结构
在线提单