Skip to content

MuhammedBuyukkinaci/Object-Classification-and-Localization-with-TensorFlow

Repository files navigation

Object-Classification-and-Localization-with-TensorFlow

This is a multiclass image classification & localization project for SINGLE object using CNN's and TensorFlow API (no Keras) on Python3.

Steps

  1. Collecting images via Google Image Download. Only one object must be in the image.

  1. Labeling images via LabelImg

3) Data Augmentation(create_training_data.py). Mirroring with respect to x axis, mirroring with respect to y axis and adding noise were carried out. Hereby, data amount were folded by 8( 2 x 2 x 2 ).
  1. After data augmentation, create_training_data.py script is creating suitable xml files for augmented images.

  2. Making our data tabular. Input is image that we feed into CNN. Output1 is one hot encoded classification output. Output2 is the locations of bounding boxes(regression) in create_training_data.py.

  3. Determining hypermaraters in train.py.

  4. Separating labelled data as train and CV in train.py.

  5. Defining our architecture in train.py. I used AlexNet for model architecture.

  6. Creating 2 heads for calculating loss in train.py. One head is classification loss. The other head is regression loss.

  1. Training the CNN on a GPU (GTX 1050 - One epoch lasted 10 seconds approximately)

  2. Testing on unseen data colled from the Internet.

Architecture

AlexNet is used as architecture. 5 convolution layers and 3 Fully Connected Layers with 0.5 Dropout Ratio. 60 million Parameters. alt text