ONNX-to-PyTorch model converter
Top 50.1% on sourcepulse
This project provides a tool to convert ONNX models into PyTorch models, enabling users to leverage PyTorch's ecosystem for models originally defined in ONNX. It is targeted at researchers and developers who need to integrate ONNX models into PyTorch workflows or fine-tune them using PyTorch.
How It Works
The converter parses the ONNX graph and translates each ONNX operation into its PyTorch equivalent. It supports a wide range of models and operations, including segmentation, detection, classification, and transformers. For unsupported operations, users can easily extend the converter by defining custom PyTorch modules and registering them.
Quick Start & Requirements
pip install onnx2torch
or conda install -c conda-forge onnx2torch
.Highlighted Details
onnx.version_converter
.torch.onnx.export
.Maintenance & Community
The project is maintained by ENOT developers and acknowledges contributions from several individuals. Community engagement is encouraged through issue reporting and merge requests.
Licensing & Compatibility
The project is released under an unspecified license. Compatibility for commercial use or closed-source linking is not explicitly detailed.
Limitations & Caveats
The converter covers only a limited number of PyTorch/ONNX models and operations, and users may encounter unsupported operations. The effectiveness of the opset version workaround may vary.
11 months ago
1 week