# YOLO version3 in Pytorch
Full implementation of YOLO version3 in PyTorch, including training, evaluation, simple deployment(developing).
## Overview
#### YOLOv3: An Incremental Improvement
[[Paper]](https://pjreddie.com/media/files/papers/YOLOv3.pdf)
[[Original Implementation]](https://github.com/pjreddie/darknet)
#### Motivation
Implement YOLOv3 and darknet53 without original darknet cfg parser.
It is easy to custom your backbone network. Such as resnet, densenet...
Also decide to develop custom structure (like grayscale pretrained model)
## Installation
##### Environment
* pytorch >= 0.4.0
* python >= 3.6.0
##### Get code
```
git clone https://github.com/zhanghanduo/yolo3_pytorch.git
cd YOLOv3_PyTorch
pip3 install -r requirements.txt --user
```
##### Download COCO dataset
```
cd data/
bash get_coco_dataset.sh
```
##### Download BDD dataset
Please visit [BDD100K](https://github.com/ucbdrive/bdd-data) for details.
## Training
##### Download pretrained weights
1. See [weights readme](weights/README.md) for detail.
2. Download pretrained yolo3 full wegiths from [Google Drive](https://drive.google.com/file/d/1SnFAlSvsx37J7MDNs3WWLgeKY0iknikP/view?usp=sharing) or [Baidu Drive](https://pan.baidu.com/s/1YCcRLPWPNhsQfn5f8bs_0g)
3. Move downloaded file ```official_yolov3_weights_pytorch.pth``` to ```weights``` folder in this project.
##### Modify training parameters
1. Review config file ```training/params.py```
2. Replace ```YOUR_WORKING_DIR``` to your working directory. Use for save model and tmp file.
3. Adjust your GPU device. See parallels.
4. Adjust other parameters.
##### Start training
```
cd training
python training.py params.py
```
##### Option: Visualizing training
```
# please install tensorboard in first
python -m tensorboard.main --logdir=YOUR_WORKING_DIR
```
<p><img src="common/loss_curve.png"\></p>
## Evaluate
##### Download pretrained weights
1. See [weights readme](weights/README.md) for detail.
2. Download pretrained yolo3 full wegiths from [Google Drive](https://drive.google.com/open?id=1Bm_CLv9hP3mMQ5cyerKRjvt7_t1duvjI) or [Baidu Drive](https://pan.baidu.com/s/1gx-XRUE1NTfIMKkQ1L0awQ)
3. Move downloaded file ```yolov3_weights_pytorch.pth``` to ```wegihts``` folder in this project.
##### Start evaluate
```
cd evaluate
python eval.py params.py
python eval_coco.py params.py
```
<p align="center"><img src="https://pjreddie.com/media/image/Screen_Shot_2018-03-24_at_10.48.42_PM.png" width="480"\></p>
#### Roadmap
- [x] Yolov3 training
- [x] Yolov3 evaluation
- [ ] Add backbone network other than Darknet
- [ ] Able to adapt 3-channel image to 1-channel input
## Credit
```
@article{yolov3,
title={YOLOv3: An Incremental Improvement},
author={Redmon, Joseph and Farhadi, Ali},
journal = {arXiv},
year={2018}
}
```
## Reference
* [darknet](https://github.com/pjreddie/darknet)
* [PyTorch-YOLOv3](https://github.com/eriklindernoren/PyTorch-YOLOv3): Thanks for Evaluate and YOLO loss code

智慧安全方案
- 粉丝: 3928
最新资源
- springboot284基于HTML5的问卷调查系统的设计与实现录像.mp4
- springboot283图书商城管理系统录像.mp4
- springboot286入校申报审批系统的设计与实现录像.mp4
- springboot285基于Java web的药店管理系统的设计与实现录像.mp4
- springboot287基于javaEE的校园二手书交易平台的设计与实现录像.mp4
- springboot290教学资料管理系统录像.mp4
- springboot289基于JAVA的房地产销售管理系统的设计与实现录像.mp4
- springboot288基于BS的老年人体检管理系统录像.mp4
- springboot293基于javaweb的学生用品采购系统录像.mp4
- springboot291校园疫情防控系统录像.mp4
- springboot292校园外卖服务系统设计与实现录像.mp4
- springboot295基于Mysql的商业辅助决策系统的设计与实现录像.mp4
- springboot294基于java的火车票订票系统的设计与实现录像.mp4
- springboot296基于个性化定制的智慧校园管理系统设计与开发录像.mp4
- springboot297毕业生实习与就业管理系统的设计与实现录像.mp4
- springboot298计算机学院校友网录像.mp4
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈


