CN113449574A - Method and device for identifying content on target, storage medium and computer equipment - Google Patents

Method and device for identifying content on target, storage medium and computer equipment Download PDF

Info

Publication number
CN113449574A
CN113449574A CN202010628773.XA CN202010628773A CN113449574A CN 113449574 A CN113449574 A CN 113449574A CN 202010628773 A CN202010628773 A CN 202010628773A CN 113449574 A CN113449574 A CN 113449574A
Authority
CN
China
Prior art keywords
target
content
identified
neural network
identifying
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010628773.XA
Other languages
Chinese (zh)
Inventor
周斌
邱宝军
刘春雷
朱曦
张剑锋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai G2link Network Technology Co ltd
Original Assignee
Shanghai G2link Network Technology Co ltd
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 Shanghai G2link Network Technology Co ltd filed Critical Shanghai G2link Network Technology Co ltd
Publication of CN113449574A publication Critical patent/CN113449574A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting
    • 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

Landscapes

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

Abstract

A method and a device for identifying content on a target, a storage medium and a computer device are provided, wherein the method comprises the following steps: reading a target video stream, and detecting a target to be identified from the target video stream to obtain an image containing the target to be identified; identifying a target area where content is located from an image containing a target to be identified, wherein the target area is located on the target to be identified; and adjusting the gray level of the target area and identifying the content of the target area to obtain identification information. By the method, the accuracy of the identification result can be effectively improved when the content on the target is identified.

Description

