Awesome
[WIP] components_of_onnx
https://github.com/onnx/onnx/blob/main/docs/Operators.md
https://github.com/PINTO0309/simple-onnx-processing-tools
<p align="center"> <img src="https://user-images.githubusercontent.com/33194443/170163635-00a4d3c6-e65f-43f5-8b34-c2c02c87b804.png" /> </p>Key concept
- Convert each and every operator in Operators.md into a single ONNX file and commit.
- Use sog4onnx to generate the ONNX model for a single OP.
- Use sam4onnx to rewrite variables and constants.
- By preparing a large number of ONNX files of a single OP as a component and rewriting them individually with sam4onnx to the necessary parameters, any combination of OPs can be generated like a puzzle.
- All generated single-OP ONNX files are combined with snc4onnx.
- Use sna4onnx to add OPs to the generated ONNX graph and snd4onnx to remove OPs from the graph.
- The real goal of this repository is to componentize routine pre-processing and post-processing and directly replace the corresponding processing in various types of ONNX models, allowing for flexible switching between operations without modifying PyTorch or TensorFlow logic or re-exporting ONNX.
Base
As of April 28, 2022
Opsets List
Progress
<details><summary>Progress List</summary><div>
No. | Operator | Structure | Fin |
---|---|---|---|
001 | Abs | :heavy_check_mark: | |
002 | Acos | :heavy_check_mark: | |
003 | Acosh | :heavy_check_mark: | |
004 | Add | :heavy_check_mark: | |
005 | And | :heavy_check_mark: | |
006 | ArgMax | :heavy_check_mark: | |
007 | ArgMin | :heavy_check_mark: | |
008 | Asin | :heavy_check_mark: | |
009 | Asinh | :heavy_check_mark: | |
010 | Atan | :heavy_check_mark: | |
011 | Atanh | :heavy_check_mark: | |
012 | AveragePool | ||
013 | BatchNormalization | ||
014 | BitShift | ||
015 | Cast | ||
016 | Ceil | ||
017 | Clip | ||
018 | Compress | ||
019 | Concat | ||
020 | ConcatFromSequence | ||
021 | Constant | ||
022 | ConstantOfShape | ||
023 | Conv | ||
024 | ConvInteger | ||
025 | ConvTranspose | ||
026 | Cos | ||
027 | Cosh | ||
028 | CumSum | ||
029 | DepthToSpace | ||
030 | DequantizeLinear | ||
031 | Det | ||
032 | Div | ||
033 | Dropout | ||
034 | Einsum | ||
035 | Elu | ||
036 | Equal | ||
037 | Erf | ||
038 | Exp | ||
039 | Expand | ||
040 | EyeLike | ||
041 | Flatten | ||
042 | Floor | ||
043 | GRU | ||
044 | Gather | ||
045 | GatherElements | ||
046 | GatherND | ||
047 | Gemm | ||
048 | GlobalAveragePool | ||
049 | GlobalLpPool | ||
050 | GlobalMaxPool | ||
051 | Greater | ||
052 | GridSample | ||
053 | HardSigmoid | ||
054 | Hardmax | ||
055 | Identity | ||
056 | If | ||
057 | InstanceNormalization | ||
058 | IsInf | ||
059 | IsNaN | ||
060 | LRN | ||
061 | LSTM | ||
062 | LeakyRelu | ||
063 | Less | ||
064 | Log | ||
065 | Loop | ||
066 | LpNormalization | ||
067 | LpPool | ||
068 | MatMul | ||
069 | MatMulInteger | ||
070 | Max | ||
071 | MaxPool | ||
072 | MaxRoiPool | ||
073 | MaxUnpool | ||
074 | Mean | ||
075 | Min | ||
076 | Mod | ||
077 | Mul | ||
078 | Multinomial | ||
079 | Neg | ||
080 | NonMaxSuppression | :heavy_check_mark: | |
081 | NonZero | ||
082 | Not | ||
083 | OneHot | ||
084 | Optional | ||
085 | OptionalGetElement | ||
086 | OptionalHasElement | ||
087 | Or | ||
088 | PRelu | ||
089 | Pad | ||
090 | Pow | ||
091 | QLinearConv | ||
092 | QLinearMatMul | ||
093 | QuantizeLinear | ||
094 | RNN | ||
095 | RandomNormal | ||
096 | RandomNormalLike | ||
097 | RandomUniform | ||
098 | RandomUniformLike | ||
099 | Reciprocal | ||
100 | ReduceL1 | ||
101 | ReduceL2 | ||
102 | ReduceLogSum | ||
103 | ReduceLogSumExp | ||
104 | ReduceMax | ||
105 | ReduceMean | ||
106 | ReduceMin | ||
107 | ReduceProd | ||
108 | ReduceSum | ||
109 | ReduceSumSquare | ||
110 | Relu | ||
111 | Reshape | ||
112 | Resize | :heavy_check_mark: | |
113 | ReverseSequence | ||
114 | RoiAlign | ||
115 | Round | ||
116 | Scan | ||
117 | Scatter | ||
118 | ScatterElements | ||
119 | ScatterND | ||
120 | Selu | ||
121 | SequenceAt | ||
122 | SequenceConstruct | ||
123 | SequenceEmpty | ||
124 | SequenceErase | ||
125 | SequenceInsert | ||
126 | SequenceLength | ||
127 | Shape | ||
128 | Shrink | ||
129 | Sigmoid | ||
130 | Sign | ||
131 | Sin | ||
132 | Sinh | ||
133 | Size | ||
134 | Slice | ||
135 | Softplus | ||
136 | Softsign | ||
137 | SpaceToDepth | ||
138 | Split | ||
139 | SplitToSequence | ||
140 | Sqrt | ||
141 | Squeeze | ||
142 | StringNormalizer | ||
143 | Sub | ||
144 | Sum | ||
145 | Tan | ||
146 | Tanh | ||
147 | TfIdfVectorizer | ||
148 | ThresholdedRelu | ||
149 | Tile | ||
150 | TopK | ||
151 | Transpose | ||
152 | Trilu | ||
153 | Unique | ||
154 | Unsqueeze | ||
155 | Upsample | ||
156 | Where | ||
157 | Xor | ||
158 | Bernoulli | ||
159 | CastLike | ||
160 | Celu | ||
161 | DynamicQuantizeLinear | ||
162 | GreaterOrEqual | ||
163 | HardSwish | ||
164 | LessOrEqual | ||
165 | LogSoftmax | ||
166 | MeanVarianceNormalization | ||
167 | NegativeLogLikelihoodLoss | ||
168 | Range | ||
169 | SequenceMap | ||
170 | Softmax | ||
171 | SoftmaxCrossEntropyLoss | ||
Z001 | Normalization_rgb_imagenet | :heavy_check_mark: | |
Z002 | Normalization_bgr_imagenet | :heavy_check_mark: | |
Z003 | SingleClass_NonMaxSupression | 480x640 | :heavy_check_mark: |
Z004 | YOLACT_Edge_NonMaxSupression | 550x550<br> | :heavy_check_mark: |
Z005 | Resize_0.5x0.5 | 1x3xHxW->1x3x(Hx0.5)x(Wx0.5)<br> | :heavy_check_mark: |
Z006 | Resize_HxW | 1x3xHxW->1x3x(Hx?)x(Wx?)<br> | :heavy_check_mark: |
Z007 | Myriad_workaround_NonMaxSuppression | :heavy_check_mark: | |
Z008 | TensorRT_compatible_N_batch_Resize | :heavy_check_mark: | |
Z009 | Unity_Barracuda_compatible_GatherND | :heavy_check_mark: | |
Z010 | Unity_Barracuda_compatible_Split | :heavy_check_mark: | |
Z011 | YOLACT_PostProcess | :heavy_check_mark: | |
Z012 | DAMO-YOLO_PostProcess | :heavy_check_mark: | |
Z013 | YOLO_General_PostProcess (anchor+NMS) | :heavy_check_mark: | |
Z014 | Inverse (com.microsoft) | :heavy_check_mark: | |
Z015 | MSELoss | :heavy_check_mark: | |
Z016 | EfficientNMS_TRT | :heavy_check_mark: | |
Z017 | BatchedNMS_TRT | :heavy_check_mark: | |
Z018 | AffineTransform | :heavy_check_mark: | |
Z019 | AffineGrid_4D (general purpose) | :heavy_check_mark: | |
Z020 | WarpAffine_4D | :heavy_check_mark: |