You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you have a file_type defined in the config.ini such "*.jpg" and have images that are *.JPG then during prediction creation you will have zero files and the TF Detector code will fail the script. Root cause seems to be the way code is handled here for instance. Why wait all the way up until Create Predictions for this to surface? Do we need to be case sensitive here?
Just logging this as a bug. I will probably fix
The text was updated successfully, but these errors were encountered:
andrebriggs
changed the title
Filetype is case sensitive
File_type is case sensitive, creates problems during prediction generation
Nov 28, 2018
This issue also occurs with .jpeg extensions not being recognized as .jpg, which is probably also not ideal. The more robust way would be to use something like imghdr to get the actual type of all files, and take only the ones that are of the desired type (which would then be narrowed down to either 'jpeg' or 'png'). Even replacing the linked code with something like this would probably work:
# all_image_files = list(basedir.rglob(filetype))# replace this with:importimghdrall_image_files= [image_fileforimage_fileinsubdir.iterdir()
ifimage_file.is_file() andimghdr.what(image_file)=='jpeg']
If you have a file_type defined in the config.ini such "*.jpg" and have images that are *.JPG then during prediction creation you will have zero files and the TF Detector code will fail the script. Root cause seems to be the way code is handled here for instance. Why wait all the way up until Create Predictions for this to surface? Do we need to be case sensitive here?
Just logging this as a bug. I will probably fix
The text was updated successfully, but these errors were encountered: