MNN/schema/default/UserDefine.fbs

69 lines
1.2 KiB
Plaintext
Raw Permalink Normal View History

2019-04-17 10:49:11 +08:00
include "Tensor.fbs";
namespace MNN;
table TensorConvertInfo {
source:MNN_DATA_FORMAT;
dest:MNN_DATA_FORMAT;
}
2021-04-08 15:34:23 +08:00
enum SampleMode : byte {
BILINEAR=0,
NEAREST
}
enum BorderMode : byte {
ZEROS=0,
CLAMP,
2023-12-04 11:12:20 +08:00
REFLECTION,
CUBE
2021-04-08 15:34:23 +08:00
}
table GridSample {
mode:SampleMode;
paddingMode:BorderMode;
alignCorners:bool=false;
2023-12-04 11:12:20 +08:00
backward:bool=false;
}
enum ImageFormatType : int {
RGBA = 0,
RGB = 1,
BGR = 2,
GRAY = 3,
BGRA = 4,
YCrCb = 5,
YUV = 6,
HSV = 7,
XYZ = 8,
BGR555 = 9,
BGR565 = 10,
YUV_NV21 = 11,
YUV_NV12 = 12,
YUV_I420 = 13,
2022-01-04 10:50:40 +08:00
HSV_FULL = 14,
}
enum FilterType : byte {
NEAREST = 0,
BILINEAR = 1,
BICUBIC = 2
}
enum WrapType : byte {
CLAMP_TO_EDGE = 0,
ZERO = 1,
REPEAT = 2
}
table ImageProcessParam {
filterType:FilterType = NEAREST;
sourceFormat:ImageFormatType = RGBA;
destFormat:ImageFormatType = RGBA;
wrap:WrapType = CLAMP_TO_EDGE;
mean:[float]; // float[4]
normal:[float]; // float[4]
transform:[float]; // float[9] Matrix
paddingValue:byte = 0;
shape:[int]; // shape: [N, C, H, W]
outputType:DataType;
2022-02-18 11:30:27 +08:00
draw:bool = false;
}