{"categories":[{"label":"Artificial Intelligence","url":"https://skillfed.io/packages/category/scientific-engineering-artificial-intelligence/7"}],"enrichment":{"capability":"Converts ONNX models to PyTorch modules with a simple API, supporting a limited but growing set of operations and popular model architectures.","skillfed_tags":["model-conversion","onnx","pytorch"],"use_cases":["Convert a pre-trained ONNX model to PyTorch for fine-tuning or inference in a PyTorch-native pipeline.","Integrate ONNX-exported models from other frameworks into a PyTorch codebase.","Extend the converter with custom layers to support domain-specific ONNX operations not yet in the core library.","Validate ONNX model behavior by running inference in PyTorch and comparing outputs against ONNX Runtime.","Deploy ONNX models trained elsewhere as native PyTorch modules without maintaining separate inference code."],"what_it_does":"onnx2torch is a converter that transforms ONNX model files into native PyTorch modules. It accepts either a file path or a loaded ONNX model object and returns a PyTorch nn.Module that can be used directly for inference or training. The converter is designed to be extensible\u2014you can register custom PyTorch layers for unsupported ONNX operations using a decorator pattern, and converted models can be exported back to ONNX using torch.onnx.export.\n\nThe package supports a curated set of models including popular segmentation architectures (DeepLabV3+, UNet, HRNet), detection models (YOLOv3, YOLOv5, RetinaNet), classification networks (ResNet, MobileNet, EfficientNet, ViT), and transformers (Swin, GPT-J). However, it covers only a limited number of ONNX operations, so not all ONNX models will convert successfully. The maintainers explicitly encourage users to report unsupported models and operations.","worth_installing":"Yes, if you need to convert ONNX models to PyTorch and your model uses supported operations. The package is stable and permissively licensed, with low install friction. However, verify that your specific ONNX model's operations are supported before committing to it\u2014the converter does not support all ONNX operations, and maintenance has slowed. If your model is unsupported, you may need to implement custom converters or consider alternatives."},"id":"onnx2torch","links":{"html":"https://skillfed.io/packages/onnx2torch","md":"https://skillfed.io/packages/onnx2torch.md","pypi":"https://pypi.org/project/onnx2torch/"},"maintenance":{"status":"aging"},"meta":{"latest_release":"2024-08-07","license_spdx":null,"license_treatment":"permissive","name":"onnx2torch","python_support":"supports_current","summary":"ONNX to PyTorch converter"},"popularity":{"monthly_downloads":225660,"position":9216,"tier":"top_15000"},"security":{"n_vulnerabilities":0},"version":"1.5.15"}
