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 - marcel.d

Pages: [1]
1
Python and Java API / [Request] Proper Python Documentation
« on: February 14, 2024, 06:34:45 PM »
Dear Agisoft,

Thank you for the powerful Python API.

While the API itself is great, its documentation is not usable.

Finding anything in the PDF document with over 200 pages is super slow and only feasible when you already know the function name.
This issue (along with other vital points)  has already been raised in 2022 (https://www.agisoft.com/forum/index.php?topic=14910), but the problem has not been fixed yet.
There are better formats for documentation (e.g. https://numpy.org/doc/stable/reference/index.html), why do we get stuck with a PDF?
PDFs are nice for paper-printing, but that is not how most of us use software documentation.

Furthermore, writing code in any IDE but PyCharm or a notebook is like not using an IDE at all, because code completion, linting and checking do not work.

Again, thanks for the great API and please advise when we can expect its documentation to be at the same level.

Cheers,
Marcel

PS Here is what I mean with linting not working in e.g. VSCode:


2
General / Re: Depth maps incomplete for some images
« on: January 15, 2024, 01:08:34 AM »
Hey, I ended up regenerating the depth maps with
Code: [Select]
point_cloud.renderDepth() for the relevant cameras.

3
General / Re: Hardware: better choice for Metashape
« on: January 15, 2024, 01:04:55 AM »
My 2 cents: you most likely need NVIDIA GPU. To convince yourself, try running your normal processing tasks with the GPU disabled and compare to the time it takes with GPU enabled. I assume most tasks will take way longer.

Is it possible for you to set up a desktop machine/workstation where the processing is happening and only get a cheap+portable laptop to access this machine remotely? This could be a more affordable and easier to maintain option in the long run.

Good luck!

4
General / Re: Depth maps incomplete for some images
« on: January 05, 2024, 05:38:56 PM »
Thanks for your input Tazzo!

Your expectation about optimizing processing time and quality sounds plausible.
But there is no occlusion in the first depth map. At least nothing can be seen in the point cloud or the RGB images.

Even though the depth maps are just intermediate products, we would like to use them.
Unless there is a better suggestion of how to generate them, we will probably sample distances from cameras to the point cloud. Maybe just for missing depth data? Let you know how that works out.

Cheers,
Marcel

5
General / Depth maps incomplete for some images
« on: January 04, 2024, 03:23:58 PM »
Hi,

I am processing an aerial dataset with very high overlap. Everything works great. Except some generated depth maps are incomplete. The example in the attachment demonstrates it well:



Two images with plenty of overlap. On the left a big chunk of the depth map is missing, on the right it is complete (including the overlapping part).

A feature appearing in both images is highlighted.

Any ideas what is going on?
A. Is Metashape deciding not to reconstruct every depth map because it can create the dense point cloud from other images?
B. Or are parts of depth maps not passing the depth filtering (mild filterin in this case).
C. Something else?

What do I do if I want to have all depth maps generated?
If the issue is option A, I could try to separate the project into "staggered" chunks, where chunk 1 would contain images 1,4,7,10,..., chunk 2: images 2,5,8,11,..., chunk 3:images 3,6,9,12,...  Thus forcing Metashape to generate more depth maps because of lower overlap?
If it is option B, I could disable filtering...

I look forward to some pointers.

Thanks,
Marcel

6
Python and Java API / Re: importRerference questions
« on: November 29, 2023, 02:03:52 PM »
Dear Alexey,

thank you for your suggestion and sorry for the late reply. We decided against the use of spaces within the string and instead rearranged the columns, so the "useless" columns come at the end and the string "nxyzXYZ" works great.

Also, while playing with file formats for the images, we ran into the issue where importReference does not work if the file ending is lacking in the CSV file (like in this post: https://www.agisoft.com/forum/index.php?topic=11165.0).

Kind regards,
Marcel

7
Python and Java API / Re: importRerference questions
« on: August 31, 2023, 04:43:19 PM »
Hi,

is there a character we can use to tell Metashape to skip certain columns from an imported csv?
e.g. consider a file with these columns:

Code: [Select]
label,x,y,z,skip_col,x_accuracy,y_accuracy,z_accuracy
Will the following code work?

Code: [Select]
chunk.importReference(path, delimiter=",", columns="nxyzsXYZ")
Notice the "s" in the "nxyzsXYZ" (because I assume s=skip).
Of course we can rearrange the columns before importing, but a skip-column character seems more elegant and these kinds of files can be easily imported in the GUI. - so why not CLI?

Thanks,
Marcel

8
Python and Java API / Re: Renaming .psx project and the .files folder
« on: August 08, 2023, 02:25:12 PM »
Hey, I did not try it myself, but maybe this could work:

Code: [Select]
prom pathlib import Path

# open project and do the processing
doc = Metashape.app.document
doc.open("path/to/initial_name.psx")
# ...

# save to disk
doc.save()

# rename file and folder
Path("path/to/initial_name.psx").rename("path/to/updated_name.psx")
Path("path/to/initial_name.files").rename("path/to/updated_name.files")

# reopen the file and continue processing
doc.open("path/to/updated_name.psx")
# ...

Or maybe even this could work?

Code: [Select]
# open project and do the processing
doc = Metashape.app.document
doc.open("path/to/initial_name.psx")
# ...

# save to disk with new name
doc.save("path/to/updated_name.psx")


Let me know if you try any of the approaches.

9
Python and Java API / Re: Metashape v1.6 downscale parameter
« on: August 08, 2023, 02:11:25 PM »
Alexey, thank you for the explanation. Will the documentation be updated?

"It would be great if this info was included in the API documentation." - This is still relevant.

10
Hello Alexey,

Thanks for the suggestion. I tried it and the results are below.

However what I tried first was restarting the computer multiple times and trying to run Metashape every time. It always crashed either with the error 999 or 46. But one time it did not crash and successfully aligned the photos! So I opened the proper project with over 1000 photos without closing Metashape in between. I ran the whole processing without issues. Then I shortly restarted Metashape (the PC ran continuously) and again it did not run even a small alignment process. Crashed with the same errors as always.

What struck me is that it did not throw the error in the beginning and then never again while the software was running.

Then we had a fresh Windows install and used the drivers 461.72 (I know that in between 461.92 are available, but did not try installing those). With this setup - still crashing.

Last thing I tried was disabling CUDA as described here: https://www.agisoft.com/forum/index.php?topic=10100.msg46133#msg46133
It worked and the output is attached. However we would prefer using CUDA, as other users are unhappy with the processing times when using OpenCL (https://www.agisoft.com/forum/index.php?topic=10100.msg46142#msg46142). Any suggestions?

Thanks,
Marcel

11
Hello Alexey,

I did the following:

1) Updated Windows 10 latest version:
Edition   Windows 10 Pro
Version   20H2
Installed on ‎10.‎03.‎2021
OS Build 19042.867
Windows Feature Experience Pack 120.2212.551.0

The issue persisted.

2) Installed Nvidia Driver 461.72 (clean install!)

The issue persisted

3) Installed Metashape 1.6.6 (1.5.5 was deleted in the process)

Ran the procedure twice and got 2 different results (possibly with different data sets):

First: "Error: CUDA_ERROR_UNKNOWN (999) at line 146" . Console output in output1.txt

Second: "Error: cudaMemGetInfo(&free_mem_size, &total_mem_size): all CUDA-capable devices are busy or unavailable (46) at line 40" . Console output in output2.txt

4) Installed Metashape 1.7.2 (I renamed the 1.6.6 folder to keep both versions)

