Forum

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - PolarNick

Pages: [1] 2 3 ... 7
1
Feature Requests / Re: Please add Stubs for the Python standalone module
« on: November 27, 2023, 03:51:09 PM »
> Seeing as those autogenerated stubs seem to work at least partially, maybe you could think about including them in the module in the future?

I don't know how to generate these stubs automatically (without PyCharm GUI) - so it is a big question how to integrate their generation in CI build system. It is possible to implement a custom stubs generator, but this requires a lot of time/efforts and currently is not planned.

2
Feature Requests / Re: Please add Stubs for the Python standalone module
« on: November 24, 2023, 09:22:00 PM »
About auto-completion in PyCharm - it was not working for Metashape 2.0 (see screenshot pycharm_typehinting_MS20.png), but it seems to work properly for Metashape 2.1 (see screenshot pycharm_typehinting_MS21.png).

About VSCode - as a workaround - maybe it should work to generate stubs in PyCharm and then use generated binary skeletons in VSCode? (see screenshot pycharm_binary_skeleton_MS21.png)

3
Feature Requests / Re: Gaussian Splatting
« on: November 10, 2023, 01:47:10 PM »
Quote
Do you know maybe - is possible way to convert somehow camera + pointcloud/tie data into colmap format without Pro version?
Any advices?

Hi. Sorry, I don't know any alternative methods.

4
Feature Requests / Re: Gaussian Splatting
« on: November 09, 2023, 03:31:19 PM »
Yes, Gaussian Splatting uses SfM results (cameras calibration + 3D tie points), so to transfer that information from Metashape project to Colmap format (that is supported as input by Gaussian Splatting) - this script exists. But this scripts uses Metashape Python API that is available only in Metashape Professional.

5
Feature Requests / Re: Gaussian Splatting
« on: November 07, 2023, 12:00:28 PM »
Quote
Hi, any option for Standard version user?

At the moment I don't know any options for Standard version, because this is a Python script and only Pro version has Python API support.

6
Hm, I don't sure but may be disabling all Vulkan drivers except NVIDIA (i.e. Intel and Mesa) could help. In this topic the problem with segfault on exit was due to mesa driver. But on the other hand they had segfault on exit of vulkaninfo, which exits fine for you.

7
> The problem only occurs in Headless mode (for me over SSH to a remote server). Exporting the DISPLAY environment variable fixes the issue but I can only do that because the server is not actually headless.

What if you run vulkaninfo? Does it behave the same - does it segafults on exit in case of headless mode without DISPLAY?

8
General / Re: Metashape Pro Crashing During Image Alignment
« on: October 20, 2023, 11:45:45 AM »
When you changed memory sticks - was their frequency in BIOS automatically updated? Asking just in case if the problem is because of memory overclocking (I don't know does it reset automatically on memory change).

To troubleshoot CPU vs GPU:

1) You can just enable writing log to disk (Tools->Preferences->tick Write log to file) and after reproducing the crash - check what last 20 lines in log was. Please post them here - they will tell is it a GPU-bound processing stage or is it a CPU-only stage.
2) You can try to align photos without GPU (Tools->Preferences->GPU->untick GPU).

In case if the problem seems to be with CPU:

11) Ensure there are no overclocking in BIOS.
12) What are your CPU temperatures while processing? If temperatures are high - it can be due to poorly applied stock thermal paste or something like that.

9
General / Re: Metashape Pro Crashing During Image Alignment
« on: October 16, 2023, 04:51:23 PM »
The more RAM sticks you use - the bigger chance of RAM instability and the lower maximum frequency at which memory is stable. Also, if you will check some kind of motherboard/CPU memory-compatibility list - you will note that supported 4xSticks have lower maximum frequency than 2xSticks.

memtest is a good stress test but it has different code, so it is possible that only Metashape-like code provokes RAM instability. For example - may be it is important to increase overal temperature inside PC, and in case of Metashape processing this is more probable due to GPU usage, which is ignored in memtest. Or may be it is important to use some AVX-instructions and so on.

