Home

Awesome

Pelee: A Real-Time Object Detection System on Mobile Devices, in PyTorch

A PyTorch implementation of Pelee: A Real-Time Object Detection System on Mobile Devices The official and original Caffe code can be found here.

Description

I train Pelee with pytorch and the result is better than the original paper result,the pretrained model can be downloaded in peleenet.pth.

MAP in VOC2007

Method07+1207+12+coco
SSD30077.281.2
SSD+MobileNet6872.7
Original Pelee70.976.4
Ours Pelee71.76---

Preparation

the supported version is pytorch-0.4.1 or pytorch-1.0

git clone https://github.com/yxlijun/Pelee.Pytorch
sh make.sh

train

you can train different set according to configs/*,First, you should download the pretrained model peleenet.pth,then,move the file to weights/

python train.py --dataset VOC\COCO --config ./configs/Pelee_VOC.py  

if you train with multi gpu

CUDA_VISIBLE_DEVICES=0,1 python train.py --dataset VOC\COCO --config ./configs/Pelee_VOC.py   --ngpu 2

eval

you can evaluate your model in voc and coco

python test.py --dataset VOC\COCO  --config ./configs/Pelee_VOC.py --trained_model ./weights/Pelee_VOC.pth 

demo

you can test your image, First, download the trained model Pelee_VOC.pth file. Then, move the file to weights/.

python demo.py --dataset VOC\COCO  --config ./configs/Pelee_VOC.py --trained_model ./weights/Pelee_VOC.pth --show  

You can see the image with drawed boxes as:

<div align=center><img src="imgs/VOC/im_res/street_stdngit.jpg" width="450" hegiht="163" align=center /> <div align=left>

TODO

the code support:

References