Decimated faces takes forever

Hello folks!

I’m trying to create a 3D model from ~80 pictures that I took with my DJI Mini 2 and the it seems that something wrong is happening because the “Decimated faces” step takes forever.

This is my current log after being running for 1 hour:

Decimated faces 5336841 (23.98%, 15m54s, ETA 50m)…
[498 similar lines in the middle…]
Decimated faces 6272218 (28.18%, 34m29s, ETA 1h27m)…

As you can see, it seems to get stuck or going slower as the time passes.

I’m using the default options. The machine is: 16GB RAM 2666Hz, CPU Intel i7-8750H CPU @ 2.20GHz, 256GB SSD, 1 TB HDD, Windows 10 Pro.

As I’m using Docker with WSL2, 6 cores and 8GB are allocated to the Docker containers, and the swapFile is located at the HDD, not the SSD.

I kind of feel that the task is taking more than it should, because a few weeks ago I tried WebODM in a MacBook Pro 2021, and it was able to generate the 3D model using ~200 pictures in around 90 minutes. I don’t expect the same performance in this computer, as it is worse, but I believe this task using 76 pictures should be done by now.

Maybe allocating the swap file in the SSD could improve this? What are your thoughts?

Thanks and kind regards!

EDIT:

Another 75 minutes of processing (2h and 15 minutes in total) and this is the last line of the output log:

Decimated faces 6599533 (29.65%, 1h46m27s, ETA 4h12m)…

3 Likes

Hello, Welcome to this community

I am sorry for that trouble

FYI, I never use Docker WSL, but my suggestion, you can increase from 8 GB to 16 GB (or bigger) for docker container’s memory. I hope it can resolve your issue.

Also try for Native ODM Command line for Windows. AFAIK It can use your Windows pagefile, so we dont have any mess with WSL/Docker.

For installation guide :

Please try ODM native command prompt in Windows. You can download the installer at download site
for example, put all of your images in D:\Qwerty\code\images

Then run this

run --project-path “D:\Qwerty” --your-preferred-option 

This is some option that you can use
--orthophoto-resolution 2 --dsm --dtm --pc-geometric --pc-quality high --feature-quality ultra --mesh-size 300000 --mesh-octree-depth 12 and others :ok_hand:

2 Likes

Welcome, David!

You’re likely swapping out heavily to the swap/pagefile, which as you noted is on the HDD. You can verify this by looking at Task Manager to see the disk activity. This will be orders of magnitude slower than physical memory, and even another order of magnitude slower than swapping out to the SSD.

I wouldn’t recommend tweaking Docker’s WSL2 backend to use all of your system resources like ichsan is recommending, but leaving about 20% physical RAM for Windows should be sufficient.

You can adjust your wslconfig here:

I would also not go above the Default settings until you get a reasonable processing baseline with the adjusted wslconfig.

1 Like

Hello guys, thanks for the replies.

@ichsan2895 I used the ODM cmd and it took ~2 hours to process 105 images with the options you give me. Is not that bad, at least it does the work, but I’m quite frustrated comparing the performance in this computer vs the previous one.

@Saijin_Naib In my case I’ve 8GB out of 16GB because I used for other projects that require high amount of RAM, but yeah, it is most certain that HDD is going to be always slower than SSD. I will try to move the swap file to the SSD and check again if the WebODM can do the work or not.

I’ll keep you posted.

Thanks!

3 Likes

David, Docker should release the RAM when you stop it, and WSL2 should release it by stopping the VM after a period of inactivity, so it isn’t a static/permanent allocaiton of 12 of your 16GB of RAM all the time.

Try pushing it to 12GB as 4GB for Windows (backed by Windows pagefile) should be sufficient if you’re not doing anything much else during processing (keep Chrome closed, eh :stuck_out_tongue: )

2 Likes

Well, it seems it was a problem of CPU actually…

I thought I had the swap file in the HDD configured, but I haven’t, it was all the time in the SSD. What I actually had was the usage of 6 CPU’s instead of 12. So I just removed the wsl2 configuration, therefore Docker now its using the default values (half of my RAM -8 GB- and all cores -12-) and I was able to run the task with 105 images in 55 minutes using the WebODM.

I will now go and try with the whole dataset of 500 images and let see how it goes.

Thanks and kind regards!

4 Likes

Sweet! Show us what you get when you get there!

Hmm…

I’m curious why ODM CMD is slower than ODM Docker WSL in Windows… :thinking:

I would say that it’s because I run the ODM CMD and the pictures in the HDD, not the SSD.

Finally, I got to process around 500 pictures of my DJI Mini 2 within 2 hours and 49 minutes, with a very good result for the 3D model.

2 Likes

Beautiful! Can you share a screenshot?

1 Like

Sure!

Here you can see the ortophoto and a preview of the 3D model 3D Modelling of a building construction - Album on Imgur

3 Likes

Wow great result. Glad you like the result :+1:

My another tips (my hope) :
Buy another RAM and increase your settings parameter, for example = --min-num-features 8000 (default) to 12000 and --mesh-octree-depth 11 (default) to 12

2 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.