Convert Torch7 neural network models to Apple CoreML format for deployment on iOS/macOS devices.
Torch2CoreML is a Python library that converts Torch7 neural network models into Apple CoreML format. It solves the problem of deploying PyTorch/Torch7-trained models to Apple devices by providing a conversion pipeline that handles common Torch7 layers and preprocessing requirements. The tool enables developers to run converted models natively on iOS and macOS applications.
Machine learning engineers and iOS developers who need to deploy Torch7/PyTorch models to Apple devices, particularly those working with neural style transfer, image processing, or other computer vision applications.
Developers choose Torch2CoreML because it provides a specialized, focused solution for converting Torch7 models to CoreML with support for 21 common layers and image preprocessing parameters. Unlike generic conversion tools, it specifically addresses the Torch7-to-CoreML workflow with a simple API and practical examples.
Torch7 -> CoreML
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Specifically targets Torch7 models loaded via PyTorch, with a simple `convert` function that streamlines the workflow for Apple deployment, as highlighted in the example for fast-neural-style.
Built-in parameters for BGR/RGB handling, bias, and scaling in `preprocessing_args` and `deprocessing_args`, reducing manual work for image-based models like style transfer.
Provides an `unknown_layer_converter_fn` callback to manually implement support for unsupported layers, allowing for extensibility beyond the 21 predefined layers.
Includes a practical example for converting fast-neural-style models, making it easier for developers to adapt the tool to similar computer vision applications.
Requires Python 2.7 and Xcode 9, which are deprecated and may not be compatible with modern systems, limiting adoption and maintenance.
Only covers 21 Torch7 layers, excluding many modern neural network components, which forces reliance on the callback function for unsupported cases.
The README offers minimal guidance with a short tutorial link, lacking in-depth examples or troubleshooting help for complex conversion scenarios.