WO2021217924A1 - 交通卡口车辆类型的识别方法、装置、设备及存储介质 - Google Patents

交通卡口车辆类型的识别方法、装置、设备及存储介质 Download PDF

Info

Publication number
WO2021217924A1
WO2021217924A1 PCT/CN2020/104804 CN2020104804W WO2021217924A1 WO 2021217924 A1 WO2021217924 A1 WO 2021217924A1 CN 2020104804 W CN2020104804 W CN 2020104804W WO 2021217924 A1 WO2021217924 A1 WO 2021217924A1
Authority
WO
WIPO (PCT)
Prior art keywords
vehicle
target
processing
preset
feature
Prior art date
Application number
PCT/CN2020/104804
Other languages
English (en)
French (fr)
Inventor
吴晓东
Original Assignee
平安国际智慧城市科技股份有限公司
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 平安国际智慧城市科技股份有限公司 filed Critical 平安国际智慧城市科技股份有限公司
Publication of WO2021217924A1 publication Critical patent/WO2021217924A1/zh

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/52Surveillance or monitoring of activities, e.g. for recognising suspicious objects
    • G06V20/54Surveillance or monitoring of activities, e.g. for recognising suspicious objects of traffic, e.g. cars on the road, trains or boats
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/23Clustering techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V2201/00Indexing scheme relating to image or video recognition or understanding
    • G06V2201/08Detecting or categorising vehicles

