Project Overview: onnx-modifier
The onnx-modifier project is a tool designed to make editing ONNX (Open Neural Network Exchange) models more intuitive and efficient. Traditionally, modifying these models requires coding and visualization, which can be a repetitive and time-consuming process. onnx-modifier streamlines this by allowing users to both edit and preview ONNX models in a fully visual interface.
Key Features
-
Visual Editing & Preview: Users can directly edit the model graph using a visualization panel, simplifying the process of checking changes without constant coding iteration.
-
Integration: Built upon the popular network visualization tool, Netron, and the Flask web framework, the tool offers a reliable and flexible interface for users.
Editing Capabilities
onnx-modifier supports a wide variety of operations, making it a comprehensive tool for model editing:
- Deleting and adding new nodes
- Renaming inputs and outputs for both nodes and the entire model
- Adding new model outputs and inputs
- Editing node attributes and model initializers
- Adjusting model input shapes
Getting Started Guide
There are multiple ways to launch the onnx-modifier:
1. Via Command Line:
- Clone the repository and install necessary Python packages.
- Run the application using Flask, after which the tool launches in a web browser.
2. Via Executable File:
- For Windows, you can download and run an executable file to get started instantly.
3. Using a Docker Container:
- Build a Docker container and run the tool, mapping the necessary ports and folders for access through a local URL.
How to Use onnx-modifier
The interface of onnx-modifier places graph-level operations at the top-left, with buttons for actions such as resetting or downloading the model, adding nodes, and applying shape inference. Node-level operations are accessible via a sidebar by selecting specific nodes.
Advanced Editing Features:
- Delete Nodes: Choose between deleting a specific node or a node along with its child nodes.
- Add New Nodes: Insert new nodes into the model by specifying node type, attributes, and inputs/outputs.
- Rename Node Inputs and Outputs: Seamlessly change node connections to modify the model’s data flow.
- New Model Inputs/Outputs: Add inputs or outputs to adapt the model to various configurations or analysis needs.
- Edit Attributes and Initializers: Fine-tune models by altering node attributes or changing initializer values.
Sample Models:
For quick testing, onnx-modifier provides links to a selection of pre-trained models from the ONNX model zoo.
Future Developments & Contributions
The project is continuously evolving, welcoming user feedback and contributions to enhance its capabilities. It maintains an active development status, encouraging community engagement through issues and pull requests.
Acknowledgments
The development of onnx-modifier leverages a range of open-source libraries and platforms, drawing inspiration and functionality from tools such as Netron, Flask, ONNX utilities, and many more, reflecting a collaborative spirit in software development.
The onnx-modifier project represents a significant advancement in making deep learning model refinement more accessible and efficient for practitioners and researchers alike.