SakhriHoussem Image Classification Save

Pre-trained VGG-Net Model for image classification using tensorflow

Project README

Image Classification

Pre-trained VGG-Net Model for image classification using tensorflow

DataSets :

we used each of this DataSets for Image Classification training

After Training :

Resultat of UC Merced Land DataSet After Image Classification Training

Testing the classification of one batch of Pictures from UC Merced Land Use Dataset

test UC Merced Land

Cost and Accuracy :

graph represent the values of both of cost and accuracy each epoch graph

How To use :

you can use this model to classify any DataSet just follow the 4 next instruction

Instalation :

 pip install tensorflow matplotlib opencv-python imutils

Train the Model:

To Train Model for different DataSets or Different Classification follow the steps :

Exploit your DataSet

python dataSetGenerator.py  [-h] --path path [--SaveTo SaveTo] [--resize resize]
                      [--resize_to resize_to] [--percentage percentage]
                      [--dataAug dataAugmentation]
Example
python dataSetGenerator.py  --path Desktop/SIRI-WHU --resize --resize_to 200
Help
image dataSet as numpy file.

       picture dataSets
          |
          |----------class-1
          |        .   |-------image-1
          |        .   |         .
          |        .   |         .
          |        .   |         .
          |        .   |-------image-n
          |        .
          |-------class-n

optional arguments:
  -h, --help            show this help message and exit
  --path path           the path for picture dataSets folder (/)
  --SaveTo SaveTo       the path when we save dataSet (/)
  --resize resize       choose resize the pictures or not
  --resize_to resize_to
                        the new size of pictures
  --percentage percentage
                        how many pictures you want to use for training
  --dataAug dataAugmentation
                        apply data Augmentation Strategy

Train your DataSet

python   train_vgg19.py [-h] --dataset dataset [--batch batch] [--epochs epochs]
Example
python train_vgg19.py  --dataset SIRI-WHU
Help
Train vgg19 [-h] --dataset dataset [--batch batch] [--epochs epochs]

Simple tester for the vgg19_trainable

optional arguments:
  -h, --help         show this help message and exit
  --dataset dataset  DataSet Name
  --batch batch      batch size
  --epochs epochs    number of epoch to train the network

Test your Model :

to test your model

python test_vgg19.py [-h] --dataset dataset [--batch batch]
Example
python test_vgg19.py  --dataset SIRI-WHU

Help

tester for the vgg19_trainable

optional arguments:
  -h, --help         show this help message and exit
  --dataset dataset  DataSet Name
  --batch batch      batch size

Confusion Matrix :

to Draw Confusion matrix (the output in images)

python confusion_matrix.py -h [-h] --dataset dataset [--batch batch] [--showPic showPic]

Help

Draw Confusion Matrix for the vgg19

optional arguments:
  -h, --help         show this help message and exit
  --dataset dataset  DataSet Name
  --batch batch      batch size
  --showPic showPic  Show patch of picture each epoch

For Distributed Tensorflow [optional] :

  1. Download and install nmap

  2. install nmap python module

 pip install python-nmap
  1. Set Workers and pss (parameter servers) devices name in train_vgg19_distibuted
workers = ['PC1','PC2']
pss = ['PC3']
Open Source Agenda is not affiliated with "SakhriHoussem Image Classification" Project. README Source: SakhriHoussem/Image-Classification

Open Source Agenda Badge

Open Source Agenda Rating