Agisoft Metashape

Agisoft Metashape => Bug Reports => Topic started by: Cyberworld on September 16, 2022, 01:15:51 PM

Title: Is the Mosaic blending in texture generation broken with GPU acceleration?
Post by: Cyberworld on September 16, 2022, 01:15:51 PM
I've recently updated to Metashape version 1.8.4 with latest recommended NVidia drivers for two Quadro RTX4000 (driver is 516.94).

I run my usual routine, but now textures aren't being rendered correctly with the Mosaic blending mode when GPU acceleration is enabled. I've done the same texture using the Mosaic, Average and Disabled options with all other settings the same (Diffuse map, Generic for UV, 4K resolution, Hole filling and Ghosting enabled if present, From Images). I attach three screenshots one with Mosaic and the other with Disabled (Average gives about the same results) and with Mosaic without GPU.

Is this a bug?
Title: Re: Is the Mosaic blending in texture generation broken with GPU acceleration?
Post by: Cyberworld on September 23, 2022, 01:43:33 PM
I have checked with the 1.8.5 pre-release and the issue is still there. Mosaic blending on GPU creates soft-blurry textures, disabled on GPU creates non-coherent, choppy textures, Averaging on GPU seems to be working, but is not ideal. I'll have to wait couple more hours to check if mosaic on CPU still works.
Title: Re: Is the Mosaic blending in texture generation broken with GPU acceleration?
Post by: Adam Kellie on September 23, 2022, 04:18:55 PM
Cyberworld,
I'm curious to hear if mosaic on CPU has worked for you. I've been encountering the same problem with 1.8.4 of overall soft/blurry texture, not just small sections of the uv. I've tried defocus masking (choppy and incomplete texture coverage) and increasing tile size to 4096 (better, but not correctly sharp texture). What time difference are you seeing for texture generation with/without GPU?
Title: Re: Is the Mosaic blending in texture generation broken with GPU acceleration?
Post by: Alexey Pasumansky on September 23, 2022, 05:48:59 PM
Hello!

We would need an example of the dataset (project with camera alignment and mesh model + source images), that can be used to reproduce the degradation of the texture quality in 1.8.4/1.8.5 compared to the previous versions.

If you can share any sample data, please send the download link to support@agisoft.com.
Title: Re: Is the Mosaic blending in texture generation broken with GPU acceleration?
Post by: Cyberworld on September 24, 2022, 12:33:54 AM
Mosaic on CPU works, and for some reason it is not terribly slower than GPU. GPU took about 6 minutes, CPU took about 11 minutes without UV maps production cause that was done by the GPU already. Both for 4K texture.



Alexey I will prepare a data package on Monday and send the link to support. Thank you for the good work.
Title: Re: Is the Mosaic blending in texture generation broken with GPU acceleration?
Post by: sapiensl on October 14, 2022, 09:27:10 AM
Hello everyone!

I just wanted to chime in and say that I am facing the same issue. everytime I am trying to generate a texture using the GPU mosaic setting, the result is very blurry.

I just want to leave some information on my setup, maybe that helps:

- Ryzen 1300X
- GTX 970, Driver Version 516.59 (I am betting it is a driver issue, since I think I did not change the Metashape version when the problem first occurred. But I might be misremembering.
- Windows 10.0.19043
- 16GB 1333 DDR4
- Metashape 1.8.4 / 1.7.6

Here is a comparison image between mosaic and average. Using mosaic on the CPU luckily works just fine, so I am not blocked by this bug, which is very nice :)

Have a nice day and greetings from Germany!
Title: Re: Is the Mosaic blending in texture generation broken with GPU acceleration?
Post by: Alexey Pasumansky on October 14, 2022, 01:18:30 PM
Thank you for reporting the problem, we are working on this issue.
Title: Re: Is the Mosaic blending in texture generation broken with GPU acceleration?
Post by: Hamish on October 17, 2022, 12:36:28 AM
Thank you for reporting the problem, we are working on this issue.

if there is to be a fix for this issue will it come in 1.8.x version of metashape or will we have to wait for the stable 2.0.x ?
Title: Re: Is the Mosaic blending in texture generation broken with GPU acceleration?
Post by: Alexey Pasumansky on October 17, 2022, 11:20:01 AM
Hello Hamish,

We are planning to release 1.8.x update with some bugfixes for the actual version, so if the problem with the mosaic blending on GPU is resolved, it will be implemented both in 1.8 and 2.0 versions.
Title: Re: Is the Mosaic blending in texture generation broken with GPU acceleration?
Post by: flyzk on October 29, 2022, 02:55:43 PM
Could it be the reason why  I get slow process when building Tiled model? the texture part of the process take a LOT of time.
Title: Re: Is the Mosaic blending in texture generation broken with GPU acceleration?
Post by: Matt on March 15, 2023, 06:10:38 AM
I am still seeing substantial performance issues with Image blending in the orthomosaic build process when using averaging. I am using version 2.0.1
GPU use is non existent and CPU use is minimal. Its taking in excess of 200+ seconds for the blending of individual image groups to occur.
Also in the batch processing settings for build orthomosaic you can refine seamlines when using average for mosaic, in the workflow dialogue you cannot.  Is this a bug?
Its taking inexcess of 2 days to generate a ortho from 800+ images. Its never been this slow in previous versions.

Title: Re: Is the Mosaic blending in texture generation broken with GPU acceleration?
Post by: Alexey Pasumansky on March 15, 2023, 12:20:06 PM
Hello Matt,

can you please share the complete log related to the Build Orthomosaic operation, where the task starting parameters are also visible? Long time could be related to the ghosting filter enabled (especially, if mesh is used as a surface) or to mosaic blending + refine seamlines, also in case of mesh-based orthomosaic generation.

Refine Seamlines for Average blending seem meaningless, as all the images are blended together. Batch Process shows all the available options, while the view of certain task dialog depends on the selected parameters.

GPU acceleration is available for texture blending in mosaic mode, not for orthomosaic generation.