Search - User list
Full Version: ONNX Copernicus Node with depth anything V2
Root » Technical Discussion » ONNX Copernicus Node with depth anything V2
josbin
Hi, I am getting an error when using the COPs ONNX Inference node. I am trying to convert images to depth maps with depth anything V2 and their onnx files. Here is the link to the Models: https://github.com/fabio-sim/Depth-Anything-ONNX [github.com]

I am getting the error: First dimensions of the model output tensor doesn't divide into 3 channels

here some screenshots. I am not sure what the problem is. Maybe someone can give me a pointer!


Best
Josh
johnmather
It should work if you set it like this:
josbin
hey John,

thanks for the quick reply. I assume I am missing something cause my node throws this error:


Error
The specified output shape must be the same length as the model's output shape length. output index : 0 , specified length : 4 , model shape length : 3


Also, How did you find out what to put in the settings?

Best and Thanks,
Josh
johnmather
Sorry, the settings above apply to V1, not V2.

To get V2 working, I did the following:

1. Load your source image with a File COP
2. Plug it into a Bright COP with the shift set to -0.45
3. Plug that into an ONNX COP.
4. Load the model file and press "Setup Shapes from Model"
5. Under "Number of Outputs" #1, check the box next to Channel Size and set it to 1
6. Go to the Input & Output tab
7. Check the box next to "Resample Size" and set it to 518x518
8. Under "Number of Outputs" #1, set the Output Tensor Shape to 1 518 518, 1 0 0, 0 0 0.
9. Check the box next to "Channel Size" and set it to 1.
10. Plug this node into an equalize node to view the output.
josbin
Hey sorry for the late reply,

I got it working but never got around to sending a proper reply. I got it to work with these settings in the end. For me the question still remains of how I would be able to find information on what to set my tensor shapes to etc. I am not familiar with the topic of machine learning at all (I am more of a art artist than tech artist), but I think me and many more people would love to see some content on how to use onnx nodes and models in houdini. It is mega powerful and boradly applicable!

Anyways I hugley appreciate the community here and since ZBrush, Houdini is the only 3D tool that managed to make fall in love with it (ෆ˙ᵕ˙ෆ)♡!

(ෆ˙ᵕ˙ෆ)
GSO
Hi,

thanks to your posts I've successfully configured AnyDepth v2, merci!
Now I'd like to test Apple Depth Pro [github.com] - supposedly it does perform better especially on details and contours compared to any other depth estimation model.

Unfortunately I keep getting errors in the Onyx COP node. How can one discover the parameters to use in the node?

Here the Onyx files: https://huggingface.co/onnx-community/DepthPro-ONNX/tree/main/onnx [huggingface.co]



forbidden14



Normalize wrangle code:
// DepthPro input normalization: ->
@C = @C * 2.0 - 1.0;
marius.enemark.due
Hej there forbidden14 would it be possible for you to give me the files that you have created here I'm trying to crayday Onyx Products myself but I am strugling to figure out what the other settings or that you have in your copnet Network
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.