Agisoft Metashape

Agisoft Metashape => Bug Reports => Topic started by: KBL on November 15, 2018, 01:37:37 PM

Title: Premature end of JPEG file
Post by: KBL on November 15, 2018, 01:37:37 PM
I'm getting the error "premature end of jpeg file" while merging five chunks with an average of about 1000 images in them. I've completed this run successfully with a 1, 2, and 4 GPU configuration, but it's giving me this error while running with 3 out of 4 GPUs enabled. Attached is an image of the recent log
Title: Re: Premature end of JPEG file
Post by: Alexey Pasumansky on November 15, 2018, 02:09:52 PM
Hello KBL,

Does the issue persist, if you reduce the depth maps reconstruction area with the problematic GPU configuration and re-start the process with the same parameters (according to log the issue appears when the depth maps area calculated, so seems to be a start of the dense cloud reconstruction operation)?
Title: Re: Premature end of JPEG file
Post by: KBL on November 15, 2018, 02:21:58 PM
I can definitely try that Alexy, if you can clarify exactly what you mean. The setup has been successful with 2 and 4 GPU configurations, but fails in #3, so it is a bit odd. For the depth maps step, I have the parameters set:
- Quality = PhotoScan.LowQuality
- Filter = PhotoScan.ModerateFiltering)
- Cameras = my cameras
- Reuse_depth = <not set>
- Progress = <not set>
Title: Re: Premature end of JPEG file
Post by: Alexey Pasumansky on November 15, 2018, 03:02:33 PM
Hello KBL,

In case it would be possible to minimize the dataset where the issue occurs, it would be easier to perform further test to identify the source of the problem.

Does the operation stop when the "Premature end of JPG" message appears or the processing continues?
Title: Re: Premature end of JPEG file
Post by: KBL on November 16, 2018, 04:17:44 AM
The operation hangs with that message.
Title: Re: Premature end of JPEG file
Post by: KBL on November 17, 2018, 03:00:22 AM
I've done some additional testing. I'm getting the same error on the same test computer configured with a single Titan V, as well as physically removing one of the GTX 1080s (so configured with 3x GTX 1080s).
Title: Re: Premature end of JPEG file
Post by: Alexey Pasumansky on November 17, 2018, 09:50:44 AM
Hello KBL,

Is it possible to reduce the dataset and see, if the problem can be still reproduced? Probably there's some problem with the input data.
Title: Re: Premature end of JPEG file
Post by: KBL on November 20, 2018, 07:05:31 PM
Confirmed, this was an issue with the image data. I'm still concerned as to why this issue happened (this computer is dedicated to photoscan). I was able to identify the issue using the instructions here: https://watson-net.com/blog/checking-the-integrity-of-all-jpg-files-in-a-directory/

Short version:
cd photos
find -iname “*.jpg” -print0 | xargs -0 jpeginfo -c | grep -e WARNING -e ERROR

Which identified one photo with the error "Premature end of JPEG" file [WARNING] -- sort of a smoking gun :)