Skip to content

rxng8/Faster-R-CNN-Research

Repository files navigation

Faster R-CNN Research and Implementation

As the title, this repo is for Faster R-CNN implementation. The algorithm is mainly based on this article and this article

Installation:

  1. Install Anaconda if you have not already.
  2. Create conda environment from file:
conda env create -f environment.yml
  1. Activate the conda environment:
conda activate rcnn
  1. Go to Google's open image dataset and download the classname description file and the box annotation files of the subset and put them in the dataset folder.
  2. Config the right path in /dataset/data_selector.py to generate 2 files and create 1 folder:
  • a file containing image id to be downloaded (data.txt in this case).
  • a file which is the small version of the annotation file (train-annotations-bbox.csv in this case).
  • a folder containing the images to be downloaded (open_image in this case).
  1. Run the /dataset/downloader.py to download image into a folder.
# Change directory to dataset folder.
cd dataset
# For the case we want to use 2 processor.
python downloader.py data.txt --download_folder=open_image --num_processes=2
  1. Other dataset (fire detection):
  1. Start using the notebook.py file.

Project struture:

Project Backlog

Other works

Week 1: Feb 1 - Feb 5: Chest X-ray project week 1

Week 2: Feb 8 - Feb 12: Chest X-ray project week 2

Week 3: Feb 15 - Feb 19: Chest X-ray project week 3

Week 4: Feb 22 - Feb 26: Chest X-ray project week 4

Week 5: March 1 - March 5: Chest X-ray project week 5

Week 6: March 8 - March 12: Chest X-ray project week 6

Week 7: March 15 - March 19: Chest X-ray project week 7

Week 8: March 22 - March 26: Chest X-ray project week 8

Week 9: March 29 - April 2: Shopee project week 9

Week 10: April 5 - April 9: Shopee project week 10

Week 11: April 12 - April 15: Shopee project week 11

Week 12: April 18 - April 22: Shopee project week 12

Week 13: April 25 - April 29:

  • [2 hours] Create the whole project pipeline and template, write documentation in readme.
  • [0.5 hours] Prepare environment rcnn for the project.
  • [4 hours] Experiment with Google's open image dataset and setup the dataset downloader pipeline (and download).
    • [0.5 hours] Read about the process of downloading the data from google api.
    • [3.5 hours] Write code and fix bug to generate appropriate files and csv, as well as labels and annotation files.
  • [1.5 hours] Read the paper Faster R-CNN in-depth. Refering to 5 sources of in-depth information about the method.
  • [5.5 hours] Implement the overall structure of Faster R-CNN:
    • [0.5 hours] Build and test transfer learning model with base VGG16 (frcnn/models.py).
    • [2 hours] Implement iou loss, rpn classifier and regressor loss, and object classifier loss (frcnn/losses.py).
    • [3 hours] Implement the cal_rpn() to generate the label for the rpn networks in the data generator.

Week 14: May 2 - May 6:

  • [3 hours] get_data function fixing bugs and revised in notebook.py
  • [7 hours] Training pipeline fixing bugs and revised. Trainable now! (From line 288 to end in notebook.py)

June 1:

  • Done: trianing and evaluating
  • BUG: Evaluating buggy

Reference:

  1. Javior. 2018. Faster R-CNN: Down the rabbit hole of modern object detection. Trynolabs. https://tryolabs.com/blog/2018/01/18/faster-r-cnn-down-the-rabbit-hole-of-modern-object-detection/.
  2. Xy, Y. 2018. Faster R-CNN (object detection) implemented by Keras for custom data from Google’s Open Images Dataset V4. Toward Data Science. https://towardsdatascience.com/faster-r-cnn-object-detection-implemented-by-keras-for-custom-data-from-googles-open-images-125f62b9141a.
  3. Weng, L. 2017. Object Detection for Dummies Part 3: R-CNN Family. Lil' Log. https://lilianweng.github.io/lil-log/2017/12/31/object-recognition-for-dummies-part-3.html.
  4. Gad, A. F. 2020. Faster R-CNN Explained for Object Detection Tasks. Paperspace Blog. https://blog.paperspace.com/faster-r-cnn-explained-object-detection/.
  5. Geeksforgeek. 2020. Faster R-CNN | ML. Geeksforgeek. https://www.geeksforgeeks.org/faster-r-cnn-ml/
  6. RockyXu66. 2018. Faster R-CNN for Open Images Dataset by Keras. frcnn_train_vgg.ipynb. Github. https://github.com/RockyXu66/Faster_RCNN_for_Open_Images_Dataset_Keras/blob/master/frcnn_train_vgg.ipynb
  7. Phan, H. 2020. [Deep Learning] - Thuật toán Faster-RCNN với bài toán phát hiện đường lưỡi bò - Faster-RCNN object detection algorithm for Nine-dash-line detection!. Viblo. https://viblo.asia/p/deep-learning-thuat-toan-faster-rcnn-voi-bai-toan-phat-hien-duong-luoi-bo-faster-rcnn-object-detection-algorithm-for-nine-dash-line-detection-bJzKmREOZ9N
  8. Sharma, P. 2018. A Practical Implementation of the Faster R-CNN Algorithm for Object Detection (Part 2 – with Python codes). Analytics Vidhya. https://www.analyticsvidhya.com/blog/2018/11/implementation-faster-r-cnn-python-object-detection/

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages