-
Notifications
You must be signed in to change notification settings - Fork 630
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix parsing of JPEG headers #175
Conversation
Signed-off-by: Janusz Lisiecki <jlisiecki@nvidia.com>
Built and tested 697279. |
What is the reason of this fix? |
In ImageNet we have images which are not handled properly by the host decoder, like there are lacking 'JFIF' string in the header and etc. This patch also add host decoder to our data set tests. |
dali/image/jpeg.cc
Outdated
// Slightly modified from https://github.com/apache/incubator-mxnet/blob/master/plugin/opencv/cv_api.cc | ||
// http://www.64lines.com/jpeg-width-height | ||
// Gets the JPEG size from the array of data passed to the function, file reference: http://www.obrador.com/essentialjpeg/headerinfo.htm | ||
// Based on https://github.com/scardine/image_size |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code seems only very slightly modified from the previous version, so I would put both references here (image_size and mxnet)
Signed-off-by: Janusz Lisiecki <jlisiecki@nvidia.com>
* Fix parsing of JPEG headers for host decoder, add more tests Signed-off-by: Janusz Lisiecki <jlisiecki@nvidia.com> * Update comment for jpeg.cc code inspiration Signed-off-by: Janusz Lisiecki <jlisiecki@nvidia.com>
Signed-off-by: Janusz Lisiecki jlisiecki@nvidia.com