diff --git a/.gitignore b/.gitignore index 4ff1a99..79a271c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,8 @@ -__pycache__/ +*/__pycache__/ gym/ *ppt *pptx -*.onnx \ No newline at end of file +*.onnx +/test_onnx/ +/modified_onnx/ \ No newline at end of file diff --git a/__pycache__/app.cpython-38.pyc b/__pycache__/app.cpython-38.pyc new file mode 100644 index 0000000..330c705 Binary files /dev/null and b/__pycache__/app.cpython-38.pyc differ diff --git a/__pycache__/onnx_modifier.cpython-38.pyc b/__pycache__/onnx_modifier.cpython-38.pyc new file mode 100644 index 0000000..44fdafa Binary files /dev/null and b/__pycache__/onnx_modifier.cpython-38.pyc differ diff --git a/docs/onnx_modifier_todo.md b/docs/onnx_modifier_todo.md deleted file mode 100644 index 672e5dc..0000000 --- a/docs/onnx_modifier_todo.md +++ /dev/null @@ -1,44 +0,0 @@ -# Add node - -extend shape: https://github.com/onnx/onnx/issues/3920 - -add node (extend output's dim): https://github.com/onnx/onnx/issues/2709 - -add node (NMS): https://github.com/onnx/onnx/issues/2216 - -add node (add preprocess nodes): https://zhuanlan.zhihu.com/p/394395167 - -combine models: - - https://stackoverflow.com/questions/66178085/can-i-combine-two-onnx-graphs-together-passing-the-output-from-one-as-input-to - - https://www.zhihu.com/people/kai-xin-zui-zhong-yao-76/posts - -# modify attribute of nodes - -topk: https://github.com/onnx/onnx/issues/2921 - - -# done - -remove layer: https://github.com/onnx/onnx/issues/2638 - - - -# 或许可以帮助 - -http://yyixx.com/docs/algo/onnx/ - - -# 待做的 - -boost: 支持添加更复杂的节点 -boost: 直接使用侧边栏inputs/outputs属性框完成重命名,并提供reset功能 -boost: 支持处理属性的修改 - - 暂时只支持新增节点,而不支持已有节点开放(防止出现不必要的错误) - -(fixed)bug: 不可连续添加某一种类型的节点(无反应) -(solved)question: 在add()函数里,为什么对conv的inputs进行遍历,只能得到X,而得不到W和B? - - 因为遍历的条件里,有判断是否有initializer的条件 - - -# 其他 -在修改节点输入输出时,建议修改方法是:把某一节点的输入,更改为另一节点的输出;而不是把某一节点的输出,改为另一节点的输入。 \ No newline at end of file diff --git a/docs/todo_list.md b/docs/todo_list.md new file mode 100644 index 0000000..547217b --- /dev/null +++ b/docs/todo_list.md @@ -0,0 +1,39 @@ +# TODO + +- support desktop application. + +- support adding more complicated nodes (which has some simple parameters). + +- support combine models. + +- support user-defined input/output number when the type of node's input/output is list. + +- slim the codes. + - because some `.js` files (like electron.js and even python.js) in the `static` folder and `electron.html` in `templates` folder are legacy of Netron and can be further slimmed. + + +# Some known reference issues/feature requests + +- add node (experimentally supported) + + - (extend output's dim): https://github.com/onnx/onnx/issues/2709 + + - add node (NMS): https://github.com/onnx/onnx/issues/2216 + + - add node (add preprocess nodes): https://zhuanlan.zhihu.com/p/394395167 + +combine models (not supported): + + - https://stackoverflow.com/questions/66178085/can-i-combine-two-onnx-graphs-together-passing-the-output-from-one-as-input-to + + - https://www.zhihu.com/people/kai-xin-zui-zhong-yao-76/posts + +- modify attribute of nodes (supported) + + - topk: https://github.com/onnx/onnx/issues/2921 + +- remove layer (supported): https://github.com/onnx/onnx/issues/2638 + + + + diff --git a/docs/update_log.md b/docs/update_log.md index e69de29..86f6fb6 100644 --- a/docs/update_log.md +++ b/docs/update_log.md @@ -0,0 +1,21 @@ +# onnx-modifier update log + +## 20220612 +- update graph automatically as soon as a modification is invoked. +- fix `shared arguments` issue. +- support editing the attributes and the name of inputs/outputs directly in the placeholders in the sidebar. +- newly support features: + - Add new nodes. + - edit the attributes of nodes. +- re-organize the layouts of buttons. + +## 20220510 +fix external data loading error for unix platform. + +## 20220501 +- the first public version. +- support features: + - delete/recover node. + - rename the input and output of nodes. +- use sweetalert for nice alert. + diff --git a/readme.md b/readme.md index b44f2e3..e5fa41e 100644 --- a/readme.md +++ b/readme.md @@ -126,7 +126,7 @@ The following are some notes for this feature: 6. For the `Inputs/Outputs` with type `list`, it is forced to be at most 8 elements in the current version. If the actual inputs/outputs number is less than 8, we can leave the unused items with the name starting with `list_custom`, and they will be automatically omitted. -7. This feature is experimentally supported now and may be not very robust. So any issues are warmly welcomed if some unexpected result is encountered. +7. This feature is experimentally supported now and may be not very robust. So any issues are warmly welcomed if some unexpected results are encountered. # Sample models @@ -141,6 +141,13 @@ For quick testing, some typical sample models are provided as following. Most of `onnx-modifier` is under active development 🛠. Welcome to use, create issues and pull requests! 🥰 +# TODO + +- [ ] Create executable file for easier launching for the following platforms: + - [ ] Linux + - [ ] Windows +- [ ] Add `merge models` feature + # Credits and referred materials - [Netron](https://github.com/lutzroeder/netron) diff --git a/readme_zh-CN.md b/readme_zh-CN.md index 7139e4b..b571484 100644 --- a/readme_zh-CN.md +++ b/readme_zh-CN.md @@ -52,7 +52,7 @@ - `Refresh`:刷新界面,预览当前编辑得到的模型图结构; - > 在当前版本里,模型图结构会在每次编辑操作后即时自动更新,无需手动刷新。所以该按钮用到的次数会比之前的版本里少上不少(解放双手:raised_hands:) + > 在当前版本里,模型图结构会在每次编辑操作后即时自动更新,无需手动刷新。所以该按钮用到的次数会比之前的版本里少上不少(解放双手:raised_hands:)。 - `Reset`:重置模型图结构为导入时的初始状态; @@ -64,7 +64,7 @@ 一起来详细康康。 -## 删除节点 +## 删除/恢复节点 删除节点有两种模式:`Delete With Children` 和 `Delete Single Node`. 后者只删除当前单个节点;而前者还会自动删除以这个节点为根节点的所有子节点,当我们需要删除一长串节点时,这个功能会比较有用。