Disclosure of Invention
The invention provides a parking space number identification method and device, electronic equipment and a storage medium, which are used for solving or partially solving the technical problem that the identification of the parking space number in the prior art is easy to cause character identification errors, so that the identification of the parking space number is wrong.
The invention provides a parking space number identification method, which is applied to a vehicle-mounted terminal, wherein the vehicle-mounted terminal is communicated with an image acquisition device arranged on a vehicle; the method comprises the following steps:
receiving a parking space number image acquired by the image acquisition device;
inputting the parking space number image into a preset deep learning network to obtain an output feature set; the output feature set comprises background channel output features;
extracting a point list in the background channel output features;
sequentially acquiring the position information of each pixel point in the point list;
determining the character category of each pixel point in the point list according to the position information and the output feature set;
and determining the parking space number according to the character type and the position information of each pixel point in the point list.
Optionally, the step of inputting the parking space number image into a preset deep learning network to obtain an output feature set includes:
determining the number N of character type channels of the parking space number image, and determining output dimension according to the number of the image channels;
inputting the parking space number image into a preset deep learning network to obtain an output feature set corresponding to the output dimension;
wherein the output dimensions include N character category channels and 1 background channel.
Optionally, the step of extracting a point list in the background channel output feature includes:
and extracting a point list from the output characteristics of the background channel by adopting a preset 8-neighborhood extreme value method.
Optionally, the step of determining the character category of each pixel point in the point list according to the position information and the output feature set includes:
based on the position information, sequentially matching confidence degrees of all the pixel points output in all the character type channels in the output feature set;
and determining the character category corresponding to the character category channel with the maximum output confidence coefficient as the character category of the pixel point.
The invention also provides a parking space number identification device, which is applied to a vehicle-mounted terminal, wherein the vehicle-mounted terminal is communicated with an image acquisition device arranged on a vehicle; the device comprises:
the parking space number image receiving module is used for receiving the parking space number image acquired by the image acquisition device;
the output characteristic set generating module is used for inputting the parking space number image into a preset deep learning network to obtain an output characteristic set; the output feature set comprises background channel output features;
the point list extraction module is used for extracting a point list from the background channel output characteristics;
the position information acquisition module is used for sequentially acquiring the position information of each pixel point in the point list;
the character type determining module is used for determining the character type of each pixel point in the point list according to the position information and the output characteristic set;
and the parking space number determining module is used for determining the parking space number according to the character type and the position information of each pixel point in the point list.
Optionally, the output feature set generating module includes:
the output dimension determining submodule is used for determining the number N of the character type channels of the parking space number image and determining the output dimension according to the number of the image channels;
the output characteristic set generation submodule is used for inputting the parking space number image into a preset deep learning network to obtain an output characteristic set corresponding to the output dimension;
wherein the output dimensions include N character category channels and 1 background channel.
Optionally, the point list extracting module includes:
and the point list extraction submodule is used for extracting a point list from the output characteristics of the background channel by adopting a preset 8-neighborhood extreme value method.
Optionally, the character category determining module includes:
the confidence coefficient matching submodule is used for sequentially matching the confidence coefficient output by each pixel point in each character type channel in the output feature set based on the position information;
and the character type determining submodule is used for determining the character type corresponding to the character type channel with the maximum output confidence coefficient as the character type of the pixel point.
The invention also provides an electronic device comprising a processor and a memory:
the memory is used for storing program codes and transmitting the program codes to the processor;
the processor is used for executing the parking space number identification method according to the instructions in the program codes.
The invention also provides a computer-readable storage medium for storing a program code for executing the parking space number identification method.
According to the technical scheme, the invention has the following advantages: the parking space number image acquired by the image acquisition device is received, the parking space number image is input into a preset deep learning network to obtain an output characteristic set, pixel points which may be parking space number characters are extracted according to the output characteristic of a background channel carried in the output characteristic set, and a point list is generated; the position information of each pixel point in the point list is obtained, so that the character category of each pixel point is determined according to the position information, and the identification of the parking space number is completed. The invention extracts the point list which may be the parking space number characters by analyzing the pixel points in the background channel, identifies the position information of each pixel point in the point list, and analyzes the character category of each pixel point in the point list by combining the output characteristic set, thereby determining the parking space number. The probability of error in the recognition of the parking space number characters is reduced, and the parking space recognition accuracy is improved.
Detailed Description
The embodiment of the invention provides a parking space number identification method and device, electronic equipment and a storage medium, which are used for solving or partially solving the technical problem that the identification of the parking space number in the prior art is easy to cause character identification errors, so that the identification of the parking space number is wrong.
In order to make the objects, features and advantages of the present invention more obvious and understandable, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is obvious that the embodiments described below are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 1, fig. 1 is a flowchart illustrating steps of a parking space number identification method according to an embodiment of the present invention.
The invention provides a parking space number identification method, which is applied to a vehicle-mounted terminal, wherein the vehicle-mounted terminal is communicated with an image acquisition device installed on a vehicle.
The vehicle-mounted terminal is a front-end device of a vehicle monitoring and management system, and can also be called a vehicle scheduling and monitoring terminal. The multifunctional automobile driving recorder integrates multiple functions of positioning, communication, automobile driving recorder and the like; has powerful service scheduling function and data processing capacity. The invention mainly applies the data processing capability of the vehicle-mounted terminal.
The image acquisition device is arranged on the vehicle body and used for acquiring the parking space number image, can be a camera, a scanner and other equipment, can be arranged on two sides of the vehicle body, can also be arranged on the vehicle roof and the like, and a person skilled in the art can select the type and the installation position of the image acquisition device according to needs.
The method may specifically comprise the steps of:
step 101, receiving a parking space number image acquired by an image acquisition device;
in the embodiment of the invention, when the vehicle runs to the parking area, the image information of the parking space in the parking area can be collected, and the image information contains the parking space number of the parking space.
It should be noted that the parking space number image may include information of one parking space number or information of a plurality of parking space numbers, and the number of parking spaces in the parking space number image is not specifically limited in the embodiment of the present invention.
Step 102, inputting the parking space number image into a preset deep learning network to obtain an output feature set; the output feature set comprises background channel output features;
in the embodiment of the invention, the parking space number image can be analyzed through the deep learning network to obtain the output feature set. Wherein, the deep learning network comprises a plurality of character category output channels and a background channel. Respectively for outputting character category features and point features.
Step 103, extracting a point list from the output characteristics of the background channel;
in the embodiment of the invention, the information of each pixel point collected from the parking space number image is recorded in the characteristic layer of the background channel, and according to the judgment of the position relation of the point characteristics, which pixel points are probably the pixel points corresponding to the parking space number characters can be roughly presumed. The pixel points possibly corresponding to the parking space number characters are extracted, and a point list representing parking space number character information can be obtained.
Step 104, sequentially acquiring position information of each pixel point in the point list;
after the point list is extracted from the characteristic layer of the background channel, the position information of each pixel point is sequentially extracted from the point list, and the method is used for further screening the pixel points which are possibly the parking space number characters according to the correlation among the position information of each pixel point.
105, determining the character type of each pixel point in the point list according to the position information and the output feature set;
according to the position information of the pixel points in the point list and the characteristic information output by the character type channel, the output result of each point in different character type channels can be determined, and then the character type of the point can be analyzed according to the output result.
And step 106, determining the parking space number according to the character type and the position information of each pixel point in the point list.
After the character type and the position information of each pixel point in the point list are determined, the character type of each pixel point can be arranged according to the position information, and a complete parking space number is obtained. The slot number may be used to guide the vehicle to park.
The parking space number image acquired by the image acquisition device is received, the parking space number image is input into a preset deep learning network to obtain an output characteristic set, pixel points which may be parking space number characters are extracted according to the output characteristic of a background channel carried in the output characteristic set, and a point list is generated; the position information of each pixel point in the point list is obtained, so that the character category of each pixel point is determined according to the position information, and the identification of the parking space number is completed. The invention extracts the point list which may be the parking space number characters by analyzing the pixel points in the background channel, identifies the position information of each pixel point in the point list, and analyzes the character category of each pixel point in the point list by combining the output characteristic set, thereby determining the parking space number. The probability of error in the recognition of the parking space number characters is reduced, and the parking space recognition accuracy is improved.
Referring to fig. 2, fig. 2 is a flowchart illustrating steps of a parking space number identification method according to another embodiment of the present invention. The method may specifically comprise the steps of:
step 201, receiving a parking space number image collected by an image collecting device;
step 201 is similar to step 101, and specific contents may refer to step 101, which is not described herein again.
Step 202, determining the number N of picture channels of the parking lot number image, and determining output dimensionality according to the number of the picture channels;
step 203, inputting the parking space number image into a preset deep learning network to obtain an output feature set corresponding to an output dimension; wherein, the output dimension comprises N character category channels and 1 background channel;
in the embodiment of the invention, the number of character type channels can be set for the deep learning network according to the constituent elements of the parking space number. The character category channel may be set to the confidence level of the output character. In one example, assuming that the parking space number is constructed in the form of a pure number, the number of channels of the character classification may be set to 10, for outputting confidence levels of characters 0-9, respectively. In another example, assuming that the number of the parking space is formed in the form of pure english letters, the number of the character category channels may be 26, each for outputting the confidence of a different letter; in addition, the number of the character type channels may be 52 in consideration of the case, and those skilled in the art can flexibly select the number and the type of the character type channels according to the actual constituent elements of the car position number.
It should be noted that the confidence of the output character of the character category channel is only a specific example of the embodiment of the present invention, and those skilled in the art may also select to output other data, for example, the occurrence probability of the character, and the present invention is not limited in this respect.
In one example, assuming that the size of the input parking space number image is (w, h, c), where w is the width of a picture, h is the height of the picture, c is the number of picture channels (RGB picture is 3), and the total number of recognizable character classes is N, the dimension of the feature Fout output by the deep learning network is (1, w/2, h/2, N +1), where N +1 channels include N channels representing character classes and 1 background channel
Step 204, extracting a point list from the output characteristics of the background channel;
in the embodiment of the invention, the information of each pixel point collected from the parking space number image is recorded in the characteristic layer of the background channel, and according to the judgment of the position relation of the point characteristics, which pixel points are probably the pixel points corresponding to the parking space number characters can be roughly presumed. The pixel points possibly corresponding to the parking space number characters are extracted, and a point list representing parking space number character information can be obtained.
In this embodiment of the present invention, the step of extracting the point list from the background channel output feature may be: and extracting a point list from the feature layer in the background channel by adopting a preset 8-neighborhood extreme value method.
The 8-neighborhood extremum method is to compare the gray values of each pixel point in the background channel with the gray values of 8 adjacent pixel points, and if the point is the maximum value or the minimum value, the point is considered as a target pixel point, all the target pixel points are extracted, and a point list can be obtained.
Step 205, sequentially obtaining position information of each pixel point in the point list;
after the point list is extracted from the characteristic layer of the background channel, the position information of each pixel point is sequentially extracted from the point list, and the method is used for further screening the pixel points which are possibly the parking space number characters according to the correlation among the position information of each pixel point.
In one example, after the position information of each pixel point is obtained, pixel points with similar distances can be found according to the position relation between the pixel points, one of the pixel points is reserved, and then the rest of the pixel points are removed; the reason is that the pixels with similar distances are likely to be the pixels of the same character.
Step 206, determining the character type of each pixel point in the point list according to the position information and the output feature set;
according to the position information of the pixel points in the point list and the characteristic information output by the character type channel, the output result of each point in different character type channels can be determined, and then the character type of the point can be analyzed according to the output result.
In this embodiment of the present invention, step 206 may specifically include:
based on the position information, sequentially matching the confidence coefficient of each pixel point output in each character type channel in the output feature set;
and determining the character category corresponding to the character category channel with the maximum output confidence coefficient as the character category of the pixel point.
Confidence, also called reliability, or confidence level, confidence coefficient, i.e. when a sample estimates an overall parameter, its conclusion is always uncertain due to the randomness of the sample. Therefore, a probabilistic statement method, i.e. interval estimation in mathematical statistics, is used, i.e. how large the corresponding probability of the estimated value and the overall parameter are within a certain allowable error range, and this corresponding probability is called confidence.
In the embodiment of the present invention, after the point list is obtained, the pixel points in the point list may be sequentially classified, and then according to the position information of the pixel points, the character category features in the output feature set are found, the dimension of which is N (here, each dimension represents a character channel, and the deep learning network outputs the confidence of the pixel point in each character category), and the character category corresponding to the character category channel with the maximum output confidence is determined as the character category of the pixel point.
And step 207, determining the parking space number according to the character type and the position information of each pixel point in the point list.
After the character type and the position information of each pixel point in the point list are determined, the character type of each pixel point can be arranged according to the position information, and a complete parking space number is obtained. The slot number may be used to guide the vehicle to park.
The parking space number image acquired by the image acquisition device is received, the parking space number image is input into a preset deep learning network to obtain an output characteristic set, pixel points which may be parking space number characters are extracted according to the output characteristic of a background channel carried in the output characteristic set, and a point list is generated; the position information of each pixel point in the point list is obtained, so that the character category of each pixel point is determined according to the position information, and the identification of the parking space number is completed. The invention extracts the point list which may be the parking space number characters by analyzing the pixel points in the background channel, identifies the position information of each pixel point in the point list, and analyzes the character category of each pixel point in the point list by combining the output characteristic set, thereby determining the parking space number. The probability of error in the recognition of the parking space number characters is reduced, and the parking space recognition accuracy is improved.
Referring to fig. 3, fig. 3 is a block diagram of a parking space number identification device according to an embodiment of the present invention.
The embodiment of the invention provides a parking space number identification device, which is applied to a vehicle-mounted terminal, wherein the vehicle-mounted terminal is communicated with an image acquisition device arranged on a vehicle; the device may specifically include:
the parking space numberimage receiving module 301 is used for receiving a parking space number image acquired by the image acquisition device;
the output feature set generatingmodule 302 is configured to input the parking space number image into a preset deep learning network to obtain an output feature set; the output feature set comprises background channel output features;
a pointlist extraction module 303, configured to extract a point list from the background channel output features;
a positioninformation obtaining module 304, configured to sequentially obtain position information of each pixel point in the point list;
a charactertype determining module 305, configured to determine a character type of each pixel point in the point list according to the position information and the output feature set;
the parking spacenumber determining module 306 is configured to determine a parking space number according to the character type and the position information of each pixel in the point list.
In this embodiment of the present invention, the output feature set generatingmodule 302 includes:
the output dimension determining submodule is used for determining the number N of the character type channels of the parking space number image and determining the output dimension according to the number of the image channels;
the output characteristic set generation sub-module is used for inputting the parking space number image into a preset deep learning network to obtain an output characteristic set corresponding to an output dimension;
wherein the output dimension includes N character category channels and 1 background channel.
In this embodiment of the present invention, the pointlist extracting module 303 includes:
and the point list extraction submodule is used for extracting a point list from the output characteristics of the background channel by adopting a preset 8-neighborhood extreme value method.
In an embodiment of the present invention, the charactercategory determining module 305 includes:
the confidence coefficient matching submodule is used for sequentially matching the confidence coefficient output by each pixel point in each character type channel in the output characteristic set based on the position information;
and the character type determining submodule is used for determining the character type corresponding to the character type channel with the maximum output confidence coefficient as the character type of the pixel point.
The invention also provides an electronic device comprising a processor and a memory:
the memory is used for storing the program codes and transmitting the program codes to the processor;
the processor is used for executing the parking space number identification method according to the instruction in the program code.
The invention also provides a computer readable storage medium for storing the program code, and the program code is used for executing the parking space number identification method of the embodiment of the invention.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
The embodiments in the present specification are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, apparatus, or computer program product. Accordingly, embodiments of the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, embodiments of the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
Embodiments of the present invention are described with reference to flowchart illustrations and/or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing terminal to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing terminal to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing terminal to cause a series of operational steps to be performed on the computer or other programmable terminal to produce a computer implemented process such that the instructions which execute on the computer or other programmable terminal provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present invention have been described, additional variations and modifications of these embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all such alterations and modifications as fall within the scope of the embodiments of the invention.
Finally, it should also be noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or terminal that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or terminal. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or terminal that comprises the element.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present invention, and not for limiting the same; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.