Docker Error: float division by zero

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Docker Error: float division by zero

Dennis Baldwin
Hi,

Today was my first experience running ODM with Docker and I ran into the following error:

[DEBUG]   running PYTHONPATH=/code/SuperBuild/install/lib/python2.7/dist-packages /code/SuperBuild/src/opensfm/bin/run_all /images/opensfm
2016-06-21 22:27:08,640 Extracting focal lengths for image DJI_0160.JPG

Traceback (most recent call last):

  File "/code/SuperBuild/src/opensfm/bin/focal_from_exif", line 27, in <module>

    d = exif.extract_exif_from_file(data.load_image(image))

  File "/code/SuperBuild/src/opensfm/opensfm/exif.py", line 88, in extract_exif_from_file

    d = exif_data.extract_exif()

  File "/code/SuperBuild/src/opensfm/opensfm/exif.py", line 238, in extract_exif

    focal_35, focal_ratio = self.extract_focal()

  File "/code/SuperBuild/src/opensfm/opensfm/exif.py", line 169, in extract_focal

    get_frac_tag(self.tags, 'EXIF FocalLength'),

  File "/code/SuperBuild/src/opensfm/opensfm/exif.py", line 41, in get_frac_tag

    return eval_frac(tags[key].values[0])

  File "/code/SuperBuild/src/opensfm/opensfm/exif.py", line 21, in eval_frac

    return float(value.num) / float(value.den)

ZeroDivisionError: float division by zero

[ERROR]   quitting cause: 

PYTHONPATH=/code/SuperBuild/install/lib/python2.7/dist-packages /code/SuperBuild/src/opensfm/bin/run_all /images/opensfm

returned with code 256.

I was manually forcing the focal and ccd params with the following command:

docker run -v $IMAGES:/images opendronemap:latest --force-focal 3.5 --force-ccd 6.17

Any insight how to get around this? I've run ODM successfully many times on my VM, but Docker seems to have stopped me.

Thanks,
Dennis




_______________________________________________
OpenDroneMap-users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/opendronemap-users
Reply | Threaded
Open this post in threaded view
|

Re: Docker Error: float division by zero

Dakota Benjamin

It looks to me like this line in OpenSfM doesn't check for division by 0: https://github.com/mapillary/OpenSfM/blob/odm-2/opensfm/exif.py#L21


But I bet it has to do with the --force-focal tag not properly being passed over to OpenSfM either.


Why don't you document your problem and post it as an issue?



From: OpenDroneMap-users <[hidden email]> on behalf of Dennis Baldwin <[hidden email]>
Sent: Tuesday, June 21, 2016 6:34:14 PM
To: [hidden email]
Subject: [OpenDroneMap-users] Docker Error: float division by zero
 
Hi,

Today was my first experience running ODM with Docker and I ran into the following error:

[DEBUG]   running PYTHONPATH=/code/SuperBuild/install/lib/python2.7/dist-packages /code/SuperBuild/src/opensfm/bin/run_all /images/opensfm
2016-06-21 22:27:08,640 Extracting focal lengths for image DJI_0160.JPG

Traceback (most recent call last):

  File "/code/SuperBuild/src/opensfm/bin/focal_from_exif", line 27, in <module>

    d = exif.extract_exif_from_file(data.load_image(image))

  File "/code/SuperBuild/src/opensfm/opensfm/exif.py", line 88, in extract_exif_from_file

    d = exif_data.extract_exif()

  File "/code/SuperBuild/src/opensfm/opensfm/exif.py", line 238, in extract_exif

    focal_35, focal_ratio = self.extract_focal()

  File "/code/SuperBuild/src/opensfm/opensfm/exif.py", line 169, in extract_focal

    get_frac_tag(self.tags, 'EXIF FocalLength'),

  File "/code/SuperBuild/src/opensfm/opensfm/exif.py", line 41, in get_frac_tag

    return eval_frac(tags[key].values[0])

  File "/code/SuperBuild/src/opensfm/opensfm/exif.py", line 21, in eval_frac

    return float(value.num) / float(value.den)

ZeroDivisionError: float division by zero

[ERROR]   quitting cause: 

PYTHONPATH=/code/SuperBuild/install/lib/python2.7/dist-packages /code/SuperBuild/src/opensfm/bin/run_all /images/opensfm

returned with code 256.

I was manually forcing the focal and ccd params with the following command:

docker run -v $IMAGES:/images opendronemap:latest --force-focal 3.5 --force-ccd 6.17

Any insight how to get around this? I've run ODM successfully many times on my VM, but Docker seems to have stopped me.

Thanks,
Dennis




_______________________________________________
OpenDroneMap-users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/opendronemap-users