Suvi-dha / CNN-Image-retrieval

CNN Image Retrieval on Tattoo dataset with Tensorflow and Keras : Implementation of Faster R-CNN and R-MAC papers

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CNN-Imate-retrieval

CNN Image Retrieval on Tattoo dataset with Tensorflow and Keras : Implementation of following papers

  1. Implementation of Particular Object Retrieval with Intergral Max-Pooling of CNN Activations
  2. Implementation of Faster R-CNN : Towards Real-Time object detection with Region Proposal Networks

Dataset

Since I received the dataset from Tattoo Dataset Organization, you need your own dataset.

Usage

├── ROOT
   └── dataset (train dataset for Faster R-CNN model)
       ├── final_annotations.txt (you can find the reference for this file in my dataset folder)
       ├── images
           ├── xxx.jpg 
           ├── yyy.png
           ├── ...

   └── test_dataset (test dataset for Faster R-CNN model)
       ├── final_test_annotations.txt (you can find the reference for this file in my test_dataset folder)
       ├── images
           ├── xxx.jpg 
           ├── yyy.png
           ├── ...
   └── retrieval_test (test dataset for Image Retrieval)
       ├── retrieval_annotations.txt (you can find the reference for this file in my test_dataset folder)
       ├── images
           ├── xxx.jpg 
           ├── yyy.png
           ├── ...

Getting Started

  • You need your own dataset for every following steps.

  • frcnn_train_vgg.ipynb This notebook is for the training Object detection model(Faster R-CNN).

  • frcnn_test_vgg.ipynb This notebook is for the testing Object detection model(Faster R-CNN).

  • Retrieval_Model_final.ipynb. This notebook applies max-pooling on last convolution feature map and then generates pickles for each image in training dataset.

  • Ranking_Module.ipynb This notebook is for the testing performance of image-retrieval.

Training on Your Own Dataset

To train and test this model, you need to build your own dataset.

For each dataset folder, you need annotations.txt files. It includes ground truth for (path / bounding box coordinates / class label).

Path

Since notebooks are colab files, image datasets shoud be in your google drive and it corresponds to ground truth path.

Bounding box coordinates and class label

I used RectLabel application for bounding box labeling. you can use other applications for this task.

Project using this model

If you extend this model to build projects that use it, I'd love to hear from you.

Object detection

스크린샷 2020-07-20 오후 6 27 02

스크린샷 2020-07-20 오후 6 27 25

스크린샷 2020-07-20 오후 6 28 17

Image Retrieval

스크린샷 2020-07-20 오후 6 36 31

스크린샷 2020-07-20 오후 6 41 42

스크린샷 2020-07-20 오후 6 44 33

About

CNN Image Retrieval on Tattoo dataset with Tensorflow and Keras : Implementation of Faster R-CNN and R-MAC papers


Languages

Language:Jupyter Notebook 100.0%