Pytorch YoloV2 implementation from scratch

This repository is simple implementation of YOLOv2 algorithm for better understanding and use it for more object detection usage. This project based on Pytorch. The code of project is so easy and clear.

Dataset

Pretrained weights in this implemetation are based on training yolo team on COCO trainval dataset

Usage

You can have your own object detection machine

Note: The tests of this repo run with cpu mode so if you use gpu prediction become much faster

Clone the repository

git clone https://github.com/miladlink/YoloV2.git

cd YoloV2

Install dependencies

pip install -r requirements.txt

Pretrained Weights

  • Download used weights in this project from here or go to weights and click to yolov2.weights

or

chmod +x weights/get_weights.sh
weights/get_weights.sh

Help

image

Detection

python detect.py -w path/to/weights
-ct <conf_thresh>
-nt <nms_thresh>
-p path/to/img
-s

Some Result image

you can see some examples in yolov2_examples.ipynb

dog

person

giraffe

Note: TinyYoloV2 trained by pascal VOC can not predict above image

for more information about TinyYoloV2 implementations you can visit

github.com/miladlink/TinyYoloV2

Read more here: Source link