Coder Social home page Coder Social logo

pinto0309 / components_of_onnx Goto Github PK

View Code? Open in Web Editor NEW
8.0 3.0 0.0 1.55 MB

[WIP] ONNX parts yard. The various operations described in Operator Schemas are converted in advance into OP stand-alone ONNX files.

License: MIT License

Shell 28.11% Python 71.89%
onnx models python

components_of_onnx's Introduction

[WIP] components_of_onnx

https://github.com/onnx/onnx/blob/main/docs/Operators.md

https://github.com/PINTO0309/simple-onnx-processing-tools

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

Progress List

No. Operator Structure Fin
001 Abs 20220508224354 ✔️
002 Acos 20220508224520 ✔️
003 Acosh 20220508224605 ✔️
004 Add 20220508224659 ✔️
005 And 20220508224805 ✔️
006 ArgMax 20220508224902 ✔️
007 ArgMin 20220508224941 ✔️
008 Asin 20220508225017 ✔️
009 Asinh 20220508225055 ✔️
010 Atan image ✔️
011 Atanh image ✔️
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 20220508233013 ✔️
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 image ✔️
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 20220508222828 ✔️
Z002 Normalization_bgr_imagenet 20220508222945 ✔️
Z003 SingleClass_NonMaxSupression 480x640 ✔️
Z004 YOLACT_Edge_NonMaxSupression 550x550
image
✔️
Z005 Resize_0.5x0.5 1x3xHxW->1x3x(Hx0.5)x(Wx0.5)
image
✔️
Z006 Resize_HxW 1x3xHxW->1x3x(Hx?)x(Wx?)
image
✔️
Z007 Myriad_workaround_NonMaxSuppression image ✔️
Z008 TensorRT_compatible_N_batch_Resize image ✔️
Z009 Unity_Barracuda_compatible_GatherND image ✔️
Z010 Unity_Barracuda_compatible_Split image ✔️
Z011 YOLACT_PostProcess image ✔️
Z012 DAMO-YOLO_PostProcess image ✔️
Z013 YOLO_General_PostProcess (anchor+NMS) image ✔️
Z014 Inverse (com.microsoft) image ✔️
Z015 MSELoss image ✔️
Z016 EfficientNMS_TRT image ✔️
Z017 BatchedNMS_TRT image ✔️
Z018 AffineTransform image ✔️
Z019 AffineGrid_4D (general purpose) ✔️
Z020 WarpAffine_4D ✔️

Reference

  1. https://stackoverflow.com/questions/47344571/how-to-draw-checkbox-or-tick-mark-in-github-markdown-table
  2. Samples of handcrafting ONNX models (base64 encoding, base64 decoding, etc.)

components_of_onnx's People

Contributors

pinto0309 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.