Are you sure you want to delete this task? Once this task is deleted, it cannot be recovered.
nuaaceieyty 547477e6ef | 2 years ago | |
---|---|---|
configs | 2 years ago | |
data | 2 years ago | |
model | 2 years ago | |
output | 2 years ago | |
1.txt | 2 years ago | |
README.md | 2 years ago | |
README_CN.md | 2 years ago | |
eval.py | 2 years ago | |
predict.py | 2 years ago | |
requirements.txt | 2 years ago | |
result.JPG | 2 years ago | |
stdout.txt | 2 years ago | |
train.py | 2 years ago |
English | 简体中文
This project is based on the paddlepaddle_V2.1 framework to reproduce YOLOv4. YOLOv4 is the fourth generation model of YOLO series. While retaining the encoding and decoding mode of YOLOv3 detection head, YOLOv4 uses stronger backbone network, stronger feature fusion module and more data enhancement modes, so that the model performance is significantly improved compared with YOLOv3, and the inference speed is still very fast.
Paper:
Reference project:
The link of aistudio:
The model is trained on COCO2017's train set and tested on COCO2017's testdev set (the training can be verified on val set first to evaluate the training of the model).
The AP on testdev set given in the paper when the input size is 416x416 is 41.2%, and the AP obtained in this project is 41.2%.
Hardware:CPU、GPU(a machine with four Tesla V100-32G is recommended)
Framework:
# clone this repo
git clone https://github.com/nuaaceieyty/Paddle-YOLOv4.git
cd Paddle-YOLOv4
export PYTHONPATH=./
Install dependencies
pip install -r requestments.txt
python -m paddle.distributed.launch --gpus 0,1,2,3 train.py -c configs/yolov4/yolov4_coco.yml --eval
Note: Make sure the best_model.pdparams file is in the output directory.
python3 eval.py -c configs/yolov4/yolov4_coco.yml
Note: Make sure the best_model.pdparams file is in the output directory.
python3 eval.py -c configs/yolov4/yolov4_coco_test.yml
Zip the bbox. Json file generated in the live directory and send it to the evaluation server
Put the images to be tested in the data directory, run the following command, and save the output images in the Output directory; If there is a GPU in the machine environment, delete -o use_gpu=False from the command
python3 predict.py -c configs/yolov4/yolov4_coco.yml --infer_img data/1.jpg -o use_gpu=False
The result is shown as follows:
├─config
├─model
├─data
├─output
│ eval.py
│ predict.py
│ README.md
│ README_CN.md
│ requirements.txt
│ train.py
Parameters related to training and evaluation can be set in train.py
, as follows:
Parameters | default | description | other |
---|---|---|---|
config | None, Mandatory | Configuration file path | |
--eval | None, Optional | Evaluate after an epoch | If you don't select this, you might have trouble finding the best_model |
--fp16 | None, Optional | Semi-precision training | If this option is not selected, 32GB of video memory may not be sufficient |
--resume | None, Optional | Recovery training | For example: --resume output/yolov2_voc/66 |
See 5、Quick Start
For other information about the model, please refer to the following table:
information | description |
---|---|
Author | YU Tianyang(EICAS) |
Date | 2021.10 |
Framework version | Paddle 2.1.2 |
Application scenarios | Object detection |
Support hardware | GPU、CPU |
Download link | Pre training model |
Online operation | notebook |
本项目基于paddlepaddle_v2.1框架复现YOLOv4,精度达到论文给出的。所有预训练参数和模型权重均可下载使用。
Python Text Markdown
Dear OpenI User
Thank you for your continuous support to the Openl Qizhi Community AI Collaboration Platform. In order to protect your usage rights and ensure network security, we updated the Openl Qizhi Community AI Collaboration Platform Usage Agreement in January 2024. The updated agreement specifies that users are prohibited from using intranet penetration tools. After you click "Agree and continue", you can continue to use our services. Thank you for your cooperation and understanding.
For more agreement content, please refer to the《Openl Qizhi Community AI Collaboration Platform Usage Agreement》