An implementation of our method. The code is constructed based on Faster R-CNN and ORN.
-
Ubuntu 16.04 + Anaconda + Python 2.7 + CUDA 8.0 + CUDNN 6.0
-
Other dependencies required to install caffe.
Any NVIDIA GPU that supports CUDA acceleration and has at least 3G memory.
- Clone the repository
git clone https://github.com/lilinhao/ShipDetection.git
- Build the Cython modules
cd $SDET_ROOT/lib make
- Build Caffe and pycaffe
cd $SDET_ROOT/caffe-fast-rcnn make -j8 && make pycaffe
Our dataset can be download from here with password 4t5e
. The dataset is organized according to the VOC2007 dataset. If you want to train on your own data, you can convert it to VOC2007 format.
Examples of the annotations in our xml files are as follows:
<rotbox>
<rbox_cx>174.268870</rbox_cx>
<rbox_cy>512.186141</rbox_cy>
<rbox_w>143.288621</rbox_w>
<rbox_h>17.665301</rbox_h>
<rbox_ang>-0.219796</rbox_ang>
The annotated information is the center coordinate, width, height and orientation of the bounding box from top to bottom. The orientation ranges from -π/2 to π/2 and the counterclockwise direction is positive
Download the VGG16 model to $FRCN_ROOT/data/imagenet_models
and use experiments/scripts/ship_detection_end2end.sh
to train and test a ship detector. Output is written underneath $FRCN_ROOT/output
.
cd $FRCN_ROOT
./experiments/scripts/ship_detection_end2end.sh [GPU_ID] VGG16 pascal_voc
# GPU_ID is the GPU you want to train on