Car Make and Model Recognition Using Ima
Car Make and Model Recognition Using Ima
Machine Learning
Hashir Yaqoob, Shaharyar Bhatti and Rana Raees Ahmed Khan.
Similarly Cheung and Ailee Chue [3] in the paper “Car make Figure 1: Bag of Feature model work flow
and model recognition” used two methods for feature
extraction and matching. They also iused SIFT key points as The second approach we used was the CNN neural network,
features and descriptors for matching the query car image which is trained for feature extraction and classification. We
with its database images. The second approach used was also used pre-trained neural network known as AlexNet, and
Harris Corners for interest point detection and Fast used Transfer Learning to train AlexNet on our data set to
Normalized Correlation for feature matching. classify vehicles in VMMR system.
IV. PROCEDURE AND IMPLEMENTATION
A. Data collection
First step to the VMMR system is the collection of data set
large enough that your systems are trained on enough images
to present a satisfactory accuracy. Our data set for vehicle
images consisted of three data sets as mentioned earlier, the
COMPCARS dataset, Internet Images, and personally
collected data set, with raw images numbering over 10,000
images. Figure 3: SURF features and SURF descriptors
B. BOF Implementation
Clustering: using the SURF points, we create a
The BOF model is fairly and old model, and has been used
vocabulary by clustering, it is the method to
widely for document classification and text recognition and
collect similar data points and collecting them in
classification, thus it has some constraints regarding the limit
groups using via K-means clustering which uses
of size and capacity. BOF model is considered robust on the
the “Euclidean Distance” algorithm. “K” is the
other hand due to its flexibility on the nature and orientation
number of cluster centers (or words), which are
of the images. There is no size constraint and the feautre
the vocabulary of the BOF model. A cluster model
extraction process is fairly less time consuming than the
is shown below with K=5:
Neural network training time.
Due to the size limit constraints and development machines
constraints, we were forced to use a relatively small data set
to train BOF model. We used approximately 4000 vehicle
images, divided into 38 categories (models of the cars), and
trained the BOF model on this data set. The method of training
BOF is illustrated below:
Figure 6: Output of 96 filters of 1st convolutional layer Data set collection: collection of over 10,000
images.
Resize, organize into classes and split for training
Neural networks take a lot of time for training on a large
data set. We used a GPU capable computer to train the CNN. and testing: the data set is resized to the image layer
The method we used to train the CNN using transfer input size for AlexNet, which is 227 x 227 pixels.
learning is stated below: Modify AlexNet layers to use with our dataset:
Feature Extraction: we first extract features using modify the fully connected layers to adjust for the
the 96 image filters present in the first number of classes for our data set.
convolutional layer of AlexNet. Because we use Retrain network: retrain the network on our data set.
these layers repeatedly and with different Classification: after training is done, we pass a test
configuration everytime, the earlier layers extract image to the network and obtain the output of the
low level features like edges and curves, while
classification result.\
later layers extract high level information.
Classification: the classification in CNN is The modifications applied to the network architecture of
achieved in the “fully connected layer” of the
AlexNet are as follows (we modified layer 23 and layer
CNN, which is the last layer in the network.
25 to do transfer learning training of the AlexNet:
The architecture of AlexNet is given as follows:
Figure 9: Modified layers of AlexNet
𝑡𝑟𝑢𝑒 𝑚𝑎𝑡𝑐ℎ𝑒𝑠
𝐴𝑐𝑐𝑢𝑟𝑎𝑐𝑦 = × 100%
𝑡𝑜𝑡𝑎𝑙 𝑡𝑒𝑠𝑡 𝑖𝑚𝑎𝑔𝑒𝑠
VII. CONCLUSION
VMMR systems are useful in traffic monitoring and
surveillance, toll plaza systems and parking systems.
Currently work is being carried out by researchers to develop
Figure 17: CNN classification output accurate and robust techniques for car make and model
recognition. Our system includes advanced machine learning
algorithms such as CNN and deep learning and state of the art
AlexNet neural network.
C. LOGO Detection and classification
However the BOF model is ruled out as less effective and
We also implemented template matching using peak accurate classification method as compared to the neural
correlation method, to localize and extract the logo from front networks efficiency and accuracy. We obtained above 90%
and back of the car. For this, we created a template data set of accuracy using neural networks as compared to the 75%
logo images, as shown below: average accuracy of BOF model.
The accuracy can be further improved by using a larger
data sets having images numbering in millions, to ensure a
proper learning of the classes, which contains images taken in
every kind of different situations, so that the learning is
universal and more effective.
Furthermore, this system has a numerous number od child
Figure 18: car logo image templates projects in the domain of object and pattern recognition and
classification.
Moreover, this system could be used for data mining and
trend analysis, for example, we can use the calssification in REFERENCES
real time and observe the trends of most preferred colour of [1] Mausam Jain, D. Tharun Kumar, “Car Make and Model
vehicles, most preferred models of the cars, in any region. Recognition”, IIT Hyderabad, ODF, Yeddumailaram – 502205, 2015.
[2] V. S. Petrovic and T. F. Cootes, “Analysis of features for rigid
This analysis can be very helpful for vehicle manufacturing
structure vehicle type recognition”, in Proc. British Machine Vision
companies to make their business more profitable. Conference (BMVC’04), pp. 587-596, Kingstone UK, September
2004.
[3] Sparta Cheung, Alice Chu, “Make and Model Recognition of Cars”,
CSE 190A Projects in Vision and Learning, Final Report, 2008.
APPENDIX [4] Abdul Jabbar Siddiqui et. Al “Real-Time Vehicle Make and Model
Recognition Based on a Bag of SURF Features”, IEEE Transactions
SURF: Speeded up robust features. on Intelligent Transportation Systems, VOL. 17, NO. 11, November,
SIFT: Scalar Invariant Feature Transform. 2016.
HOG: Histogram of oriented gradients. [5] Yiren Zhou et. Al. Ímage-Base Vehicle Analysis using Deep Neural
Network: A Systematic Study”, arXiv:1601.01145v2[cs.CV], August,
Template Matching: Match an object in an 2016.
image using the templates in the template [6] Afshin Dehghan et. Al. “View Independent Vehicle Make, Model and
database. Color Recognition using Convolutional Neural Network”, Computer
Vision Lab, Sighthound Inc., Winter Park, FL.
Peak Correlation: Match two images using arXiv:1702.01721v1[cs.CV], 6 Feb 2017.
peaks created by taking the discrete fourier [7] A Krizhevsky, et. Al. “Imagenet Classification with Deep
transform of both images. Convolutional Neural Networks:, Advances in Neural Information
Processing Systems, 2012.
KNN: k nearest neighbour algorithm. [8] Derrick Liu, Yushi Wang, “Image Classification of Vehicle Make and
BOF: Bag of Features Model using Convolutional Neural Networks and Transfer Learning”,
CNN: Convolutional Neural Network. Stanford Uni.
SVM: Support Vector Machine. [9] Dr. Kazi A. Kalpoma et. Al. “Logo Recognition using SURF Features
and kNN Search Tree”, International Journal of Scientific and
Transfer Learning: Method of re-training a pre- Engineering Research, Volume 6, Issue 9, September-2015. ISSN
trained neural network using its layers weights 2229-5518.
[10] pp. 876—880. Available: http://www.halcyon.com/pub/journals/
and your own data set. 21ps03-vidmar
VMMR: Vehicle Make and Model Recognition.
MMR: Make and Model Recognition.
ACKNOWLEDGMENT
This project would not have been possible without the
support, supervision and sincere guidance of our supervisor,
Ms. Sumayya Haroon, Assistant Professor, faculty of
Electrical Engineering department of COMSATS Institute of
Information Technology, Islamabad. She guided us
effectively to make this project reach its completion.
We are thankful to our seniors, and faculty members, who
helped us out in every difficulty and obstacle that occoured
during the development of this project.
We would very humbly pay our gratitude to our family
members, for their support and prayers.
In the end, we would like to thank our group members for
putting in their sincere efforts and knowledge.
This work is dedicated to our respected supervisor, to the
university and our friends and family.