CN115700819A - Vehicle detection system based on improved YOLOv5 - Google Patents

Vehicle detection system based on improved YOLOv5 Download PDF

Info

Publication number
CN115700819A
CN115700819A CN202211363738.5A CN202211363738A CN115700819A CN 115700819 A CN115700819 A CN 115700819A CN 202211363738 A CN202211363738 A CN 202211363738A CN 115700819 A CN115700819 A CN 115700819A
Authority
CN
China
Prior art keywords
data
vehicle
vehicle detection
yolov5
improved
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211363738.5A
Other languages
Chinese (zh)
Inventor
齐朝威
邹明檐
郑琳
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Chengdu Univeristy of Technology
Original Assignee
Chengdu Univeristy of Technology
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Chengdu Univeristy of Technology filed Critical Chengdu Univeristy of Technology
Priority to CN202211363738.5A priority Critical patent/CN115700819A/en
Publication of CN115700819A publication Critical patent/CN115700819A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02TCLIMATE CHANGE MITIGATION TECHNOLOGIES RELATED TO TRANSPORTATION
    • Y02T10/00Road transport of goods or passengers
    • Y02T10/10Internal combustion engine [ICE] based vehicles
    • Y02T10/40Engine management systems

Landscapes

  • Image Analysis (AREA)

Abstract

The invention provides a vehicle detection system and method based on improved YOLOv5, and relates to the technical field of computer visual target detection. The system comprises a data acquisition module for vehicle data information, a controller for data analysis, and a data platform for data storage. The method comprises the following steps: making a data set; preprocessing data based on a data enhancement method; optimizing a trunk feature extraction network; calculating a sample loss value; and improving the data model. The invention can solve the problems of false detection, missed detection and the like caused by vehicle shielding and small vehicle targets in the traffic monitoring video.

Description