> Would the alignement instability persist with only 2 sticks (64GB) or if you use the ram at a lower frequency?

It depends on the nature of the problem:

1) If the instability is because of too high frequency - setting lower frequency will help. F.e. you bought two sets of 2xSticks (4xSticks in total), they are declared to run at 6400Mhz, but this is guaranteed only for 2xSticks and only for compatible motherboards/CPUs. So if you face crashes due to RAM instability - you can try to lower memory frequency - for example to 3200Mhz or lower (just to be sure) and/or use only 2xSticks.

2) If the reason is a defective RAM stick - nothing will help - the best you can do is to return RAM to the shop. Also you can try to locate the defective RAM Stick:

2.1) Set lower memory frequency (f.e. 3200Mhz instead of 6400Mhz)
2.2) Remove the first stick out of four - check processing for instability (i.e. using 2+3+4 sticks)
2.3) Put the first stick back and remove the second stick out of four - check processing for instability (i.e. using 1+3+4 sticks)
2.4-2.5) Repeate the same processing attempt with 1+2+4 sticks and with 1+2+3 sticks

And so - if, for example, processing is stable only if you use 1+3+4 sticks - then the second stick is defective and shouldn't be used. Note that you shouldn't use these 1+3+4 sticks AND some other random single stick bought after that. Because memory sticks are guaranteed to be stable only if they are all from the same factory batch.

10
Feature Requests / Re: Gaussian Splatting
« on: October 05, 2023, 11:57:36 PM »
Hi! You can use script to export camera images and camera alignment and after that use them in gaussian splatting.

11
General / Re: Different Results
« on: September 22, 2023, 11:55:20 AM »
For those who found this topic on google - why this is not always possible to have reproducible results in an algorithm:

1) If the algorithm is single-threaded - it is enough to fix the seed for the random values generator, so that the random sequence is the same from run to run (on the same computer).

2) If the algorithm is multi-threaded, you can't easily mitigate possible differences in threads execution speed. In general, you can only mitigate it with algorithm speed degradation - f.e. falling back to single-threaded implementation. And the possible difference in threads' execution speed leads to different results.

12
Something like that:

Code: [Select]
for chunk in PhotoScan.app.document.chunks:
    if chunk.label == "My Custom Chunk Name":
        chunk.importModel('Path/0.obj')
        chunk.model.removeComponents(100000)

Or like that (if you want to make chosen chunk to be active):

Code: [Select]
for chunk in PhotoScan.app.document.chunks:
    if chunk.label == "My Custom Chunk Name":
        PhotScan.app.document.chunk = chunk

PhotoScan.app.document.chunk.importModel('Path/0.obj')
PhotoScan.app.document.chunk.model.removeComponents(100000)

13
Yes, that's possible too :)

This is example of how to check all chunks' labels and then, if label equal to desired name - make it active, so that all Metashape.app.document.chunk accesses were addressed to it:

Code: [Select]
for chunk in Metashape.app.document.chunks:
    if chunk.label == "My Custom Chunk Name":
        Metashape.app.document.chunk = chunk

Probably you meant to name a chunk from GUI - but for the sake of completeness - this is how to change the currently active chunk name from Python:

Code: [Select]
Metashape.app.document.chunk.label = "My Custom Chunk Name"

P.S. script was adapted from https://www.agisoft.com/forum/index.php?topic=7815.0 (googled with "metashape python make chunk active")

14
Quote
Although I am having problem doing this for multiple chunks in the Workspace.  :(
How do I get this to select each chunk to be active so that the script applies the actions?

You can use for-loop over all chunks (like here). And after that use chunk.model like this:


...
        stats = chunk.model.statistics()
...
        chunk.model.removeComponents(faces_threshold)
...

Pages: [1] 2 3 ... 7