Are you sure you want to delete this task? Once this task is deleted, it cannot be recovered.
nuaaceieyty cc9ee2e866 | 2 years ago | |
---|---|---|
configs | 2 years ago | |
data | 2 years ago | |
model | 2 years ago | |
output | 2 years ago | |
utils | 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 | |
train.py | 2 years ago |
English | 简体中文
This project is based on the paddlepaddle_V2.1 framework to reproduce YOLOv2(YOLO9000). YOLOv2 is the second generation model of YOLO series. For the first time, it makes YOLO series model detect based on anchor frame, and proposes multi-scale training methods, which lays the foundation for subsequent YOLOv3, YOLOv4, YOLOv5 and PPYOLO.
Paper:
Reference project:
The link of aistudio:
The model is trained on the trainval set of VOC2007 and VOC2012, and tested on the test set of VOC2007.
The mAP given in the paper when the input size is 416x416 is 76.8%, and the mAP obtained in this project is 76.86%.
Hardware:CPU、GPU(Tesla V100-32G is recommended)
Framework:
# clone this repo
git clone https://github.com/nuaaceieyty/Paddle-YOLOv2.git
cd Paddle-YOLOv2
export PYTHONPATH=./
Install dependencies
pip install -r requestments.txt
python3 train.py -c configs/yolov2/yolov2_voc.yml --eval --fp16
Note: Make sure the best_model.pdparams file is in the output directory.
python3 tools/eval.py -c configs/yolov2/yolov2_voc.yml
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/yolov2/yolov2_voc.yml --infer_img data/dog.jpg -o use_gpu=False
The result is shown as follows:
├─config
├─model
├─utils
├─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.08 |
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框架复现YOLOv2(YOLO9000),精度超过论文给出的。所有预训练参数和模型权重均可下载使用。
Python 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》