Reputation: 2056
I have 3 folders with color images. Name of the folder is label for the images inside.
cls1
|____img_0.png
|____ ...
|____img_n.png
cls2
|____img_0.png
|____ ...
|____img_n.png
cls3
|____img_0.png
|____ ...
|____img_n.png
I would like to use Keras library to create Convolutional neural network for classification, but I can't find, how to create dataset from color images. Can you help me?
Upvotes: 12
Views: 7020
Reputation: 777
Please consider this gist of pre-trained VGG-16 model with example usage which I find illustrative:
To summarize:
X_train
, test data X_test
etc. along with ground truth Y_train
, Y_test
etc.fit_generator
to do the training instead. (Keras also has evaluate_generator
and predict_generator
)Upvotes: 12