CN114998618A - Truck color identification method based on convolutional neural network model - Google Patents
Truck color identification method based on convolutional neural network model Download PDFInfo
- Publication number
- CN114998618A CN114998618A CN202210037164.6A CN202210037164A CN114998618A CN 114998618 A CN114998618 A CN 114998618A CN 202210037164 A CN202210037164 A CN 202210037164A CN 114998618 A CN114998618 A CN 114998618A
- Authority
- CN
- China
- Prior art keywords
- truck
- vehicle
- color
- neural network
- convolutional neural
- 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
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/08—Learning methods
-
- Y—GENERAL 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
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02T—CLIMATE CHANGE MITIGATION TECHNOLOGIES RELATED TO TRANSPORTATION
- Y02T10/00—Road transport of goods or passengers
- Y02T10/10—Internal combustion engine [ICE] based vehicles
- Y02T10/40—Engine management systems
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- Data Mining & Analysis (AREA)
- General Health & Medical Sciences (AREA)
- Biomedical Technology (AREA)
- Biophysics (AREA)
- Computational Linguistics (AREA)
- Life Sciences & Earth Sciences (AREA)
- Evolutionary Computation (AREA)
- Artificial Intelligence (AREA)
- Molecular Biology (AREA)
- Computing Systems (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Mathematical Physics (AREA)
- Software Systems (AREA)
- Health & Medical Sciences (AREA)
- Image Analysis (AREA)
Abstract
The invention discloses a truck color identification method based on a convolutional neural network model, which comprises the following steps: positioning a wagon face area based on the vehicle number plate and the vehicle symmetry; constructing a truck vehicle image set based on the truck vehicle structure and color characteristics; and (3) constructing convolutional neural network models under different color spaces, and preferably selecting the CNN-LAB model for carrying out truck color identification. The invention has the beneficial effects that: the color feature region of the truck can be effectively extracted, the truck color image set suitable for neural network learning is constructed, a proper color space model and a proper convolutional neural network are selected, the color identification of the truck is realized, the dimensionality is enriched for the vehicle attribute identification, and the important role is played in the vehicle identification.
Description
Technical Field
The invention relates to the field of intelligent traffic and intelligent high-speed information perception, in particular to a truck color identification method based on a convolutional neural network model.
Background
The vehicle attribute identification comprises number plates, types, brands, colors and the like, and plays an important role in striking fake plate and fake plate vehicle. The truck color information is one of truck key information, and because the truck has long running time, complex scene and illumination change and other influence factors, and the accurate identification of the truck color has certain difficulty and challenge, the truck number plate area is found by adopting a vehicle number plate positioning method based on an original truck image data set, the truck color area is obtained according to the vehicle number plate area, a truck vehicle color image set is constructed, and the truck color is identified by adopting a deep learning method.
Disclosure of Invention
The purpose of the invention is as follows: in order to overcome the defects in the prior art, the truck color identification method based on the convolutional neural network model is provided, the deep learning method based on the convolutional neural network model (CNN-LAB) based on the LAB color space is utilized to quickly and effectively identify the colors of the trucks, and the technical support can be provided for the attribute perception of the vehicles in the highway scene.
The technical scheme is as follows: in order to achieve the purpose, the truck color identification method based on the convolutional neural network model comprises the following steps:
s1: positioning a truck face area based on the number plate of the truck and the symmetry of the truck;
s2: constructing a truck vehicle image set based on the truck vehicle structure and color characteristics;
s3: and (4) constructing a convolutional neural network model under different color spaces, and identifying the colors of the truck.
Further, the specific steps of positioning the wagon face area based on the vehicle number plate and the vehicle symmetry in the step S1 are as follows:
firstly, positioning an input image by adopting a license plate positioning method;
secondly, detecting the vertical symmetry axis of the license plate of the truck. According to the symmetrical geometric characteristics of the vehicle, the vertical symmetry axis of the license plate is the vertical symmetry axis of the vehicle area;
calculating vertical histograms of both sides of the vertical symmetry axis to determine left and right edges of the vehicle region, and calculating a horizontal histogram of the image between the left and right edges of the vehicle region to determine upper and lower edges of the vehicle.
Further, in the step S2, based on the structure and color characteristics of the truck vehicle, the method for constructing the truck vehicle image set includes: in the acquired image of the vehicle positioning area, defining the left edge and the right edge of the local vehicle face area as the edges of the vehicle area, setting the height of the vehicle license plate as H, and setting the upper edge of the local vehicle face area as the position of the upper edge 5H of the vehicle license plate; and cutting the images of the vehicle positioning areas, only reserving the front areas of the local vehicles as samples, and constructing the local front images of the red, blue, white, black, yellow and green trucks. The number of truck color images for red, blue, white, black, yellow and green are 7970, 2400, 3670, 1600, 4300 and 2000, respectively, for a total of 21940.
Further, the method for constructing and comparing the convolutional neural network models in different color spaces in step S3 includes: and respectively converting the image set into an HSV color space and an LAB color space to obtain image samples in RGB, HSV, LAB and other three color spaces, and respectively inputting the three samples into the constructed convolutional neural network for training. The convolutional neural network consists of six hidden layers, an input image is a 64 x 128 three-channel image, the first layer adopts 32 convolutional kernels with the sizes of the convolutional kernels, the activation function selects a ReLU, and the pooling layers are connected; the second layer also adopts 32 convolution kernels with the size of 32, the activation function selects ReLU, and the pooling layers are connected; the third layer adopts 64 convolution kernels with the size of 64, the activation function selects ReLU, and the pooling layers are connected; the extracted high-dimensional features are input into a full-connected layer of 64 neural nodes, subjected to a ReLU activation function, connected with a Dropout layer with a discarding rate of 0.5, and finally connected with a full-connected layer of 6 neural nodes, and then subjected to probability calculation of wagon color classification by using Softmax.
The invention integrates an LAB color space model and a convolutional neural network model, and provides a truck color identification method based on the convolutional neural network model.
The invention has the beneficial effects that: the wagon color feature region can be effectively extracted, a wagon vehicle color image set suitable for neural network learning is constructed, a proper color space model and a proper convolution neural network are selected, color identification of the wagon is achieved, and technical support is provided for holographic perception of the vehicle.
Drawings
Fig. 1 is a method for locating a vehicle based on a license plate and vehicle symmetry, in which (a) is an original image, (b) is a license plate of the vehicle, (c) is determined for left and right edges of a vehicle region, and (d) is determined for upper and lower edges of the vehicle region.
Fig. 2 shows the relative relationship between the face area and the number plate position.
Fig. 3 shows a sample truck image set in which (a) is red, (b) is blue, (c) is white, (d) is black, (e) is yellow, and (f) is green.
FIG. 4 a truck color identification model framework.
FIG. 5 compares the accuracy of different optimizer models.
FIG. 6 is a graph comparing the accuracy of three models.
Detailed Description
The present invention will be further explained with reference to the accompanying drawings, and the following detailed description is only for illustrating the present invention and is not intended to limit the scope of the present invention.
S1: positioning a wagon face area based on the vehicle number plate and the vehicle symmetry;
the method comprises the following steps:
firstly, positioning an input image by adopting a license plate positioning method;
the vehicle license plate positioning method is based on edge information, color information, template matching, character features, histogram features of direction gradient, support vector machine, deformable component model and the like, and is characterized in that the vehicle license plate is made of reflective materials and is not allowed to be stained under general conditions, the detection rate of the vehicle license plate under dim conditions is good relative to vehicle windows and vehicle faces, and experiments show that the accuracy of the vehicle license plate positioning method based on the deformable component model can reach 99.34%.
Secondly, detecting the vertical symmetry axis of the license plate of the truck. According to the symmetrical geometric characteristics of the vehicle, the vertical symmetry axis of the license plate is the vertical symmetry axis of the vehicle area;
and calculating vertical histograms of both sides of the vertical symmetry axis to determine left and right edges of the vehicle region, and calculating a horizontal histogram of an image between the left and right edges of the vehicle region to determine upper and lower edges of the vehicle, as shown in fig. 1.
Because the original truck image data is concentrated on the truck image shooting angle, the truck body in most truck images can not completely enter the shooting view, and the upper edge of the image is mostly a window part, so that when the method is adopted to position the vehicle area, the positioning area can comprise a complete vehicle face area.
S2: constructing a truck vehicle image set based on the truck vehicle structure and color characteristics;
the method comprises the following steps:
defining the left edge and the right edge of a local car face area as the edges of the car area in the obtained car positioning area image, setting the height of a car number plate as H, and setting the upper edge of the local car face area as the position 5H of the upper edge of the car number plate, as shown in FIG. 2;
and cutting the images of the vehicle positioning areas, only reserving the front areas of the local vehicles as samples, and constructing the local front images of the red, blue, white, black, yellow and green trucks. The number of red, blue, white, black, yellow and green wagon color images is 7970, 2400, 3670, 1600, 4300 and 2000, respectively, for a total of 21940. Some examples are shown in FIG. 3.
S3: and (4) constructing a convolutional neural network model under different color spaces, and identifying the colors of the truck.
The method comprises the following steps:
and respectively converting the image set into an HSV color space and an LAB color space to obtain image samples under the three color spaces of RGB, HSV, LAB and the like, and respectively inputting the three samples into the constructed convolutional neural network for training.
Assuming Max ═ Max (R, G, B), Min ═ Min (R, G, B), R, G, B are the three original color components in the original color space, the conversion formula for HSV color space and RGB color space is:
l of the LAB color space represents luminance, A, B is used to describe color, which is mapped from the RGB color space into the transition space XYZ, and then from the XYZ space into the LAB space. The conversion formula is [ X, Y, Z]=M*[g(R),g(G),g(B)],,Where M is the transformation matrix and g is the Gamma correction function. Color XYZThe formula for spatial conversion to LAB color space isWherein f is a function of the correction function,
the convolutional neural network consists of six hidden layers, an input image is a 64 x 128 three-channel image, the first layer adopts 32 convolutional kernels with the sizes of the convolutional kernels, the activation function selects a ReLU, and the pooling layers are connected; the second layer also adopts 32 convolution kernels with the same size, and the activation function selects ReLU and the connected pooling layer; the third layer adopts 64 convolution kernels with the size of 64, the activation function selects ReLU, and the pooling layers are connected; the extracted high-dimensional features are input into a full-link layer of 64 neural nodes, are subjected to a ReLU activation function, are connected with a Dropout layer with a discarding rate of 0.5, are finally connected to a full-link layer of 6 neural nodes, and are subjected to probability calculation of wagon color classification by Softmax. The structure of the truck color recognition model is shown in fig. 4.
In the embodiment, models such as CNN-RGB, CNN-HSV and CNN-LAB are compared in an experiment, 60% of an image set is used as a training image, 20% is used as a verification image, the rest 20% is used as a test image, and the colors of vehicles are divided into 6 types: red, blue, white, yellow, green and black. The experimental results of the CNN-RGB, CNN-HSV and CNN-LAB adopting RMSprop and Adam optimizers are shown in figure 5, and it can be seen that the selection of the optimizers has little influence on the accuracy of the convolutional neural network model.
The histogram and boxplot comparison of the CNN-RGB, CNN-HSV and CNN-LAB color models is shown in FIG. 6. Experiments show that the accuracy of the convolutional neural network model based on the LAB color space is slightly higher than that of the convolutional neural network model in other two color spaces, the verification accuracy reaches 96.34%, and the convolutional neural network model has better robustness and stability.
Claims (7)
1. The truck color identification method based on the convolutional neural network model is characterized by comprising the following steps of:
s1: positioning a wagon face area based on the vehicle number plate and the vehicle symmetry;
s2: constructing a truck vehicle image set based on the truck vehicle structure and color characteristics;
s3: and (4) constructing a convolutional neural network model under different color spaces, and identifying the colors of the truck.
2. The method for truck color recognition based on convolutional neural network model as claimed in claim 1, wherein the specific steps of locating the truck face area based on the vehicle number plate and the vehicle symmetry in step S1 are as follows:
firstly, positioning an input image by adopting a license plate positioning method;
secondly, detecting a vertical symmetry axis of the license plate of the truck; according to the symmetrical geometric characteristics of the vehicle, the vertical symmetry axis of the license plate is the vertical symmetry axis of the vehicle area;
calculating vertical histograms of both sides of the vertical symmetry axis to determine left and right edges of the vehicle region, and calculating a horizontal histogram of the image between the left and right edges of the vehicle region to determine upper and lower edges of the vehicle.
3. The method for identifying truck color based on convolutional neural network model as claimed in claim 1, wherein based on the truck structure and color features in step S2, the truck image set is constructed by: in the acquired image of the vehicle positioning area, defining the left edge and the right edge of the local vehicle face area as the edges of the vehicle area, setting the height of the vehicle license plate as H, and setting the upper edge of the local vehicle face area as the position of the upper edge 5H of the vehicle license plate; and cutting the images of the vehicle positioning areas, only reserving partial front areas of the vehicles as samples, and constructing the partial front images of the red, blue, white, black, yellow and green trucks.
4. The convolutional neural network model-based truck color identification method as claimed in claim 3, wherein the number of truck color images of red, blue, white, black, yellow and green is 7970, 2400, 3670, 1600, 4300 and 2000 respectively, for a total of 21940.
5. The truck color identification method based on the convolutional neural network model as claimed in claim 1, wherein the method for constructing the convolutional neural network model under different color spaces in step S3 is as follows: and respectively converting the image set into an HSV color space and an LAB color space to obtain image samples under the RGB, HSV and LAB color spaces, respectively inputting the three samples into the constructed convolutional neural network for training, and finally performing comparison and selection.
6. The truck color identification method based on the convolutional neural network model as claimed in claim 5, wherein the convolutional neural network is composed of six hidden layers, the input image is a 64 x 128 three-channel image, the first layer adopts 32 convolutional kernels with the size of 3 x 3, the activation function selects ReLU, and is connected with a 2 x 2 pooling layer; the second layer also adopts 32 convolution kernels with the size of 3 multiplied by 3, the activation function selects the ReLU, and the 2 multiplied by 2 pooling layers are connected; the third layer adopts 64 convolution kernels with the size of 3 multiplied by 3, the activation function selects a ReLU, and the pooling layers with the size of 2 multiplied by 2 are connected; the extracted high-dimensional features are input into a full-connected layer of 64 neural nodes, subjected to a ReLU activation function, connected with a Dropout layer with a discarding rate of 0.5, and finally connected with a full-connected layer of 6 neural nodes, and then subjected to probability calculation of wagon color classification by using Softmax.
7. The method for identifying colors of trucks according to claim 5, wherein the convolutional neural network model in the LAB color space is constructed in the step 3 for truck color identification.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210037164.6A CN114998618A (en) | 2022-01-13 | 2022-01-13 | Truck color identification method based on convolutional neural network model |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210037164.6A CN114998618A (en) | 2022-01-13 | 2022-01-13 | Truck color identification method based on convolutional neural network model |
Publications (1)
Publication Number | Publication Date |
---|---|
CN114998618A true CN114998618A (en) | 2022-09-02 |
Family
ID=83023692
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210037164.6A Pending CN114998618A (en) | 2022-01-13 | 2022-01-13 | Truck color identification method based on convolutional neural network model |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114998618A (en) |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2006201817A (en) * | 2005-01-17 | 2006-08-03 | Hitachi Ltd | Method and device for discriminating vehicle body color |
JP2007235950A (en) * | 2006-02-28 | 2007-09-13 | Alpine Electronics Inc | Method and device for detecting vehicle position |
CN106909943A (en) * | 2017-02-28 | 2017-06-30 | 深圳市捷顺科技实业股份有限公司 | A kind of method and device for differentiating vehicle color based on convolutional neural networks model |
CN107292933A (en) * | 2017-04-27 | 2017-10-24 | 浙江工业大学 | A kind of vehicle color identification method based on BP neural network |
-
2022
- 2022-01-13 CN CN202210037164.6A patent/CN114998618A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2006201817A (en) * | 2005-01-17 | 2006-08-03 | Hitachi Ltd | Method and device for discriminating vehicle body color |
JP2007235950A (en) * | 2006-02-28 | 2007-09-13 | Alpine Electronics Inc | Method and device for detecting vehicle position |
CN106909943A (en) * | 2017-02-28 | 2017-06-30 | 深圳市捷顺科技实业股份有限公司 | A kind of method and device for differentiating vehicle color based on convolutional neural networks model |
CN107292933A (en) * | 2017-04-27 | 2017-10-24 | 浙江工业大学 | A kind of vehicle color identification method based on BP neural network |
Non-Patent Citations (2)
Title |
---|
利齐律: "《复杂环境下的卷积神经网络车辆颜色识别研究》", 《工程科技Ⅱ辑》 * |
林盛梅: "《基于深度学习的车辆检测及车型分类方法研究》", 《工程科技Ⅱ辑》 * |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111666938B (en) | Two-place double-license-plate detection and identification method and system based on deep learning | |
CN107729801B (en) | Vehicle color recognition system based on multitask deep convolution neural network | |
CN108108761B (en) | Rapid traffic signal lamp detection method based on deep feature learning | |
CN105046196B (en) | Front truck information of vehicles structuring output method based on concatenated convolutional neutral net | |
CN106599792B (en) | Method for detecting hand driving violation behavior | |
CN103824081B (en) | Method for detecting rapid robustness traffic signs on outdoor bad illumination condition | |
US8139852B2 (en) | Color classification method, color recognition method, color classification apparatus, color recognition apparatus, color recognition system, computer program, and recording medium | |
CN106156768B (en) | The vehicle registration certificate detection method of view-based access control model | |
CN103646241B (en) | Real-time taxi identification method based on embedded system | |
CN107729812B (en) | Method suitable for recognizing vehicle color in monitoring scene | |
CN107016362B (en) | Vehicle weight recognition method and system based on vehicle front windshield pasted mark | |
CN105005766A (en) | Vehicle body color identification method | |
CN107273866A (en) | A kind of human body abnormal behaviour recognition methods based on monitoring system | |
Yonetsu et al. | Two-stage YOLOv2 for accurate license-plate detection in complex scenes | |
CN106682597A (en) | Method for identifying traffic lights | |
CN109190455B (en) | Black smoke vehicle identification method based on Gaussian mixture and autoregressive moving average model | |
CN106650611B (en) | Method and device for recognizing color of vehicle body | |
CN111695565A (en) | Automobile mark accurate positioning method based on road barrier fuzzy image | |
CN111860509A (en) | Coarse-to-fine two-stage non-constrained license plate region accurate extraction method | |
CN106407951A (en) | Monocular vision-based nighttime front vehicle detection method | |
CN102930292B (en) | A kind of object identification method based on p-SIFT feature | |
CN108563976B (en) | Multidirectional vehicle color identification method based on vehicle window position | |
CN110516666B (en) | License plate positioning method based on combination of MSER and ISODATA | |
CN113537211A (en) | Deep learning license plate frame positioning method based on asymmetric IOU | |
CN107862341A (en) | A kind of vehicle checking method |
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 |