llSourcell / tensorflow_image_classifier

TensorFlow Image Classifier Demo by @Sirajology on Youtube
529 stars 286 forks source link

Change label_dir.py to move images to directories named with the label #6

Open BBB opened 7 years ago

BBB commented 7 years ago

This PR changes the label_dir.py script so that it moves image rather than copying and renaming them.

It outputs them folder with the label names that that classifier has been trained with. This makes it easier to use the output from the classifier to train it again.

It also adds some error handling for image issues like #5 and refactors the code to be more consistent and pythonic.