-
Notifications
You must be signed in to change notification settings - Fork 18.7k
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
Encoded cleanup #1878
Encoded cleanup #1878
Conversation
} | ||
if (encode_type.size() && !encoded) | ||
LOG(INFO) << "encode_type specified, assuming encoded=true."; | ||
// if (encoded) { |
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.
Why keep these around as comments? Just drop.
@philkr thanks for improving the encoding. Can you squash this into a single commit and take care of the inline comments? Thanks. |
Please combine your commits for the sake of the history http://gitready.com/advanced/2009/02/10/squashing-commits-with-rebase.html then this can be merged. |
…le) to be encoded. Allowing for a change in encoded (jpg -> png vice versa) and cleaning up some unused functions.
ahh, the wonders of git :) |
Groom handling of encoded image inputs
This reverts the encoding cleanup since it breaks data processing for existing inputs as discussed in #1901.
I decided to clean the encoded flag up a bit and add some more options.
convert_imageset can now store images encoded with resize and gray options on. Internally io.cpp will use opencv to re-encode a resized image if needed. It is also possible to change the encoding, using the encode_type flag.
The DecodeDatumToCVMat and DecodeDatum functions were renamed to DecodeDatumToCVMatNative and DecodeDatumNative . The ...Native functions will load images with their native color channels (grey or BGR) instead of always converting encoded images to BGR. This allows the encoding of 1d label masks (such as image class labels).