Method and device for identifying content on target, storage medium and computer equipment
Technical Field
The invention relates to the technical field of image recognition, in particular to a method and a device for recognizing content on a target, a storage medium and computer equipment.
Background
With the development of intelligent identification technology, various scenes in life are usually subjected to target identification through big data training and shooting monitoring technology so as to realize the effects of monitoring and target control. In an example of object recognition, vehicle detection can be performed at a platform, a parking lot, a logistics park, and the like, and currently, in the detection of vehicles, a plurality of pairs of vehicles are photographed or videos are recorded by a monitoring camera, and a plurality of characteristics such as vehicle types, vehicle colors, and the like are recognized from the acquired photos or videos to perform vehicle recognition.
However, in the monitoring camera for object recognition in the prior art, basically, the whole screen is used as an exposure target, or a middle fixed area, for example, a central area, of the whole screen is used as an exposure target, and under the condition of a large light ratio encountered in actual operation, the whole screen is exposed reasonably, but an overexposure or an underexposure condition is likely to occur in an area where the target is located. Resulting in the inability of the content recognition algorithm to accurately recognize the content located on the target.
Disclosure of Invention
The invention solves the technical problem of how to improve the accuracy of content identification on a target.
In order to solve the above technical problem, an embodiment of the present invention provides a method for identifying content on a target, where the method includes: reading a target video stream, and detecting a target to be identified from the target video stream to obtain an image containing the target to be identified; identifying a target area where content is located from an image containing a target to be identified, wherein the target area is located on the target to be identified; and adjusting the gray level of the target area and identifying the content of the target area to obtain identification information.
Optionally, the detecting a target to be identified from the target video stream includes: inputting the target video stream into a trained first neural network model, and detecting the target to be recognized from the target video stream by using the first neural network model.
Optionally, the step of generating the first neural network model includes: obtaining a sample target data set; and inputting the sample target data set into an initial neural network model for model training to obtain the first neural network model.
Optionally, the identifying the target area where the content is located from the image including the target to be identified includes: inputting the image containing the target to be recognized into a second neural network model, and recognizing a target area where the content is located from the image containing the target to be recognized by using the second neural network model.
Optionally, the generating step of the second neural network model includes: acquiring a sample target and a position of content on the sample target as a training sample; and inputting the training sample into an initial neural network model for model training to obtain the second neural network model.
Optionally, the adjusting the gray scale of the target region includes: calculating the average gray value of the target area; obtaining an optimal gray scale range; and enabling the average gray value of the target area to approach the optimal gray range through an approximation algorithm.
Optionally, the obtaining the optimal gray scale range includes: acquiring a sample region containing content; setting the sample regions to different gray values, and identifying the content of the sample regions with different gray values; and taking the gray scale range with the highest identification accuracy as the optimal gray scale range.
Optionally, after obtaining the identification information, the method further includes: and acquiring the accuracy of the identification information, and adjusting the optimal gray scale range according to the accuracy.
Optionally, the content identification of the target area includes: and carrying out content recognition on the target area by utilizing an optical character recognition technology.
Optionally, the target to be recognized is a vehicle to be recognized, the target area is an image area corresponding to a license plate, and the recognition information is license plate information.
An embodiment of the present invention further provides an apparatus for identifying content on a target, where the apparatus includes: the target identification module is used for reading a target video stream, detecting a target to be identified from the target video stream and obtaining an image containing the target to be identified; the target area acquisition module is used for identifying a target area where the content is located from an image containing a target to be identified, wherein the target area is located on the target to be identified; and the content identification module is used for adjusting the gray level of the target area and identifying the content of the target area to obtain identification information.
An embodiment of the present invention further provides a storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the steps of the method for identifying content on the target.
The embodiment of the invention also provides computer equipment, which comprises a memory and a processor, wherein the memory stores a computer program, and the processor realizes the steps of the content identification method on the target when executing the computer program.
Compared with the prior art, the technical scheme of the embodiment of the invention has the following beneficial effects:
the embodiment of the invention provides a method for identifying content on a target, which comprises the following steps: reading a target video stream, and detecting a target to be identified from the target video stream to obtain an image containing the target to be identified; identifying a target area where content is located from an image containing a target to be identified, wherein the target area is located on the target to be identified; and adjusting the gray level of the target area and identifying the content of the target area to obtain identification information. Compared with the prior art, the method and the device for recognizing the content of the target area have the advantages that the image of the target to be recognized containing the content to be recognized can be detected from the target video stream, the target area where the content to be recognized is located is detected from the image of the target to be recognized according to the shape and the structure of the target to be recognized, the relative position of the content to be recognized to the target to be recognized and the like, and the content of the target area is recognized. During content identification, the accuracy of the content identification result is improved by combining the gray level adjustment of the target area.
Further, a first neural network model may be trained based on the sample target data set to identify a target to be identified in the target video stream, so as to obtain an image containing the target to be identified. Through big data training, the accuracy of the recognition of the target to be recognized is effectively improved.
Further, the second neural network model can be obtained based on training of the training samples related to the positions of the target areas, the second neural network model is used for identifying the target areas in the images containing the targets to be identified to obtain the target areas, and accuracy of identification and judgment of the target areas is improved.
Further, the optimal gray scale range can be obtained according to experience or sample analysis statistics and is used for adjusting the gray scale of the target area so as to improve the accuracy of identifying the content of the target area.
Further, after the identification information is obtained, the accuracy of the identification information can be used as feedback to adjust the optimal gray scale range, so that the optimal gray scale range can be adjusted in real time to adapt to the change of the target video stream.
Furthermore, content recognition is carried out on the target area by utilizing an optical character recognition technology, and a neural network model for content recognition can be established, so that the recognition accuracy is improved, and characteristics such as background color of the target area are obtained for auxiliary recognition.
Further, in the method for identifying content on a target provided by the embodiment of the present invention, the exposure control policy is to use the target to be identified and the content of the area (i.e. the target area) where the content to be identified on the target is located, which are identified by the neural network, as the exposure target. The exposure target setting is not the brightness which is suitable for the human eyes of the traditional monitoring camera to look like, but the result which can obtain the highest recognition accuracy rate through algorithm judgment is used as the exposure adjustment target.
Drawings
FIG. 1 is a flow chart illustrating a method for identifying content on a target according to an embodiment of the present invention;
FIG. 2 is a partial flow chart illustrating a method for identifying content on a target according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of an apparatus for identifying content on a target according to an embodiment of the present invention.
Detailed Description
As background, prior art content recognition algorithms fail to accurately identify content located on a target.
In order to solve the problem, an embodiment of the present invention provides a method for identifying content on a target, where the method includes: reading a target video stream, and detecting a target to be identified from the target video stream to obtain an image containing the target to be identified; identifying a target area where content is located from an image containing a target to be identified, wherein the target area is located on the target to be identified; and adjusting the gray level of the target area and identifying the content of the target area to obtain identification information.
By the scheme, the accuracy of the identification result can be effectively improved when the content on the target is identified.
In order to make the aforementioned objects, features and advantages of the present invention comprehensible, embodiments accompanied with figures are described in detail below.
Referring to fig. 1, an embodiment of the present invention provides a method for identifying content on a target, including the following steps:
step S101, reading a target video stream, detecting a target to be identified from the target video stream, and obtaining an image containing the target to be identified;
the target video stream is obtained by continuously shooting a certain area or a certain person or object, and comprises a plurality of frames of images, the target video stream comprises the image of the target to be identified where the content to be identified is located, and the content to be identified is located on the target to be identified.
When the content on the target is identified, the target video stream is read from a preset disk or a terminal for storing the target video stream, and image identification is carried out on a plurality of frame images contained in the video stream so as to detect whether the target to be identified is contained or not. When the target to be recognized is detected in the target video stream, an image containing the target to be recognized is acquired, and the steps of steps S102 to S103 described below are continued on the image.
Optionally, the image containing the target to be recognized may be one or more frames of images containing the target to be recognized in the target video stream, or may be a partial image that is captured from one or more frames of images containing the target to be recognized and can represent the feature of the target to be recognized.
Step S102, identifying a target area where content is located from an image containing a target to be identified, wherein the target area is located on the target to be identified;
after the image containing the target to be recognized is obtained, the image containing the area where the content to be recognized is located, namely the target area, is recognized. The target area may be identified from the image containing the target to be identified according to the set identification logic, and the identification logic may be set according to the shape and structure of the target to be identified, the relative position relationship between the target area and the target to be identified, the characteristics of the target area (such as the shape contained in the target area, the color of the target area), and the like.
Optionally, when the target video stream includes multiple frames of images of the same target to be recognized, the multiple frames of images corresponding to the same target to be recognized may be obtained as the images including the target to be recognized, and the target areas in the multiple frames of images are respectively obtained.
And step S103, adjusting the gray scale of the target area and identifying the content of the target area to obtain identification information.
When the content of the target area is identified, the gray level of the image of the target area acquired from the target video stream can be adjusted to improve the accuracy of identifying the content in the target area, so that the identification result of the content to be identified on the target to be identified, namely the identification information, is obtained.
Optionally, when the target area of the target to be recognized is a plurality of target areas obtained by recognizing the multi-frame image, content recognition may be performed on the plurality of target areas respectively to obtain a plurality of recognition results, and the plurality of recognition results are summarized and analyzed to obtain more accurate recognition information.
In a non-limiting application example, the target video stream is a video stream obtained by video shooting a partial area of a road, the target to be identified may be a billboard, a vehicle, a store, or the like on the road, and the target area is an image area corresponding to an advertisement portion in the billboard, a license plate of the vehicle, a plaque of the store, or the like.
It should be noted that the target to be recognized may be any person or object, the content to be recognized is on the target to be recognized, and the relative position between the two may be determined according to a certain recognition logic, which satisfies the protection scope of the content recognition method on the target of the present invention.
By the method for identifying the content on the target, the image of the target to be identified containing the content to be identified can be detected from the target video stream, and the content of the target area can be identified by detecting the target area where the content to be identified is located from the image containing the target to be identified according to the shape and structure of the target to be identified, the relative position of the content to be identified to the target to be identified and the like. During content identification, the accuracy of the content identification result is improved by combining the gray level adjustment of the target area.
In one embodiment, the detecting the target to be identified from the target video stream in step S101 in fig. 1 may include: inputting the target video stream into a trained first neural network model, and detecting the target to be recognized from the target video stream by using the first neural network model.
The first neural network model is obtained by performing model training by using an image of the target to be recognized as a training sample (the training sample is marked as a sample target), and is used for obtaining the image containing the target to be recognized in the video stream.
Optionally, the step of generating the first neural network model includes: obtaining a sample target data set; and inputting the sample target data set into an initial neural network model for model training to obtain the first neural network model.
The training sample of the first neural network model may be a data set composed of a plurality of self-built sample targets, that is, a sample target data set. The sample target and the target to be recognized have associated features (such as the sample target and the target to be recognized are the same kind or the same person or object), so that the first neural network can be trained according to big data to obtain the capability of recognizing the target to be recognized by using the associated features. The initial neural network model can be implemented by using a commonly used neural network algorithm, such as a target detection model YOLO.
In the above embodiment, the first neural network model may be obtained based on the sample target data set training, and is used to identify the target to be identified in the target video stream, so as to obtain the image containing the target to be identified. Through big data training, the accuracy of the recognition of the target to be recognized is effectively improved.
In one embodiment, the identifying, in step S102 in fig. 1, a target area where content is located from an image including a target to be identified may include: inputting the image containing the target to be recognized into a second neural network model, and recognizing a target area where the content is located from the image containing the target to be recognized by using the second neural network model.
The second neural network model is obtained by performing model training by taking an image containing information such as the relationship between the target to be recognized and the target region and the characteristics of the target region as a training sample, and is used for recognizing the target region on the target to be recognized in the image.
Optionally, the generating step of the second neural network model includes: acquiring a sample target and a position of content on the sample target as a training sample; and inputting the training sample into an initial neural network model for model training to obtain the second neural network model.
The position of the target area on the sample target is used as sample data, namely a training sample, when the second neural network model is trained, so that the second neural network model obtained through big data training can identify the target area in the input image containing the target to be identified according to the identification rule obtained through training of the training sample. The initial neural network model can be implemented by using a commonly used neural network algorithm, such as a target detection model YOLO.
In the above embodiment, the second neural network model may be obtained based on training of the training sample related to the position of the target region, so as to identify the target region in the image including the target to be identified to obtain the target region, thereby improving the accuracy of identification and determination of the target region.
In one embodiment, please refer to fig. 2, fig. 2 is a partial flow chart illustrating a method for identifying content on a target; the adjusting the gray scale of the target region in step S103 in fig. 1 may include steps S201 to S203 in fig. 2, where:
step S201, calculating the average gray value of the target area;
each pixel point in the target area can be calculated by adopting the following formula to obtain the gray value of the target area:
Gray=R×0.299+G×0.587+B×0.114
wherein Gray is the Gray value of each pixel point, R is the red (red) channel of the image, G is the Green (Green) channel of the image, and B is the Blue (Blue) channel of the image. The coefficients of the channels in the formula are obtained through empirical or experimental calculation and can be adjusted according to the image of the target area.
And (4) solving the mathematical average of Gray values of all pixel points in the target area to obtain the average Gray value of the target area.
Step S202, obtaining an optimal gray scale range;
the optimal gray scale range may be an empirically or computationally derived gray scale value used to adjust the gray scale of the target region, and may be an interval of one value.
Step S203, the average gray value of the target area is approximated to the optimal gray range through an approximation algorithm.
The approximation algorithm is used for approximating some scenes or accuracy of an actual problem through the algorithm, wherein in order to approximate an optimal gray scale range, the approximation algorithm can be controlled through PID (Proportion integration differentiation), and the control principle of PID is to form a control quantity by linearly combining Proportion (contribution), Integral (Integral) and Differential (Differential) of deviation.
And calculating the average gray value of the current target area through an approximation algorithm, wherein the approximation target is the previously obtained optimal gray range.
Optionally, the obtaining the optimal gray scale range may include: acquiring a sample region containing content; setting the sample regions to different gray values, and identifying the content of the sample regions with different gray values; and taking the gray scale range with the highest identification accuracy as the optimal gray scale range.
The optimal gray scale range can be obtained by manually marking the sample area and counting the sample area. The sample region may be a collected data set containing related images of the content, for example, if an image of a license plate of a vehicle is used as a target region, images of a plurality of license plates may be obtained as the sample region, and characters in the license plate are the content to be identified. The gray value area of the sample can be adjusted, the content of the adjusted sample area is identified, and the optimal gray range is obtained according to the identification accuracy.
In the above embodiment, the optimal gray scale range can be obtained according to experience or sample analysis statistics, and is used for adjusting the gray scale of the target region, so as to improve the accuracy of identifying the content of the target region.
In an embodiment, with continuing reference to fig. 1, after obtaining the identification information in step S103 in fig. 1, the method may further include: and acquiring the accuracy of the identification information, and adjusting the optimal gray scale range according to the accuracy.
Optionally, the accuracy of the identification information is used as feedback to adjust the optimal gray scale range, so that the optimal gray scale range can be adjusted in real time according to changes of light, resolution and the like of an image in the target video stream to adapt to changes of the target video stream.
Optionally, the Video acquisition device is controlled by an open network Video Interface Forum (ONVIF for short) protocol, so as to achieve maximum device compatibility.
Alternatively, a feedback adjustment period may be set, the optimal gray scale range is adjusted once every period, and the adjustment period may be set as needed, for example, every 0.8 seconds as an adjustment period.
In this embodiment, after the identification information is obtained, the accuracy of the identification information is used as feedback to adjust the optimal gray scale range, so that the optimal gray scale range is adjusted in real time to adapt to the change of the target video stream.
In one embodiment, the content identification of the target area includes: and carrying out content recognition on the target area by utilizing an optical character recognition technology.
The content identification method for the target area may be as follows: and extracting characters in the target region by adopting a Recognition technology such as Optical Character Recognition (OCR for short) and the like, and performing Character Recognition according to the shapes of the characters to obtain the Recognition information of the target region.
Continuing with the above example of performing content recognition on the license plate of the vehicle, content recognition may be performed on the image of the license plate according to technologies such as OCR, so as to obtain license plate information (for example, the license plate number recorded on the license plate) as recognition information.
Optionally, the neural network model for content recognition is built according to OCR recognition techniques. For example, the target recognition algorithm YOLO is used as the initial ORC recognition, so that the method has better anti-distortion capability, and a common convolution cyclic neural network (CRNN for short) in OCR is adopted to realize the Chinese character error correction, so as to make up for the shortage of the Chinese character data set samples.
Optionally, the features of other target areas, such as the background color of the target area, may also be recognized, and the recognized features and characters may be used as the result of content recognition, that is, the recognition information.
It should be noted that, when identifying the content of the target area, other identified features include, but are not limited to, a background color, and any feature that can be obtained by identifying the image of the target area is included in the protection scope of the embodiment of the present invention.
In the above embodiment, the content of the target area is identified by using an optical character identification technology, and a neural network model for content identification may also be established to improve the accuracy of identification and obtain characteristics such as background color of the target area for auxiliary identification.
In the method for identifying content on a target provided by the embodiment of the invention, the exposure control strategy takes the target to be identified by the neural network and the content of the area (namely the target area) where the content to be identified is located on the target as the exposure target. The exposure target setting is not the brightness which is suitable for the human eyes of the traditional monitoring camera to look like, but the result which can obtain the highest recognition accuracy rate through algorithm judgment is used as the exposure adjustment target.
With the development of intelligent identification technology, the intelligent identification technology is often applied to vehicle detection in places such as a platform, a parking lot, a logistics park and the like, a plurality of pairs of vehicles are photographed or videos are recorded through a monitoring camera in the current vehicle detection, and a plurality of characteristics such as vehicle types and vehicle colors are identified from the acquired photos or videos to perform vehicle identification.
However, the existing monitoring camera basically uses the whole screen as an exposure target, or uses a middle fixed area, such as a central area, of the whole screen as an exposure target, and under the condition of a large light ratio encountered in the actual operation of the platform, the strategy of the existing monitoring camera can cause the situation that the whole screen is exposed reasonably, but the license plate area is overexposed or underexposed. And the license plate recognition algorithm cannot accurately recognize the license plate.
Aiming at the problem that the license plate cannot be accurately identified in the prior art, the method for identifying the content on the target provided by the embodiment of the invention can be used for identifying the license plate.
At this time, the target to be recognized is a vehicle to be recognized, the target area is an image area corresponding to a license plate, and the recognition information is license plate information.
That is, an embodiment of the present invention provides a license plate recognition method, where the method includes: reading a target video stream, and detecting a vehicle to be identified from the target video stream to obtain an image of the vehicle to be identified; identifying the position of a license plate from the image of the vehicle to be identified to obtain a license plate area; and adjusting the gray level of the license plate area and performing content identification on the license plate area to obtain the license plate information of the vehicle to be identified.
At this time, the target to be recognized is a vehicle, and the content to be recognized is the content of the license plate, so that the target video stream may include the image of the vehicle (i.e., the vehicle to be recognized) with the license plate to be recognized; the image acquisition equipment can be arranged at the entrances and exits of the vehicle centralized gathering places such as logistics parks, districts, platforms, parking lots and the like to acquire the target video stream.
The target area may be an image area corresponding to a license plate, which is referred to as a license plate area for short. The license plate area in the image of the vehicle to be recognized can be recognized according to the position of the license plate in the vehicle to be recognized relative to the vehicle body, the size, the shape and other characteristics of the vehicle, or the characteristics of the license plate expressed in the image. And identifying the content of the license plate area to obtain the license plate information contained in the license plate area.
By the license plate recognition method, the image of the vehicle to be recognized with the license plate needing to be recognized can be detected from the target video stream, the license plate area is detected from the image of the vehicle to be recognized according to the shape and the structure of the vehicle, the relative position of the license plate to the vehicle and the like, and the content of the license plate area is recognized. During license plate recognition, the accuracy of a license plate recognition result is improved by combining the gray level adjustment of a license plate area.
In one embodiment, the detecting a vehicle to be identified from the target video stream to obtain an image of the vehicle to be identified includes: and inputting the target video stream into a trained first neural network model to obtain an image of the vehicle to be identified.
The first neural network model is obtained by performing model training by taking the image of the vehicle as a training sample and is used for obtaining the image of the vehicle to be identified contained in the video stream.
Optionally, the step of generating the first neural network model includes: obtaining a sample vehicle dataset; and inputting the sample vehicle data set into an initial neural network model for model training to obtain the first neural network model.
The sample object may be an image containing multiple, or multiple, vehicles, and the collection of these images is referred to as a sample object dataset. Wherein, when the targeted identification scenario is a dock, the vehicle dataset for that dock may be collected as the sample target dataset.
In one embodiment, the identifying the position of the license plate from the image of the vehicle to be identified to obtain the license plate region includes: and inputting the image of the vehicle to be identified into a second neural network model to obtain a license plate region.
The second neural network model is obtained by performing model training by taking an image containing information such as the relationship between the vehicle and the license plate, the license plate characteristics and the like as a training sample and is used for identifying the license plate area in the image of the vehicle.
Optionally, the generating step of the second neural network model includes: obtaining the license plate position of a sample vehicle as a training sample; and inputting the training sample into an initial neural network model for model training to obtain the second neural network model.
When the target area is a license plate of a vehicle, the license plate position of the sample vehicle may be subjected to data collection for an application scene of the license plate recognition method to obtain a training sample, for example, when the specific recognition scene is a platform, a vehicle data set of the platform may be collected, and vehicle data, that is, the license plate position of each vehicle, may be obtained as the training sample.
The license plate positions of the sample vehicles can be subjected to data collection aiming at the application scene of the license plate recognition method to obtain training samples, for example, when the aimed recognition scene is a platform, a vehicle data set of the platform can be collected, and vehicle data, namely the license plate positions of all vehicles, can be obtained to serve as the training samples.
In one embodiment, the adjusting the gray scale of the license plate region includes: calculating the average gray value of the license plate area; obtaining an optimal gray scale range; and enabling the average gray value of the license plate region to approach the optimal gray range through an approximation algorithm.
In one embodiment, the obtaining the optimal gray scale range includes: obtaining a license plate sample; setting the license plate samples to different gray values, and performing content identification on the license plate samples with different gray values; and taking the gray scale range with the highest identification accuracy as the optimal gray scale range.
In one embodiment, after obtaining the license plate information of the vehicle to be recognized, the method further includes: and acquiring the accuracy rate of license plate information identification, and adjusting the optimal gray scale range according to the accuracy rate.
Optionally, the content recognition of the license plate region includes: and carrying out content recognition on the license plate area by using an optical character recognition technology.
When the content of the license plate of the vehicle is identified, the color of the license plate can be used for identifying the type of the vehicle, if the color of the license plate of the truck is yellow, the type of the vehicle can be identified as the truck when the extracted color of the license plate of the target vehicle is yellow.
For more details of the specific working principle and working mode of the license plate recognition method, reference may be made to the above description of the recognition method for the content on the target in fig. 1 and fig. 2, and details are not repeated here.
Referring to fig. 3, the present invention further provides an apparatus for identifying content on a target, which may include:
the target identification module 301 is configured to read a target video stream, detect a target to be identified from the target video stream, and obtain an image including the target to be identified;
a target area obtaining module 302, configured to identify a target area where content is located in an image including a target to be identified, where the target area is located on the target to be identified;
and the content identification module 303 is configured to adjust the gray level of the target area and perform content identification on the target area to obtain identification information.
In one embodiment, please continue to refer to fig. 3, the target recognition module 301 is further configured to input the target video stream into a trained first neural network model, and detect the target to be recognized from the target video stream by using the first neural network model.
In one embodiment, the apparatus for identifying content on a target shown in fig. 3 may further include:
a sample target data set acquisition module for acquiring a sample target data set;
and the first model training module is used for inputting the sample target data set into an initial neural network model for model training to obtain the first neural network model.
In an embodiment, the target region obtaining module 302 shown in fig. 3 may be further configured to input the image including the target to be recognized into a second neural network model, and identify, by using the second neural network model, a target region where the content is located from the image including the target to be recognized.
In one embodiment, the apparatus for identifying content on a target shown in fig. 3 may further include:
a training sample acquisition module for acquiring a sample target and a position of content on the sample target as a training sample;
and the second model training module is used for inputting the training samples into the initial neural network model for model training to obtain the second neural network model.
In one embodiment, the content identification module 303 in the device for identifying content on a target shown in fig. 3 may include:
the average gray value calculation unit is used for calculating the average gray value of the target area;
an optimal gray scale range acquisition unit for acquiring an optimal gray scale range;
and the gray value approximation unit is used for approximating the average gray value of the target area to the optimal gray range through an approximation algorithm.
In one embodiment, the optimal gray scale range obtaining unit may include:
a sample acquisition subunit configured to acquire a sample region containing content;
the sample identification subunit is used for setting the sample regions to different gray values and identifying the contents of the sample regions with the different gray values;
and the optimal gray scale range acquisition subunit is used for taking the gray scale range with the highest identification accuracy as the optimal gray scale range.
In one embodiment, the apparatus for identifying content on a target shown in fig. 3 may further include:
and the adjusting module is used for acquiring the identification information identification accuracy and adjusting the optimal gray scale range according to the accuracy.
In one embodiment, the content recognition module 303 is further configured to perform content recognition on the target area by using an optical character recognition technology.
Optionally, the method for recognizing the content on the target is used for recognizing a license plate.
Optionally, the target to be recognized is a vehicle to be recognized, the target area is an image area corresponding to a license plate, and the recognition information is license plate information.
For more details on the working principle and working mode of the device for identifying content on a target, reference may be made to the above-mentioned description of the method for identifying content on a target in fig. 1 and fig. 2, and details are not repeated here.
Further, the embodiment of the present invention also discloses a storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the technical solution of the method for identifying content on an object in the embodiments shown in fig. 1 and fig. 2 is executed.
Further, the embodiment of the present invention further discloses a computer device, which includes a memory and a processor, where the memory stores a computer program capable of running on the processor, and the processor executes the technical solution of the method for identifying content on an object in the embodiment shown in fig. 1 and fig. 2 when running the computer program. The terminal can be a mobile phone, a computer, a camera and other terminals. For a terminal with a shooting device, such as a camera, a mobile phone, a computer and the like, a video acquired by the terminal can be directly acquired as a target video stream, and a method for identifying content on a target can be executed.
Specifically, in the embodiment of the present invention, the processor may be a Central Processing Unit (CPU), and the processor may also be other general-purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, and the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
It will also be appreciated that the memory in the embodiments of the subject application can be either volatile memory or nonvolatile memory, or can include both volatile and nonvolatile memory. The nonvolatile memory may be a read-only memory (ROM), a Programmable ROM (PROM), an Erasable PROM (EPROM), an Electrically Erasable PROM (EEPROM), or a flash memory. Volatile memory can be Random Access Memory (RAM), which acts as external cache memory. By way of example and not limitation, many forms of Random Access Memory (RAM) are available, such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (enhanced SDRAM), SDRAM (SLDRAM), synchlink DRAM (SLDRAM), and direct bus RAM (DR RAM).
It should be understood that the term "and/or" herein is merely one type of association relationship that describes an associated object, meaning that three relationships may exist, e.g., a and/or B may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the character "/" in this document indicates that the former and latter related objects are in an "or" relationship.
The "plurality" appearing in the embodiments of the present application means two or more.
The descriptions of the first, second, etc. appearing in the embodiments of the present application are only for illustrating and differentiating the objects, and do not represent the order or the particular limitation of the number of the devices in the embodiments of the present application, and do not constitute any limitation to the embodiments of the present application.
The term "connect" in the embodiments of the present application refers to various connection manners, such as direct connection or indirect connection, to implement communication between devices, which is not limited in this embodiment of the present application.
Although the present invention is disclosed above, the present invention is not limited thereto. Various changes and modifications may be effected therein by one skilled in the art without departing from the spirit and scope of the invention as defined in the appended claims.

