Skip to content

Simple multi-class object detector using fully convolutional network.

Notifications You must be signed in to change notification settings

iKrishneel/fcn_object_detector

Repository files navigation

fcn_object_detector

1. Info

ROS package for multiclass fully convolutional object detector using pretrained network.

2. Building the System

2.1 Requirements

2.1 Downloading

Use standard git tools

  $ git clone https://github.com/iKrishneel/fcn_object_detector.git

2.3 Build Process

To compile the system, use the standard catkin build on ros environment:

  $ catkin build fcn_object_detector

3. Running Nodes

3.1 Running Detector Node

$ roslaunch fcn_object_detector fcn_object_deteor.launch image:=/camera/rgb/image_rect_color

4 Test data

Download the rosbag file for testing

Training

  • Add the data argumentation layer to the system wide environmental variable
  $ export PYTHONPATH=./fcn_object_detector/scripts/data_argumentation_layer:$PYTHONPATH
  • Create LMDB of the input datasets. The dataset should contain images, bounding boxes and labels. The bounding boxes and labels has to be in .txt file in following format. Note x and y are top left hand corner coordinate and currently it only supports one bounding box per image
  /path/to/images x, y, width, height, label 
  • To create the LMDB run the following command. Make sure to set path to the dataset folder containing the training set
  $ roslaunch fcn_object_detector create_training_lmdb.launch

This command will create LMDB folder with two file features and labels where features contains images and labels contains the bounding box coordinates and class label of the object in the image

  • In the train_val.prototxt file add the data argumentation layer for end-to-end training
layer {
  type: 'Python'
  name: 'Argumentation'
  top: "data"
  top: "coverage-label"
  top: "bbox-label"
  top: "size-block"
  top: "obj-block"
  top: "coverage-block"
  bottom: 'data_in'
  bottom: 'label'
  python_param {
      module: 'data_argumentation_layer'
    layer: 'DataArgumentationLayer'
    param_str : '448, 448,16, 1'
    }
 }