Ran the procedure twice and got the same 2 results, in different order:

First: "Error: cudaMemGetInfo(&free_mem_size, &total_mem_size): all CUDA-capable devices are busy or unavailable (46) at line 40" . Console output in output3.txt

Second: "Error: CUDA_ERROR_UNKNOWN (999) at line 146" . Console output in output4.txt

The output of nvidia-smi when the last project was running:

Code: [Select]
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 461.72       Driver Version: 461.72       CUDA Version: 11.2     |
|-------------------------------+----------------------+----------------------+
| GPU  Name            TCC/WDDM | Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|                               |                      |               MIG M. |
|===============================+======================+======================|
|   0  GeForce GTX TIT... WDDM  | 00000000:03:00.0  On |                  N/A |
| 22%   47C    P8    27W / 250W |    331MiB / 12288MiB |      0%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+
| Processes:                                                                  |
|  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
|        ID   ID                                                   Usage      |
|=============================================================================|
|    0   N/A  N/A      1224    C+G   Insufficient Permissions        N/A      |
|    0   N/A  N/A      3524    C+G   ...nputApp\TextInputHost.exe    N/A      |
|    0   N/A  N/A      8920    C+G   ...5n1h2txyewy\SearchApp.exe    N/A      |
|    0   N/A  N/A      9612    C+G   C:\Windows\explorer.exe         N/A      |
|    0   N/A  N/A     10652    C+G   ...lPanel\SystemSettings.exe    N/A      |
|    0   N/A  N/A     11056    C+G   ...artMenuExperienceHost.exe    N/A      |
|    0   N/A  N/A     12632    C+G   ...y\ShellExperienceHost.exe    N/A      |
|    0   N/A  N/A     14696    C+G   ...b3d8bbwe\WinStore.App.exe    N/A      |
|    0   N/A  N/A     16064    C+G   ...e Pro 1.7.2\metashape.exe    N/A      |
+-----------------------------------------------------------------------------+

