This project aims to make prediction on image to recognize symbols among 14 symbols. This repository contains pre-generated cnn which allow you to go directly to the third step to make prediction.
### Note
All images must be in png format with `.png` extension. All given folders as inputs can contain file with other formats, they will be ignored.
### Dependencies
This project has been tested on Ubuntu 16.04.1 LTS 64 bits.
python 3.5 x64
tensorflow r0.12
tflearn 0.2.x
numpy 1.12.x
h5py 2.6.x
scipy 0.18.x
### Usage
The first step is to generate the pkl file containing representation of images. Each of these images is converted into a 32*32 matrix which each item contains the three channels value (red, green and blue) normalized between 0 and 1.
The image's label is added in another array.
This huge dataset is separated into a `train` and a `test` datasets. The size of these datasests depends on the `TEST_PERCENTAGE` value you can edit in the `generate_dataset.py` file (default value is `0.1` for 10 % of test images).
You can find two pre-generated datasets respectively in `rgb/dataset.pkl` ad `grayscale/dataset.pkl`
#### Step 2 : Making network
Once your dataset file is generated, you can make your network using a second script. Be careful this step can take several hours to produce the classifier folder. This folder contains very important files. They contain all the convolutional neural networks training. They will be used later when we will make predictions.
You can find two pre-generated classifiers respectively in `rgb/classifier` ad `grayscale/classifier`
### Step 3 : Making predictions
When you have your classifier, you are able to make any amount of predictions you want. You just have to give an image file or a folder containing images as input.
This commands allows you to make predictions for a folder :