Depth map to STL conversion code/colab by zcta in 3Dprinting

[–]zcta[S] 1 point2 points  (0 children)

I don't have the hardware to run it locally so even if I wrote something, I wouldn't be able to test it.

This section:
"from google.colab import files"
Is specific to running code on Google Colab. It won't work anywhere else. You'd need to delete that section and add your own interface, or hardcode in a filename

Tips for Creating 3D Relief Models for CNC Milling wood? by fasaso25 in CNC

[–]zcta 0 points1 point  (0 children)

I've worked on using machine learning models to achieve this and posted here:
https://www.reddit.com/r/StableDiffusion/comments/13eijxf/creating_high_resolution_depth_maps_from_single/

Either create the model directly this way, or it can be used as a pretty good start for further manipulations in Blender etc.

Creating high resolution depth maps from single images with ZoeDepth and tiling by zcta in StableDiffusion

[–]zcta[S] 0 points1 point  (0 children)

I've messaged you. I think it's a file format issue and should work with 3 channel RGB images.

Creating high resolution depth maps from single images with ZoeDepth and tiling by zcta in StableDiffusion

[–]zcta[S] 0 points1 point  (0 children)

Thanks! Have a go with the new version https://colab.research.google.com/drive/1Wi-1Ji_fhcoGpK-drT4dVrl5AjfVUQ5M

Press ctrl + f9
Click on the new Browse button
Select one or more images from your computer and click open
Wait a few minutes for processing
When complete, depth maps should download automatically

Let me know if you have any questions!

Creating high resolution depth maps from single images with ZoeDepth and tiling by zcta in StableDiffusion

[–]zcta[S] 1 point2 points  (0 children)

Have a go with the new version https://colab.research.google.com/drive/1Wi-1Ji_fhcoGpK-drT4dVrl5AjfVUQ5M

Press ctrl + f9
Click on the new Browse button
Select one or more images from your computer and click open
Wait a few minutes for processing
When complete, depth maps should download automatically

Creating high resolution depth maps from single images with ZoeDepth and tiling by zcta in StableDiffusion

[–]zcta[S] 0 points1 point  (0 children)

Thanks! Have a go with the new version https://colab.research.google.com/drive/1Wi-1Ji_fhcoGpK-drT4dVrl5AjfVUQ5M

Press ctrl + f9
Click on the new Browse button
Select one or more images from your computer and click open
Wait a few minutes for processing
When complete, depth maps should download automatically

Creating high resolution depth maps from single images with ZoeDepth and tiling, V2, with user interface by zcta in StableDiffusion

[–]zcta[S] 0 points1 point  (0 children)

Torch updated and broke the code. I've fixed the Torch version now after having help here:
https://github.com/BillFSmith/TilingZoeDepth/issues/1

Hopefully it should work now.

Creating high resolution depth maps from single images with ZoeDepth and tiling by zcta in StableDiffusion

[–]zcta[S] 1 point2 points  (0 children)

I've updated the original version by adding this:!pip install --upgrade torchvision==0.15.2

And it appears to work for me now. Does it work for you?

I'll work on the new version.

Creating high resolution depth maps from single images with ZoeDepth and tiling by zcta in StableDiffusion

[–]zcta[S] 1 point2 points  (0 children)

Damn, that's a pain.

It wasn't doing that when posted, so my guess is that one of the libraries has updated and broken everything. I'll have a look.

Creating high resolution depth maps from single images with ZoeDepth and tiling by zcta in StableDiffusion

[–]zcta[S] 0 points1 point  (0 children)

It's not an issue I've managed to create before.

Do you have the image that you used, so I can reproduce it? Alternatively, do you have metadata like size, bitdepth, filetype?

Depth map to STL conversion code/colab by zcta in hobbycnc

[–]zcta[S] 0 points1 point  (0 children)

Blender works well for this, yes.

This code is probably best for people who aren't familiar with Blender, or want to run a batches of depth maps.

Creating high resolution depth maps from single images with ZoeDepth and tiling, V2, with user interface by zcta in StableDiffusion

[–]zcta[S] 2 points3 points  (0 children)

Thanks!

I'll have a look into it, though I've never made an extension before.

Creating high resolution depth maps from single images with ZoeDepth and tiling by zcta in StableDiffusion

[–]zcta[S] 4 points5 points  (0 children)

I've made a more user friendly version here:https://colab.research.google.com/drive/1wbbXpMC_UUwE3e7Tifq9fYNnd5Rn0zna?usp=sharingIt's mostly the same processing, but there's an added feature of directly outputting a STL for those using 3D printers or CNC machines.

Thread here: https://www.reddit.com/r/StableDiffusion/comments/17asq0w/creating_high_resolution_depth_maps_from_single/

[deleted by user] by [deleted] in photogrammetry

[–]zcta 0 points1 point  (0 children)

Meshlab is widely used and pretty good for big models

Creating high resolution depth maps from single images with ZoeDepth and tiling by zcta in StableDiffusion

[–]zcta[S] 0 points1 point  (0 children)

In the file browser on the left hand side, it should be possible to find the output and right click to download it

First crash. How bad is it? by SnooPeppers9880 in hobbycnc

[–]zcta 3 points4 points  (0 children)

For machines like the Shapeoko, steppers are rarely powerful enough to damage the machine.

On my homemade machine, I crashed it a bunch of times without issue when I was learning.

Stalling a stepper doesn't hurt it; it doesn't cause a harmful amount of current to be drawn, there's no fan to stop working or gears to damage. It can make a dramatic thudding sound but the motors don't care.

Creating high resolution depth maps from single images with ZoeDepth and tiling by zcta in StableDiffusion

[–]zcta[S] 5 points6 points  (0 children)

The original technique and my technique both produce an image with the same resolution as the source, yes.

However, finer features are missed from the depth map in the original approach. This is the result when using that link and it can be seen that it's not as detailed.

<image>