I don't have any more ideas what to try. Do you habe a guess what we could do?

Thanks
Marcel

12
Hello Alexey,

Thank you for these suggestions and for replying in the other thread (https://www.agisoft.com/forum/index.php?topic=10394.0). Sorry for crossposting, but with several driver versions we did have the error from the other thread.

I have avoided clean installs so far, because several people are using the machine and I was not sure if it would break anything for them. If updating windows (currently running 1803, available: 2004) will not help, we will try the clean install of the Nvidia drivers (461.72 or 397.93 if that fails).

Regarding Metashape versions 1.6.6 and 1.7.1: we were unsure if the license would be affected by an update, but judging by the info here https://www.agisoft.com/downloads/installer/and here https://agisoft.freshdesk.com/support/solutions/articles/31000135256-how-to-update-metashape-pro-to-the-new-version it should be fine. We will try it too.

Kind regards,
Marcel

13
Hi Andy!

We are currently facing the same issue. Can you please confirm whether you are still running Windows 10 v 1903 and Nvidia driver 397.93 or whether you have since updated?

With some Nvidia driver versions we get this: https://www.agisoft.com/forum/index.php?topic=13156.0

But with others (e.g. 417.22) we do get the same error as you do. Our current Windows version is 1803.

Other specs:
CPU: Intel(R) Xeon(R) CPU E5-2620 v4 @ 2.10GHz (server)
CPU family: 6 model: 79 signature: 406F1h
RAM: 511.9 GB
OpenGL Vendor: NVIDIA Corporation
OpenGL Renderer: GeForce GTX TITAN X/PCIe/SSE2

Since the setup is fairly similar, I hope to get your feedback and maybe it'll also sove our issues. Thanks!

Marcel

14
Hello,

I have a very simple project with 20 photos which aligns easily on CPU, but fails to align when using the GPU. Since this fails, I cannot do any of the other steps. Any ideas?

Error message: "Error: cudaMemGetInfo(&free_mem_size, &total_mem_size): all CUDA-capable devices are busy or unavailable (46) at line 33"

Specs:

Agisoft Metashape Professional Version: 1.5.5 build 9097 (64 bit)
Platform: Windows
CPU: Intel(R) Xeon(R) CPU E5-2620 v4 @ 2.10GHz (server)
CPU family: 6 model: 79 signature: 406F1h
RAM: 511.9 GB
OpenGL Vendor: NVIDIA Corporation
OpenGL Renderer: GeForce GTX TITAN X/PCIe/SSE2
OpenGL Version: 4.6.0 NVIDIA 461.72

Thanks in advance!

15
General / Appropriate format (TIFF/PNG/JP2/etc) for 12-bit images
« on: January 27, 2021, 11:45:12 PM »
Dear Agisoft Community!

I have images coming from a 12-bit camera. Reading through the many useful posts on the forum I came across this: https://www.agisoft.com/forum/index.php?topic=308.0 which made me curious to use the whole bit depth in Metashape.

The easy thing to do is to store the 12 significant bits as the most significant bits of an unsigned 16-bit integer and pad the least significant bits with zeroes. It is easy because I can see the colors well when I open these images in any viewer. The other option is to store the data in the least significant bits. But then the images initially look almost black in most image viewers. They do look just as good as the other ones with the correct settings.

Another argument for using the 12 top bits, in PNG I can set the sBIT (SignificantBits) tag to 12, so the original data can be retrieved with the precision/accuracy that it was captured with.

Unfortunately the sBIT tag is not available in the TIFF file specification, but the Metashape manual (beginning of chapter 2) specifically recommends using TIFF (https://www.agisoft.com/pdf/metashape_1_7_en.pdf#page=11).

I do pre-processing in OpenCV and can save the files in both formats. And with both "bit-positions".

With the exact same data (12MP, 12-bit significant, RGB), I get the following file sizes:

Option 1: PNG, data in MOST significant bits: 40.1 MB   (Deflate/Inflate lossless compression)
Option 2: TIFF, data in MOST significant bits: 43.1 MB        (LZW lossless compression)
---------------
Option 3: PNG, data in LEAST significant bits: 42.2 MB   (Deflate/Inflate lossless compression)
Option 4: TIFF, data in LEAST significant bits: 47.6 MB        (LZW lossless compression)

Option 1 wins by a small margin also regarding the file size.

Summarizing:
1. Is either "Data in MSB (Options 1&2)" or "Data in LSB (Options 3&4)" better / easier for Metashape / preferable?
2. Is either TIFF or PNG  (or JPEG2000/something else)  better / easier for Metashape / preferable?
Again: the underlying data is exactly the same!

@Alexey: I know the questions are rather loaded, but I would appreciate it if you found the time to go through them. Thank you in advance!

Thanks,
Marcel Dogotari

Pages: [1]