Skip to content

To train IMAGE CLASSFIER Deep Learning model using CNN. Easy_To_use. one call for all type of image classfication eg: emotion detection, gender classfication, etc.,

License

Notifications You must be signed in to change notification settings

nkpro2000sr/Train-Image-Classfier-DLmodel

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Train-Image-Classfier-DLmodel

To train IMAGE CLASSFIER Deep Learning model using CNN. Easy_To_use

structure of dataset

                      +-----------------+
                      | Training Dataset|
                      +--------+--------+
                               |
                               v
                +------+-------+-------------+
                v      v                     v
          +-----+--+ +-+-------+      +------+--+
          |label_1 | | label_2 |......|label_n  |
          +--+-----+ +-----+---+      +-----+---+
             |             |                |
             v             v                v
     +---+---+-----+  ......................
     v   v         v
+----+-+ +------+  +------+
|img1_1| |img1_2|..|img1_n|   ...............
+------+ +------+  +------+
# same for validation dataset

for emotion detection (label_1,label_2,...) = ("happy","sad",...) and (img1_1,img1_2,...) are images of happy faces, (img2_1,img2_2,...) are images of sad faces, ...

similarly for gender detection (label_1,label_2) = ("Male","Female") and (img1_1,img1_2,...) are images of Male & (img2_1,img2_2,...) are images of Female.

model.json

this have detail about the model

  • training_data_dir : path of training dataset
  • validation_data_dir : path of validation dataset
  • trained_model_file : path of trained model
  • labels : list of labels (output)
  • n_labels : no. of labeels
  • image_shape : shape of image used for training and prediction
  • dataset : full tree of dataset (including both training dataset and validation dataset)
  • image_mode : mode of image (grayscale|rgb|rgba)
  • model_summary : summary about the model
  • number_of_training_samples : no. of training samples (no. of images used for training)
  • number_of_validation_samples : no. of validation samples (no. of images used for validation)
  • history : history.history gentated while model training (model.fit_generator -> history)

helpful at prediction

with open("model.json",'r') as file:
    model_dict = json.load(file)
predicted_label = model_dict["labels"][np.argmax(output_vector_from_model)]

About

To train IMAGE CLASSFIER Deep Learning model using CNN. Easy_To_use. one call for all type of image classfication eg: emotion detection, gender classfication, etc.,

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages