Inception v3 Transfer Learning Image Classification
Inception v3 Transfer Learning Model:
Deep learning in simple sense means a neural network having number of nodes between input and output. These hidden layers between input and output is used to learn features. Deep learning is inspired by the structure and functions of the brain.
One of the cited benefit of deep learning is their ability to automatic perform feature extraction from raw data called feature learning.
Training cost for Inception v3 Transfer Learning model:
It is Deep neural network for image classification. To speak more about this model, it is trained on 8 Tesla K40 GPUs and has 25 millions parameters and approximately 5 billion multiply add operation. Inception-v3 transfer learning image classification model cost estimated is $30,000. Computation cost of inception model is less as compared to VGG Net.
To understand the transfer learning inception v3 model, just look at the below screen shot and let us calculate the computation cost. Inception model in broader sense refers to factorizing of the convolution layer so as to reduce the computation cost.
This could be justified from the example
If the input of the dimension 4 x 4 x 6 is passed to 4 convolution filters of size (2,2) required computational cost is 4 x 4 x 4 x 2 x 2 x 6 = 1536. This cost could be reduced by creating the bottleneck which is the basis of the inception model.
How Inception model (bottleneck) reduced the cost of computation:
Let us suppose between the input and output of the convolution layer the new 4 filter of size(1,1) are introduced. This filter is called bottleneck and this process refers to convolution factorization. Now if the cost of computation is calculated it comes out to be as below:
4 x 4 x 4 x 2 x 2 x 4 = 1024
Look at the difference between computation cost with and without the introduction of bottle neck.
In the nutshell it reduces the computation cost by replacing size of convolution filter with some other size like convolution of 5 x 5 with 2 layers can be replaced with two convolution of 3 x 3 with 2 layers. One specialty of this network is that for new set of images to be classified you don’t need to perform feature extraction part again.
Difference between Inception v2 with v3 lies in the concept of adding BN-auxiliary along with factorizing convolution layer which was part of inception v2. From BN-auxiliary I mean that fully connected layer of the auxiliary classifier is also normalized not only convolution so in simple words Inception v3 is [Inception v2 + BN auxilliary]
Steps for training the images with the transfer learning inception v3 model:
1.) Download all the files placed under this repository Git Hub
2.) Since the size of model is more than 100 MB, so for ease I am placing here Google drive link to download the inception model. Please click on this link to get the desired files Google drive. When you will download the model using this link you will get two folder named as tf_files and training_dataset. Please place your customized images inside training_dataset
3.) To check the working of the model with model testing image (cropped_panda.jpg) please run the python pre_model_test.py
4.) To train the model with your own images, please place the images in the training_dataset folder and run the python file python train_data.py
5.) To perform the real time testing, Please open the file test_data_pred.py and place the path of real time image you want to test as image_path = “xxxxxx”. Please run the file python test_data_pred.py
6.) You will get the score as the output.
Please visit you tube link to see the video how to run this video for more details.
Note: Hope you have went through the video, git hub and blog. Now you are familiar with image classification using inception v3. AI Sangam is trying its best to support readers and people to grow because we believe in sharing knowledge. It would be humble from your side if you provide some valuable feedback to encourage AI Sangam to write and improve more because criticism is very important to grow.
AI Sangam believes in providing quality service to the end user or clients. If you want any query or want to build AI Application, please email us at email@example.com. We will reflect you back. Our services are paid but we can provide free guidance or suggestions. For full fledged application you need to contact us at our email.
To know more subscribe us at AI Sangam youtube channel.