当前位置:网站首页>Object detection yolov5 open source project debugging
Object detection yolov5 open source project debugging
2022-06-30 09:42:00 【Stephen_ Tao】
List of articles
One 、 Open source code download
Project address :https://github.com/ultralytics/yolov5
Two 、 Environment configuration
1. Load project
Decompress the downloaded file , open PyCharm, adopt File-Open
, Select the project path to load the project .
2. Creating a virtual environment
- Installation is required first Anaconda, And complete the configuration of some required environment variables . Then open the Anocanda Prompt, adopt
conda create -n “name” python=“version”
Creating a virtual environment ( The virtual environment is installed to by default C Plate , To modify the default path, refer to be based on Anaconda Module installation and precautions ). - Install the corresponding module in the current virtual environment , The module information is in
requirement.txt
In file . stay Pycharm Open in Terminal, adoptpip intall -r requirement.txt
install . - Get into Pycharm, adopt
File-Settings-Project:yolov5-5.0-Python Interpreter
Get into Python Interpreter configuration ( What I choose here is yolov5 Of 5.0 edition , You can download different versions as needed , So far it has arrived 6.1 edition ), Add virtual environment of Python Interpreter path , Now the environment configuration is complete .
3、 ... and 、 be based on yolov5 The forecast
1. Prediction based on terminal command line
- from https://github.com/ultralytics/yolov5/releases/tag/v6.1 Download a network weight file , And put it in the project directory , This project downloads
yolo5x.pt
. - stay Terminal Type in python detect.py --weights yolo5x.pt An error will be reported , The error information is as follows .
Specific solutions can be referred to yolov5–Can’t get attribute ‘SPPF’ on - But after solving the above problems , An error message will appear during operation , The error information is as follows .
Specific solutions can be referred to YOLOV5 There is a problem when training the model test :AttributeError: ‘Upsample‘ object has no attribute ‘recompute_scale_factor‘ Solutions for - After solving the above problems, the code can run normally , The terminal displays as follows .
2. be based on Pycharm Prediction of integrated development environment
step 1、2、3 Are the same as those predicted based on the terminal command line . The different operations are as follows .
- Click on the detect Icon , And select
Edit Configurations
. - stay Parameters Options
--weights yolov5x.pt
And Application . - function detect.py Results are displayed after .
3. Predicted results
Four 、 Code related explanations
'--weights'
: Used to specify the weight parameters of the network , The default is yolov5s.pt( The above project adopts yolov5x.pt, So it is necessary to specify again ).'--source'
: Path of picture or video , That is, the path of network input .'--img-size'
: Specify the image size of the input network .'--conf-thres'
: The confidence threshold of the object , The target box below this threshold is not displayed .'--iou-thres'
:IOU threshold , For non maximum suppression . If the two check boxes IOU Greater than threshold , Then the detection box with higher reliability will be preserved . On the contrary, both detection boxes are reserved .'--device'
: use CPU still GPU operation .'--view-img'
: Display the results when running the code , among action Parameter set to store_true Indicates that if this parameter is specified, the result will be displayed ( There are also action Parameters , I won't go into that ). For example, input at the terminal python detect.py --weights yolov5x.pt --view-img
The running results will be displayed in real time during the running process .'--save-txt'
: Write the running results to txt In file .'--save-conf'
: Save confidence .'--nosave'
: Whether to save the running results .'--classes'
: It can be used for category filtering , Show only targets in a specific category .'--agnostic-nms'
: Enhanced non maximum suppression .'--augment'
: An enhanced inference of the result .'--project'
: Save path of network input results .'--name'
: The name of the saved result .'--exist-ok'
: Whether the next run result overwrites the previous one .
notes : In this paper, the reference object detection YOLOv5 Debugging and explanation of open source code project
边栏推荐
- Research on lg1403 divisor
- Cb/s Architecture - Implementation Based on cef3+mfc
- 3. integrate eslint and prettier
- float
- Net framework system requirements
- Acquisition de 100% des actions de Guilin latex par Guilin Robust Medical pour combler le vide de la gamme de produits Latex
- Small program learning path 1 - getting to know small programs
- Ocx control can be called by IE on some computers, but can not be called by IE on some computers
- Enum demo
- Distributed ID
猜你喜欢
MCU firmware packaging Script Software
Distributed ID
直播带货源码开发中,如何降低直播中的延迟?
桂林 稳健医疗收购桂林乳胶100%股权 填补乳胶产品线空白
Framework program of browser self-service terminal based on IE kernel
JVM tuning tool introduction and constant pool explanation
Dart 开发技巧
Acquisition de 100% des actions de Guilin latex par Guilin Robust Medical pour combler le vide de la gamme de produits Latex
Recommend a very easy-to-use network communication framework HP socket
About the smart platform solution for business hall Terminal Desktop System
随机推荐
MySQL knowledge summary (useful for thieves)
Solution to pychart's failure in importing torch package
Self service terminal handwritten Chinese character recognition input method library tjfink introduction
Idea shortcut key settings
2021-10-20
Experience of an acmer
What is the difference between ZigBee, Bluetooth and WiFi (copy and reprint)
Deep Learning with Pytorch- A 60 Minute Blitz
Pytorch for former Torch users - Tensors
直播带货源码开发中,如何降低直播中的延迟?
Baidu map JS browsing terminal
布隆过滤器
ES6 learning path (III) deconstruction assignment
Script summary
Configuring MySQL for error reporting
ABAP-时间函数
UltraEdit delete empty line method
Solution to the sixth training competition of 2020 provincial competition
ReturnJson,让返回数据多一些自定义数据或类名
prometheus 监控之 ntp_exporter