ONNX Copernicus Node with depth anything V2
2861 5 2-
- josbin
- Member
- 20 posts
- Joined: April 2018
- Offline
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
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
- Staff
- 640 posts
- Joined: Aug. 2019
- Offline
-
- josbin
- Member
- 20 posts
- Joined: April 2018
- Offline
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
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
- Staff
- 640 posts
- Joined: Aug. 2019
- Offline
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.
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.
Edited by johnmather - Feb. 11, 2025 00:04:48
-
- josbin
- Member
- 20 posts
- Joined: April 2018
- Offline
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 (ෆ˙ᵕ˙ෆ)♡!
(ෆ˙ᵕ˙ෆ)
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
- Member
- 9 posts
- Joined: May 2020
- Offline
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]


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]
Edited by GSO - May 7, 2025 11:46:53
-
- Quick Links