lutzroeder / netron

Visualizer for neural network, deep learning and machine learning models
https://netron.app
MIT License
27.83k stars 2.76k forks source link

Tengine support #440

Closed li-zihang closed 4 years ago

li-zihang commented 4 years ago

Hi Lutz,

I was developing supporting Tengine/tmfile model on Netron, and it's almost done. Screenshot from 2020-03-10 01-34-36

I was in version 3.8.4, and there I found in DEVELOPMENT.md says using npx electron-builder --linux I could be able to build binaries. But it failed with error code ERR_ELECTRON_BUILDER_CANNOT_EXECUTE. It seems stuck by downloading electron/releases/download/v8.0.0/electron-v8.0.0-linux-x64.zip.

I got this: Screenshot from 2020-03-11 22-06-24

And, I noticed you have deleted 'how to release binaries' in the latest version. Could you please tell me what should I do?

lutzroeder commented 4 years ago

Supporting branches and custom builds is not a priority.

One option would be to merge the changes to the main branch. Given the large number of basically identically formats it would need some explaining why there needs to be another custom format instead of using an existing one like ONNX.

li-zihang commented 4 years ago

Hi Lutz,

As I mentioned, I'm doing the Tengine model supporting. But I'm still stuggling with some bugs.

  1. After I updated to your latest code, all my nodes turned to black. However, I've already set categories in metadata, and it shows correct color before I update code.

image

It's quite confusing. Did you change how Netron deal with layer color?

  1. I'm going to merge into the main branch in a few days, what do I need to provide? As you asked, the reason why I'm supporting Tengine, here is the introduction of this framework:

Tengine is an application development platform for AIoT scenarios, launched by Open AI Lab which is dedicated to solving the fragmentation problem of AIoT industrial chain and accelerating the landing of AI industrialization. Tengine is specially designed for AIoT scenarios, and it has several features, such as cross platform, heterogeneous scheduling, chip bottom acceleration, ultra light weight and independent, and complete development and deployment tool chain. Tengine is compatible with a variety of operating systems and deep learning algorithm framework, which simplifies and accelerates the rapid migration of scene oriented AI algorithm on embedded edge devices, as well as the actual application deployment. Besides, Tengine is OpenCV core partnets, contributing code to the OpenCV open source community, performing in-depth optimization on the ARM embedded platform for OPENCV-DNN, and integrating the Tengine high-performance arm computing library To the OpenCV DNN module to enhance its network model inference performance on the arm platform, and integrate it in OpenCV 4.3 version for open source release. OpenCV 4.3 and later versions will use Tengine as the CNN engine of the Arm SoC to improve the reasoning speed of OpenCV's embedded artificial intelligence system in Arm, so that intelligent algorithms and applications can be deployed on the embedded device side more quickly and efficiently. Tengine is also an open-source project with more than 1k+ stars. https://github.com/OAID/Tengine

Tengine use '.tmfile' models. In tmfiles, all data are stored as binary format. Besides, Caffe models, TensorFlows and some other mainstream frameworks are supported in Tengine.

It is provided by Tengine team officially.

Tengine has trully got quite a lot active developers in China. And because of it's optimised models and algorithm, it's actually attracting more attention.

A model viewer is very necessary. Certainly, Netron is the best choice.

So, if you need more information, please let me know. I'll try to merge into the main branch as long as I fix them. Here is my fork.

lutzroeder commented 4 years ago

After I updated to your latest code, all my nodes turned to black. However, I've already set categories in metadata, and it shows correct color before I update code.

Node now exposes get metadata() returning an object with category and documentation instead of get category() and get documentation() properties.

In the future you will have to figure out such changes by yourself and provide fixes.

why I'm supporting Tengine, here is the introduction of this framework:

Yes, the question is more why is the Tengine team inventing another new format instead of picking one of the many existing formats that are essentially the same. There are dozens of deep learning formats, why don't you put some effort in removing similar formats instead adding more new ones?

what do I need to provide?

lutzroeder commented 4 years ago

test_multi_input_output.zip