Depth-Anything-ONNX icon indicating copy to clipboard operation
Depth-Anything-ONNX copied to clipboard

Regarding the shapes of the input and output of the model nodes

Open hhhFuture opened this issue 7 months ago • 2 comments

Hello, author. I'd like to ask you a question. After I converted DepthAnythingV2 to onnx using the code you provided, I wanted to view the output of each node, including the shape of the nodes and other contents. However, when I opened it with netron, I could only see the bias or weight of the node input. The shape of the data input into the node and the shape of the output of the node cannot be seen. I compared the yolo model and found that the onnx model of yolo can show the shape of the output and input of each node. What is the reason for this? May I ask, if I want to see the shape of the input and output of each node after DepthAnythingV2 is converted to onnx, how can I operate it?

Image

Image

hhhFuture avatar May 08 '25 05:05 hhhFuture

use onnxsim i suppose

Image

SnifferCaptain avatar May 08 '25 12:05 SnifferCaptain

我想使用 onnxsim

Image

Thank you for your reply. Yes, your method is correct. Indeed, after using onnxsim, the output of each node can be seen. Moreover, I also tested the results of the two models processing the same image. The implementation shows that the maximum difference between them is 0. It can be proved that the model processed by onnxsim is different from the original model except for some nodes (onnxsim will delete and fold some nodes). Their results are consistent. Thank you again for your reply!

hhhFuture avatar May 09 '25 06:05 hhhFuture