https://github.com/acecoooool/yolo-pytorch
darknet to pytorch
https://github.com/acecoooool/yolo-pytorch
darknet python pytorch yolov2
Last synced: about 1 year ago
JSON representation
darknet to pytorch
- Host: GitHub
- URL: https://github.com/acecoooool/yolo-pytorch
- Owner: AceCoooool
- Created: 2017-12-25T05:32:40.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-12-25T06:26:07.000Z (over 8 years ago)
- Last Synced: 2025-04-01T12:04:09.245Z (about 1 year ago)
- Topics: darknet, python, pytorch, yolov2
- Language: Python
- Size: 424 KB
- Stars: 17
- Watchers: 4
- Forks: 6
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# YOLO-Pytorch
[中文说明](README.zh.md)
## Description
This is a pytorch version of [YAD2K](https://github.com/allanzelener/YAD2K)。
Original paper: [YOLO9000: Better, Faster, Stronger](https://arxiv.org/abs/1612.08242)by Joseph Redmond and Ali Farhadi.

---
## Requirements
- Pytorch 0.3.0
- torchvision
- opencv(Requirement for camera and video)
- python 3
## Usage
1. Download Darknet model cfg and weights from the [official YOLO website](http://pjreddie.com/darknet/yolo/).
```bash
# for example --- or other version cfg and weights
wget http://pjreddie.com/media/files/yolo.weights
wget https://raw.githubusercontent.com/pjreddie/darknet/master/cfg/yolo.cfg
```
Note: you can download other types: like `yolo-voc.cfg`
2. Convert the weights to `.pth`
```bash
python tools/yad2t.py path-to-yolo-cfg path-to-yolo-weights path-to-output-folder
```
Note: default choose
- copy your `yolo.cfg` and `yolo.weights` to the directory `config`
- the output folder is `model`
3. Three demos (picture, camera, video)
1. `demo.py`
```bash
python demo.py pic-path yolo-type --cuda=True
```
Note: default choose
- picture in folder `results/demo`
- `yolo-type` is `yolo`: three kinds: `[yolo, tiny-yolo-voc, yolo-voc]`
2. `demo_cam.py`
```bash
python demo_cam.py --trained_model=pth_model_from_1
```
3. `demo_video.py`
```bash
python demo_video.py --demo_path=video_path --trained_model=pth_model_from_1
```