CN109508635B - Traffic light identification method based on TensorFlow combined with multilayer CNN network - Google Patents

Traffic light identification method based on TensorFlow combined with multilayer CNN network Download PDF

Info

Publication number
CN109508635B
CN109508635B CN201811167453.8A CN201811167453A CN109508635B CN 109508635 B CN109508635 B CN 109508635B CN 201811167453 A CN201811167453 A CN 201811167453A CN 109508635 B CN109508635 B CN 109508635B
Authority
CN
China
Prior art keywords
label
traffic light
data set
labels
tensorflow
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.)
Expired - Fee Related
Application number
CN201811167453.8A
Other languages
Chinese (zh)
Other versions
CN109508635A (en
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.)
Hainan Normal University
Original Assignee
Hainan Normal University
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 Hainan Normal University filed Critical Hainan Normal University
Priority to CN201811167453.8A priority Critical patent/CN109508635B/en
Publication of CN109508635A publication Critical patent/CN109508635A/en
Application granted granted Critical
Publication of CN109508635B publication Critical patent/CN109508635B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/50Context or environment of the image
    • G06V20/56Context or environment of the image exterior to a vehicle by using sensors mounted on the vehicle
    • G06V20/58Recognition of moving objects or obstacles, e.g. vehicles or pedestrians; Recognition of traffic objects, e.g. traffic signs, traffic lights or roads
    • G06V20/584Recognition of moving objects or obstacles, e.g. vehicles or pedestrians; Recognition of traffic objects, e.g. traffic signs, traffic lights or roads of vehicle lights or traffic lights
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • General Health & Medical Sciences (AREA)
  • Molecular Biology (AREA)
  • Biophysics (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Evolutionary Computation (AREA)
  • Artificial Intelligence (AREA)
  • Biomedical Technology (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Health & Medical Sciences (AREA)
  • Multimedia (AREA)
  • Image Analysis (AREA)

Abstract

A traffic light recognition method based on TensorFlow combined with multilayer CNN network belongs to the field of computer vision and machine learning; preparing a traffic signal identification public data set image, a label and a video data set; utilizing OpenCV to identify images in the open data set to change size and output normalized numerical values of RGB channels of the images; transforming and normalizing the coordinate labels according to the transformation rule of the graph; extracting pictures containing traffic light information according to the label indexes and enabling the pictures to correspond to the labels one by one; sending the pictures and the labels into a CNN network for training and storing the model; the invention effectively solves the technical problems of low marking accuracy and low recognition speed.

Description

Traffic light identification method based on TensorFlow combined with multilayer CNN network
Technical Field
The invention belongs to the field of computer vision and machine learning, and particularly relates to a traffic light identification method based on TensorFlow combined with a multilayer CNN network.
Background
The identification of the position of a traffic light in an image is a technology combining computer vision and Machine Learning (Machine Learning), with the arrival of the artificial intelligence era, the demand of equipment mainly driving an automobile automatically for collecting and processing traffic information is more and more increased, and how to more efficiently find accurate traffic information in the range shown by a camera is not efficient and accurate only by means of a traditional image identification algorithm. For an automatic driving automobile, in order to ensure safe driving under the existing laws and regulations and traffic rules, the real-time sensing capability of the road condition is very important, wherein the important point is the collecting and processing capability of traffic light information.
The marking of the position of the traffic light in the picture can be realized by means of the traditional image processing means, but the marking accuracy is not high and the recognition speed is slow.
Disclosure of Invention
The invention overcomes the defects of the prior art, and provides a Traffic light identification method based on a TensorFlow combined multilayer CNN network, which adopts a Traffic signal identification public data set, namely a Traffic Light Registration (TLR) public keys data set, and contains 6228 effective pictures and corresponding one-to-many labels, so that the extracted image characteristics have certain expression capability, and the positions of the Traffic Lights in the pictures are labeled by a convolutional neural network algorithm, so that the Traffic light identification method effectively solves the technical problems of low labeling accuracy and low identification speed.
The technical scheme of the invention is as follows:
a traffic light identification method based on TensorFlow combined with a multilayer CNN network comprises the following steps:
a, preparing a traffic signal identification public data set image, a label and a video data set;
b, using OpenCV to identify images in the public data set of the traffic signal, changing the size of the images and outputting normalized numerical values of RGB channels of the images;
c, transforming and normalizing the coordinate labels according to the transformation rule of the graph;
d, extracting pictures containing traffic light information according to the label indexes and enabling the pictures to correspond to the labels one by one;
and e, sending the picture and the label into a CNN network for training and storing the model.
Further, the system environment for preparing the traffic signal identification public data set image, label and video data set in the step a is Windows10+ Anaconda3+ transorflow 1.5.0, the number of the generated original picture vectors is 6228, the number of the labels corresponding to the traffic light positions is 6228, the number of the test picture vectors is 2238, and the number of the labels corresponding to the traffic lights is 2940.
Further, the image size is changed in step b, and normalized values of three channels of each pixel RGB are respectively output in order to convert 640 × 480 × 3 into 128 × 3.
Further, in the step c, the coordinate labels are the horizontal and vertical coordinates of the upper left corner and the horizontal and vertical coordinates of the lower right corner of the traffic light position rectangle, and the coordinate labels are transformed and normalized according to the transformation rule of the graph, namely, the coordinate values are 0.2, the vertical coordinate values are 0.267, and the horizontal and vertical coordinate values are normalized by 0.01.
Furthermore, the method for extracting the pictures containing the traffic light information according to the label indexes in the step d is to extract the pictures containing the traffic lights according to the label data centralized indexes, remove the labels of the repeated marks, only leave one effective label corresponding to the pictures one by one, and summarize the labels of the repeated parts into test label data.
Further, the CNN network model training and saving method in step e includes the following steps:
step e1, transforming the input image matrix shape from 1 × 49152 to 128 × 3 with the data type float32, transforming the input label matrix to 1 × 4 with the data type float 32;
e2, establishing a neural network model, wherein the network structure comprises five convolution layers and five pooling layers, extracting an image characteristic matrix by using a ReLU activation function, and sending 60 groups of random data for training each time;
and e3, obtaining a final image feature vector P by fully connecting the image feature matrix extracted in the step e2 by a fully connecting method.
Compared with the prior art, the invention has the following beneficial effects:
the invention provides a Traffic light identification method of a multilayer CNN network based on TensorFlow, which adopts a Traffic signal identification public data set, namely a Traffic Light Registration (TLR) public marks data set, and contains 6228 effective pictures and corresponding one-to-many labels, so that the image characteristics extracted by the invention have certain expression capability, and the positions of the Traffic Lights in the pictures are labeled by a convolutional neural network algorithm, so that the invention effectively solves the technical problems of low labeling accuracy and low identification speed.
Compared with the traditional image processing method, the method provided by the invention has the advantages that the multilayer convolutional neural network is used for extracting the characteristics of the input image, more abundant image information is obtained, meanwhile, better fitting capability is brought to the model, overfitting is reduced, and the development of the computer vision field is further advanced.
Drawings
FIG. 1 is a schematic diagram of a multi-layer image convolution;
FIG. 2 is a flow chart of a network architecture;
fig. 3 is an identification effect display diagram.
Detailed Description
The present invention will be described in detail below with reference to the accompanying drawings.
Detailed description of the invention
A traffic light identification method of a multilayer CNN network based on TensorFlow comprises the following steps:
step a, preparing a Traffic Lights Registration (TLR) public benchmark image, a label and a video data set;
b, using OpenCV to identify images in the public data set of the traffic signal, changing the size of the images and outputting normalized numerical values of RGB channels of the images;
c, transforming and normalizing the coordinate labels according to the transformation rule of the graph;
d, extracting pictures containing traffic light information according to the label indexes and enabling the pictures to correspond to the labels one by one;
e, sending the picture and the label into a CNN network for training and storing the model;
specifically, the traffic light identification method based on the TensorFlow multilayer CNN network includes the steps that a, the data set is prepared, the system experiment environment is Windows10+ Anaconda3+ TensorFlow 1.5.0, the number of generated original picture vectors is 6228, the number of corresponding traffic light position tags is 6228, the number of test picture vectors is 2238, and the number of corresponding traffic light tags is 2940.
Specifically, in the traffic light identification method based on the TensorFlow multilayer CNN network, the image size is changed in the step b, and in order to convert 640 × 480 × 3 into 128 × 3, normalized values of three channels of each pixel RGB are respectively output.
Specifically, in the traffic light identification method based on the TensorFlow multilayer CNN network, the label information corresponding to the picture is the upper left-corner horizontal ordinate and the lower right-corner horizontal ordinate of the traffic light position rectangle, and the label processing in the step c is performed with the horizontal ordinate value 0.2, the vertical ordinate value 0.267, and the horizontal ordinate value 0.01 for normalization.
Specifically, in the traffic light identification method based on the TensorFlow multilayer CNN network, in the step d, according to the label data set index, pictures containing traffic lights are extracted, repeatedly marked labels are removed, only one effective label is left to correspond to the pictures one by one, and the repeated labels are summarized into test label data.
Specifically, in the traffic light recognition method based on the TensorFlow multilayer CNN network, the step e of training the CNN network and storing the model comprises the following steps:
step e1, transforming the input image matrix shape from 1 × 49152 to 128 × 3 with the data type float32, transforming the input label matrix to 1 × 4 with the data type float 32;
e2, establishing a neural network model, wherein the network structure comprises five convolution layers and five pooling layers, extracting an image characteristic matrix by using a ReLU activation function, and sending 60 groups of random data for training each time;
and e3, in order to prevent the overfitting phenomenon during training, fully connecting the image feature matrix extracted in the step e2 by a fully connecting method to obtain a final image feature vector P.
As shown in fig. 1, the present invention uses image convolution, i.e. performs convolution operation on a digital image, namely, sliding a convolution kernel (convolution template) on the image, multiplying the gray value of a pixel on an image point by the corresponding value on the convolution kernel, and then adding all the multiplied values as the gray value of the pixel on the image corresponding to the middle pixel of the convolution kernel, so that the multi-layer convolution network can realize better classification accuracy.
As shown in fig. 2, the present invention uses a five-layer convolution, five-layer pooling, two fully-connected layer network model, and finally outputs a 1 × 4 vector for each set of training data, representing the target traffic light position.
The model tests the effect graph as shown in fig. 3.

Claims (5)

1. A traffic light identification method based on TensorFlow combined with a multilayer CNN network is characterized by comprising the following steps:
a, preparing a traffic signal identification public data set image, a label and a video data set; wherein the traffic signal identifies a situation in which one image in the public data set corresponds to a plurality of tags;
b, using OpenCV to identify images in the public data set of the traffic signal, changing the size of the images and outputting normalized numerical values of RGB channels of the images;
c, transforming and normalizing the label coordinates according to the transformation rule of the graph;
d, extracting pictures containing traffic light information according to the label indexes and enabling the pictures to correspond to the labels one by one; the method for extracting the pictures containing the traffic light information according to the label indexes comprises the steps of intensively indexing according to label data, extracting the pictures containing the traffic lights, removing labels with repeated marks, only leaving one effective label corresponding to the pictures one by one, and summarizing the labels of the repeated parts into test label data;
and e, sending the picture and the label into a CNN network for training and storing the model.
2. The traffic light recognition method based on the TensorFlow combined multilayer CNN network, according to claim 1, wherein the system environment for preparing the traffic signal recognition public data set image, label and video data set in step a is Windows10+ Anaconda3+ TensorFlow 1.5.0, the number of generated original picture vectors is 6228, the number of corresponding traffic light position labels is 6228, the number of test picture vectors is 2238, and the number of corresponding traffic light labels is 2940.
3. The traffic light recognition method based on the TensorFlow combined multilayer CNN network as claimed in claim 2, wherein the step b of changing the image size to convert 640 x 480 x 3 to 128 x 3 outputs the normalized values of three channels per pixel RGB respectively.
4. The traffic light identification method according to claim 3, wherein the label coordinates in step c are the upper left-hand horizontal coordinate and the lower right-hand horizontal coordinate of the traffic light position rectangle, and the label coordinates are transformed and normalized according to the transformation rule of the graph, that is, the horizontal coordinate value 0.2, the vertical coordinate value 0.267, and the horizontal coordinate value 0.01 are normalized.
5. The traffic light identification method based on TensorFlow combined with multilayer CNN network according to claim 1, wherein the CNN network training and model saving method in step e comprises the following steps:
step e1, transforming the input image matrix shape from 1 × 49152 to 128 × 3 with the data type float32, transforming the input label matrix to 1 × 4 with the data type float 32;
e2, establishing a neural network model, wherein the network structure comprises five convolution layers and five pooling layers, extracting an image characteristic matrix by using a ReLU activation function, and sending 60 groups of random data for training each time;
and e3, obtaining a final image feature vector P by fully connecting the image feature matrix extracted in the step e2 by a fully connecting method.
CN201811167453.8A 2018-10-08 2018-10-08 Traffic light identification method based on TensorFlow combined with multilayer CNN network Expired - Fee Related CN109508635B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811167453.8A CN109508635B (en) 2018-10-08 2018-10-08 Traffic light identification method based on TensorFlow combined with multilayer CNN network

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811167453.8A CN109508635B (en) 2018-10-08 2018-10-08 Traffic light identification method based on TensorFlow combined with multilayer CNN network

Publications (2)

Publication Number Publication Date
CN109508635A CN109508635A (en) 2019-03-22
CN109508635B true CN109508635B (en) 2022-01-07

Family

ID=65746279

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811167453.8A Expired - Fee Related CN109508635B (en) 2018-10-08 2018-10-08 Traffic light identification method based on TensorFlow combined with multilayer CNN network

Country Status (1)

Country Link
CN (1) CN109508635B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104050827A (en) * 2014-06-06 2014-09-17 北京航空航天大学 Traffic signal lamp automatic detection and recognition method based on visual sense
US20170083792A1 (en) * 2015-09-22 2017-03-23 Xerox Corporation Similarity-based detection of prominent objects using deep cnn pooling layers as features
CN106650641A (en) * 2016-12-05 2017-05-10 北京文安智能技术股份有限公司 Traffic light positioning and identification method, device and system
CN106845335A (en) * 2016-11-29 2017-06-13 歌尔科技有限公司 Gesture identification method, device and virtual reality device for virtual reality device
CN107220643A (en) * 2017-04-12 2017-09-29 广东工业大学 The Traffic Sign Recognition System of deep learning model based on neurological network
CN108052933A (en) * 2018-01-16 2018-05-18 杭州国辰机器人科技有限公司 Road Identification system and method based on convolutional neural networks

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10185881B2 (en) * 2016-11-23 2019-01-22 Ford Global Technologies, Llc Traffic-light detection and classification using computer vision and deep learning
CN108335510A (en) * 2018-03-21 2018-07-27 北京百度网讯科技有限公司 Traffic lights recognition methods, device and equipment

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104050827A (en) * 2014-06-06 2014-09-17 北京航空航天大学 Traffic signal lamp automatic detection and recognition method based on visual sense
US20170083792A1 (en) * 2015-09-22 2017-03-23 Xerox Corporation Similarity-based detection of prominent objects using deep cnn pooling layers as features
CN106845335A (en) * 2016-11-29 2017-06-13 歌尔科技有限公司 Gesture identification method, device and virtual reality device for virtual reality device
CN106650641A (en) * 2016-12-05 2017-05-10 北京文安智能技术股份有限公司 Traffic light positioning and identification method, device and system
CN107220643A (en) * 2017-04-12 2017-09-29 广东工业大学 The Traffic Sign Recognition System of deep learning model based on neurological network
CN108052933A (en) * 2018-01-16 2018-05-18 杭州国辰机器人科技有限公司 Road Identification system and method based on convolutional neural networks

Also Published As

Publication number Publication date
CN109508635A (en) 2019-03-22

Similar Documents

Publication Publication Date Title
CN112884064B (en) Target detection and identification method based on neural network
CN106599773B (en) Deep learning image identification method and system for intelligent driving and terminal equipment
CN111160352B (en) Workpiece metal surface character recognition method and system based on image segmentation
CN105354568A (en) Convolutional neural network based vehicle logo identification method
CN110781882A (en) License plate positioning and identifying method based on YOLO model
CN112712052A (en) Method for detecting and identifying weak target in airport panoramic video
CN112487981A (en) MA-YOLO dynamic gesture rapid recognition method based on two-way segmentation
CN114821014A (en) Multi-mode and counterstudy-based multi-task target detection and identification method and device
CN115272204A (en) Bearing surface scratch detection method based on machine vision
CN112926486A (en) Improved RFBnet target detection algorithm for ship small target
CN114332942A (en) Night infrared pedestrian detection method and system based on improved YOLOv3
CN117197763A (en) Road crack detection method and system based on cross attention guide feature alignment network
CN110516527B (en) Visual SLAM loop detection improvement method based on instance segmentation
CN114445620A (en) Target segmentation method for improving Mask R-CNN
CN109508635B (en) Traffic light identification method based on TensorFlow combined with multilayer CNN network
CN110136098B (en) Cable sequence detection method based on deep learning
CN114937153B (en) Visual characteristic processing system and method based on neural network in weak texture environment
CN116912872A (en) Drawing identification method, device, equipment and readable storage medium
CN116612398A (en) Unmanned aerial vehicle inspection photo pole tower license plate character recognition method based on CTPN algorithm
CN115410184A (en) Target detection license plate recognition method based on deep neural network
CN113420839B (en) Semi-automatic labeling method and segmentation positioning system for stacking planar target objects
CN115909276A (en) Improved YOLOv 5-based small traffic sign target detection method in complex weather
CN115424243A (en) Parking stall number identification method, equipment and medium based on yolov5-shufflenetv2
CN115331261A (en) Mobile terminal real-time human body detection method and system based on YOLOv6
CN114550197A (en) Terminal strip image detection information matching 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
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20211221

Address after: 570000 99 Longkun South Road, Qiongshan District, Haikou City, Hainan Province

Applicant after: HAINAN NORMAL University

Address before: 150080 No. 52, Xuefu Road, Nangang District, Heilongjiang, Harbin

Applicant before: HARBIN University OF SCIENCE AND TECHNOLOGY

GR01 Patent grant
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20220107