EnricoAhlers / agi2nerf

Simple tool for converting Agisoft XML files to NERF JSON files for https://github.com/NVlabs/instant-ngp
Other
112 stars 15 forks source link

totp /= totw [nan nan nan] #6

Open filippide opened 1 year ago

filippide commented 1 year ago

Hi, I'm sorry to tell you but the problem still exist. I tryed metashape 1.8 I used mask to remove background. RuntimeWarning: invalid value encountered in divide totp /= totw [nan nan nan] example.txt

transforms.txt

MCemGunes commented 1 year ago

Hello, it has been a long time but I faced the same error. So I am writing for the ones who will face it from this point on.

The solution is changing line 139 as below:

from for frame in root[0][2]: to for frame in root[0][1]:

and be sure that directories are provided clearly:

for example:

python3 agi2nerf.py --xml_in ./livingroom.xml --imgfolder /workspace/camera_data/images/ --imgtype jpg

Probably, the hierarchy order is changed in Metashape XML files. So if someone sees this type of problem in the future. Please check what is inside the referenced array/dictionary.

Tonysa87 commented 4 months ago

Hi MCemGunes, I've encounterd the problem linked by filippide, but using you suggestion seems not to solve it, do you have any other suggestion?

error