Sub_Netron is an extension of the Netron model viewer that lets you select nodes—either via double-click or by dragging a selection box (with the Shift key held)—and extract a subgraph from an ONNX model.
Make sure you have Python installed. Then, install the required dependencies by running:
pip install -r requirements.txt
To launch the full Sub_Netron workflow (Netron interface + backend processing), run:
python run_subnetron.py <path_to_model.onnx>
This will:
-
Launch the Netron interface in your browser for model inspection.
-
Start the backend validation and extraction script.
-
Shift + Drag to draw a selection box and select nodes in the graph.
-
Click the Reset button to unselect all currently highlighted nodes.
-
After pressing Validate&Extract, the tool will send the selected node IDs and model path to the backend for validation and extraction.
Netron is a viewer for neural network, deep learning and machine learning models.
Netron supports ONNX, TensorFlow Lite, Core ML, Keras, Caffe, Darknet, PyTorch, TensorFlow.js, Safetensors and NumPy.
Netron has experimental support for TorchScript, TensorFlow, MXNet, OpenVINO, RKNN, ML.NET, ncnn, MNN, PaddlePaddle, GGUF and scikit-learn.
macOS: Download the .dmg
file or run brew install --cask netron
Linux: Download the .AppImage
file or run snap install netron
Windows: Download the .exe
installer or run winget install -s winget netron
Browser: Start the browser version.
Python: Run pip install netron
and netron [FILE]
or netron.start('[FILE]')
.
Sample model files to download or open using the browser version: