Skip to content

A pytorch Implementation of classical object detection.

Notifications You must be signed in to change notification settings

AceCoooool/detection-pytorch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

detection-pytorch

This repository is my reproduction of classical object detection in pytorch. (For own study and reference others' implementation --- welcome to pull issues 😳)

Done

Note:This implement is mainly based on the amdegroot's ssd 👍.

Detail of instructions are in each sub-direcoryssdyoloyolo3

Pre-requisties

  • Python 3.4+
  • Pytorch 0.4 (Note:you can install through source or through follow conda) conda install -c ostrokach-forge pytorch=0.4.0
  • OpenCV(optional,PIL.Image is also well)
  • CUDA 8.0 or higher(optional)

Dataset

PASCAL_VOC 07+12:follow the instructions in amdegroot's ssd

  1. Download VOC2007 trainval & test

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

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

(Note:if your dataset is not in ~/data,please modify the dataset/config.py ’ s home parameter to you data path.)

Performance

detection model mAP(07) mAP(10) Google Drive Baidu Drive
SSD (vgg16) 77.55% 80.10% vgg_final.pth vgg_final.pth
SSD (res101) 75.97% 78.26% resnet_final.pth resnet_final.pth
YOLOv2 (official) 73.40% 75.80% yolo-voc.pth yolo-voc.pth
YOLOv2 (w/o multi) 67.73% 69.61% yolo_160.pth yolo_160.pth
YOLOv3(official) yolo3.pth yolo3.pth

Note:

  1. The pretrained vgg model is converted from caffe and download from amdegroot's ssd,and the pretrained res101 is coming from torchvision pretrained models.(I guess this is the reason why res101 based performance is worse than vgg based)
  2. YOLOv2 official means the weights coming from the pjreddie's website(can not find now 😂 )
  3. The data in ssd minus the mean and not divide 255. However, in the YOLO, the data without minus mean and divide 255. (No why,due to the pretrained basenet 😅)
  4. YOLO using multi-scale may need more epoch.

Apology

There are sevaral important "functions" not cantain in this repository:

  • Only VOC dataset,not support other datasets (e.g. COCO dataset)
  • Only one card(GPU),not support multiprocess

(I am sorry for those. I only have one GPU card,and cannot finish the above functions~:neutral_face:)

Reference

  1. ssd.pytorch
  2. YAD2K
  3. pytorch-yolo2
  4. pytorch-yolo3

Thanks for the great work by these authors.:heart:

About

A pytorch Implementation of classical object detection.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages