netron icon indicating copy to clipboard operation
netron copied to clipboard

Model editing support

Open linkerzhang opened this issue 5 years ago • 15 comments

Is there any plan to have Netron support model editing please? This will be a very useful feature

linkerzhang avatar May 23 '19 14:05 linkerzhang

Is it possible to edit names of input and output layers of onnx model?

mrgloom avatar May 23 '19 16:05 mrgloom

There's one more scenario happened frequently is, do some manual constant folding optimization. Say, it's known that a sub-graph can be constant-folded, and user would like to directly remove the sub-graph and replace it with an initializer.

linkerzhang avatar Jun 05 '19 17:06 linkerzhang

@linkerzhang could this be implemented as an ONNX Optimizer?

lutzroeder avatar Jun 05 '19 19:06 lutzroeder

@lutzroeder Editing would be great. I really would like to use it for training with yolo and darknet. In fact I found your tool googleing exactly for a way to edit the files with a gui

vfbsilva avatar Jun 18 '19 06:06 vfbsilva

does netron support editing now?

minrui-hust avatar Oct 03 '21 00:10 minrui-hust

Editing feature in Netron itself would be very cool!! I love the Netron UI for ONNX model inspection and all information is presented in one integrated fashion!

schegde avatar Feb 18 '22 18:02 schegde

Even just basic editing support would be amazing:

  • Include/exclude nodes from the list of input/output nodes
  • Remove nodes

chausner-audeering avatar Mar 11 '22 14:03 chausner-audeering

Since models can be edited through the onnx python API e.g here, it would be a possible way of resolving this to introduce a way to run python script, and then the community could add their own scripts into the editor.

davids91 avatar Mar 23 '22 07:03 davids91

This could be helpful for anyone looking for something similar: https://github.com/ZhangGe6/onnx-modifier It builds on top of Netron.

vjsrinivas avatar Jul 24 '22 16:07 vjsrinivas

Interested in this feature too and like to contribute. It involves 3 areas:

  1. side-bar attribute view need to be editable
  2. data changed in side-bar be accessiable by model
  3. serialization (protobuf, json, flatbuffer, xml...)

The current protoc.js and protobuf.js only have decoder/reader. Should we add encoder/writer by ourself? Or should we use existing project like https://github.com/protobufjs/protobuf.js/ ?

weimingzha0 avatar Oct 09 '22 06:10 weimingzha0

Should we add encoder/writer by ourself?

Yes, extend the existing libraries instead of adding dependencies.

lutzroeder avatar Oct 09 '22 16:10 lutzroeder

I have an initial implementation for protobuf encoding (https://github.com/lutzroeder/netron/pull/995)

weimingzha0 avatar Oct 18 '22 22:10 weimingzha0

Bump! Any news?

Zireael07 avatar Aug 10 '23 15:08 Zireael07

bump

KyotoSunshine avatar Jan 15 '24 06:01 KyotoSunshine

This work is still active and could be help

https://github.com/ZhangGe6/onnx-modifier

jinguojie-alibaba avatar Apr 03 '24 07:04 jinguojie-alibaba