Package: simple-onnx-processing-tools
simple-onnx-processing-toolsA set of simple tools for splitting, merging, OP deletion, size compression, rewriting attributes and constants, OP generation, change opset, change to the specified input order, addition of OP, RGB to BGR conversion, change batch size, batch rename of OP, and JSON convertion for ONNX models.1. ToolsHostPC# (1) Minimum configuration installation with no dependent packages installed$pipinstall-Usimple-onnx-processing-tools\&&pipinstall-Uonnx\&&python3-mpipinstall-Uonnx_graphsurgeon--index-urlhttps://pypi.ngc.nvidia.com

or# (2) When installing all dependent packages such as onnx-simplifier, onnxruntime, numpy, etc...$pipinstall-Usimple-onnx-processing-tools[full]\&&pipinstall-Uonnx\&&python3-mpipinstall-Uonnx_graphsurgeon--index-urlhttps://pypi.ngc.nvidia.comDocker$dockerrun--rm-it\-v`pwd`:/workdir\-w/workdir\ghcr.io/pinto0309/simple-onnx-processing-tools:1.1.30No.Tool NameTagsSummary1snc4onnxSimple tool to combine(merge) onnx models.SimpleNetworkCombine Tool forONNX.2sne4onnxA very simple tool for situations where optimization with onnx-simplifier would exceed the Protocol Buffers upper file size limit of 2GB, or simply to separate onnx files to any size you want.SimpleNetworkExtraction forONNX.3snd4onnxSimple node deletion tool for onnx.SimpleNodeDeletion forONNX.4scs4onnxA very simple tool that compresses the overall size of the ONNX model by aggregating duplicate constant values as much as possible.SimpleConstant valueShrink forONNX.5sog4onnxSimple ONNX operation generator.SimpleOperationGenerator forONNX.6sam4onnxA very simple tool to rewrite parameters such as attributes and constants for OPs in ONNX models.SimpleAttribute and ConstantModifier forONNX.7soc4onnxA very simple tool that forces a change in the opset of an ONNX graph.SimpleOpsetChanger forONNX.8scc4onnxVery simple NCHW and NHWC conversion tool for ONNX. Change to the specified input order for each and every input OP. Also, change the channel order of RGB and BGR.SimpleChannelConverter forONNX.9sna4onnxSimple node addition tool for onnx.SimpleNodeAddition forONNX.10sbi4onnxA very simple script that only initializes the batch size of ONNX.SimpleBatchsizeInitialization forONNX.11sor4onnxSimpleOPRenamer forONNX.12soa4onnxSimple modelOutput OPAdditional tools forONNX.13sod4onnxSimple modelOutput OPDeletion tools forONNX.14ssi4onnxSimpleShapeInference tool forONNX.15sit4onnxTools for simple inference testing using TensorRT, CUDA and OpenVINO CPU/GPU and CPU providers.SimpleInferenceTest forONNX.16onnx2jsonExports the ONNX file to a JSON file.17json2onnxConverts a JSON file to an ONNX file.18sed4onnxSimple ONNX constant encoder/decoder. Since the constant values in the JSON files generated by onnx2json are Base64-encoded values, ASCII <-> Base64 conversion is required when rewriting JSON constant values.19ssc4onnxChecker with simple ONNX model structure.SimpleStructureChecker forONNX. Analyzes and displays the structure of huge size models that cannot be displayed by Netron.20sio4onnxSimple tool to change the INPUT and OUTPUT shape of ONNX.21svs4onnxA very simple tool to swap connections between output and input variables in an ONNX graph.SimpleVariableSwitch forONNX.22onnx2tfSelf-Created Tools to convert ONNX files (NCHW) to TensorFlow format (NHWC). The purpose of this tool is to solve the massive Transpose extrapolation problem in onnx-tensorflow (onnx-tf).23sng4onnxA simple tool that automatically generates and assigns an OP name to each OP in an old format ONNX file.24sde4onnxSimple doc_string eraser for ONNX.25spo4onnxSimple tool for partial optimization of ONNX. Further optimize some models that cannot be optimized with onnx-optimizer and onnxsim by several tens of percent. In particular, models containing Einsum and OneHot.26components_of_onnx[WIP]ONNX parts yard. The various operations described inOperator Schemasare converted in advance into OP stand-alone ONNX files.2. Very useful toolsNo.Tool NameAuthorTagsSummary1OnnxGraphQtfateshelledONNX model visualizer. Model structure can be edited on the visualization tool.2onnx-modifierZhangGe6To edit an ONNX model, One common way is to visualize the model graph, and edit it using ONNX Python API.3onnx-simplifierdaquexianONNX Simplifier is presented to simplify the ONNX model. It infers the whole computation graph and then replaces the redundant operators with their constant outputs.4SparsifyneuralmagicEasy-to-use UI for automatically sparsifying neural networks and creating sparsification recipes for better inference performance and a smaller footprint.5DeepSparse EngineneuralmagicSparsity-aware neural network inference engine for GPU-class performance on CPUs.6Sparsebitmegvii-researchSparsebit is a toolkit with pruning and quantization capabilities. It is designed to help researchers compress and accelerate neural network models by modifying only a few codes in existing pytorch project.7onnionIdeinonnion project. compile onnx to python. runtime depends only numpy.2-1. OnnxGraphQt - [WIP] Startup Method Samplegitclonehttps://github.com/fateshelled/OnnxGraphQtcdOnnxGraphQt# build docker image./docker/build.bash# run./docker/run.bash3. Acknowledgmentshttps://github.com/onnx/onnx/blob/main/docs/PythonAPIOverview.mdhttps://docs.nvidia.com/deeplearning/tensorrt/onnx-graphsurgeon/docs/index.htmlhttps://github.com/NVIDIA/TensorRT/tree/main/tools/onnx-graphsurgeonhttps://github.com/onnx/onnx/blob/main/docs/Operators.md4. Referenceshttps://github.com/PINTO0309/PINTO_model_zoohttps://github.com/PINTO0309/PINTO_model_zoo/tree/main/115_MoveNet/PINTO_Special/barracuda_gathernd_splithttps://user-images.githubusercontent.com/33194443/192281791-cf469dfd-f29a-4301-bd39-e96dd868dad9.mp4