Claims (13)

1. A method for identifying content on a target, the method comprising:
reading a target video stream, and detecting a target to be identified from the target video stream to obtain an image containing the target to be identified;
identifying a target area where content is located from an image containing a target to be identified, wherein the target area is located on the target to be identified;
and adjusting the gray level of the target area and identifying the content of the target area to obtain identification information.
2. The method of claim 1, wherein the detecting the target to be identified from the target video stream comprises:
inputting the target video stream into a trained first neural network model, and detecting the target to be recognized from the target video stream by using the first neural network model.
3. The method of claim 2, wherein the step of generating the first neural network model comprises:
obtaining a sample target data set;
and inputting the sample target data set into an initial neural network model for model training to obtain the first neural network model.
4. The method of claim 1, wherein the identifying the target area in which the content is located from the image containing the target to be identified comprises:
inputting the image containing the target to be recognized into a second neural network model, and recognizing a target area where the content is located from the image containing the target to be recognized by using the second neural network model.
5. The method of claim 4, wherein the step of generating the second neural network model comprises:
acquiring a sample target and a position of content on the sample target as a training sample;
and inputting the training sample into an initial neural network model for model training to obtain the second neural network model.
6. The method of claim 1, wherein the adjusting the gray scale of the target region comprises:
calculating the average gray value of the target area;
obtaining an optimal gray scale range;
and enabling the average gray value of the target area to approach the optimal gray range through an approximation algorithm.
7. The method of claim 6, wherein obtaining the optimal gray scale range comprises:
acquiring a sample region containing content;
setting the sample regions to different gray values, and identifying the content of the sample regions with different gray values;
and taking the gray scale range with the highest identification accuracy as the optimal gray scale range.
8. The method of claim 6, wherein after obtaining the identification information, further comprising:
and acquiring the accuracy of the identification information, and adjusting the optimal gray scale range according to the accuracy.
9. The method of claim 1, wherein the identifying the target area comprises:
and carrying out content recognition on the target area by utilizing an optical character recognition technology.
10. The method according to any one of claims 1 to 9, wherein the target to be recognized is a vehicle to be recognized, the target region where the content is located is an image region corresponding to a license plate, and the recognition information is license plate information.
11. An apparatus for identifying content on a target, the apparatus comprising:
the target identification module is used for reading a target video stream, detecting a target to be identified from the target video stream and obtaining an image containing the target to be identified;
the target area acquisition module is used for identifying a target area where the content is located from an image containing a target to be identified, wherein the target area is located on the target to be identified;
and the content identification module is used for adjusting the gray level of the target area and identifying the content of the target area to obtain identification information.
12. A storage medium having a computer program stored thereon, the computer program, when being executed by a processor, realizing the steps of the method according to any of the claims 1 to 11.
13. A computer device comprising a memory and a processor, the memory storing a computer program, wherein the processor implements the steps of the method of any one of claims 1 to 11 when executing the computer program.
CN202010628773.XA 2020-03-26 2020-07-02 Method and device for identifying content on target, storage medium and computer equipment Pending CN113449574A (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN2020102236870 2020-03-26
CN202010223687 2020-03-26

Publications (1)

Publication Number Publication Date
CN113449574A true CN113449574A (en) 2021-09-28

Family

ID=77808359

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010628773.XA Pending CN113449574A (en) 2020-03-26 2020-07-02 Method and device for identifying content on target, storage medium and computer equipment

Country Status (1)

Country Link
CN (1) CN113449574A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115617237A (en) * 2022-11-21 2023-01-17 成都智元汇信息技术股份有限公司 Advertisement position information display component and method for generating advertisement position information by local identification

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102509091A (en) * 2011-11-29 2012-06-20 北京航空航天大学 Airplane tail number recognition method
CN109344786A (en) * 2018-10-11 2019-02-15 深圳步智造科技有限公司 Target identification method, device and computer readable storage medium
CN110414451A (en) * 2019-07-31 2019-11-05 深圳市捷顺科技实业股份有限公司 It is a kind of based on end-to-end licence plate recognition method, device, equipment and storage medium

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102509091A (en) * 2011-11-29 2012-06-20 北京航空航天大学 Airplane tail number recognition method
CN109344786A (en) * 2018-10-11 2019-02-15 深圳步智造科技有限公司 Target identification method, device and computer readable storage medium
CN110414451A (en) * 2019-07-31 2019-11-05 深圳市捷顺科技实业股份有限公司 It is a kind of based on end-to-end licence plate recognition method, device, equipment and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115617237A (en) * 2022-11-21 2023-01-17 成都智元汇信息技术股份有限公司 Advertisement position information display component and method for generating advertisement position information by local identification

Similar Documents

Publication Publication Date Title
EP1800259B1 (en) Image segmentation method and system
US8170350B2 (en) Foreground/background segmentation in digital images
CN108197546B (en) Illumination processing method and device in face recognition, computer equipment and storage medium
EP3170304B1 (en) Method and apparatus for detecting imaging conditions
CN110149482A (en) Focusing method, device, electronic equipment and computer readable storage medium
US11019250B2 (en) Method for implementing animal nose pattern biometric identification system on mobile devices
US20210166015A1 (en) Certificate image extraction method and terminal device
CN106991707B (en) Traffic signal lamp image strengthening method and device based on day and night imaging characteristics
CN111179302B (en) Moving target detection method and device, storage medium and terminal equipment
CN110365897B (en) Image correction method and device, electronic equipment and computer readable storage medium
CN113673474B (en) Image processing method, device, electronic equipment and computer readable storage medium
CN112581481B (en) Image processing method and device, electronic equipment and computer readable storage medium
CN113449574A (en) Method and device for identifying content on target, storage medium and computer equipment
CN112507818B (en) Illumination estimation method and system based on near infrared image
CN111932462A (en) Training method and device for image degradation model, electronic equipment and storage medium
CN110399823B (en) Subject tracking method and apparatus, electronic device, and computer-readable storage medium
CN110688926A (en) Subject detection method and apparatus, electronic device, and computer-readable storage medium
CN112052859A (en) License plate accurate positioning method and device in free scene
US11972632B1 (en) Apparatus and method of digital enhancement of fingerprint ridges
CN117152819B (en) Face recognition method and device
CN117475421A (en) License plate exposure compensation method and device and electronic equipment
CN113591649A (en) Exposure statistical method based on human face
CN111797694A (en) License plate detection method and device
CN116546330A (en) Exposure adjustment method and device, computer readable storage medium and terminal
CN113870158A (en) License plate image processing method and device and computer readable storage medium

Legal Events

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