Definitions

  • This application relates to the technical field of area extraction, and in particular to methods, devices, equipment, and storage media for identifying vehicle types at traffic bayonet.
  • a single-stage target detection algorithm is used to identify the vehicle images in the intelligent transportation system.
  • the feature extraction network is used to extract features from the input image to obtain a feature map.
  • the feature map is divided into multiple grid units. The unit predicts a fixed number of bounding boxes, and performs vehicle positioning on the input image according to the bounding boxes to realize vehicle recognition.
  • the inventor realizes that due to the inaccurate positioning of the target bounding box and the prediction of a fixed number of candidate boxes from each feature grid, the number of candidate boxes is greatly reduced, which results in a relatively low recall rate, thus, As a result, the accuracy of rapid positioning and recognition of vehicles of multiple scales, resolutions and types in complex scenes is low.
  • the main purpose of this application is to solve the problem of low accuracy in rapid positioning and recognition of vehicles of multiple scales, resolutions, and types in complex scenes.
  • the first aspect of the present application provides a method for identifying the type of a traffic bayonet vehicle, which includes: acquiring an original traffic bayonet vehicle image, and converting the image size of the original traffic bayonet vehicle image to a preset size , Obtain the target traffic bayonet vehicle image; perform vehicle feature extraction on the target traffic bayonet vehicle image through a preset effective network algorithm to obtain vehicle feature information; perform vector convolution processing and batch return on the vehicle feature information Through unified processing, activation function processing and stitching processing, multiple target vehicle feature maps of different scales are obtained; the positioning frame of the vehicle in the multiple target vehicle feature maps of different scales is determined by the preset target anchor frame and the matching algorithm Giou Perform predictive analysis to obtain the target vehicle positioning frame and the initial coordinates of the target vehicle positioning frame; predict the type of the vehicle in the target vehicle positioning frame according to the vehicle feature information to obtain the predicted vehicle type; convert the initial coordinates Map to the original traffic bayonet vehicle image to obtain target coordinates, determine the target vehicle contained in the bound
  • the second aspect of the present application provides a vehicle type identification device for a traffic bayonet, including a memory, a processor, and computer-readable instructions stored in the memory and running on the processor, and the processor executes
  • the computer-readable instructions implement the following steps: obtain the original traffic bayonet vehicle image, convert the image size of the original traffic bayonet vehicle image to a preset size, and obtain the target traffic bayonet vehicle image;
  • the network algorithm performs vehicle feature extraction on the target traffic bayonet vehicle image to obtain vehicle feature information; performs vector convolution processing, batch normalization processing, activation function processing, and splicing processing on the vehicle feature information to obtain multiple Target vehicle feature maps of different scales; through the preset target anchor frame and the matching algorithm Giou, predict and analyze the positioning frames of the vehicles in the target vehicle feature maps of different scales to obtain the target vehicle positioning frame and the target vehicle
  • the initial coordinates of the positioning frame predict the type of vehicles in the target vehicle positioning frame according to the vehicle feature information to obtain the predicted vehicle type; map the initial coordinates to the
  • the third aspect of the present application provides a computer-readable storage medium, the computer-readable storage medium stores computer instructions, and when the computer instructions run on the computer, the computer executes the following steps: Obtain the original traffic bayonet A vehicle image, converting the image size of the original traffic bayonet vehicle image into a preset size to obtain a target traffic bayonet vehicle image; extracting vehicle features from the target traffic bayonet vehicle image through a preset effective network algorithm, Obtain vehicle feature information; perform vector convolution processing, batch normalization processing, activation function processing, and splicing processing on the vehicle feature information to obtain multiple target vehicle feature maps of different scales; through preset target anchor frames and The matching algorithm Giou performs predictive analysis on the vehicle positioning frame in the multiple target vehicle feature maps of different scales to obtain the target vehicle positioning frame and the initial coordinates of the target vehicle positioning frame; Predict the type of vehicle in the vehicle positioning frame to obtain the predicted vehicle type; map the initial coordinates to the original traffic bayonet vehicle image to obtain target coordinates, and determine the target contained in the bounding box
  • the fourth aspect of the present application provides a vehicle type identification device for a traffic bayonet, which includes: a first acquisition module, configured to acquire an original traffic bayonet vehicle image, and convert the image size of the original traffic bayonet vehicle image into a predetermined image size.
  • the feature extraction model is used to perform vehicle feature extraction on the target traffic bayonet vehicle image through a preset effective network algorithm to obtain vehicle feature information
  • the processing module is used to The vehicle feature information is subjected to vector convolution processing, batch normalization processing, activation function processing and splicing processing to obtain multiple target vehicle feature maps of different scales
  • the first prediction module is used to pass the preset target anchor frame and The matching algorithm Giou performs predictive analysis on the vehicle positioning frames in the multiple target vehicle feature maps of different scales to obtain the target vehicle positioning frame and the initial coordinates of the target vehicle positioning frame
  • the second prediction module is used for The vehicle feature information predicts the type of the vehicle in the target vehicle positioning frame to obtain the predicted vehicle type
  • the mapping module is used to map the initial coordinates to the original traffic bayonet vehicle image to obtain the target coordinates, and determine For the target vehicle contained in the bounding box corresponding to the target coordinate, the predicted vehicle type is determined as the target vehicle type corresponding to the target vehicle.
  • the original traffic bayonet vehicle image and the target traffic bayonet vehicle image are acquired; the vehicle feature extraction is performed on the target traffic bayonet vehicle image through a preset effective network algorithm to obtain vehicle feature information;
  • the information is processed by vector convolution processing, batch normalization processing, activation function processing and splicing processing to obtain multiple target vehicle feature maps of different scales; through the preset target anchor frame and matching algorithm Giou, multiple targets of different scales Perform predictive analysis on the positioning frame of the vehicle in the vehicle feature map to obtain the target vehicle positioning frame and the initial coordinates of the target vehicle positioning frame; predict the type of vehicle in the target vehicle positioning frame according to the vehicle feature information to obtain the predicted vehicle type; change the target coordinates Map to the original traffic bayonet vehicle image to obtain the target coordinates, determine the target vehicle contained in the bounding box corresponding to the target coordinates, and determine the predicted vehicle type as the target vehicle type corresponding to the target vehicle.
  • the effectiveness of vehicle feature information is enhanced, and the detection of target vehicle types is improved.
  • the recall rate improves the positioning and recognition accuracy of the target vehicle positioning frame in the original traffic bayonet vehicle image, thereby improving the accuracy of rapid positioning and recognition of vehicles of multiple scales, resolutions and types in complex scenes.
  • FIG. 1 is a schematic diagram of an embodiment of a method for identifying vehicle types at a traffic bayonet in an embodiment of this application;
  • FIG. 2 is a schematic diagram of another embodiment of a method for identifying vehicle types at a traffic bayonet in an embodiment of the application;
  • FIG. 3 is a schematic diagram of an embodiment of acquiring multiple target vehicle feature maps of different scales in an embodiment of the application
  • FIG. 4 is a schematic diagram of an embodiment of acquiring multiple candidate vehicle feature maps of different scales in an embodiment of the application
  • FIG. 5 is a schematic diagram of an embodiment of a vehicle type identification device for a traffic bayonet in an embodiment of the application
  • FIG. 6 is a schematic diagram of another embodiment of a vehicle type identification device for a traffic bayonet in an embodiment of the application
  • Fig. 7 is a schematic diagram of an embodiment of a vehicle type identification device for a traffic bayonet in an embodiment of the application.
  • the embodiments of the present application provide a method, device, device, and storage medium for identifying the vehicle type of a traffic bayonet, which are used to use an effective network, multiple vector convolution processing, batch normalization processing, activation function processing,
  • the stitching processing and matching algorithm Giou enhances the effectiveness of vehicle feature information, improves the recall rate of target vehicle type detection, and improves the positioning and recognition accuracy of the target vehicle positioning frame in the original traffic bayonet vehicle image, thereby improving the detection of complex scenes
  • An embodiment of the method for identifying the vehicle type of a traffic bayonet in the embodiment of the present application includes:
  • the method for identifying the vehicle type of the traffic bayonet includes:
  • the execution subject of this application may be a vehicle type identification device of a traffic bayonet, or a terminal or a server, which is not specifically limited here.
  • the embodiment of the present application takes the server as the execution subject as an example for description.
  • the server uses the image scaling function Resize function to convert the image size of the original traffic bayonet vehicle map collected by a camera or other camera tools into a target traffic bayonet vehicle image of a preset size, for example: the candidate vehicle image
  • the image size is converted to a vehicle image of 512*512 size.
  • the original traffic bayonet vehicle image is stored in the blockchain, and the server obtains the original traffic bayonet vehicle image from the blockchain.
  • Blockchain is a new application mode of computer technology such as distributed data storage, point-to-point transmission, consensus mechanism, and encryption algorithm.
  • Blockchain essentially a decentralized database, is a series of data blocks associated with cryptographic methods. Each data block contains a batch of network transaction information for verification. The validity of the information (anti-counterfeiting) and the generation of the next block.
  • the blockchain can include the underlying platform of the blockchain, the platform product service layer, and the application service layer.
  • the server calls the preset effective network algorithm EfficientNet, and uses the convolutional network that increases the network depth coefficient and resolution coefficient in EfficientNet to perform multi-convolution kernel convolution operation on the target traffic bayonet vehicle image with the increased receptive field coefficient Processing and sub-sampling processing to obtain vehicle characteristic information.
  • the vehicle feature information includes the regional feature information, shape feature information, and license plate feature information of the vehicle.
  • the regional feature information is the location of the vehicle on the target traffic bayonet vehicle image.
  • the shape feature information includes the overall outline information of the vehicle and the position of the front of the vehicle. Information and roof feature information, etc.
  • the license plate feature information includes the color and shape of the license plate and the composition feature information of the license plate number.
  • the accuracy and efficiency of vehicle type recognition can be improved, thereby improving the rapid detection of multiple scales, multiple resolutions and multiple types of vehicles in complex scenes.
  • the accuracy of positioning and recognition can be improved.
  • the server inputs vehicle feature information into a preset feature map generation framework.
  • the feature map generation framework may include a multi-layer processing framework, and each processing framework includes a batch normalization layer, an activation function layer, and/or a different number of convolutions. Layer, and feature fusion layer. Through each layer of the feature map generation framework, the vehicle feature information is subjected to vector convolution processing, batch normalization processing, activation function processing, and splicing processing.
  • the feature map generation framework can be The vehicle feature information is fused to form a feature pyramid, and multiple target vehicle feature maps of different scales are generated to realize the recognition of more vehicle feature information of different scales in the traffic bayonet vehicle image, and improve the target vehicle type in the original traffic bayonet image
  • the recall rate of detection can improve the accuracy of rapid positioning and recognition of vehicles of multiple scales, resolutions and types in complex scenes.
  • the server uses a preset clustering algorithm combined with a matching algorithm Giou to perform clustering processing on all the set of real labeled frames in the preset training picture to obtain the target anchor box anchor box.
  • Giou a matching algorithm
  • Each target vehicle feature map corresponds to 3, and there are 5 target vehicle feature maps. It predicts the target category corresponding to each anchor box and the offset of the true label frame relative to the target anchor frame.
  • the position of the target anchor frame so as to obtain the coordinates of the three different sizes of target vehicle positioning frames of each vehicle feature map, and filter the three different sizes of target vehicle positioning frames of each vehicle feature map to obtain each vehicle that needs to be output
  • the feature map corresponds to the initial coordinates of the target vehicle positioning frame and the target vehicle positioning frame, or screening 15 target vehicle positioning frames to obtain the initial coordinates of the target vehicle positioning frame and the target vehicle positioning frame corresponding to all the vehicle feature maps that need to be output.
  • represents the sigmoid activation function
  • b x and b y represent the initial coordinates of each target vehicle feature map of different scales
  • c x and cy represent the feature map grid relative to each target vehicle feature map of different scales
  • Relative coordinates b w and b h represent the width and height of each target vehicle feature map of different scales
  • p w and p h represent the width and height of the target anchor frame.
  • the server calls the preset model to predict the vehicle type according to the size of the target anchor frame and the image information of the target vehicle feature map corresponding to the target anchor frame, and obtain a variety of different candidate vehicle types corresponding to all target vehicle feature maps.
  • the similarity between the vehicle feature information and the feature information of multiple different candidate vehicle types is calculated, and the candidate vehicle type corresponding to the largest similarity value is used as the final predicted vehicle type.
  • the corresponding relationship between the predicted vehicle type and the target vehicle positioning frame is also created, so that when the target coordinates of the target vehicle positioning frame are mapped to the original traffic bayonet vehicle image, the corresponding predicted vehicle type is marked on the target vehicle superior.
  • the server maps the initial coordinates of the target vehicle positioning frame to the corresponding coordinates on the original traffic bayonet vehicle image to obtain the corresponding target coordinates, so as to mark the target vehicle positioning frame on the original traffic bayonet vehicle image
  • the size of the original traffic bayonet vehicle image is 416*416, the size of the target vehicle feature map is 13*13, and the coordinates are (6, 8, 2, 3).
  • effective networks are used to enhance the effectiveness of vehicle feature information and improve the recall rate of target vehicle type detection , Improve the positioning and recognition accuracy of the target vehicle positioning frame in the original traffic bayonet vehicle image, thereby improving the accuracy of rapid positioning and recognition of vehicles of multiple scales, resolutions and types in complex scenes.
  • This application can be applied in the field of smart transportation to promote the construction of smart cities.
  • another embodiment of the method for identifying the vehicle type of a traffic bayonet in the embodiment of the present application includes:
  • the server obtains the original traffic bayonet vehicle image, converts the image size of the original traffic bayonet vehicle image into a preset size, and obtains the target traffic bayonet vehicle image, which may include: acquiring the original traffic bayonet vehicle image, Carrying out data preprocessing on the bayonet vehicle image to obtain the preprocessed traffic bayonet vehicle image.
  • the data preprocessing includes data cleaning processing, data integration processing, data transformation processing, data protocol processing and image enhancement processing; for preprocessing traffic bayonet vehicle images Perform edge detection to obtain candidate traffic bayonet vehicle images; convert the image size of candidate traffic bayonet vehicle images to a preset size to obtain target traffic bayonet vehicle images.
  • the server performs data preprocessing on the original traffic bayonet vehicle images collected from the traffic system.
  • the data preprocessing includes data cleaning processing, data integration processing, data transformation processing, data protocol processing and image enhancement processing.
  • the image enhancement The processing includes image random horizontal flip, random cropping, random chroma processing and saturation transformation processing, etc., to obtain pre-processed traffic bayonet vehicle images.
  • the image size of the candidate traffic bayonet vehicle image is converted into a preset size through the preset image scaling function Resize function to obtain the target traffic bayonet vehicle image.
  • the server calls the preset effective network algorithm EfficientNet, and uses the convolutional network that increases the network depth coefficient and resolution coefficient in EfficientNet to perform multi-convolution kernel convolution operation on the target traffic bayonet vehicle image with the increased receptive field coefficient Processing and sub-sampling processing to obtain vehicle characteristic information.
  • the vehicle feature information includes the regional feature information, shape feature information, and license plate feature information of the vehicle.
  • the regional feature information is the location of the vehicle on the target traffic bayonet vehicle image.
  • the shape feature information includes the overall outline information of the vehicle and the position of the front of the vehicle. Information and roof feature information, etc.
  • the license plate feature information includes the color and shape of the license plate and the composition feature information of the license plate number.
  • the accuracy and efficiency of vehicle type recognition can be improved, thereby improving the rapid detection of multiple scales, multiple resolutions and multiple types of vehicles in complex scenes.
  • the accuracy of positioning and recognition can be improved.
  • the server performs vector convolution processing, batch normalization processing, activation function processing, and splicing processing on vehicle feature information to obtain multiple target vehicle feature maps of different scales, which may include: performing first data on vehicle feature information Process to obtain the first feature information, and perform second data processing on the first feature information to obtain a first-scale vehicle feature map.
  • the first data processing includes multi-layer vector convolution processing, batch normalization processing, and activation function processing
  • the second data processing includes a layer of vector convolution processing, batch normalization processing and activation function processing; multiple preset data processing is performed on the first feature information and vehicle feature information to obtain multiple candidate vehicle features of different scales Figure, the preset data processing includes first data processing, up-sampling processing, splicing processing and second data processing; the first-scale vehicle feature map and multiple candidate vehicle feature maps of different scales are determined as multiple target vehicles of different scales Feature map, the number of scale types in multiple target vehicle feature maps of different scales is greater than 3.
  • the server performs first data processing on the vehicle feature information to obtain the first target feature information, performs a layer of vector convolution processing on the first target feature information to obtain the first-scale vehicle feature map, and multiplies the vehicle feature information and the first feature information.
  • the second preset data processing obtains more than three candidate vehicle feature maps of different scales (ie, multiple candidate vehicle feature maps of different scales), as shown in FIG. 3. Wherein, the combination sequence and operation sequence of the second data processing, upsampling processing, splicing processing, the first data processing and the one-layer vector convolution operation processing in the multiple preset data processing may not be limited.
  • the second data processing and the up-sampling processing can be combined as one, or the second data processing can be performed first and then the memory up-sampling processing.
  • the scale of the vehicle feature map generated by the prior art is generally three types, and the scale of the vehicle feature map generated by this application through multiple vector convolution processing, batch normalization processing, activation function processing, and splicing processing is More than three types, by extending the original three-scale vehicle feature maps to more than the existing three-scale vehicle feature maps, it is possible to identify more vehicles of different scales in the original traffic bayonet vehicle image.
  • a target vehicle feature map with more sizes than those generated in the prior art can be realized, so that each feature grid can predict candidate frames without restriction, and improve the accuracy and accuracy of generating the target vehicle feature map.
  • Efficiency can effectively identify more target vehicle feature maps of different scales in traffic bayonet vehicle images, thereby improving the recall rate of target vehicle type detection.
  • the server performs multiple preset data processing on the first feature information and vehicle feature information to obtain multiple candidate vehicle feature maps of different scales, including: performing first data processing and upsampling processing on the first feature information to obtain The second feature information; obtain the target feature dimension of the second feature information, and obtain the vehicle feature information corresponding to the target feature dimension from the vehicle feature information through the preset convolutional network; match the second feature information with the target feature dimension Carry out splicing processing on the vehicle characteristic information to obtain the third characteristic information; perform the first data processing on the third characteristic information to obtain the fourth characteristic information, and perform the second data processing and a layer of vector convolution operation processing on the fourth characteristic information To obtain a second-scale vehicle feature map; perform multiple first data processing, up-sampling processing, splicing processing, and second data processing on the vehicle feature information and the fourth feature information to obtain multiple original vehicle feature maps of different scales; The second-scale vehicle feature map and multiple original vehicle feature maps of different scales are determined as multiple candidate vehicle feature maps of different scales.
  • four preset data processings are used.
  • the first feature information be A
  • the vehicle feature information be B
  • the second feature information be D
  • the feature dimension corresponds to the target feature dimension.
  • the vehicle feature information is B1
  • the third feature information is E
  • the fourth feature information is F
  • the second-scale vehicle feature map is A.
  • D The feature dimension is 128*128*80.
  • the size of the convolution kernel is inconsistent with the step size, so it is necessary to obtain B1 from B through a preset convolution network (consisting of multiple convolution layers).
  • the feature dimension of B1 is 128*128*? (?
  • the preset keras.layers.Concatenate() function to splice D and B1 to obtain E, perform the first data processing on E to obtain F, and perform the second data processing on F to obtain A; Perform the second data processing on F to obtain C1, perform up-sampling processing on C1 to obtain D1, obtain B2 from B with the feature dimension corresponding to the feature dimension of D1 through the preset convolution block, and use the preset keras.layers
  • the .Concatenate() function concatenates D1 and B1 to get E1, performs the first data processing on E1 to get F1, and performs the second data processing on F1 to get B; in the same way, you can get C and D, and A, B, C and D are multiple Candidate vehicle feature maps of different scales.
  • the server uses the preset target anchor frame and the matching algorithm Giou to predict and analyze the vehicle positioning frames in multiple target vehicle feature maps of different scales to obtain the target vehicle positioning frame and the initial coordinates of the target vehicle positioning frame. It may include: generating multiple target vehicle bounding boxes of each target vehicle feature map of different scales of target vehicle feature maps, and calculating the intersection ratio difference between every two target vehicle bounding boxes through a preset matching algorithm Giou; The size type of the bounding box of the target vehicle is clustered through the preset clustering algorithm and the intersection ratio difference value, and the preset target anchor box is obtained.
  • the preset matching algorithm Giou is used to calculate the intersection ratio between the two target vehicle bounding boxes in each target vehicle feature map of multiple different scales of target vehicle feature maps.
  • the preset target anchor frame through the matching algorithm Giou and Kmeans clustering algorithm, which can more truly reflect the difference between the predicted frame and the labeled frame (ie, the two target vehicle bounding boxes), and improve the positioning of the vehicle in the vehicle image Accuracy, so as to improve the accuracy of rapid positioning and recognition of multiple scales, multiple resolutions and multiple types of vehicles in complex scenes.
  • the server uses the preset target anchor frame and the matching algorithm Giou to predict and analyze the vehicle positioning frames in multiple target vehicle feature maps of different scales to obtain the target vehicle positioning frame and the initial coordinates of the target vehicle positioning frame, which may include : Carry out the category prediction and offset prediction of the vehicle positioning frame on multiple target vehicle feature maps of different scales through the preset target anchor frame and preset parameters to obtain the initial vehicle positioning frame.
  • the preset parameters include prediction type parameters and prediction Offset parameters and real label parameters; the metric value between the initial vehicle positioning frame and the target anchor frame is calculated by the matching algorithm Giou, and the initial vehicle positioning frame with the largest metric value is determined as the target vehicle positioning frame; to obtain the positioning frame with the target vehicle Corresponding to the preset feature grid unit, and read the coordinates of the preset feature grid unit to obtain the initial coordinates of the target vehicle positioning frame.
  • each target vehicle feature map corresponds to 3, there are 5 target vehicle feature maps
  • 15 initial vehicle positioning frames are obtained, and each target vehicle feature map Corresponding to the 3 initial vehicle positioning frames, the 3 initial vehicle corresponding to each target vehicle feature map is calculated by the preset matching algorithm Giou
  • the metric value of the positioning frame of the vehicle and the preset real label frame respectively, the calculation formula of the metric value is: I represents the intersection area of any one of the initial vehicle location frames and the target anchor frame (ie, the preset true label frame) in the three initial vehicle location frames corresponding to each target vehicle feature map, and C represents the corresponding area of each target vehicle feature map
  • I represents the intersection area of any one of the initial vehicle location frames and the target anchor frame (ie, the preset true label frame) in the three initial vehicle location frames corresponding to each target vehicle feature map
  • C represents the corresponding area of each target vehicle feature map
  • U represents the minimum bounding box of any one of the initial vehicle positioning frame and the target anchor frame corresponding to each target vehicle feature map Union area
  • sort the 3 initial vehicle positioning frames corresponding to each target vehicle feature map according to the metric value from large to small and use the first-ranked initial vehicle positioning frame as the target candidate vehicle corresponding to each target vehicle feature map Positioning box, in which 15 initial vehicle positioning boxes can also be sorted according to the metric
  • the server calls the preset model to predict the vehicle type according to the size of the target anchor frame and the image information of the target vehicle feature map corresponding to the target anchor frame, and obtain a variety of different candidate vehicle types corresponding to all target vehicle feature maps.
  • the similarity between the vehicle feature information and the feature information of multiple different candidate vehicle types is calculated, and the candidate vehicle type corresponding to the largest similarity value is used as the final predicted vehicle type.
  • the corresponding relationship between the vehicle type and the target vehicle positioning frame is also created, so that when the target coordinates of the target vehicle positioning frame are mapped to the original traffic bayonet vehicle image, the corresponding vehicle type is marked on the target vehicle.
  • the server After the server obtains the target vehicle positioning frame, it maps the target coordinates of the target vehicle positioning frame to the corresponding coordinates on the original traffic bayonet vehicle image to obtain the corresponding target coordinates, so as to mark the target vehicle positioning frame on the original traffic bayonet vehicle image
  • the size of the original traffic bayonet vehicle image is 416*416, the size of the target vehicle feature map is 13*13, and the coordinates are (6, 8, 2, 3).
  • the real vehicle in the original traffic bayonet vehicle image, the corresponding real vehicle type, and the coordinates and size of the frame where the real vehicle is located can be manually marked to obtain the real vehicle, the real vehicle type, and the real vehicle in the original traffic bayonet.
  • the original traffic bayonet vehicle image with the real coordinates of the corresponding preset label frame and the real size of the preset label content on the vehicle image the server uses the preset label extraction algorithm to perform the preset label content of the original traffic bayonet vehicle image Extract the real vehicle and the real vehicle type of the real vehicle. Read the size of the target vehicle positioning frame through the preset size reading function.
  • the fourth error, and the degree of matching between the target anchor frame and the target vehicle positioning frame is calculated by the matching algorithm Giou;
  • y true_obj indicates the real vehicle
  • y predict_obj indicates the target vehicle
  • the value of ⁇ obj is 0 or 1
  • 0 indicates that the target vehicle does not exist in the feature grid unit in the target vehicle feature map
  • 1 indicates the target vehicle FIG presence of the target vehicle characteristic feature of the grid cells
  • ⁇ obj by loss class [- (y true_class logy predict_class + (1-y true_class) log (1-y predict_class))] calculated second error
  • y true_class represents The real vehicle type
  • y predict_class represents the target vehicle type
  • passed Calculating a third error y true_x represents the true coordinates and y true_y, y predict_x target coordinates and y predict_y represented
  • the fourth error is calculated, y true_w and y true_h represent the true size, and y predcit_w and y predict_h represent the target size.
  • I represents the intersection area of the target anchor frame and the target vehicle positioning frame
  • C represents the minimum bounding box between the target anchor frame and the target vehicle positioning frame
  • U represents the target anchor The union area between the frame and the target vehicle positioning frame.
  • the target loss function is used to optimize the recognition of the target vehicle type in the original traffic bayonet vehicle image.
  • the target loss function includes a first loss function and a second loss function
  • the target loss function is used to continuously adjust the weight value of the algorithm for identifying the target vehicle type in the original traffic bayonet vehicle image until the evaluation value of the algorithm reaches the preset threshold to realize the recognition of the target vehicle type in the original traffic bayonet vehicle image Iterative optimization. By iteratively optimizing the recognition of the target vehicle type in the original traffic bayonet vehicle image, the accuracy of the recognition of the target vehicle type in the original traffic bayonet vehicle image is improved, thereby improving the recognition of multiple scales and multiple resolutions in complex scenes Rate and accuracy of rapid positioning and recognition of various types of vehicles.
  • the effectiveness of vehicle feature information is enhanced, the recall rate of target vehicle type detection is improved, and the positioning and recognition accuracy of the target vehicle positioning frame in the original traffic bayonet vehicle image is improved, thereby improving the detection of complex scenes.
  • the recognition of the target vehicle type in the original traffic bayonet vehicle image is iteratively optimized to improve the accuracy of the original traffic bayonet vehicle image.
  • the accuracy of the recognition of the target vehicle type further improves the accuracy of rapid positioning and recognition of vehicles of multiple scales, resolutions and types in complex scenes.
  • the identification method of the traffic bayonet vehicle type in the embodiment of this application and the following describes the identification device of the traffic bayonet vehicle type in the embodiment of this application. Please refer to FIG. 5, the traffic bayonet vehicle type in the embodiment of the application.
  • An embodiment of the identification device includes:
  • the first acquisition module 501 is configured to acquire an original traffic bayonet vehicle image, convert the image size of the original traffic bayonet vehicle image into a preset size, and obtain a target traffic bayonet vehicle image;
  • the feature extraction model 502 is used to perform vehicle feature extraction on the target traffic bayonet vehicle image through a preset effective network algorithm to obtain vehicle feature information;
  • the processing module 503 is used to perform vector convolution processing, batch normalization processing, activation function processing and splicing processing on vehicle feature information to obtain multiple target vehicle feature maps of different scales;
  • the first prediction module 504 is used to predict and analyze the vehicle positioning frames in multiple target vehicle feature maps of different scales through the preset target anchor frame and the matching algorithm Giou to obtain the target vehicle positioning frame and the initial target vehicle positioning frame coordinate;
  • the second prediction module 505 is used to predict the type of the vehicle in the target vehicle positioning frame according to the vehicle characteristic information to obtain the predicted vehicle type;
  • the mapping module 506 is used to map the initial coordinates to the original traffic bayonet vehicle image to obtain the target coordinates, determine the target vehicle contained in the bounding box corresponding to the target coordinates, and determine the predicted vehicle type as the target vehicle type corresponding to the target vehicle .
  • each module in the above-mentioned traffic bayonet vehicle type identification device corresponds to the steps in the above-mentioned traffic bayonet vehicle type identification method embodiment, and its functions and implementation processes are not repeated here.
  • the comparison and analysis of the prediction frame and the label frame are performed by using effective networks, vector convolution processing, batch normalization processing, activation function processing and splicing processing, and matching algorithm Giou to enhance the effectiveness of vehicle feature information.
  • Effective networks vector convolution processing, batch normalization processing, activation function processing and splicing processing, and matching algorithm Giou to enhance the effectiveness of vehicle feature information.
  • another embodiment of the device for identifying vehicle types at a traffic bayonet in the embodiment of the present application includes:
  • the first acquisition module 501 is configured to acquire an original traffic bayonet vehicle image, convert the image size of the original traffic bayonet vehicle image into a preset size, and obtain a target traffic bayonet vehicle image;
  • the feature extraction model 502 is used to perform vehicle feature extraction on the target traffic bayonet vehicle image through a preset effective network algorithm to obtain vehicle feature information;
  • the processing module 503 is used to perform vector convolution processing, batch normalization processing, activation function processing and splicing processing on vehicle feature information to obtain multiple target vehicle feature maps of different scales;
  • the first prediction module 504 is used to predict and analyze the vehicle positioning frames in multiple target vehicle feature maps of different scales through the preset target anchor frame and the matching algorithm Giou to obtain the target vehicle positioning frame and the initial target vehicle positioning frame coordinate;
  • the second prediction module 505 is used to predict the type of the vehicle in the target vehicle positioning frame according to the vehicle characteristic information to obtain the predicted vehicle type;
  • the mapping module 506 is used to map the initial coordinates to the original traffic bayonet vehicle image to obtain the target coordinates, determine the target vehicle contained in the bounding box corresponding to the target coordinates, and determine the predicted vehicle type as the target vehicle type corresponding to the target vehicle ;
  • the second acquisition module 507 is used to acquire the real vehicle and the real vehicle type of the real vehicle in the preset label content on the original traffic bayonet vehicle image, and to acquire the realness of the real vehicle preset label frame on the original traffic bayonet vehicle image Coordinates and real size, and obtain the target size of the target vehicle positioning frame;
  • the second calculation module 508 is used to calculate the first error between the real vehicle and the target vehicle, the second error between the real vehicle type and the target vehicle type, the third error between the real coordinates and the target coordinates, and the target size
  • the fourth error between the actual size and the matching algorithm Giou is used to calculate the matching degree between the target anchor frame and the target vehicle positioning frame;
  • the generating module 509 is used to generate a target loss function according to the first error, the second error, the third error, the fourth error, and the degree of matching.
  • the target loss function is used to optimize the recognition of the target vehicle type in the original traffic bayonet vehicle image .
  • the processing module 503 includes: a first processing unit 5031, configured to perform first data processing on vehicle characteristic information to obtain first characteristic information, and perform second data processing on the first characteristic information to obtain a first-scale vehicle Feature map, the first data processing includes multi-layer vector convolution operation processing, batch normalization processing and activation function processing, and the second data processing includes one layer vector convolution operation processing, batch normalization processing and activation function processing;
  • the second processing unit 5032 is used to perform multiple preset data processing on the first feature information and vehicle feature information to obtain multiple candidate vehicle feature maps of different scales.
  • the preset data processing includes first data processing, up-sampling processing, and splicing Processing and second data processing; a determining unit 5033, configured to determine the first-scale vehicle feature map and multiple candidate vehicle feature maps of different scales as multiple target vehicle feature maps of different scales, and multiple target vehicle features of different scales
  • the number of types of scales in the figure is greater than 3.
  • the second processing unit 5032 may also be specifically configured to: perform first data processing and up-sampling processing on the first characteristic information to obtain second characteristic information; obtain the target characteristic dimension of the second characteristic information, and preset
  • the convolutional network obtains the vehicle feature information corresponding to the target feature dimension from the vehicle feature information; splices the second feature information and the vehicle feature information corresponding to the target feature dimension to obtain the third feature information; for the third feature information Perform the first data processing to obtain the fourth feature information, and perform the second data processing and a layer of vector convolution processing on the fourth feature information to obtain the second-scale vehicle feature map; perform the vehicle feature information and the fourth feature information
  • Multiple first data processing, up-sampling processing, stitching processing and second data processing are performed to obtain multiple original vehicle feature maps of different scales; the second-size vehicle feature map and multiple original vehicle feature maps of different scales are determined as Multiple candidate vehicle feature maps of different scales.
  • the device for identifying vehicle types at a traffic bayonet further includes: a first calculation module 510, configured to generate a target vehicle bounding box of each target vehicle feature map in a plurality of target vehicle feature maps of different scales, by preset
  • the matching algorithm Giou calculates the intersection ratio difference between each two target vehicle bounding boxes;
  • the clustering module 511 is used to perform the size type of the target vehicle bounding box through the preset clustering algorithm and intersection ratio difference. Clustering, get the preset target anchor frame.
  • the first prediction module 504 may also be specifically configured to: perform vehicle positioning frame category prediction and offset prediction on multiple target vehicle feature maps of different scales through preset target anchor frames and preset parameters, to obtain Initial vehicle positioning frame.
  • the preset parameters include prediction type parameters, predicted offset parameters and true label parameters; the metric value between the initial vehicle positioning frame and the target anchor frame is calculated by the matching algorithm Giou, and the initial vehicle with the largest metric value is positioned
  • the frame is determined as the target vehicle positioning frame; the preset feature grid unit corresponding to the target vehicle positioning frame is obtained, and the coordinates of the preset feature grid unit are read to obtain the initial coordinates of the target vehicle positioning frame.
  • the first obtaining module 501 may also be specifically used for:
  • Data preprocessing includes data cleaning processing, data integration processing, data transformation processing, data protocol processing, and images Enhanced processing; edge detection is performed on the pre-processed traffic bayonet vehicle image to obtain candidate traffic bayonet vehicle images; the image size of the candidate traffic bayonet vehicle image is converted to a preset size to obtain the target traffic bayonet vehicle image.
  • each module and each unit in the above-mentioned traffic bayonet vehicle type identification device corresponds to each step in the above-mentioned traffic bayonet vehicle type identification method embodiment, and their functions and implementation processes will not be repeated here.
  • the effectiveness of vehicle feature information is enhanced, the recall rate of target vehicle type detection is improved, and the positioning and recognition accuracy of the target vehicle positioning frame in the original traffic bayonet vehicle image is improved, thereby improving the detection of complex scenes.
  • the recognition of the target vehicle type in the original traffic bayonet vehicle image is iteratively optimized to improve the accuracy of the original traffic bayonet vehicle image.
  • the accuracy of the recognition of the target vehicle type further improves the accuracy of rapid positioning and recognition of vehicles of multiple scales, resolutions and types in complex scenes.
  • FIG. 7 is a schematic structural diagram of a vehicle type identification device for a traffic bayonet provided by an embodiment of the present application.
  • the vehicle type identification device 700 for a traffic bayonet may have relatively large differences due to different configurations or performances, and may include one or One or more central processing units (CPU) 710 (for example, one or more processors) and memory 720, one or more storage media 730 for storing application programs 733 or data 732 (for example, one or one storage device with a large amount of storage ).
  • the memory 720 and the storage medium 730 may be short-term storage or persistent storage.
  • the program stored in the storage medium 730 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations in the vehicle type identification device 700 for the traffic bayonet.
  • the processor 710 may be configured to communicate with the storage medium 730, and execute a series of instruction operations in the storage medium 730 on the vehicle type identification device 700 of the traffic bayonet.
  • the vehicle type identification device 700 for a traffic bayonet may also include one or more power supplies 740, one or more wired or wireless network interfaces 750, one or more input and output interfaces 760, and/or, one or more operating systems 731 , Such as Windows Serve, Mac OS X, Unix, Linux, FreeBSD and so on.
  • Windows Serve Windows Serve
  • Mac OS X Unix
  • Linux FreeBSD
  • FIG. 7 does not constitute a limitation on the identification device of the traffic bayonet vehicle type, and may include more or less components than shown in the figure, or Combining certain components, or different component arrangements.
  • the present application also provides a vehicle type identification device for a traffic bayonet, including: a memory and at least one processor, the memory stores instructions, the memory and the at least one processor are interconnected through a wire; the at least one processor A processor invokes the instructions in the memory, so that the intelligent path planning device executes the steps in the above-mentioned method for identifying vehicle types at a traffic bayonet.
  • the present application also provides a computer-readable storage medium.
  • the computer-readable storage medium may be a non-volatile computer-readable storage medium or a volatile computer-readable storage medium.
  • the computer-readable storage medium stores computer instructions, and when the computer instructions are executed on the computer, the computer executes the following steps:
  • Predictive analysis of the vehicle positioning frames in the multiple target vehicle feature maps of different scales through the preset target anchor frame and the matching algorithm Giou, to obtain the target vehicle positioning frame and the initial coordinates of the target vehicle positioning frame;
  • the initial coordinates are mapped to the original traffic bayonet vehicle image to obtain target coordinates, and the target vehicle contained in the bounding box corresponding to the target coordinates is determined, and the predicted vehicle type is determined to correspond to the target vehicle The target vehicle type.
  • the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer readable storage medium.
  • the technical solution of the present application essentially or the part that contributes to the existing technology or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium , Including several instructions to make a computer device (which may be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the methods described in the various embodiments of the present application.
  • the aforementioned storage media include: U disk, mobile hard disk, read-only memory (read-only memory, ROM), random access memory (random access memory, RAM), magnetic disks or optical disks and other media that can store program codes. .

Landscapes

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

Abstract

一种交通卡口车辆类型的识别方法、装置、设备及存储介质,用于提高对车辆进行定位与识别的精准度。该方法包括:通过有效网络算法对目标交通卡口车辆图像进行车辆特征提取,得到车辆特征信息(102);对车辆特征信息进行预设的数据处理,得到多个不同尺度的目标车辆特征图(103);通过目标锚框和匹配算法Giou对目标车辆特征图中车辆的定位框进行预测分析,得到目标车辆定位框和初始坐标(104);根据车辆特征信息对目标车辆定位框内车辆的类型进行预测,得到预测车辆类型(105);通过将初始坐标映射到原始交通卡口车辆图像上得到目标车辆,将预测车辆类型确定为目标车辆对应的目标车辆类型(106)。

Description

交通卡口车辆类型的识别方法、装置、设备及存储介质
本申请要求于2020年4月29日提交中国专利局、申请号为202010358054.0、发明名称为“交通卡口车辆类型的识别方法、装置、设备及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在申请中。
技术领域
本申请涉及区域提取技术领域,尤其涉及交通卡口车辆类型的识别方法、装置、设备及存储介质。
背景技术
随着计算机技术的发展和计算机视觉原理的广泛应用,利用计算机图像处理技术对目标进行实时跟踪研究越来越热门。对目标进行动态实时跟踪定位的相关技术算法常被应用在智能化交通***、智能监控***、军事目标检测及医学导航手术中手术器械定位等方面。目前,采用一种单阶段目标检测算法对智能化交通***中车辆图像进行车辆识别,通过特征提取网络对输入图像提取特征,获得特征图,将特征图分成多个网格单元,每个网格单元预测固定数量的边界框,根据边界框对输入图像进行车辆定位,以实现对车辆的识别。
发明人意识到,由于目标边界框的定位不精准和由每个特征网格预测固定数量的候选框在很大程度上减少了候选框的数量,因而,导致了召回率相对较低,从而,导致对复杂场景中多种尺度、分辨率和类型的车辆进行快速定位与识别的精准度低。
发明内容
本申请的主要目的在于解决对复杂场景中多种尺度、分辨率和类型的车辆进行快速定位与识别的准确度低的问题。
为实现上述目的,本申请第一方面提供了一种交通卡口车辆类型的识别方法,包括:获取原始交通卡口车辆图像,将所述原始交通卡口车辆图像的图像尺寸转换为预设尺寸,得到目标交通卡口车辆图像;通过预置的有效网络算法对所述目标交通卡口车辆图像进行车辆特征提取,得到车辆特征信息;对所述车辆特征信息进行向量卷积运算处理、批归一化处理、激活函数处理和拼接处理,得到多个不同尺度的目标车辆特征图;通过预置的目标锚框和匹配算法Giou对所述多个不同尺度的目标车辆特征图中车辆的定位框进行预测分析,得到目标车辆定位框以及所述目标车辆定位框的初始坐标;根据所述车辆特征信息对所述目标车辆定位框内车辆的类型进行预测,得到预测车辆类型;将所述初始坐标映射到所述原始交通卡口车辆图像上,得到目标坐标,并确定所述目标坐标对应的边界框内包含的目标车辆,将所述预测车辆类型确定为所述目标车辆对应的目标车辆类型。
本申请第二方面提供了一种交通卡口车辆类型的识别设备,包括存储器、处理器及存储在所述存储器上并可在所述处理器上运行的计算机可读指令,所述处理器执行所述计算机可读指令时实现如下步骤:获取原始交通卡口车辆图像,将所述原始交通卡口车辆图像的图像尺寸转换为预设尺寸,得到目标交通卡口车辆图像;通过预置的有效网络算法对所述目标交通卡口车辆图像进行车辆特征提取,得到车辆特征信息;对所述车辆特征信息进行向量卷积运算处理、批归一化处理、激活函数处理和拼接处理,得到多个不同尺度的目标车辆特征图;通过预置的目标锚框和匹配算法Giou对所述多个不同尺度的目标车辆特征图中车辆的定位框进行预测分析,得到目标车辆定位框以及所述目标车辆定位框的初始坐标;根据所述车辆特征信息对所述目标车辆定位框内车辆的类型进行预测,得到预测车辆类型;将所述初始坐标映射到所述原始交通卡口车辆图像上,得到目标坐标,并确定所述目标坐标对应的边界框内包含的目标车辆,将所述预测车辆类型确定为所述目标车辆对应的目标车辆类型。
本申请第三方面提供了一种计算机可读存储介质,所述计算机可读存储介质中存储有 计算机指令,当所述计算机指令在计算机上运行时,使得计算机执行如下步骤:获取原始交通卡口车辆图像,将所述原始交通卡口车辆图像的图像尺寸转换为预设尺寸,得到目标交通卡口车辆图像;通过预置的有效网络算法对所述目标交通卡口车辆图像进行车辆特征提取,得到车辆特征信息;对所述车辆特征信息进行向量卷积运算处理、批归一化处理、激活函数处理和拼接处理,得到多个不同尺度的目标车辆特征图;通过预置的目标锚框和匹配算法Giou对所述多个不同尺度的目标车辆特征图中车辆的定位框进行预测分析,得到目标车辆定位框以及所述目标车辆定位框的初始坐标;根据所述车辆特征信息对所述目标车辆定位框内车辆的类型进行预测,得到预测车辆类型;将所述初始坐标映射到所述原始交通卡口车辆图像上,得到目标坐标,并确定所述目标坐标对应的边界框内包含的目标车辆,将所述预测车辆类型确定为所述目标车辆对应的目标车辆类型。
本申请第四方面提供了一种交通卡口车辆类型的识别装置,包括:第一获取模块,用于获取原始交通卡口车辆图像,将所述原始交通卡口车辆图像的图像尺寸转换为预设尺寸,得到目标交通卡口车辆图像;特征提取模型,用于通过预置的有效网络算法对所述目标交通卡口车辆图像进行车辆特征提取,得到车辆特征信息;处理模块,用于对所述车辆特征信息进行向量卷积运算处理、批归一化处理、激活函数处理和拼接处理,得到多个不同尺度的目标车辆特征图;第一预测模块,用于通过预置的目标锚框和匹配算法Giou对所述多个不同尺度的目标车辆特征图中车辆的定位框进行预测分析,得到目标车辆定位框以及所述目标车辆定位框的初始坐标;第二预测模块,用于根据所述车辆特征信息对所述目标车辆定位框内车辆的类型进行预测,得到预测车辆类型;映射模块,用于将所述初始坐标映射到所述原始交通卡口车辆图像上,得到目标坐标,并确定所述目标坐标对应的边界框内包含的目标车辆,将所述预测车辆类型确定为所述目标车辆对应的目标车辆类型。
本申请提供的技术方案中,获取原始交通卡口车辆图像和目标交通卡口车辆图像;通过预置的有效网络算法对目标交通卡口车辆图像进行车辆特征提取,得到车辆特征信息;对车辆特征信息进行向量卷积运算处理、批归一化处理、激活函数处理和拼接处理,得到多个不同尺度的目标车辆特征图;通过预置的目标锚框和匹配算法Giou对多个不同尺度的目标车辆特征图中车辆的定位框进行预测分析,得到目标车辆定位框以及目标车辆定位框的初始坐标;根据车辆特征信息对目标车辆定位框内车辆的类型进行预测,得到预测车辆类型;将目标坐标映射到原始交通卡口车辆图像上,得到目标坐标,并确定目标坐标对应的边界框内包含的目标车辆,将预测车辆类型确定为目标车辆对应的目标车辆类型。本申请中,通过采用有效网络、多次的向量卷积运算处理、批归一化处理、激活函数处理、拼接处理和匹配算法Giou,增强车辆特征信息的有效性,提高对目标车辆类型检测的召回率,提高对原始交通卡口车辆图像中的目标车辆定位框的定位识别精度,进而提高了对复杂场景中多种尺度、分辨率和类型的车辆进行快速定位与识别的精准度。
附图说明
图1为本申请实施例中交通卡口车辆类型的识别方法的一个实施例示意图;
图2为本申请实施例中交通卡口车辆类型的识别方法的另一个实施例示意图;
图3为本申请实施例中获取多个不同尺度的目标车辆特征图的一个实施例示意图;
图4为本申请实施例中获取多个不同尺度的候选车辆特征图的一个实施例示意图;
图5为本申请实施例中交通卡口车辆类型的识别装置的一个实施例示意图;
图6为本申请实施例中交通卡口车辆类型的识别装置的另一个实施例示意图;
图7为本申请实施例中交通卡口车辆类型的识别设备的一个实施例示意图。
具体实施方式
本申请实施例提供了一种交通卡口车辆类型的识别方法、装置、设备及存储介质,用 于通过采用有效网络、多次的向量卷积运算处理、批归一化处理、激活函数处理、拼接处理和匹配算法Giou,增强车辆特征信息的有效性,提高对目标车辆类型检测的召回率,提高对原始交通卡口车辆图像中的目标车辆定位框的定位识别精度,进而提高了对复杂场景中多种尺度、分辨率和类型的车辆进行快速定位与识别的精准度。
为了使本技术领域的人员更好地理解本申请方案,下面将结合本申请实施例中的附图,对本申请实施例进行描述。
本申请的说明书和权利要求书及上述附图中的术语“第一”、“第二”、“第三”、“第四”等(如果存在)是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便这里描述的实施例能够以除了在这里图示或描述的内容以外的顺序实施。此外,术语“包括”或“具有”及其任何变形,意图在于覆盖不排他的包含,例如,包含了一系列步骤或单元的过程、方法、***、产品或设备不必限于清楚地列出的那些步骤或单元,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它步骤或单元。
为便于理解,下面对本申请实施例的具体流程进行描述,请参阅图1,本申请实施例中交通卡口车辆类型的识别方法的一个实施例包括:
在一实施例中,该交通卡口车辆类型的识别方法包括:
101、获取原始交通卡口车辆图像,将原始交通卡口车辆图像的图像尺寸转换为预设尺寸,得到目标交通卡口车辆图像;
可以理解的是,本申请的执行主体可以为交通卡口车辆类型的识别装置,还可以是终端或者服务器,具体此处不做限定。本申请实施例以服务器为执行主体为例进行说明。
服务器通过图像缩放函数Resize函数将通过摄像头或其他摄像工具采集到的原始交通卡口车辆图的图像尺寸转换为预设尺寸大小的目标交通卡口车辆图像,例如:通过Resize函数将候选车辆图像的图像尺寸转换为512*512尺寸大小的车辆图像。通过将原始交通卡口车辆图像的图像尺寸转换为预设尺寸,以便于通过预置的有效网络算法EfficientNet有效地对原始交通卡口车辆图像进行特征提取。
作为一种实施方式,原始交通卡口车辆图像存储于区块链中,服务器从区块链中获取原始交通卡口车辆图像。区块链是分布式数据存储、点对点传输、共识机制、加密算法等计算机技术的新型应用模式。区块链(Blockchain),本质上是一个去中心化的数据库,是一串使用密码学方法相关联产生的数据块,每一个数据块中包含了一批次网络交易的信息,用于验证其信息的有效性(防伪)和生成下一个区块。区块链可以包括区块链底层平台、平台产品服务层以及应用服务层。
102、通过预置的有效网络算法对目标交通卡口车辆图像进行车辆特征提取,得到车辆特征信息;
服务器调用预置的有效网络算法EfficientNet,通过EfficientNet中的增大网络深度系数和分辨率系数的卷积网络以增大的感受野系数对目标交通卡口车辆图像进行多卷积核的卷积运算处理和子采样处理,得到车辆特征信息。其中,车辆特征信息包括车辆的区域特征信息、形状特征信息和牌照特征信息,区域特征信息为车辆在目标交通卡口车辆图像上的区域位置,形状特征信息包括车辆的整体外廓信息、车头位置信息和车顶特征信息等,牌照特征信息包括牌照的颜色、形状和车牌号的构成特征信息。通过采用有效网络算法EfficientNet对目标交通卡口车辆图像进行特征提取,提高对车辆类型识别的准确率和效率,从而提高对复杂场景中多种尺度、多种分辨率和多种类型的车辆进行快速定位与识别的精准度。
103、对车辆特征信息进行向量卷积运算处理、批归一化处理、激活函数处理和拼接处 理,得到多个不同尺度的目标车辆特征图;
服务器将车辆特征信息输入预置的特征图生成框架中,该特征图生成框架可包括多层处理框架,每层处理框架包括批归一化层、激活函数层和/或不同层数的卷积层,以及特征融合层,通过该特征图生成框架中的每层处理框架将车辆特征信息进行向量卷积运算处理、批归一化处理、激活函数处理和拼接处理,通过该特征图生成框架可将车辆特征信息融合形成特征金字塔,生成多个不同尺度的目标车辆特征图,以实现能够识别交通卡口车辆图像中较多不同尺度的车辆特征信息,提高原始交通卡口图像中对目标车辆类型检测的召回率,从而提高对复杂场景中多种尺度、分辨率和类型的车辆进行快速定位与识别的精准度。
104、通过预置的目标锚框和匹配算法Giou对多个不同尺度的目标车辆特征图中车辆的定位框进行预测分析,得到目标车辆定位框以及目标车辆定位框的初始坐标;
服务器通过预置的聚类算法结合匹配算法Giou对预置训练图片中的所有真实标注框集合进行聚类处理得到目标锚框anchor box,在本实施例中,目标锚框anchor box为15个,每个目标车辆特征图对应3个,有5个目标车辆特征图,预测每个anchor box对应的所含目标的类别和真实标注框相对目标锚框的偏移量,根据类别和偏移量调整目标锚框位置,从而得到每个车辆特征图的3种不同尺寸的目标车辆定位框坐标,对每个车辆特征图的3种不同尺寸的目标车辆定位框进行筛选,得到需要输出的每个车辆特征图对应目标车辆定位框和目标车辆定位框的初始坐标,或对15个目标车辆定位框进行筛选,得到需要输出的所有车辆特征图对应的目标车辆定位框和目标车辆定位框的初始坐标。其中,可通过以下公式得到目标车辆定位框的初始坐标:b x=σ(t x)+c x,b y=σ(t y)+c y
Figure PCTCN2020104804-appb-000001
Figure PCTCN2020104804-appb-000002
t x和t y表示每个不同尺度的目标车辆特征图相对于特征图网格的相对坐标,t w和t h分别表示每个不同尺度的目标车辆特征图相对于特征图网格的宽与高,σ表示sigmoid激活函数,b x和b y表示每个不同尺度的目标车辆特征图的初始坐标,c x和c y表示特征图网格相对每个多种不同尺度的目标车辆特征图的相对坐标,b w和b h表示每个不同尺度的目标车辆特征图的宽和高,p w和p h表示目标锚框的宽和高。通过预置的目标锚框对目标车辆特征图进行预测分析,得到目标车辆定位框和目标车辆定位框的初始坐标,提高车辆图像中对车辆的定位精度。
105、根据车辆特征信息对目标车辆定位框内车辆的类型进行预测,得到预测车辆类型。
服务器调用预置的模型根据目标锚框的尺寸大小和目标锚框对应目标车辆特征图的图像信息对车辆类型进行预测,得到所有目标车辆特征图对应的多种不同的候选车辆类型,在本实施例中,为20种候选车辆类型,计算车辆特征信息和多种不同的候选车辆类型的特征信息之间的相似度,将相似度值最大对应的候选车辆类型作为最终的预测车辆类型。除此之外,还创建预测车辆类型与目标车辆定位框的对应关系,以便于将目标车辆定位框的目标坐标映射到原始交通卡口车辆图像上时,将对应的预测车辆类型标记在目标车辆上。
106、将初始坐标映射到原始交通卡口车辆图像上,得到目标坐标,并确定目标坐标对应的边界框内包含的目标车辆,将预测车辆类型确定为目标车辆对应的目标车辆类型。
服务器获得目标车辆定位框后,将该目标车辆定位框的初始坐标映射到原始交通卡口车辆图像上对应的坐标得到对应的目标坐标,以将目标车辆定位框标记在原始交通卡口车辆图像上,例如:原始交通卡口车辆图像大小为416*416,目标车辆特征图的大小为13*13,坐标为(6,8,2,3),首先将目标车辆特征图的坐标转换成(6,8,6+2,8+3),即(6,8,8,11),然后将坐标(6,8,8,11)映射到原始交通卡口车辆图像中后对应的坐标变成(6*(416/13),8*(416/13),8*(416/13),11*(416/13)),即(192,256,256,352)。 获取原始交通卡口车辆图像上映射的坐标在对应的目标车辆,目标车辆定位框内的车辆标有对应的预测车辆类型,因而可通过将初始坐标映射到原始交通卡口车辆图像上,以将目标车辆对应的车辆类型进行识别,得到目标车辆类型,从而实现对原始交通卡口车辆图像的车辆检测和车辆类型识别,提高对复杂场景中多种尺度、分辨率和类型的车辆进行快速定位与识别的精准度。
本申请实施例中,采用有效网络、向量卷积运算处理、批归一化处理、激活函数处理和拼接处理和匹配算法Giou,增强车辆特征信息的有效性,提高对目标车辆类型检测的召回率,提高对原始交通卡口车辆图像中的目标车辆定位框的定位识别精度,进而提高了对复杂场景中多种尺度、分辨率和类型的车辆进行快速定位与识别的精准度。本申请可应用于智慧交通领域中,从而推动智慧城市的建设。
请参阅图2,本申请实施例中交通卡口车辆类型的识别方法的另一个实施例包括:
201、获取原始交通卡口车辆图像,将原始交通卡口车辆图像的图像尺寸转换为预设尺寸,得到目标交通卡口车辆图像;
具体地,服务器获取原始交通卡口车辆图像,将原始交通卡口车辆图像的图像尺寸转换为预设尺寸,得到目标交通卡口车辆图像,可以包括:获取原始交通卡口车辆图像,对原始交通卡口车辆图像进行数据预处理,得到预处理交通卡口车辆图像,数据预处理包括数据清理处理、数据集成处理、数据变换处理、数据规约处理和图像增强处理;对预处理交通卡口车辆图像进行边缘检测,得到候选交通卡口车辆图像;将候选交通卡口车辆图像的图像尺寸转换为预设尺寸,得到目标交通卡口车辆图像。
服务器对从交通***中读取采集到的原始交通卡口车辆图像进行数据预处理,该数据预处理包括数据清理处理、数据集成处理、数据变换处理、数据规约处理和图像增强处理,该图像增强处理包括图像随机水平翻转、随机裁剪处理、随机色度处理和饱和度变换处理等,得到预处理交通卡口车辆图像。结合canny算子算法和基于结构化森林的快速边缘检测算法对预处理交通卡口车辆图像进行边缘检测,并将边缘检测所得的结果标记在候选交通卡口车辆图像对应区域上,得到候选交通卡口车辆图像。通过预置的图像缩放函数Resize函数将候选交通卡口车辆图像的图像尺寸转换为预设尺寸,得到目标交通卡口车辆图像。通过上述操作,保证目标交通卡口车辆图像的质量和便于后续对目标交通卡口车辆图像的检测和分类。
202、通过预置的有效网络算法对目标交通卡口车辆图像进行车辆特征提取,得到车辆特征信息;
服务器调用预置的有效网络算法EfficientNet,通过EfficientNet中的增大网络深度系数和分辨率系数的卷积网络以增大的感受野系数对目标交通卡口车辆图像进行多卷积核的卷积运算处理和子采样处理,得到车辆特征信息。其中,车辆特征信息包括车辆的区域特征信息、形状特征信息和牌照特征信息,区域特征信息为车辆在目标交通卡口车辆图像上的区域位置,形状特征信息包括车辆的整体外廓信息、车头位置信息和车顶特征信息等,牌照特征信息包括牌照的颜色、形状和车牌号的构成特征信息。通过采用有效网络算法EfficientNet对目标交通卡口车辆图像进行特征提取,提高对车辆类型识别的准确率和效率,从而提高对复杂场景中多种尺度、多种分辨率和多种类型的车辆进行快速定位与识别的精准度。
203、对车辆特征信息进行向量卷积运算处理、批归一化处理、激活函数处理和拼接处理,得到多个不同尺度的目标车辆特征图;
具体地,服务器对车辆特征信息进行向量卷积运算处理、批归一化处理、激活函数处理和拼接处理,得到多个不同尺度的目标车辆特征图,可以包括:对车辆特征信息进行第 一数据处理,得到第一特征信息,并对第一特征信息进行第二数据处理,得到第一尺度车辆特征图,第一数据处理包括多层向量卷积运算处理、批归一化处理和激活函数处理,第二数据处理包括一层向量卷积运算处理、批归一化处理和激活函数处理;对第一特征信息和车辆特征信息进行多次预设数据处理,得到多个不同尺度的候选车辆特征图,预设数据处理包括第一数据处理、上采样处理、拼接处理和第二数据处理;将第一尺度车辆特征图和多个不同尺度的候选车辆特征图确定为多个不同尺度的目标车辆特征图,多个不同尺度的目标车辆特征图中尺度的种类数量大于3。
服务器对车辆特征信息进行第一数据处理得到第一目标特征信息,对第一目标特征信息进行一层向量卷积运算处理得到第一尺度车辆特征图,将车辆特征信息和第一特征信息进行多次预设数据处理得到3种以上不同尺度的候选车辆特征图(即多个不同尺度的候选车辆特征图),如图3所示。其中,多次预设数据处理中的第二数据处理、上采样处理、拼接处理、所述第一数据处理和一层向量卷积运算处理的组合顺序和操作顺序可不作限定。例如:可将第二数据处理和上采样处理作为一个组合,也可先进行第二数据处理再记性上采样处理。现有技术所生成的车辆特征图的尺度一般为3种,而本申请通过多次的向量卷积运算处理、批归一化处理、激活函数处理和拼接处理所生成的车辆特征图的尺度为3种以上,通过将原有的3种尺度车辆特征图扩展成多于现有3种尺度的车辆特征图,能够识别原始交通卡口车辆图像中较多不同尺度的车辆。通过上述步骤的操作,实现多于现有技术生成的尺寸数量的目标车辆特征图,以使每个特征网格能够不受约束地进行候选框的预测,提高生成目标车辆特征图的准确性和效率,能够有效地识别交通卡口车辆图像中较多不同尺度的目标车辆特征图,从而提高对目标车辆类型检测的召回率。
具体地,服务器对第一特征信息和车辆特征信息进行多次预设数据处理,得到多个不同尺度的候选车辆特征图,包括:对第一特征信息进行第一数据处理和上采样处理,得到第二特征信息;获取第二特征信息的目标特征维度,并通过预置的卷积网络从车辆特征信息中获取与目标特征维度对应的车辆特征信息;将第二特征信息和与目标特征维度对应的车辆特征信息进行拼接处理,得到第三特征信息;对第三特征信息进行第一数据处理,得到第四特征信息,并对第四特征信息进行第二数据处理和一层向量卷积运算处理,得到第二尺度车辆特征图;对车辆特征信息和第四特征信息进行多次的第一数据处理、上采样处理、拼接处理和第二数据处理,得到多个不同尺度的原始车辆特征图;将第二尺度车辆特征图和多个不同尺度的原始车辆特征图确定为多个不同尺度的候选车辆特征图。
本实施例中采用四次的预设数据处理,例如:如图4所示,设第一特征信息为A,车辆特征信息为B,第二特征信息为D,特征维度与目标特征维度对应的车辆特征信息为B1,第三特征信息为E,第四特征信息为F,第二尺度车辆特征图为甲,对A进行第二数据处理得到C,对C进行上采样处理得到D,D的特征维度为128*128*80,由于将两个特征信息进行拼接处理,须要该两个特征信息的特征维度保持一致,而第一数据处理、第二数据处理和一层向量卷积运算处理中的卷积核大小和步长不一致,因而须要通过预置的卷积网络(由多层卷积层构成)从B获取B1,B1的特征维度为128*128*?(?表示最高维不定,可以为任意大小),通过预置的keras.layers.Concatenate()函数拼接D与B1得到E,对E进行第一数据处理得到F,对F进行第二数据处理得到甲;对F进行第二数据处理得到C1,对C1进行上采样处理得到D1,通过预置的卷积块从B中获取特征维度与D1的特征维度对应的B2,通过预置的keras.layers.Concatenate()函数拼接D1与B1得到E1,对E1进行第一数据处理得到F1,对F1进行第二数据处理得到乙;同理可得丙和丁,甲、乙、丙和丁为多个不同尺度的候选车辆特征图。
204、通过预置的目标锚框和匹配算法Giou对多个不同尺度的目标车辆特征图中车辆 的定位框进行预测分析,得到目标车辆定位框以及目标车辆定位框的初始坐标;
具体地,服务器通过预置的目标锚框和匹配算法Giou对多个不同尺度的目标车辆特征图中车辆的定位框进行预测分析,得到目标车辆定位框以及目标车辆定位框的初始坐标之前,还可以包括:生成多个不同尺度的目标车辆特征图中每个目标车辆特征图的目标车辆边界框,通过预置的匹配算法Giou计算每两个目标车辆边界框之间的交并比差值;通过预置的聚类算法和交并比差值对目标车辆边界框的尺寸类型进行聚类,得到预置的目标锚框。
通过预置的匹配算法Giou计算多个不同尺度的目标车辆特征图中每个目标车辆特征图中的两个目标车辆边界框之间的交并比值,计算公式如下:
Figure PCTCN2020104804-appb-000003
Giou表示交并比差值,I表示两个目标车辆边界框的交集面积,C表示两个目标车辆边界框的最小包围框,U表示两个目标车辆边界框的并集面积。通过distance=1-Giou计算目标车辆边界框离聚类中心的距离,通过预置的kmeans聚类算法和目标车辆边界框离聚类中心的距离进行聚类,得到预置的锚框。通过匹配算法Giou和Kmeans聚类算法获取预置的目标锚框,更能真实地反映预测框与标注框(即两个目标车辆边界框)之间的差异程度,提高车辆图像中对车辆的定位精度,从而提高对复杂场景中多种尺度、多种分辨率和多种类型的车辆进行快速定位与识别的精准度。
具体地,服务器通过预置的目标锚框和匹配算法Giou对多个不同尺度的目标车辆特征图中车辆的定位框进行预测分析,得到目标车辆定位框以及目标车辆定位框的初始坐标,可以包括:通过预置的目标锚框和预置参数对多个不同尺度的目标车辆特征图进行车辆定位框的类别预测和偏移量预测,得到初始车辆定位框,预置参数包括预测类型参数、预测偏移量参数和真实标注参数;通过匹配算法Giou计算初始车辆定位框和目标锚框之间的度量值,将度量值最大的初始车辆定位框确定为目标车辆定位框;获取与目标车辆定位框对应的预置特征网格单元,并读取预置特征网格单元的坐标,得到目标车辆定位框的初始坐标。
例如:根据15个目标锚框(每个目标车辆特征图对应3个,有5个目标车辆特征图)的偏移量和类别进行预测,得到15个初始车辆定位框,每个目标车辆特征图对应3个初始车辆定位框,通过预置的匹配算法Giou分计算每个目标车辆特征图对应的3个初始车
辆定位框分别与预置的真实标注框的度量值,该度量值的计算公式为:
Figure PCTCN2020104804-appb-000004
I表示每个目标车辆特征图对应的3个初始车辆定位框中任意一个初始车辆定位框与目标锚框(即预置的真实标注框)的交集面积,C表示每个目标车辆特征图对应的3个初始车辆定位框中任意一个初始车辆定位框与目标锚框的最小包围框,U表示每个目标车辆特征图对应的3个初始车辆定位框中任意一个初始车辆定位框与目标锚框的并集面积,按照度量值从大到小对每个目标车辆特征图对应的3个初始车辆定位框进行排序,将排序第一的初始车辆定位框作为每个目标车辆特征图对应的目标候选车辆定位框,其中也可按照度量值从大到小对15个初始车辆定位框进行排序,将排序第一的初始车辆定位框作为所有目标车辆特征图对应的目标候选车辆定位框,读取目标车辆定位框对应预置特征网格单元的坐标,得到目标车辆定位框的初始坐标。
205、根据车辆特征信息对目标车辆定位框内车辆的类型进行预测,得到预测车辆类型。
服务器调用预置的模型根据目标锚框的尺寸大小和目标锚框对应目标车辆特征图的图像信息对车辆类型进行预测,得到所有目标车辆特征图对应的多种不同的候选车辆类型,在本实施例中,为20种候选车辆类型,计算车辆特征信息和多种不同的候选车辆类型的特征信息之间的相似度,将相似度值最大对应的候选车辆类型作为最终的预测车辆类型。除 此之外,还创建车辆类型与目标车辆定位框的对应关系,以便于将目标车辆定位框的目标坐标映射到原始交通卡口车辆图像上时,将对应的车辆类型标记在目标车辆上。
206、将初始坐标映射到原始交通卡口车辆图像上,得到目标坐标,并确定目标坐标对应的边界框内包含的目标车辆,将预测车辆类型确定为目标车辆对应的目标车辆类型;
服务器得到目标车辆定位框后,将该目标车辆定位框的目标坐标映射到原始交通卡口车辆图像上对应的坐标得到对应的目标坐标,以将目标车辆定位框标记在原始交通卡口车辆图像上,例如:原始交通卡口车辆图像大小为416*416,目标车辆特征图的大小为13*13,坐标为(6,8,2,3),首先将目标车辆特征图的坐标转换成(6,8,6+2,8+3),即(6,8,8,11),然后将坐标(6,8,8,11)映射到原始交通卡口车辆图像中后对应的坐标变成(6*(416/13),8*(416/13),8*(416/13),11*(416/13)),即(192,256,256,352)。获取原始交通卡口车辆图像上映射的坐标在对应的目标车辆,目标车辆定位框内的车辆标有对应的预测车辆类型,因而可通过将初始坐标映射到原始交通卡口车辆图像上,以将目标车辆对应的车辆类型进行识别,得到目标车辆类型,从而实现对原始交通卡口车辆图像的车辆检测和车辆类型识别,提高对复杂场景中多种尺度、分辨率和类型的车辆进行快速定位与识别的精准度。
207、获取原始交通卡口车辆图像上预置标签内容中的真实车辆和真实车辆的真实车辆类型,以及获取真实车辆在原始交通卡口车辆图像上预置标注框的真实坐标和真实尺寸,并获取目标车辆定位框的目标尺寸;
其中,可通过对原始交通卡口车辆图像的真实车辆、对应的真实车辆类型和真实车辆所在框的坐标和尺寸进行人工标注,得到带有真实车辆、真实车辆类型、真实车辆在原始交通卡口车辆图像上对应的预置标注框的真实坐标和真实尺寸大小的预置标签内容的原始交通卡口车辆图像,服务器通过预置的标签提取算法对原始交通卡口车辆图像的预置标签内容进行提取,得到真实车辆和真实车辆的真实车辆类型。通过预置的尺寸读取函数读取目标车辆定位框的尺寸。
208、计算真实车辆与目标车辆之间的第一误差、真实车辆类型与目标车辆类型之间的第二误差、真实坐标与目标坐标之间的第三误差,以及目标尺寸与真实尺寸之间的第四误差,以及通过匹配算法Giou计算目标锚框与目标车辆定位框之间的匹配度;
服务器通过
Figure PCTCN2020104804-appb-000005
计算得到第一误差,y true_obj表示真实车辆,y predict_obj表示目标车辆,λ obj的取值为0或1,0表示目标车辆特征图中的特征网格单元中不存在目标车辆,1表示目标车辆特征图中的特征网格单元中存在目标车辆;通过loss class=λ obj[-(y true_classlogy predict_class+(1-y true_class)log(1-y predict_class))]计算第二误差,y true_class表示真实车辆类型,y predict_class表示目标车辆类型;通过
Figure PCTCN2020104804-appb-000006
计算第三误差,y true_x和y true_y表示真实坐标,y predict_x和y predict_y表示目标坐标;通过
Figure PCTCN2020104804-appb-000007
计算第四误差,y true_w和y true_h表示真实尺寸,y predcit_w和y predict_h表示目标尺寸。通过
Figure PCTCN2020104804-appb-000008
计算目标锚框与目标车辆定位框之间的匹配度,I表示目标锚框与目标车辆定位框的交集面积,C表示目标锚框与目标车辆定位框之间的最小包围框,U表示目标锚框与目标车辆定位框之间的并集面积。
209、根据第一误差、第二误差、第三误差、第四误差和匹配度生成目标损失函数,目标损失函数用于对原始交通卡口车辆图像中目标车辆类型的识别进行优化。
其中,目标损失函数包括第一损失函数和第二损失函数,服务器根据第一误差、第二误差、第三误差和第四误差生成第一损失函数loss=min∑loss xy+loss wh+loss confidence+loss class,根据匹配度生成第二损失函数L=1-Giou,第二损失函数中匹配度越大,代表目标锚框与目标车辆定位框之间的重叠区域越大,进而目标锚框对目标车辆定位框的预测的损失越小。通过目标损失函数不断调整对原始交通卡口车辆图像中目标车辆类型的识别的算法的权重值,直到算法的评估值达到预设阈值,以实现对原始交通卡口车辆图像中目标车辆类型的识别的迭代优化。通过对原始交通卡口车辆图像中目标车辆类型的识别进行迭代优化,提高对原始交通卡口车辆图像中目标车辆类型的识别的精确度,进而提高了对复杂场景中多种尺度、多种分辨率和多种类型的车辆进行快速定位与识别的精准度。
本申请实施例中,在增强车辆特征信息的有效性,提高对目标车辆类型检测的召回率,提高对原始交通卡口车辆图像中的目标车辆定位框的定位识别精度,进而提高了对复杂场景中多种尺度、分辨率和类型的车辆进行快速定位与识别的精准度的基础上,通过对原始交通卡口车辆图像中目标车辆类型的识别进行迭代优化,提高对原始交通卡口车辆图像中目标车辆类型的识别的精确度,进而提高了对复杂场景中多种尺度、分辨率和类型的车辆进行快速定位与识别的精准度。
上面对本申请实施例中交通卡口车辆类型的识别方法进行了描述,下面对本申请实施例中交通卡口车辆类型的识别装置进行描述,请参阅图5,本申请实施例中交通卡口车辆类型的识别装置一个实施例包括:
第一获取模块501,用于获取原始交通卡口车辆图像,将原始交通卡口车辆图像的图像尺寸转换为预设尺寸,得到目标交通卡口车辆图像;
特征提取模型502,用于通过预置的有效网络算法对目标交通卡口车辆图像进行车辆特征提取,得到车辆特征信息;
处理模块503,用于对车辆特征信息进行向量卷积运算处理、批归一化处理、激活函数处理和拼接处理,得到多个不同尺度的目标车辆特征图;
第一预测模块504,用于通过预置的目标锚框和匹配算法Giou对多个不同尺度的目标车辆特征图中车辆的定位框进行预测分析,得到目标车辆定位框以及目标车辆定位框的初始坐标;
第二预测模块505,用于根据车辆特征信息对目标车辆定位框内车辆的类型进行预测,得到预测车辆类型;
映射模块506,用于将初始坐标映射到原始交通卡口车辆图像上,得到目标坐标,并确定目标坐标对应的边界框内包含的目标车辆,将预测车辆类型确定为目标车辆对应的目标车辆类型。
上述交通卡口车辆类型的识别装置中各个模块的功能实现与上述交通卡口车辆类型的 识别方法实施例中各步骤相对应,其功能和实现过程在此处不再一一赘述。
本申请实施例中,通过采用有效网络、向量卷积运算处理、批归一化处理、激活函数处理和拼接处理和匹配算法Giou进行预测框与标注框的对比分析,增强车辆特征信息的有效性,提高对目标车辆类型检测的召回率,提高对原始交通卡口车辆图像中的目标车辆定位框的定位识别精度,进而提高了对复杂场景中多种尺度、分辨率和类型的车辆进行快速定位与识别的精准度。
请参阅图6,本申请实施例中交通卡口车辆类型的识别装置的另一个实施例包括:
第一获取模块501,用于获取原始交通卡口车辆图像,将原始交通卡口车辆图像的图像尺寸转换为预设尺寸,得到目标交通卡口车辆图像;
特征提取模型502,用于通过预置的有效网络算法对目标交通卡口车辆图像进行车辆特征提取,得到车辆特征信息;
处理模块503,用于对车辆特征信息进行向量卷积运算处理、批归一化处理、激活函数处理和拼接处理,得到多个不同尺度的目标车辆特征图;
第一预测模块504,用于通过预置的目标锚框和匹配算法Giou对多个不同尺度的目标车辆特征图中车辆的定位框进行预测分析,得到目标车辆定位框以及目标车辆定位框的初始坐标;
第二预测模块505,用于根据车辆特征信息对目标车辆定位框内车辆的类型进行预测,得到预测车辆类型;
映射模块506,用于将初始坐标映射到原始交通卡口车辆图像上,得到目标坐标,并确定目标坐标对应的边界框内包含的目标车辆,将预测车辆类型确定为目标车辆对应的目标车辆类型;
第二获取模块507,用于获取原始交通卡口车辆图像上预置标签内容中的真实车辆和真实车辆的真实车辆类型,以及获取真实车辆在原始交通卡口车辆图像上预置标注框的真实坐标和真实尺寸,并获取目标车辆定位框的目标尺寸;
第二计算模块508,用于计算真实车辆与目标车辆之间的第一误差、真实车辆类型与目标车辆类型之间的第二误差、真实坐标与目标坐标之间的第三误差,以及目标尺寸与真实尺寸之间的第四误差,以及通过匹配算法Giou计算目标锚框与目标车辆定位框之间的匹配度;
生成模块509,用于根据第一误差、第二误差、第三误差、第四误差和匹配度生成目标损失函数,目标损失函数用于对原始交通卡口车辆图像中目标车辆类型的识别进行优化。
可选的,处理模块503包括:第一处理单元5031,用于对车辆特征信息进行第一数据处理,得到第一特征信息,并对第一特征信息进行第二数据处理,得到第一尺度车辆特征图,第一数据处理包括多层向量卷积运算处理、批归一化处理和激活函数处理,第二数据处理包括一层向量卷积运算处理、批归一化处理和激活函数处理;第二处理单元5032,用于对第一特征信息和车辆特征信息进行多次预设数据处理,得到多个不同尺度的候选车辆特征图,预设数据处理包括第一数据处理、上采样处理、拼接处理和第二数据处理;确定单元5033,用于将第一尺度车辆特征图和多个不同尺度的候选车辆特征图确定为多个不同尺度的目标车辆特征图,多个不同尺度的目标车辆特征图中尺度的种类数量大于3。
可选的,第二处理单元5032还可以具体用于:对第一特征信息进行第一数据处理和上采样处理,得到第二特征信息;获取第二特征信息的目标特征维度,并通过预置的卷积网络从车辆特征信息中获取与目标特征维度对应的车辆特征信息;将第二特征信息和与目标特征维度对应的车辆特征信息进行拼接处理,得到第三特征信息;对第三特征信息进行第一数据处理,得到第四特征信息,并对第四特征信息进行第二数据处理和一层向量卷积运 算处理,得到第二尺度车辆特征图;对车辆特征信息和第四特征信息进行多次的第一数据处理、上采样处理、拼接处理和第二数据处理,得到多个不同尺度的原始车辆特征图;将第二尺寸车辆特征图和多个不同尺度的原始车辆特征图确定为多个不同尺度的候选车辆特征图。
可选的,交通卡口车辆类型的识别装置,还包括:第一计算模块510,用于生成多个不同尺度的目标车辆特征图中每个目标车辆特征图的目标车辆边界框,通过预置的匹配算法Giou计算每两个目标车辆边界框之间的交并比差值;聚类模块511,用于通过预置的聚类算法和交并比差值对目标车辆边界框的尺寸类型进行聚类,得到预置的目标锚框。
可选的,第一预测模块504还可以具体用于:通过预置的目标锚框和预置参数对多个不同尺度的目标车辆特征图进行车辆定位框的类别预测和偏移量预测,得到初始车辆定位框,预置参数包括预测类型参数、预测偏移量参数和真实标注参数;通过匹配算法Giou计算初始车辆定位框和目标锚框之间的度量值,将度量值最大的初始车辆定位框确定为目标车辆定位框;获取与目标车辆定位框对应的预置特征网格单元,并读取预置特征网格单元的坐标,得到目标车辆定位框的初始坐标。
可选的,第一获取模块501还可以具体用于:
获取原始交通卡口车辆图像,对原始交通卡口车辆图像进行数据预处理,得到预处理交通卡口车辆图像,数据预处理包括数据清理处理、数据集成处理、数据变换处理、数据规约处理和图像增强处理;对预处理交通卡口车辆图像进行边缘检测,得到候选交通卡口车辆图像;将候选交通卡口车辆图像的图像尺寸转换为预设尺寸,得到目标交通卡口车辆图像。
上述交通卡口车辆类型的识别装置中各模块和各单元的功能实现与上述交通卡口车辆类型的识别方法实施例中各步骤相对应,其功能和实现过程在此处不再一一赘述。
本申请实施例中,在增强车辆特征信息的有效性,提高对目标车辆类型检测的召回率,提高对原始交通卡口车辆图像中的目标车辆定位框的定位识别精度,进而提高了对复杂场景中多种尺度、分辨率和类型的车辆进行快速定位与识别的精准度的基础上,通过对原始交通卡口车辆图像中目标车辆类型的识别进行迭代优化,提高对原始交通卡口车辆图像中目标车辆类型的识别的精确度,进而提高了对复杂场景中多种尺度、分辨率和类型的车辆进行快速定位与识别的精准度。
上面图5和图6从模块化功能实体的角度对本申请实施例中的交通卡口车辆类型的识别装置进行详细描述,下面从硬件处理的角度对本申请实施例中交通卡口车辆类型的识别设备进行详细描述。
图7是本申请实施例提供的一种交通卡口车辆类型的识别设备的结构示意图,该交通卡口车辆类型的识别设备700可因配置或性能不同而产生比较大的差异,可以包括一个或一个以上处理器(central processing units,CPU)710(例如,一个或一个以上处理器)和存储器720,一个或一个以上存储应用程序733或数据732的存储介质730(例如一个或一个以上海量存储设备)。其中,存储器720和存储介质730可以是短暂存储或持久存储。存储在存储介质730的程序可以包括一个或一个以上模块(图示没标出),每个模块可以包括对交通卡口车辆类型的识别设备700中的一系列指令操作。更进一步地,处理器710可以设置为与存储介质730通信,在交通卡口车辆类型的识别设备700上执行存储介质730中的一系列指令操作。
交通卡口车辆类型的识别设备700还可以包括一个或一个以上电源740,一个或一个以上有线或无线网络接口750,一个或一个以上输入输出接口760,和/或,一个或一个以上操作***731,例如Windows Serve,Mac OS X,Unix,Linux,FreeBSD等等。本领域 技术人员可以理解,图7示出的交通卡口车辆类型的识别设备结构并不构成对交通卡口车辆类型的识别设备的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。
本申请还提供一种交通卡口车辆类型的识别设备,包括:存储器和至少一个处理器,所述存储器中存储有指令,所述存储器和所述至少一个处理器通过线路互连;所述至少一个处理器调用所述存储器中的所述指令,以使得所述智能化路径规划设备执行上述交通卡口车辆类型的识别方法中的步骤。
本申请还提供一种计算机可读存储介质,该计算机可读存储介质可以为非易失性计算机可读存储介质,也可以为易失性计算机可读存储介质。计算机可读存储介质存储有计算机指令,当所述计算机指令在计算机上运行时,使得计算机执行如下步骤:
获取原始交通卡口车辆图像,将所述原始交通卡口车辆图像的图像尺寸转换为预设尺寸,得到目标交通卡口车辆图像;
通过预置的有效网络算法对所述目标交通卡口车辆图像进行车辆特征提取,得到车辆特征信息;
对所述车辆特征信息进行向量卷积运算处理、批归一化处理、激活函数处理和拼接处理,得到多个不同尺度的目标车辆特征图;
通过预置的目标锚框和匹配算法Giou对所述多个不同尺度的目标车辆特征图中车辆的定位框进行预测分析,得到目标车辆定位框以及所述目标车辆定位框的初始坐标;
根据所述车辆特征信息对所述目标车辆定位框内车辆的类型进行预测,得到预测车辆类型;
将所述初始坐标映射到所述原始交通卡口车辆图像上,得到目标坐标,并确定所述目标坐标对应的边界框内包含的目标车辆,将所述预测车辆类型确定为所述目标车辆对应的目标车辆类型。
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的***,装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(read-only memory,ROM)、随机存取存储器(random access memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。
以上所述,以上实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的精神和范围。

Claims (20)

  1. 一种交通卡口车辆类型的识别方法,其中,包括:
    获取原始交通卡口车辆图像,将所述原始交通卡口车辆图像的图像尺寸转换为预设尺寸,得到目标交通卡口车辆图像;
    通过预置的有效网络算法对所述目标交通卡口车辆图像进行车辆特征提取,得到车辆特征信息;
    对所述车辆特征信息进行向量卷积运算处理、批归一化处理、激活函数处理和拼接处理,得到多个不同尺度的目标车辆特征图;
    通过预置的目标锚框和匹配算法Giou对所述多个不同尺度的目标车辆特征图中车辆的定位框进行预测分析,得到目标车辆定位框以及所述目标车辆定位框的初始坐标;
    根据所述车辆特征信息对所述目标车辆定位框内车辆的类型进行预测,得到预测车辆类型;
    将所述初始坐标映射到所述原始交通卡口车辆图像上,得到目标坐标,并确定所述目标坐标对应的边界框内包含的目标车辆,将所述预测车辆类型确定为所述目标车辆对应的目标车辆类型。
  2. 根据权利要求1所述的交通卡口车辆类型的识别方法,其中,所述对所述车辆特征信息进行向量卷积运算处理、批归一化处理、激活函数处理和拼接处理,得到多个不同尺度的目标车辆特征图,包括:
    对所述车辆特征信息进行第一数据处理,得到第一特征信息,并对所述第一特征信息进行第二数据处理,得到第一尺度车辆特征图,所述第一数据处理包括多层向量卷积运算处理、批归一化处理和激活函数处理,所述第二数据处理包括一层向量卷积运算处理、批归一化处理和激活函数处理;
    对所述第一特征信息和所述车辆特征信息进行多次预设数据处理,得到多个不同尺度的候选车辆特征图,所述预设数据处理包括所述第一数据处理、上采样处理、拼接处理和所述第二数据处理;
    将所述第一尺度车辆特征图和所述多个不同尺度的候选车辆特征图确定为多个不同尺度的目标车辆特征图,所述多个不同尺度的目标车辆特征图中尺度的种类数量大于3。
  3. 根据权利要求2所述的交通卡口车辆类型的识别方法,其中,所述对所述第一特征信息和所述车辆特征信息进行多次预设数据处理,得到多个不同尺度的候选车辆特征图,包括:
    对所述第一特征信息进行所述第一数据处理和上采样处理,得到第二特征信息;
    获取所述第二特征信息的目标特征维度,并通过预置的卷积网络从所述车辆特征信息中获取与所述目标特征维度对应的车辆特征信息;
    将所述第二特征信息和与所述目标特征维度对应的车辆特征信息进行拼接处理,得到第三特征信息;
    对所述第三特征信息进行所述第一数据处理,得到第四特征信息,并对所述第四特征信息进行所述第二数据处理和一层向量卷积运算处理,得到第二尺度车辆特征图;
    对所述车辆特征信息和所述第四特征信息进行多次的所述第一数据处理、上采样处理、拼接处理和所述第二数据处理,得到多个不同尺度的原始车辆特征图;
    将所述第二尺度车辆特征图和所述多个不同尺度的原始车辆特征图确定为多个不同尺度的候选车辆特征图。
  4. 根据权利要求1所述的交通卡口车辆类型的识别方法,其中,所述通过预置的目标锚框和匹配算法Giou对所述多个不同尺度的目标车辆特征图中车辆的定位框进行预测分 析之前,还包括:
    生成所述多个不同尺度的目标车辆特征图中每个目标车辆特征图的目标车辆边界框,通过预置的匹配算法Giou计算每两个目标车辆边界框之间的交并比差值;
    通过预置的聚类算法和所述交并比差值对所述目标车辆边界框的尺寸类型进行聚类,得到预置的目标锚框。
  5. 根据权利要求4所述的交通卡口车辆类型的识别方法,其中,所述通过预置的目标锚框和匹配算法Giou对所述多个不同尺度的目标车辆特征图中车辆的定位框进行预测分析,得到目标车辆定位框以及所述目标车辆定位框的初始坐标,包括:
    通过预置的目标锚框和预置参数对所述多个不同尺度的目标车辆特征图进行车辆定位框的类别预测和偏移量预测,得到初始车辆定位框,所述预置参数包括预测类型参数、预测偏移量参数和真实标注参数;
    通过所述匹配算法Giou计算所述初始车辆定位框和所述目标锚框之间的度量值,将所述度量值最大的初始车辆定位框确定为目标车辆定位框;
    获取与所述目标车辆定位框对应的预置特征网格单元,并读取所述预置特征网格单元的坐标,得到目标车辆定位框的初始坐标。
  6. 根据权利要求1-5中任意一项所述的交通卡口车辆类型的识别方法,其中,所述将所述预测车辆类型确定为所述目标车辆对应的目标车辆类型之后,还包括:
    获取所述原始交通卡口车辆图像上预置标签内容中的真实车辆和所述真实车辆的真实车辆类型,以及获取所述真实车辆在所述原始交通卡口车辆图像上预置标注框的真实坐标和真实尺寸,并获取所述目标车辆定位框的目标尺寸;
    计算所述真实车辆与所述目标车辆之间的第一误差、所述真实车辆类型与所述目标车辆类型之间的第二误差、所述真实坐标与所述目标坐标之间的第三误差,以及所述目标尺寸与所述真实尺寸之间的第四误差,以及通过所述匹配算法Giou计算所述目标锚框与所述目标车辆定位框之间的匹配度;
    根据所述第一误差、所述第二误差、所述第三误差、所述第四误差和所述匹配度生成目标损失函数,所述目标损失函数用于对所述原始交通卡口车辆图像中目标车辆类型的识别进行优化。
  7. 根据权利要求1所述的交通卡口车辆类型的识别方法,其中,所述获取原始交通卡口车辆图像,将所述原始交通卡口车辆图像的图像尺寸转换为预设尺寸,得到目标交通卡口车辆图像,包括:
    获取原始交通卡口车辆图像,对所述原始交通卡口车辆图像进行数据预处理,得到预处理交通卡口车辆图像,所述数据预处理包括数据清理处理、数据集成处理、数据变换处理、数据规约处理和图像增强处理;
    对所述预处理交通卡口车辆图像进行边缘检测,得到候选交通卡口车辆图像;
    将所述候选交通卡口车辆图像的图像尺寸转换为预设尺寸,得到目标交通卡口车辆图像。
  8. 一种交通卡口车辆类型的识别设备,包括存储器、处理器及存储在所述存储器上并可在所述处理器上运行的计算机可读指令,所述处理器执行所述计算机可读指令时实现如下步骤:
    获取原始交通卡口车辆图像,将所述原始交通卡口车辆图像的图像尺寸转换为预设尺寸,得到目标交通卡口车辆图像;
    通过预置的有效网络算法对所述目标交通卡口车辆图像进行车辆特征提取,得到车辆特征信息;
    对所述车辆特征信息进行向量卷积运算处理、批归一化处理、激活函数处理和拼接处理,得到多个不同尺度的目标车辆特征图;
    通过预置的目标锚框和匹配算法Giou对所述多个不同尺度的目标车辆特征图中车辆的定位框进行预测分析,得到目标车辆定位框以及所述目标车辆定位框的初始坐标;
    根据所述车辆特征信息对所述目标车辆定位框内车辆的类型进行预测,得到预测车辆类型;
    将所述初始坐标映射到所述原始交通卡口车辆图像上,得到目标坐标,并确定所述目标坐标对应的边界框内包含的目标车辆,将所述预测车辆类型确定为所述目标车辆对应的目标车辆类型。
  9. 根据权利要求8所述的交通卡口车辆类型的识别设备,所述处理器执行所述计算机程序时还实现以下步骤:
    对所述车辆特征信息进行第一数据处理,得到第一特征信息,并对所述第一特征信息进行第二数据处理,得到第一尺度车辆特征图,所述第一数据处理包括多层向量卷积运算处理、批归一化处理和激活函数处理,所述第二数据处理包括一层向量卷积运算处理、批归一化处理和激活函数处理;
    对所述第一特征信息和所述车辆特征信息进行多次预设数据处理,得到多个不同尺度的候选车辆特征图,所述预设数据处理包括所述第一数据处理、上采样处理、拼接处理和所述第二数据处理;
    将所述第一尺度车辆特征图和所述多个不同尺度的候选车辆特征图确定为多个不同尺度的目标车辆特征图,所述多个不同尺度的目标车辆特征图中尺度的种类数量大于3。
  10. 根据权利要求9所述的交通卡口车辆类型的识别设备,所述处理器执行所述计算机程序时还实现以下步骤:
    对所述第一特征信息进行所述第一数据处理和上采样处理,得到第二特征信息;
    获取所述第二特征信息的目标特征维度,并通过预置的卷积网络从所述车辆特征信息中获取与所述目标特征维度对应的车辆特征信息;
    将所述第二特征信息和与所述目标特征维度对应的车辆特征信息进行拼接处理,得到第三特征信息;
    对所述第三特征信息进行所述第一数据处理,得到第四特征信息,并对所述第四特征信息进行所述第二数据处理和一层向量卷积运算处理,得到第二尺度车辆特征图;
    对所述车辆特征信息和所述第四特征信息进行多次的所述第一数据处理、上采样处理、拼接处理和所述第二数据处理,得到多个不同尺度的原始车辆特征图;
    将所述第二尺度车辆特征图和所述多个不同尺度的原始车辆特征图确定为多个不同尺度的候选车辆特征图。
  11. 根据权利要求8所述的交通卡口车辆类型的识别设备,所述处理器执行所述计算机程序时还实现以下步骤:
    生成所述多个不同尺度的目标车辆特征图中每个目标车辆特征图的目标车辆边界框,通过预置的匹配算法Giou计算每两个目标车辆边界框之间的交并比差值;
    通过预置的聚类算法和所述交并比差值对所述目标车辆边界框的尺寸类型进行聚类,得到预置的目标锚框。
  12. 根据权利要求11所述的交通卡口车辆类型的识别设备,所述处理器执行所述计算机程序时还实现以下步骤:
    通过预置的目标锚框和预置参数对所述多个不同尺度的目标车辆特征图进行车辆定位框的类别预测和偏移量预测,得到初始车辆定位框,所述预置参数包括预测类型参数、预 测偏移量参数和真实标注参数;
    通过所述匹配算法Giou计算所述初始车辆定位框和所述目标锚框之间的度量值,将所述度量值最大的初始车辆定位框确定为目标车辆定位框;
    获取与所述目标车辆定位框对应的预置特征网格单元,并读取所述预置特征网格单元的坐标,得到目标车辆定位框的初始坐标。
  13. 根据权利要求8-12中任意一项所述的交通卡口车辆类型的识别设备,所述处理器执行所述计算机程序时还实现以下步骤:
    获取所述原始交通卡口车辆图像上预置标签内容中的真实车辆和所述真实车辆的真实车辆类型,以及获取所述真实车辆在所述原始交通卡口车辆图像上预置标注框的真实坐标和真实尺寸,并获取所述目标车辆定位框的目标尺寸;
    计算所述真实车辆与所述目标车辆之间的第一误差、所述真实车辆类型与所述目标车辆类型之间的第二误差、所述真实坐标与所述目标坐标之间的第三误差,以及所述目标尺寸与所述真实尺寸之间的第四误差,以及通过所述匹配算法Giou计算所述目标锚框与所述目标车辆定位框之间的匹配度;
    根据所述第一误差、所述第二误差、所述第三误差、所述第四误差和所述匹配度生成目标损失函数,所述目标损失函数用于对所述原始交通卡口车辆图像中目标车辆类型的识别进行优化。
  14. 根据权利要求8所述的交通卡口车辆类型的识别设备,所述处理器执行所述计算机程序时还实现以下步骤:
    获取原始交通卡口车辆图像,对所述原始交通卡口车辆图像进行数据预处理,得到预处理交通卡口车辆图像,所述数据预处理包括数据清理处理、数据集成处理、数据变换处理、数据规约处理和图像增强处理;
    对所述预处理交通卡口车辆图像进行边缘检测,得到候选交通卡口车辆图像;
    将所述候选交通卡口车辆图像的图像尺寸转换为预设尺寸,得到目标交通卡口车辆图像。
  15. 一种计算机可读存储介质,所述计算机可读存储介质中存储计算机指令,当所述计算机指令在计算机上运行时,使得计算机执行如下步骤:
    获取原始交通卡口车辆图像,将所述原始交通卡口车辆图像的图像尺寸转换为预设尺寸,得到目标交通卡口车辆图像;
    通过预置的有效网络算法对所述目标交通卡口车辆图像进行车辆特征提取,得到车辆特征信息;
    对所述车辆特征信息进行向量卷积运算处理、批归一化处理、激活函数处理和拼接处理,得到多个不同尺度的目标车辆特征图;
    通过预置的目标锚框和匹配算法Giou对所述多个不同尺度的目标车辆特征图中车辆的定位框进行预测分析,得到目标车辆定位框以及所述目标车辆定位框的初始坐标;
    根据所述车辆特征信息对所述目标车辆定位框内车辆的类型进行预测,得到预测车辆类型;
    将所述初始坐标映射到所述原始交通卡口车辆图像上,得到目标坐标,并确定所述目标坐标对应的边界框内包含的目标车辆,将所述预测车辆类型确定为所述目标车辆对应的目标车辆类型。
  16. 根据权利要求15所述的计算机可读存储介质,当所述计算机指令在计算机上运行时,使得计算机还执行以下步骤:
    对所述车辆特征信息进行第一数据处理,得到第一特征信息,并对所述第一特征信息 进行第二数据处理,得到第一尺度车辆特征图,所述第一数据处理包括多层向量卷积运算处理、批归一化处理和激活函数处理,所述第二数据处理包括一层向量卷积运算处理、批归一化处理和激活函数处理;
    对所述第一特征信息和所述车辆特征信息进行多次预设数据处理,得到多个不同尺度的候选车辆特征图,所述预设数据处理包括所述第一数据处理、上采样处理、拼接处理和所述第二数据处理;
    将所述第一尺度车辆特征图和所述多个不同尺度的候选车辆特征图确定为多个不同尺度的目标车辆特征图,所述多个不同尺度的目标车辆特征图中尺度的种类数量大于3。
  17. 根据权利要求16所述的计算机可读存储介质,当所述计算机指令在计算机上运行时,使得计算机还执行以下步骤:
    对所述第一特征信息进行所述第一数据处理和上采样处理,得到第二特征信息;
    获取所述第二特征信息的目标特征维度,并通过预置的卷积网络从所述车辆特征信息中获取与所述目标特征维度对应的车辆特征信息;
    将所述第二特征信息和与所述目标特征维度对应的车辆特征信息进行拼接处理,得到第三特征信息;
    对所述第三特征信息进行所述第一数据处理,得到第四特征信息,并对所述第四特征信息进行所述第二数据处理和一层向量卷积运算处理,得到第二尺度车辆特征图;
    对所述车辆特征信息和所述第四特征信息进行多次的所述第一数据处理、上采样处理、拼接处理和所述第二数据处理,得到多个不同尺度的原始车辆特征图;
    将所述第二尺度车辆特征图和所述多个不同尺度的原始车辆特征图确定为多个不同尺度的候选车辆特征图。
  18. 根据权利要求15所述的计算机可读存储介质,当所述计算机指令在计算机上运行时,使得计算机还执行以下步骤:
    生成所述多个不同尺度的目标车辆特征图中每个目标车辆特征图的目标车辆边界框,通过预置的匹配算法Giou计算每两个目标车辆边界框之间的交并比差值;
    通过预置的聚类算法和所述交并比差值对所述目标车辆边界框的尺寸类型进行聚类,得到预置的目标锚框。
  19. 根据权利要求18所述的计算机可读存储介质,当所述计算机指令在计算机上运行时,使得计算机还执行以下步骤:
    通过预置的目标锚框和预置参数对所述多个不同尺度的目标车辆特征图进行车辆定位框的类别预测和偏移量预测,得到初始车辆定位框,所述预置参数包括预测类型参数、预测偏移量参数和真实标注参数;
    通过所述匹配算法Giou计算所述初始车辆定位框和所述目标锚框之间的度量值,将所述度量值最大的初始车辆定位框确定为目标车辆定位框;
    获取与所述目标车辆定位框对应的预置特征网格单元,并读取所述预置特征网格单元的坐标,得到目标车辆定位框的初始坐标。
  20. 一种交通卡口车辆类型的识别装置,其中,所述交通卡口车辆类型的识别包括:
    第一获取模块,用于获取原始交通卡口车辆图像,将所述原始交通卡口车辆图像的图像尺寸转换为预设尺寸,得到目标交通卡口车辆图像;
    特征提取模型,用于通过预置的有效网络算法对所述目标交通卡口车辆图像进行车辆 特征提取,得到车辆特征信息;
    处理模块,用于对所述车辆特征信息进行向量卷积运算处理、批归一化处理、激活函数处理和拼接处理,得到多个不同尺度的目标车辆特征图;
    第一预测模块,用于通过预置的目标锚框和匹配算法Giou对所述多个不同尺度的目标车辆特征图中车辆的定位框进行预测分析,得到目标车辆定位框以及所述目标车辆定位框的初始坐标;
    第二预测模块,用于根据所述车辆特征信息对所述目标车辆定位框内车辆的类型进行预测,得到预测车辆类型;
    映射模块,用于将所述初始坐标映射到所述原始交通卡口车辆图像上,得到目标坐标,并确定所述目标坐标对应的边界框内包含的目标车辆,将所述预测车辆类型确定为所述目标车辆对应的目标车辆类型。
PCT/CN2020/104804 2020-04-29 2020-07-27 交通卡口车辆类型的识别方法、装置、设备及存储介质 WO2021217924A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010358054.0A CN111680556B (zh) 2020-04-29 2020-04-29 交通卡口车辆类型的识别方法、装置、设备及存储介质
CN202010358054.0 2020-04-29

Publications (1)

Publication Number Publication Date
WO2021217924A1 true WO2021217924A1 (zh) 2021-11-04

Family

ID=72452590

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/104804 WO2021217924A1 (zh) 2020-04-29 2020-07-27 交通卡口车辆类型的识别方法、装置、设备及存储介质

Country Status (2)

Country Link
CN (1) CN111680556B (zh)
WO (1) WO2021217924A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115190277A (zh) * 2022-09-08 2022-10-14 中达安股份有限公司 施工区域的安全监控方法、装置、设备及存储介质
CN117392857A (zh) * 2023-10-13 2024-01-12 深圳市平安顺科技有限公司 一种基于蓝牙网络的货车车型识别***及识别方法

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112132033B (zh) * 2020-09-23 2023-10-10 平安国际智慧城市科技股份有限公司 车型识别方法、装置、电子设备及存储介质
CN112329772B (zh) * 2020-11-06 2024-03-05 浙江大搜车软件技术有限公司 车辆部件识别方法、装置、电子装置和存储介质
CN112580665B (zh) * 2020-12-18 2024-04-19 深圳赛安特技术服务有限公司 车款识别方法、装置、电子设备及存储介质
CN112800906B (zh) * 2021-01-19 2022-08-30 吉林大学 一种基于改进YOLOv3的自动驾驶汽车跨域目标检测方法
CN112966639B (zh) * 2021-03-22 2024-04-26 新疆爱华盈通信息技术有限公司 车辆检测方法、装置、电子设备及存储介质
CN113723408B (zh) * 2021-11-02 2022-02-25 上海仙工智能科技有限公司 一种车牌识别方法及其***、可读存储介质

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110044543A1 (en) * 2007-05-31 2011-02-24 Aisin Aw Co., Ltd. Feature extraction method, and image recognition method and feature database creation method using the same
CN104239898A (zh) * 2014-09-05 2014-12-24 浙江捷尚视觉科技股份有限公司 一种快速卡口车辆比对和车型识别方法
CN104699726A (zh) * 2013-12-18 2015-06-10 杭州海康威视数字技术股份有限公司 一种应用于交通卡口的车辆图像检索方法和装置
CN105354533A (zh) * 2015-09-28 2016-02-24 江南大学 一种基于词袋模型的卡口无牌车辆车型识别方法
CN106777350A (zh) * 2017-01-16 2017-05-31 青岛海信网络科技股份有限公司 一种基于卡口数据的以图搜图方法和装置
CN110517349A (zh) * 2019-07-26 2019-11-29 电子科技大学 一种基于单目视觉和几何约束的3d车辆目标检测方法

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109784476B (zh) * 2019-01-12 2022-08-16 福州大学 一种改进dsod网络的方法
CN109935080B (zh) * 2019-04-10 2021-07-16 武汉大学 一种交通线路上的车流量实时计算的监测***及方法
CN110647852A (zh) * 2019-09-27 2020-01-03 集美大学 一种车流量统计方法、终端设备及存储介质

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110044543A1 (en) * 2007-05-31 2011-02-24 Aisin Aw Co., Ltd. Feature extraction method, and image recognition method and feature database creation method using the same
CN104699726A (zh) * 2013-12-18 2015-06-10 杭州海康威视数字技术股份有限公司 一种应用于交通卡口的车辆图像检索方法和装置
CN104239898A (zh) * 2014-09-05 2014-12-24 浙江捷尚视觉科技股份有限公司 一种快速卡口车辆比对和车型识别方法
CN105354533A (zh) * 2015-09-28 2016-02-24 江南大学 一种基于词袋模型的卡口无牌车辆车型识别方法
CN106777350A (zh) * 2017-01-16 2017-05-31 青岛海信网络科技股份有限公司 一种基于卡口数据的以图搜图方法和装置
CN110517349A (zh) * 2019-07-26 2019-11-29 电子科技大学 一种基于单目视觉和几何约束的3d车辆目标检测方法

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115190277A (zh) * 2022-09-08 2022-10-14 中达安股份有限公司 施工区域的安全监控方法、装置、设备及存储介质
CN117392857A (zh) * 2023-10-13 2024-01-12 深圳市平安顺科技有限公司 一种基于蓝牙网络的货车车型识别***及识别方法

Also Published As

Publication number Publication date
CN111680556B (zh) 2024-06-07
CN111680556A (zh) 2020-09-18

Similar Documents

Publication Publication Date Title
WO2021217924A1 (zh) 交通卡口车辆类型的识别方法、装置、设备及存储介质
CN111523414B (zh) 人脸识别方法、装置、计算机设备和存储介质
CN111080693A (zh) 一种基于YOLOv3的机器人自主分类抓取方法
US20180260793A1 (en) Automatic assessment of damage and repair costs in vehicles
WO2019001481A1 (zh) 车辆外观特征识别及车辆检索方法、装置、存储介质、电子设备
US20100080469A1 (en) Novel descriptor for image corresponding point matching
CN109711416B (zh) 目标识别方法、装置、计算机设备和存储介质
US8406535B2 (en) Invariant visual scene and object recognition
CN113361495A (zh) 人脸图像相似度的计算方法、装置、设备及存储介质
CN112016638A (zh) 一种钢筋簇的识别方法、装置、设备及存储介质
CN113761999A (zh) 一种目标检测方法、装置、电子设备和存储介质
Huang et al. A coarse-to-fine algorithm for registration in 3D street-view cross-source point clouds
Farag A lightweight vehicle detection and tracking technique for advanced driving assistance systems
CN113420640A (zh) 红树林高光谱图像分类方法、装置、电子设备及存储介质
CN113793370A (zh) 三维点云配准方法、装置、电子设备及可读介质
CN109982088B (zh) 图像处理方法及装置
CN110909656B (zh) 一种雷达与摄像机融合的行人检测方法和***
CN115457492A (zh) 目标检测方法、装置、计算机设备及存储介质
CN113239227A (zh) 图像数据结构化方法、装置、电子设备及计算机可读介质
CN111709269B (zh) 一种深度图像中基于二维关节信息的人手分割方法和装置
CN111709377B (zh) 特征提取方法、目标重识别方法、装置及电子设备
Shi et al. Anchor free remote sensing detector based on solving discrete polar coordinate equation
CN116758419A (zh) 针对遥感图像的多尺度目标检测方法、装置和设备
Barba-Guaman et al. Object detection in rural roads using Tensorflow API
Wang et al. Cascading classifier with discriminative multi-features for a specific 3D object real-time detection

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20932997

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 22.02.2023)

122 Ep: pct application non-entry in european phase

Ref document number: 20932997

Country of ref document: EP

Kind code of ref document: A1