Vehicle detection system based on improved YOLOv5
Technical Field
The invention belongs to the technical field of computer vision target detection, and particularly relates to a vehicle detection system and method based on improved YOLOv 5.
Background
The number of motor vehicles in the country is up to 4.08 hundred million, the increasing number of motor vehicles and the laggard traffic management system are important reasons for urban road traffic jam, and establishing a brand-new intelligent traffic system on the basis of the traditional traffic system becomes a future development direction and a research hotspot. The traffic video monitoring is used as an important data source of an intelligent traffic system, is widely applied to roads of different grades, and particularly plays an important role in relieving urban traffic jam, improving traffic efficiency, reasonably distributing traffic resources and the like in data provided by the monitoring video in urban road sections.
The vehicle target detection aiming at the traffic monitoring video is the basis for subsequent vehicle identification and vehicle tracking, but in urban traffic jam road sections, the environment is complex, the traffic flow is high, the mutual shielding of vehicles is serious, and the challenge is provided for accurately detecting the vehicle target. Image or video based object detection is a typical task for vehicle detection. The traditional target detection method mainly utilizes artificial construction of target features and then utilizes a classification algorithm to classify, so as to judge whether a target exists or not. The traditional method for target detection adopts sliding window operation in the image, and has low detection efficiency, high resource consumption, low manual feature robustness and poor migration effect.
With the continuous development of machine learning and GPU parallel computing technologies, a plurality of target detection algorithms are gradually developed based on a Convolutional Neural Network (CNN), a YOLO series algorithm is one of the most widely applied target detection algorithms at present, and through iteration of five versions, the YOLO algorithm reserves the advantage of high detection speed and simultaneously fills up short boards with low detection accuracy. The yollov 5 series was issued by Ultralytics and achieved an Average accuracy (mep) of 72% on the COCO2017 test set. Based on the performance advantages of YOLOv5, the method is improved on the basis of the performance advantages of YOLOv5, so that the accuracy of vehicle detection in urban road traffic is improved, and meanwhile, the false detection rate and the missing detection rate are reduced.
Disclosure of Invention
Aiming at the problems in the prior art, the invention provides a vehicle detection system and method based on improved YOLOv 5.
The invention is realized by adopting the following technical scheme.
A vehicle detection system based on improved YOLOv5 is characterized in that: the improved YOLOv 5-based vehicle detection system comprises a data acquisition module for vehicle data information, a controller for data analysis and a data platform for data storage; the data acquisition module is a high-definition camera and is used for acquiring vehicle image data information; the controller is used for analyzing the acquired vehicle image data information; the data platform is used for data storage; the data acquisition module is connected with the input end of the controller, and the signal end of the controller is connected with the data platform.
A method for detecting a vehicle based on improved YOLOv5, which is characterized by comprising the following steps:
s1, making a data set: acquiring vehicle data information based on a data acquisition module, wherein a data set comprises a training set and a test set;
s2, data preprocessing: processing the vehicle data information by adopting a Mosaic data enhancement method;
s3, establishing a vehicle detection model based on YOLOv5, and improving a backbone feature extraction network in a YOLOv5S algorithm;
s4, completing model training by using a Loss function in a Focal Loss function Focal local optimization model;
and S5, taking the sample data in the test set as input, and carrying out vehicle detection through the optimized vehicle detection model based on YOLOv5 in the step S4.
The method for enhancing the Mosaic data in the step S2 is to cut four pictures at random and then splice the four pictures into one picture as training data.
The improvement in the step S3 is realized by inserting CBAM by introducing a corresponding attention module in yolo.
The beneficial effects of the invention are: by the improved YOLOv5s model, the problems of vehicle occlusion and small false detection and missing detection of a remote vehicle target are solved by using a plug-and-play lightweight convolution attention module CBAM and a Loss calculation scheme of a weight control unbalanced sample, namely a Focal Loss function Focal local optimization model.
Drawings
Fig. 1 is a general flowchart of a vehicle detection method based on the improved YOLOv 5.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The invention is further described with reference to the following drawings and specific examples, which are not intended to be limiting.
The invention is further described below with reference to the following figures and examples:
a vehicle detection system based on improved YOLOv5 is characterized in that: the improved YOLOv 5-based vehicle detection system comprises a data acquisition module for vehicle data information, a controller for data analysis and a data platform for data storage; the data acquisition module is a high-definition camera and is used for acquiring vehicle image data information; the controller is used for analyzing the acquired vehicle image data information; the data platform is used for data storage; the data acquisition module is connected with the input end of the controller, and the signal end of the controller is connected with the data platform.
The general flow of the vehicle detection system method based on the improved YOLOv5 is shown in FIG. 1, and specifically comprises the following steps:
s1, making a data set: vehicle data information is collected based on a data collection module, and a data set comprises a training set and a testing set.
And shooting the traffic video with the consistent angle with the traffic monitoring video, wherein the data set comprises a training set and a test set. And (4) making a label file by using a labeling tool, and forming a video vehicle data set for training the improved YOLOv5 model.
S2, data preprocessing: and processing the vehicle data information by adopting a Mosaic data enhancement method.
YOLOv5 uses a Mosaic-based data enhancement method, which is to randomly cut four pictures and then splice the four pictures into one picture as training data. The method has the main idea that a plurality of pictures are randomly cut and zoomed and then randomly arranged and spliced to form one picture, so that a small sample target is increased while a data set is enriched, and the training speed of the network is increased. Preprocessing of data is performed.
And S3, establishing a vehicle detection model based on YOLOv5, and improving a backbone feature extraction network in a YOLOv5S algorithm.
The improvement is realized by inserting CBAM in a mode of introducing a corresponding attention module in yolo.
S4, completing model training by using a Loss function in a Focal Loss function Focal local optimization model; a loss function is introduced. The Loss function is improved on the basis of the original Loss function, a Loss calculation scheme for controlling unbalanced samples by using weights is provided, and a Focal Loss function Focal local is introduced.
And S5, taking the sample data in the test set as input, and carrying out vehicle detection through the optimized vehicle detection model based on YOLOv5 in the step S4.

Claims (4)

