Skip to content

cory8249/yolo2-pytorch

 
 

Repository files navigation

YOLOv2 in PyTorch

This is a PyTorch implementation of YOLOv2. This project is forked from (https://github.com/longcw/yolo2-pytorch), but not compatible with origin version.

Currently, I train this model for KITTI Dataset to demo. It predicts car, pedestrian and cyclist. If you want a general detecotr, please refer to this.

You can also use original YOLOv2 COCO model on KITTI, Here is a demo video

For details about YOLO and YOLOv2 please refer to their project page and the paper: YOLO9000: Better, Faster, Stronger by Joseph Redmon and Ali Farhadi.

System Environment

  • Ubuntu 16.04
  • CUDA 8.0 / cuDNN 5.1
  • Python 3.5
  • Numpy 1.12
  • PyTorch 0.1.12
  • OpenCV 3.2

With a 1080Ti GPU, I get ~30 fps using this KITTI model (input size = 1216 x 352)

Installation and demo

  1. Clone this repository

    git clone git@github.com:cory8249/yolo2-pytorch.git
  2. Build the reorg layer (tf.extract_image_patches)

    cd yolo2-pytorch
    ./make.sh
  3. Download the trained model kitti_baseline_v3_100.h5 and set the model path in yolo_detect.py

  4. Run demo python3 yolo_detect.py.

Install any missing packages manually via pip

About

YOLOv2 in PyTorch

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 89.2%
  • C 5.9%
  • Cuda 4.5%
  • Other 0.4%