## YOLO v3 implementation With pytorch
> this repository only contain the detection module and we don't need the cfg from original YOLOv3, we implement it with pytorch.
This repository is based on the official code of [YOLOv3](https://github.com/pjreddie/darknet) and [pytorch-yolo-v3](https://github.com/ayooshkathuria/pytorch-yolo-v3). There's also an implementation for YOLOv3 already for pytorch, but it uses a config file rather than a normal pytorch approch to defining the network. One of the goals of this repository is to remove the cfg file.
## Requirements
* Python 3.5
* OpenCV
* PyTorch 0.4
## Installation
* Install PyTorch-0.4.0 by selecting your environment on the website and running the appropriate command.
* Clone this repository
* Compile the nms
* convert yolov3.weights to pytorch
```shell
cd YOLOv3_Pytorch
./make.sh
mkdir weights
cd weights
wget https://pjreddie.com/media/files/yolov3.weights
cd ..
python convert_darknet.py --version coco --weights ./weights/yolov3.weights --save_name ./weights/convert_yolov3_coco.pth
# we will get the convert_yolov3_coco.pth
```
## Train
> We only train voc dataset because we don't have enough gpus to train coco datatset. This is still an experimental repository, we don't reproduce the original results very well.
### dataset
[merge VOC dataset](https://github.com/yqyao/DRFNet#voc-dataset)
* structure
./data/datasets/VOCdevkit0712/VOC0712/Annotations
./data/datasets/VOCdevkit0712/VOC0712/ImageSets
./data/datasets/VOCdevkit0712/VOC0712/JPEGImages
* COCO
Same with [COCO](https://github.com/yqyao/DRFNet#coco-dataset)
### train
> you can train multiscale by changing data/config voc_config multiscale
* convert weights
```shell
cd weights
wget wget https://pjreddie.com/media/files/darknet53.conv.74
cd ../
python convert_darknet.py --version darknet53 --weights ./weights/darknet53.conv.74 --save_name ./weights/convert_darknet53.pth
```
* train yolov3
```python
python train.py --input_wh 416 416 -b 64 --subdivisions 4 -d VOC --basenet ./weights/convert_darknet53.pth
```
### eval
```python
python eval.py --weights ./weights/convert_yolov3_voc.pth --dataset VOC --input_wh 416 416
```
> darknet voc is trained by darknet, pytorch voc is trained by this repository
**results**
| darknet voc 608 | darknet voc 416 | pytorch voc 608| pytorch voc 416|
|:-: |:-: | :-: |:-: |
| 77.2 % | 76.2% | 74.7% | 74.9% |
| 27ms | 18ms | 27ms | 18ms |
## Demo
```python
python demo.py --images images --save_path ./output --weights ./weights/convert_yolov3_coco.pth -d COCO
```
## Example
<img align="center" src= "https://github.com/yqyao/YOLOv3_Pytorch/blob/master/output/output_person.jpg">
<!--  -->
## References
- [YOLOv3: An Incremental Improvemet](https://pjreddie.com/media/files/papers/YOLOv3.pdf)
- [Original Implementation (Darknet)](https://github.com/pjreddie/darknet)
- [pytorch-yolo-v3](https://github.com/ayooshkathuria/pytorch-yolo-v3)
- [pytorch-yolo2](https://github.com/marvis/pytorch-yolo2)
没有合适的资源?快使用搜索试试~ 我知道了~
YOLOV3 使用 pytorch 实现,使用 pytorch 方法来定义网络 .zip

共47个文件
py:28个
jpg:6个
pyx:3个

1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 60 浏览量
2024-11-26
19:25:28
上传
评论
收藏 922KB ZIP 举报
温馨提示
YOLOV3 使用 pytorch 实现,使用 pytorch 方法来定义网络。使用 pytorch 实现 YOLO v3这个存储库仅包含检测模块,我们不需要原始 YOLOv3 的 cfg,我们用 pytorch 实现它。此存储库基于YOLOv3和pytorch-yolo-v3的官方代码。pytorch 也已实现了 YOLOv3,但它使用配置文件而不是普通的 pytorch 方法来定义网络。此存储库的目标之一是删除 cfg 文件。要求Python 3.5OpenCVPyTorch 0.4安装通过在网站上选择您的环境并运行适当的命令来安装 PyTorch-0.4.0。克隆此存储库编译 nms将 yolov3.weights 转换为 pytorchcd YOLOv3_Pytorch./make.shmkdir weightscd weightswget https://pjreddie.com/media/files/yolov3.weightscd ..python convert_darknet.py --version coco --we
资源推荐
资源详情
资源评论































收起资源包目录
























































共 47 条
- 1
资源评论


赵闪闪168
- 粉丝: 1746
上传资源 快速赚钱
我的内容管理 展开
我的资源 快来上传第一个资源
我的收益
登录查看自己的收益我的积分 登录查看自己的积分
我的C币 登录后查看C币余额
我的收藏
我的下载
下载帮助


最新资源
- 信息化教学设计方案评价量规.doc
- 基于互联网+的党校档案管理问题分析.docx
- Delphi短信视频点播前台管理子.doc
- 一种基于图像处理的芯片自动开封算法设计.docx
- 基于Java开发平台的安全性措施.docx
- SolidWorks工程图转换成AutoCADDWG文件后字体不变的方法.doc
- 基于计算机技术的科技管理模式的现代化应用研究.docx
- 实验离散信号的DTFT和DFT及其FFT算法的应用.doc
- 新零售背景下网络零售平台创新模式探索.docx
- 什么是人工智能人工智能知识详解.docx
- C++课程设计方案系统和论文设计方案.docx
- 条高AutoCAD工程项目师绘图技巧.doc
- 基于FTTC的桃源步行街无线网络规划与设计.doc
- 通信工程实习总结.docx
- 某教学楼计算机网络系统集成设计方案.doc
- 基于单片机的十字路口交通灯方案设计书大学大学本科方案设计书(方案设计书).doc
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈



安全验证
文档复制为VIP权益,开通VIP直接复制
