The unofficial implementation of ECCV 2018 paper "Parallel Feature Pyramid Network for Object Detection" in Pytorch. Some tricks learned from RefineDet.PyTorch
And the paper could be downloaded from "http://openaccess.thecvf.com/content_ECCV_2018/papers/Seung-Wook_Kim_Parallel_Feature_Pyramid_ECCV_2018_paper.pdf"
Python3.5
Pytorch1.1.0
GPU:1080Ti
-
Get the code. We will call the cloned directory as
$PFPNet_Pytorch
.https://github.com/junjieAI/PFPNet_Pytorch.git
-
Build the Cython modules, We can refer to Faster-Rcnn approach.
cd $PFPNet_Pytorch/lib make
-
Download the basenet model VGGNET. By default, we assume the model is stored in
$PFPNet_Pytorch/pretrained
. -
Download the trained model of myself, the Extract code: fh9uby. By default, we assume the model is stored in
$PFPNet_Pytorch/pretrained
. -
Prepare the data basic structure.
$VOCdevkit/ # RootPath $VOCdevkit/VOC2012 # image sets, annotations, etc. $VOCdevkit/VOC2012/Annotations # include .xml files. $VOCdevkit/VOC2012/ImageSets/Main # include trainval.txt file. $VOCdevkit/VOC2012/JPEGImages # include images.
-
Train your model on PASCAL VOC Format.
cd $PFPNet_Pytorch python3 train_PFPNet.py
-
Train results, it will create two types file, '.pth' model and loss log file.
# It will create model definition files and save snapshot models in: # - $PFPNet_Pytorch/weights/PFPNet{input_size}_VOC_{iteration}.pth/ # and the loss log in: # - $PFPNet_Pytorch/'{}_{}_{}_{}:{}:{}loss.txt'.format(log_time.year, log_time.month, log_time.day,log_time.hour,'%02d'%log_time.minute, '%02d'%log_time.second)
-
Visualization.
cd $PFPNet_Pytorch python3 demo.py
-
The script vis_loss.py is just to visualize the loss log.