1. A vehicle detection system based on improved YOLOv5 is characterized in that:
the improved YOLOv 5-based vehicle detection system comprises a data acquisition module for vehicle data information, a controller for data analysis and a data platform for data storage;
the data acquisition module is a high-definition camera and is used for acquiring vehicle image data information;
the controller is used for analyzing the acquired vehicle image data information;
the data platform is used for data storage;
the data acquisition module is connected with the input end of the controller, and the signal end of the controller is connected with the data platform.
2. A method for detecting a vehicle based on improved YOLOv5, which is characterized by comprising the following steps:
s1, making a data set: acquiring vehicle data information based on a data acquisition module, wherein a data set comprises a training set and a test set;
s2, data preprocessing: processing the vehicle data information by adopting a Mosaic data enhancement method;
s3, establishing a vehicle detection model based on YOLOv5, and improving a backbone feature extraction network in a YOLOv5S algorithm;
s4, completing model training by using a Loss function in a Focal Loss function Focal local optimization model;
and S5, taking sample data in the test set as input, and carrying out vehicle detection through the vehicle detection model based on YOLOv5 after the optimization of the step S4.
3. The improved YOLOv 5-based vehicle detection method as claimed in claim 2, wherein the Mosaic data enhancement method in step S2 is to cut four pictures randomly and then splice the four pictures into one picture as training data.
4. The improved YOLOv 5-based vehicle detection method according to claim 2, wherein the improvement in step S3 is realized by inserting CBAM by introducing corresponding attention module in yolo.
CN202211363738.5A 2022-11-02 2022-11-02 Vehicle detection system based on improved YOLOv5 Pending CN115700819A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211363738.5A CN115700819A (en) 2022-11-02 2022-11-02 Vehicle detection system based on improved YOLOv5

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211363738.5A CN115700819A (en) 2022-11-02 2022-11-02 Vehicle detection system based on improved YOLOv5

Publications (1)

Publication Number Publication Date
CN115700819A true CN115700819A (en) 2023-02-07

Family

ID=85121035

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211363738.5A Pending CN115700819A (en) 2022-11-02 2022-11-02 Vehicle detection system based on improved YOLOv5

Country Status (1)

Country Link
CN (1) CN115700819A (en)

Similar Documents

Publication Publication Date Title
CN109657552B (en) Vehicle type recognition device and method for realizing cross-scene cold start based on transfer learning
CN111444821B (en) Automatic identification method for urban road signs
CN110084165B (en) Intelligent identification and early warning method for abnormal events in open scene of power field based on edge calculation
CN116310785B (en) Unmanned aerial vehicle image pavement disease detection method based on YOLO v4
CN112200143A (en) Road disease detection method based on candidate area network and machine vision
CN101221623A (en) Object type on-line training and recognizing method and system thereof
CN105184229A (en) Online learning based real-time pedestrian detection method in dynamic scene
CN111274886B (en) Deep learning-based pedestrian red light running illegal behavior analysis method and system
CN112016499A (en) Traffic scene risk assessment method and system based on multi-branch convolutional neural network
CN114267025A (en) Traffic sign detection method based on high-resolution network and light-weight attention mechanism
CN110322687B (en) Method and device for determining running state information of target intersection
CN112784834A (en) Automatic license plate identification method in natural scene
CN111881775B (en) Real-time face recognition method and device
CN112785610B (en) Lane line semantic segmentation method integrating low-level features
CN109993032B (en) Shared bicycle target identification method and device and camera
CN115700819A (en) Vehicle detection system based on improved YOLOv5
CN114037834B (en) Semantic segmentation method and device based on fusion of vibration signal and RGB image
CN114973169A (en) Vehicle classification counting method and system based on multi-target detection and tracking
CN115100546A (en) Mobile-based small target defect identification method and system for power equipment
CN115187886A (en) Vehicle violation detection method and device and electronic equipment
CN113239931A (en) Logistics station license plate recognition method
CN112149666A (en) Vehicle target detection method based on deep learning
CN113221604A (en) Target identification method and device, storage medium and electronic equipment
Narlan et al. Automated pavement defect detection using YOLOv8 object detection algorithm
CN116580345A (en) Weak supervision video abnormal behavior detection method and system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination