dongfengxijian / TDFSSD

Top-Down Feature Fusion Single Shot MultiBox Detector for object detection

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

TDFSSD: Top-Down Feature Fusion Single Shot MultiBox Detector

By Haodong Pan, Jue Jiang, Guangfeng Chen

Introduction

This is the code for our accepted manuscript in Signal Processing: Image Communication. In brief, this is a SSD based approach for object detection across different scales.
If you use this code, please cite our paper.

Prerequisities

Python3.6, PyTorch0.4.1, and NVIDIA GPUs

Installation

./make.sh

Check your GPU architecture support in utils/build.py, line 131. Default is:

'nvcc': ['-arch=sm_61',

Then download the dataset by following the instructions below and install opencv.

conda install opencv

Datasets

For convenience, we provide simple VOC and COCO dataset loader.

VOC Dataset

Download VOC2007 trainval & test
# specify a directory for dataset to be downloaded into, else default is ~/data/
sh data/scripts/VOC2007.sh # <directory>
Download VOC2012 trainval
# specify a directory for dataset to be downloaded into, else default is ~/data/
sh data/scripts/VOC2012.sh # <directory>

COCO Dataset

Install the MS COCO dataset at /path/to/coco from official website, default is ~/data/COCO. It should have this basic structure

$COCO/  
$COCO/annotations/
$COCO/cache/
$COCO/cocoapi/
$COCO/images/
$COCO/test2017/
$COCO/train2017/
$COCO/val2017/

Training

  • Download the fc-reduced VGG-16 PyTorch base network weights at our BaiduYun Driver PW:1234
  • The modified resnet-101 PyTorch base network weights file is available at our BaiduYun Driver PW:1234
  • Place the weights files in 'TDFSSD/weights'
  • To train TDFSSD with the following command:
python train_test.py -d VOC -s 300 -we 6
  • Note:
    • -d: datasets, VOC or COCO
    • -s: image size, 300 or 512
    • -we: warm epoch
    • 'resnet_trian_test.py' is used for training with the resnet as backbone
    • The detail options can be found in the 'train_test.py' and 'resnet_trian_test.py'

Evaluation

To evaluate a trained network with 'test.py' or 'eval.py'

Models

About

Top-Down Feature Fusion Single Shot MultiBox Detector for object detection

License:MIT License


Languages

Language:Python 92.8%Language:C 4.3%Language:Cuda 2.1%Language:Shell 0.8%Language:C++ 0.1%