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.
- 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)
-
Clone this repository
git clone [email protected]:cory8249/yolo2-pytorch.git
-
Build the reorg layer (
tf.extract_image_patches
)cd yolo2-pytorch ./make.sh
-
Download the trained model kitti_baseline_v3_100.h5 and set the model path in
yolo_detect.py
-
Run demo
python3 yolo_detect.py
.
Install any missing packages manually via pip