CN112183627A - Method for generating predicted density map network and vehicle annual inspection mark number detection method - Google Patents

Method for generating predicted density map network and vehicle annual inspection mark number detection method Download PDF

Info

Publication number
CN112183627A
CN112183627A CN202011042881.5A CN202011042881A CN112183627A CN 112183627 A CN112183627 A CN 112183627A CN 202011042881 A CN202011042881 A CN 202011042881A CN 112183627 A CN112183627 A CN 112183627A
Authority
CN
China
Prior art keywords
network
trained
density map
sample
loss value
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
CN202011042881.5A
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.)
Yibin Zhongxing Technology Intelligent System Co ltd
Zhongxing Technology Co ltd
Original Assignee
Yibin Zhongxing Technology Intelligent System Co ltd
Zhongxing 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 Yibin Zhongxing Technology Intelligent System Co ltd, Zhongxing Technology Co ltd filed Critical Yibin Zhongxing Technology Intelligent System Co ltd
Priority to CN202011042881.5A priority Critical patent/CN112183627A/en
Publication of CN112183627A publication Critical patent/CN112183627A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/23Clustering techniques
    • G06F18/232Non-hierarchical techniques
    • G06F18/2321Non-hierarchical techniques using statistics or function optimisation, e.g. modelling of probability density functions
    • 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
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/241Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N20/00Machine learning
    • G06N20/20Ensemble learning
    • 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
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/44Local feature extraction by analysis of parts of the pattern, e.g. by detecting edges, contours, loops, corners, strokes or intersections; Connectivity analysis, e.g. of connected components

Landscapes

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

Abstract

Embodiments of the present disclosure disclose methods, apparatuses, devices and computer readable media for generating a network of predicted density maps. One embodiment of the method comprises: obtaining a sample, wherein the sample comprises: a sample image, a sample density map corresponding to the sample image; inputting the sample image into a network to be trained to generate a predicted density map; determining a loss value of the predicted density map based on the sample density map and the predicted density map; determining whether the network to be trained is trained or not based on the loss value and the target loss value; and adjusting parameters in the network to be trained in response to determining that the network to be trained is not trained. The method solves the problem that the network structure of the density map estimation network is complex, reduces the training difficulty of the network, and shortens the training time of the network.

Description

Method for generating predicted density map network and vehicle annual inspection mark number detection method
Technical Field
Embodiments of the present disclosure relate to the field of computer technology, and in particular, to a method, an apparatus, an electronic device, and a computer-readable medium for generating a network of predicted density maps.
Background
The density map prediction method is a method for obtaining a corresponding local density probability distribution characteristic map by inputting collected pictures into a local density grade classification network. Most of the commonly used density map prediction methods generate a density map of an image based on a multi-column convolution network and a counting convolution neural network of a density grade classifier.
However, when the density map prediction is performed by the above method, the following technical problems are often present:
first, there are a large number of parameters in a high precision density level classifier to perform density level classification. However, the high-precision classifier can cause the network structure to be too complex, and further causes the network training difficulty to be larger and the training time to be long.
Secondly, the accuracy of the sample label is low, so that the density map prediction of the sample image is difficult to accurately perform by the finally trained prediction density map network.
Disclosure of Invention
This summary is provided to introduce a selection of concepts in a simplified form that are further described below in the detailed description. This summary is not intended to identify key features or essential features of the claimed subject matter, nor is it intended to be used to limit the scope of the claimed subject matter. Some embodiments of the present disclosure propose methods, apparatuses, electronic devices and computer readable media for generating a network of predicted density maps to address one or more of the technical problems mentioned in the background section above.
In a first aspect, some embodiments of the present disclosure provide a method for generating a network of predicted density maps, the method comprising: obtaining a sample, wherein the sample comprises: a sample image, a sample density map corresponding to the sample image; inputting the sample image into a network to be trained to generate a predicted density map; determining a loss value of the predicted density map based on the sample density map and the predicted density map; determining whether the network to be trained is trained or not based on the loss value and a target loss value; and adjusting parameters in the network to be trained in response to determining that the network to be trained is not trained.
In a second aspect, some embodiments of the present disclosure provide a vehicle annual survey mark number detection method, including: inputting an image of a vehicle annual inspection mark to be detected into a pre-trained predicted density map network to generate a predicted density map of the vehicle annual inspection mark, wherein the pre-trained predicted density map network is generated by the method for generating the predicted density map network; and determining the number of the annual inspection targets of the vehicles based on the predicted density map of the annual inspection targets of the vehicles.
In a third aspect, some embodiments of the present disclosure provide an apparatus for generating a network of predicted density maps, the apparatus comprising: an obtaining unit configured to obtain a sample, wherein the sample comprises: a sample image, a sample density map corresponding to the sample image; the first generation unit is configured to input the sample image to a network to be trained and generate a predicted density map; a second generation unit configured to determine a loss value of a predicted density map based on the sample density map and the predicted density map; a determining unit configured to determine whether the training of the network to be trained is completed based on the loss value and a target loss value; and the adjusting unit is configured to adjust parameters in the network to be trained in response to the fact that the network to be trained is not trained completely.
In a fourth aspect, some embodiments of the present disclosure provide a vehicle annual survey mark number detection device, the device including: a first generating unit, configured to input an annual inspection target image of a vehicle to be detected into a pre-trained predicted density map network, and generate a predicted density map of the annual inspection target of the vehicle, wherein the pre-trained predicted density map network is generated by the device for generating the predicted density map network; and the second generation unit is configured to determine the number of the annual inspection targets of the vehicle based on the predicted density map of the annual inspection targets of the vehicle.
In a fifth aspect, some embodiments of the present disclosure provide an electronic device, comprising: one or more processors; a storage device, on which one or more programs are stored, which, when executed by the one or more processors, cause the one or more processors to implement the method as described in any implementation manner of the first aspect.
In a sixth aspect, some embodiments of the disclosure provide a computer readable medium having a computer program stored thereon, where the program when executed by a processor implements a method as described in any of the implementations of the first aspect.
The above embodiments of the present disclosure have the following advantages: first, a sample is obtained, wherein the sample comprises: a sample image, and a sample density map corresponding to the sample image. By obtaining a sample, the sample can be utilized for training of the network to be trained. There is no need for density level classification with a large number of parameters to label the image area. In this way the structure of the network is not overly complex. And then, inputting the sample image into a network to be trained to generate a predicted density map. Because a large number of parameters are not needed for density grade classification, the sample images are input into the network to be trained, and a predicted density map can be obtained quickly. Then, a loss value of the predicted density map is determined based on the sample density map and the predicted density map. Determining the loss value between the sample density map and the predicted density map can be used to reflect the degree of network training. And then, determining whether the network to be trained is trained or not based on the loss value and the target loss value. And comparing the loss value with a target loss value, wherein the comparison result can determine the training completion condition of the network to be trained. And finally, adjusting parameters in the network to be trained in response to the fact that the network to be trained is not trained. And under the condition that the network to be trained is not trained, adjusting parameters in the network to be trained so that the network to be trained approaches a training target more closely. The training mode of the network to be trained does not need density grade classification, so the method is simple. Therefore, the simple network structure is easier for the training of the network, and the redundancy caused by the complex structure is avoided. Therefore, the training difficulty of the network is reduced, and the network training time is shortened.
Drawings
The above and other features, advantages and aspects of various embodiments of the present disclosure will become more apparent by referring to the following detailed description when taken in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numbers refer to the same or similar elements. It should be understood that the drawings are schematic and that elements and features are not necessarily drawn to scale.
FIG. 1 is a schematic diagram of one application scenario of a method for generating a network of predicted density maps of some embodiments of the present disclosure;
FIG. 2 is a schematic diagram of an application scenario of a vehicle annual survey mark number detection method of some embodiments of the present disclosure;
FIG. 3 is a flow diagram of some embodiments of a method for generating a predicted density map network according to the present disclosure;
FIG. 4 is a flow chart of some embodiments of a vehicle annual survey indicia quantity detection method according to the present disclosure;
FIG. 5 is a schematic block diagram of some embodiments of an apparatus for generating a network of predicted density maps according to the present disclosure;
FIG. 6 is a schematic structural diagram of some embodiments of a vehicle annual survey mark number detection device according to the present disclosure;
FIG. 7 is a schematic structural diagram of an electronic device suitable for use in implementing some embodiments of the present disclosure.
Detailed Description
Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While certain embodiments of the present disclosure are shown in the drawings, it is to be understood that the disclosure may be embodied in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the disclosure are for illustration purposes only and are not intended to limit the scope of the disclosure.
It should be noted that, for convenience of description, only the portions related to the related invention are shown in the drawings. The embodiments and features of the embodiments in the present disclosure may be combined with each other without conflict.
It should be noted that the terms "first", "second", and the like in the present disclosure are only used for distinguishing different devices, modules or units, and are not used for limiting the order or interdependence relationship of the functions performed by the devices, modules or units.
It is noted that references to "a", "an", and "the" modifications in this disclosure are intended to be illustrative rather than limiting, and that those skilled in the art will recognize that "one or more" may be used unless the context clearly dictates otherwise.
The names of messages or information exchanged between devices in the embodiments of the present disclosure are for illustrative purposes only, and are not intended to limit the scope of the messages or information.
The present disclosure will be described in detail below with reference to the accompanying drawings in conjunction with embodiments.
Fig. 1 is a schematic diagram of one application scenario of a method for generating a predicted density map network of some embodiments of the present disclosure.
In the application scenario of fig. 1, first, the computing device 101 may obtain a sample 102, where the sample 102 includes: a sample image 1021, and a sample density map 1022 corresponding to the sample image 1021. The computing device 101 may then input 1021 the sample images to the network to be trained 103, generating a predicted density map 104. Thereafter, the computing device 101 may determine the loss values 105 for the predicted density map 104 based on the sample density map 1022 described above and the predicted density map 104 described above. Then, the computing device 101 may determine whether the training of the network to be trained 103 is completed based on the loss value 105 and the target loss value 106. Finally, the computing device 101 may adjust the parameters 107 in the network to be trained 103 in response to determining that the network to be trained 103 is not trained.
The computing device 101 may be hardware or software. When the computing device is hardware, it may be implemented as a distributed cluster composed of multiple servers or terminal devices, or may be implemented as a single server or a single terminal device. When the computing device is embodied as software, it may be installed in the hardware devices enumerated above. It may be implemented, for example, as multiple software or software modules to provide distributed services, or as a single software or software module. And is not particularly limited herein.
It should be understood that the number of computing devices in FIG. 1 is merely illustrative. There may be any number of computing devices, as implementation needs dictate.
With further reference to fig. 2, fig. 2 is a schematic diagram of an application scenario of a vehicle annual survey mark number detection method according to some embodiments of the present disclosure.
In the application scenario of fig. 2, first, the computing device 201 may input the image 202 of the vehicle annual inspection target to be detected into a pre-trained predicted density map network 203, and generate a predicted density map 204 of the vehicle annual inspection target, where the pre-trained predicted density map network 203 is generated by the method for generating the predicted density map network in the application scenario shown in fig. 1; the computing device 201 may then determine a vehicle annual survey standard quantity 205 based on the predicted density map 204 of vehicle annual survey standards described above.
The computing device 201 may be hardware or software. When the computing device is hardware, it may be implemented as a distributed cluster composed of a plurality of servers or electronic devices, or may be implemented as a single server or a single electronic device. When the computing device is embodied as software, it may be implemented as multiple pieces of software or software modules, for example, to provide distributed services, or as a single piece of software or software module. And is not particularly limited herein.
It should be understood that the number of computing devices 201 in FIG. 2 is merely illustrative. There may be any number of computing devices 201, as implementation needs dictate.
With continued reference to fig. 3, a flow 300 of some embodiments of a method for generating a network of predicted density maps in accordance with the present disclosure is shown. The method for generating the predicted density map network comprises the following steps:
step 301, a sample is obtained.
In some embodiments, an executing agent (e.g., computing device 101 shown in fig. 1) that generates a network of predicted density maps may obtain a sample. Wherein, the sample may include: a sample image, and a sample density map corresponding to the sample image. The sample image may be an image of an area where a vehicle annual inspection mark attached to the upper left corner of a front window of the vehicle is located. The sample density map may be a vehicle annual survey standard density map corresponding to an image of an area where the vehicle annual survey standard is located.
Optionally, the sample density map is generated by:
firstly, determining a pre-marked pixel point sequence in the sample image. Specifically, the position of at least one vehicle annual survey mark in the sample image may be determined in advance. Then, a pixel point corresponding to the center point of at least one vehicle annual inspection mark can be selected according to the position of the at least one vehicle annual inspection mark in the sample image. And then, forming a pre-labeled pixel point sequence according to the pixel points corresponding to the central point of the determined at least one vehicle annual inspection mark. Thus, a sequence of pre-annotated pixel points in the sample image may be determined.
And secondly, pre-labeling each pre-labeled pixel point in the pre-labeled pixel point sequence in the sample image to generate a pre-labeled sample image. Specifically, each pre-labeled pixel point in the pre-labeled pixel point sequence in the determined sample image can be pre-labeled, and a pixel point corresponding to the center of the annual survey mark of the vehicle in the sample image is pre-labeled to generate a pre-labeled sample image.
Thirdly, based on the pre-marked sample image, generating a sample density graph by using the following formula:
Figure BDA0002707156110000071
wherein, σ represents the parameter of the pre-labeled pixel point. i represents a serial number. SigmaiAnd representing the parameter of the ith pre-labeled pixel point in the pre-labeled pixel point sequence. β represents a preset weight. And x represents the coordinate value of the pre-marked pixel point. x is the number ofiAnd expressing the coordinate value of the ith pre-labeled pixel point in the pre-labeled pixel point sequence. M represents the number of pixels adjacent to the pre-labeled pixel. j represents a serial number. x is the number ofijAnd expressing the coordinate value of the jth pixel point adjacent to the ith pre-labeled pixel point in the pre-labeled pixel point sequence. ρ (x) represents a sample density map function. n represents a serial number. And N represents the number of pixel points in the sample image. k denotes a predetermined threshold value. x is the number ofnAnd expressing the coordinate value of the nth pixel point in the pre-marked sample image.
Figure BDA0002707156110000072
Representing a convolution kernel. Denotes a convolution operation.
The above formula is used as an invention point of the embodiment of the present disclosure, and solves the technical problem mentioned in the background art that "the accuracy of a sample label is low, which causes that a finally trained predicted density map network is difficult to accurately predict a density map of a sample image. ". Factors that cause the accuracy of the vehicle-mounted data to be low are as follows: sample label accuracy is low. If the above factors are solved, the accuracy of generating the predicted density image by the predicted density image network can be improved. To achieve this effect, first, the above formula utilizes the distance between each pre-labeled pixel point in the pre-labeled pixel point sequence in the pre-labeled sample image and a plurality of adjacent pixel points to generate the parameter of each pre-labeled pixel point. In this way, the generated parameters are corresponding to each pre-labeled pixel point in the pre-labeled image, so the generated parameters can be fine-grained variable parameters. Then, the variable parameters with fine granularity can be used as the parameters of the convolution kernel required in the process of generating the pre-labeled sample image from the sample image. The convolution kernel can also be fine-grained variable. Because the convolution kernel uses the variable parameters with fine granularity and then performs convolution operation on the sample image to generate the pre-labeled sample image, the generated pre-labeled sample image has fine granularity, and the generated pre-labeled sample image can be more accurate. Furthermore, the network to be trained is trained by using the more accurate pre-labeled sample image, so that the predicted density map network which is finally trained can be more accurate to generate the predicted density map of the sample image.
Step 302, inputting the sample image to the network to be trained, and generating a predicted density map.
In some embodiments, the executing subject may input the sample image to a network to be trained, and generate a vehicle annual survey standard density map.
As an example, the network to be trained may be: full convolution network, image semantic segmentation network. On the basis, the fully-connected layer, the convolution layer or the pooling layer is modified according to actual needs.
Step 303, analyzing the sample density map and the predicted density map to determine a loss value of the predicted density map.
In some embodiments, the executing subject may compare the annual survey mark density map of the vehicle in the sample with the generated annual survey mark density map of the vehicle, determine a pixel change state of the whole of the two density images, and then generate a loss value of the annual survey mark density map of the vehicle according to the change state.
As an example, the loss value of the annual survey standard density map of the vehicle may be generated by a euclidean distance method. For example, the difference of pixel values of corresponding coordinate positions in the two density images is calculated, and then, the difference of all pixel values may be taken as a loss value.
And step 304, comparing the loss value with a target loss value, and determining whether the network to be trained is trained.
In some embodiments, the execution body may determine a difference between the penalty value and the target penalty value. The target loss value may be a criterion for determining that the training of the network to be trained is completed.
In some optional implementations of some embodiments, the performing main body compares the loss value with a target loss value, and determines whether the training of the network to be trained is completed, and may include the following steps:
and step one, in response to the fact that the loss value is larger than the target loss value, determining that the network to be trained is not trained.
As an example, the above loss value may be 0.011. The target loss value may be 0.01. If the loss value is greater than the target loss value, it may be determined that the network to be trained is not trained.
And secondly, in response to the fact that the loss value is not larger than the target loss value, the fact that the training of the network to be trained is completed is determined.
As an example, the above loss value may be 0.009. The target loss value may be 0.01. Then the loss value is not greater than the target loss value, then it may be determined that the training of the network to be trained is complete.
Step 305, adjusting parameters in the network to be trained in response to determining that the network to be trained is not trained.
In some embodiments, the executing entity may determine the completeness of the network to be trained according to a difference between a sample loss value and a target value, and then adjust parameters in the network to be trained according to the difference between the sample loss value and the target value. And finally, taking the network to be trained after the sample training as the network to be trained for next sample training to continue network training.
In some optional implementations of some embodiments, the performing main body, in response to determining that the network to be trained is not trained, adjusts parameters in the network to be trained, and may include the following steps:
in response to determining that the network to be trained is not trained, adjusting parameters in the network to be trained using the following formula:
j ═ J- α × (J × x-y) ×. Wherein J represents the adjusted parameters in the network to be trained. j represents a parameter in the network to be trained. x represents the loss value. y represents the target loss value. α represents a predetermined learning rate.
Specifically, when it is determined that the network to be trained is not trained, the execution main body may calculate parameters in the network to be trained according to a loss value generated in the training process and a preset learning rate and a preset target loss value of the network to be trained, so as to generate adjustment parameters of the network to be trained, and finally, the adjustment parameters are used as the parameters in the network to be trained, so as to achieve the purpose of adjusting the parameters in the network to be trained. For example, the learning rate may be: 0.00001.
optionally, in response to determining that the training of the network to be trained is completed, determining the network to be trained as a predicted density map network.
In some embodiments, the executing entity determines the network to be trained as a predicted density map network in response to determining that the training of the network to be trained is completed. The predicted density map network may include: convolutional layers, pooling layers.
As an example, the convolutional neural network VGG19(Visual Geometry Group 19) removes the network structure of the remaining 13 convolutional layers and 3 pooling layers of the fully connected layer, and uses this as the feature extractor of the sample image. Wherein 8 layers of cavity convolution are added as a pooling layer. In addition, a layer of common convolution layer is added to output the result of the predicted density graph.
The above embodiments of the present disclosure have the following advantages: first, a sample is obtained, wherein the sample comprises: a sample image, and a sample density map corresponding to the sample image. By obtaining a sample, the sample can be utilized for training of the network to be trained. There is no need for density level classification with a large number of parameters to label the image area. In this way the structure of the network is not overly complex. And then, inputting the sample image into a network to be trained to generate a predicted density map. Because a large number of parameters are not needed for density grade classification, the sample images are input into the network to be trained, and a predicted density map can be obtained quickly. Then, a loss value of the predicted density map is determined based on the sample density map and the predicted density map. Determining the loss value between the sample density map and the predicted density map can be used to reflect the degree of network training. And then, determining whether the network to be trained is trained or not based on the loss value and the target loss value. And comparing the loss value with a target loss value, wherein the comparison result can determine the training completion condition of the network to be trained. And finally, adjusting parameters in the network to be trained in response to the fact that the network to be trained is not trained. And under the condition that the network to be trained is not trained, adjusting parameters in the network to be trained so that the network to be trained approaches a training target more closely. The training mode of the network to be trained does not need density grade classification, so the method is simple. Therefore, the simple network structure is easier for the training of the network, and the redundancy caused by the complex structure is avoided. Therefore, the training difficulty of the network is reduced, and the network training time is shortened.
With continued reference to fig. 4, a flow 400 of some embodiments of a vehicle annual survey indicia quantity detection method according to the present disclosure is shown. The vehicle annual inspection standard quantity detection method comprises the following steps:
step 401, inputting the image of the vehicle annual inspection mark to be detected into a pre-trained predicted density map network, and generating a predicted density map of the vehicle annual inspection mark.
In some embodiments, the pre-trained predicted density map network of the performing subject is generated by a method for generating a predicted density map network in any embodiment of the present disclosure.
And step 402, determining the quantity of the vehicle annual inspection targets based on the predicted density map of the vehicle annual inspection targets.
In some embodiments, the executing entity may sum pixel values corresponding to each pixel point in the predicted density map of the vehicle annual survey mark, and then perform rounding to obtain the predicted number of the vehicle annual survey marks.
As an example, the pixel points and the corresponding pixel values may be: [ a:0.5, b:0.6, c:0.9, d:0.1 ]. The sum of the pixel values corresponding to the above-mentioned pixels may be: 2.1. after that, rounding the sum of the pixel values, the result may be 2. Thus, it is determined that the number of annual landmarks of the vehicle in the image is 2.
With further reference to fig. 5, as an implementation of the methods illustrated in the above figures, the present disclosure provides some embodiments of an apparatus for generating a network of predicted density maps, which correspond to those method embodiments illustrated in fig. 3, which may be particularly applicable in various electronic devices.
As shown in fig. 5, the apparatus 500 for generating a predicted density map network of some embodiments comprises: an acquisition unit 501, a first generation unit 502, a second generation unit 503, a determination unit 504, and an adjustment unit 505. The obtaining unit 501 is configured to obtain a sample, where the sample includes: a sample image, a sample density map corresponding to the sample image; a first generating unit 502 configured to input the sample image to a network to be trained and generate a predicted density map; a second generating unit 503 configured to determine a loss value of the predicted density map based on the sample density map and the predicted density map; a determining unit 504 configured to determine whether the training of the network to be trained is completed based on the loss value and a target loss value; and an adjusting unit 505 configured to adjust parameters in the network to be trained in response to determining that the network to be trained is not trained completely.
It will be understood that the elements described in the apparatus 500 correspond to various steps in the method described with reference to fig. 3. Thus, the operations, features and resulting advantages described above with respect to the method are also applicable to the apparatus 500 and the units included therein, and are not described herein again.
With further reference to fig. 6, as an implementation of the methods illustrated in the above figures, the present disclosure provides some embodiments of a vehicle annual survey mark number detection apparatus, which correspond to those method embodiments illustrated in fig. 4, and which may be particularly applicable in various electronic devices.
As shown in fig. 6, a vehicle annual survey mark number detection device 600 of some embodiments includes: generating unit 601 and determining unit 602. The generation unit 601 is configured to input an image of a vehicle annual inspection target to be detected into a pre-trained predicted density map network, and generate a predicted density map of the vehicle annual inspection target, wherein the pre-trained predicted density map network is generated by the method for generating the predicted density map network in any embodiment of the disclosure; a determining unit 602 configured to determine the number of annual survey targets of the vehicle based on the predicted density map of the annual survey targets of the vehicle.
It will be understood that the elements described in the apparatus 600 correspond to various steps in the method described with reference to fig. 4. Thus, the operations, features and resulting advantages described above with respect to the method are also applicable to the apparatus 600 and the units included therein, and are not described herein again.
Referring now to FIG. 7, a block diagram of an electronic device (e.g., computing device 101 of FIG. 1)700 suitable for use in implementing some embodiments of the present disclosure is shown. The server shown in fig. 7 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present disclosure.
As shown in fig. 7, electronic device 700 may include a processing means (e.g., central processing unit, graphics processor, etc.) 701 that may perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM)702 or a program loaded from storage 708 into a Random Access Memory (RAM) 703. In the RAM703, various programs and data necessary for the operation of the electronic apparatus 700 are also stored. The processing device 701, the ROM 702, and the RAM703 are connected to each other by a bus 704. An input/output (I/O) interface 704 is also connected to bus 704.
Generally, the following devices may be connected to the I/O interface 705: input devices 706 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; an output device 707 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage 708 including, for example, magnetic tape, hard disk, etc.; and a communication device 709. The communication means 709 may allow the electronic device 700 to communicate wirelessly or by wire with other devices to exchange data. While fig. 7 illustrates an electronic device 700 having various means, it is to be understood that not all illustrated means are required to be implemented or provided. More or fewer devices may alternatively be implemented or provided. Each block shown in fig. 7 may represent one device or may represent multiple devices as desired.
In particular, according to some embodiments of the present disclosure, the processes described above with reference to the flow diagrams may be implemented as computer software programs. For example, some embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In some such embodiments, the computer program may be downloaded and installed from a network via communications means 709, or may be installed from storage 708, or may be installed from ROM 702. The computer program, when executed by the processing device 701, performs the above-described functions defined in the methods of some embodiments of the present disclosure.
It should be noted that the computer readable medium described above in some embodiments of the present disclosure may be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In some embodiments of the disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In some embodiments of the present disclosure, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing.
In some embodiments, the clients, servers may communicate using any currently known or future developed network Protocol, such as HTTP (HyperText Transfer Protocol), and may interconnect with any form or medium of digital data communication (e.g., a communications network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), the Internet (e.g., the Internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future developed network.
The computer readable medium may be embodied in the apparatus; or may exist separately without being assembled into the electronic device. The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: obtaining a sample, wherein the sample comprises: a sample image, a sample density map corresponding to the sample image; inputting the sample image into a network to be trained to generate a predicted density map; determining a loss value of the predicted density map based on the sample density map and the predicted density map; determining whether the network to be trained is trained or not based on the loss value and a target loss value; and adjusting parameters in the network to be trained in response to determining that the network to be trained is not trained.
Computer program code for carrying out operations for embodiments of the present disclosure may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + +, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in some embodiments of the present disclosure may be implemented by software, and may also be implemented by hardware. The described units may also be provided in a processor, and may be described as: a processor includes an acquisition unit, a first generation unit, a second generation unit, a determination unit, and an adjustment unit. Where the names of these units do not in some cases constitute a limitation on the unit itself, for example, the acquisition unit may also be described as a "unit for acquiring a sample".
Further, the one or more programs, when executed by the electronic device, may further cause the electronic device to: inputting an image of a vehicle annual inspection mark to be detected into a pre-trained predicted density map network to generate a predicted density map of the vehicle annual inspection mark, wherein the pre-trained predicted density map network can be generated by adopting the method for generating the predicted density map network described in the embodiments; and determining the number of the annual inspection targets of the vehicles based on the predicted density map of the annual inspection targets of the vehicles.
The functions described herein above may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), systems on a chip (SOCs), Complex Programmable Logic Devices (CPLDs), and the like.
The foregoing description is only exemplary of the preferred embodiments of the disclosure and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the invention in the embodiments of the present disclosure is not limited to the specific combination of the above-mentioned features, but also encompasses other embodiments in which any combination of the above-mentioned features or their equivalents is made without departing from the inventive concept as defined above. For example, the above features and (but not limited to) technical features with similar functions disclosed in the embodiments of the present disclosure are mutually replaced to form the technical solution.

Claims (10)

1. A method for generating a network of predicted density maps, comprising:
obtaining a sample, wherein the sample comprises: a sample image, a sample density map corresponding to the sample image;
inputting the sample image into a network to be trained to generate a predicted density map;
determining a loss value of a predicted density map based on the sample density map and the predicted density map;
determining whether the network to be trained is trained or not based on the loss value and a target loss value;
adjusting parameters in the network to be trained in response to determining that the network to be trained is not trained.
2. The method of claim 1, wherein the method further comprises:
in response to determining that the training of the network to be trained is complete, determining the network to be trained as a predicted density map network.
3. The method of claim 1, wherein the determining whether the network to be trained is trained based on the loss value and a target loss value comprises:
in response to determining that the loss value is greater than the target loss value, determining that the network to be trained is not trained;
in response to determining that the loss value is not greater than the target loss value, determining that training of the network to be trained is complete.
4. The method of claim 1, wherein the adjusting parameters in the network to be trained in response to determining that the network to be trained is not trained comprises:
in response to determining that the network to be trained is not trained, adjusting parameters in the network to be trained using the following formula:
J=j-α×(j×x-y)×x,
wherein J represents the adjusted parameters in the network to be trained; j represents a parameter in the network to be trained; x represents the loss value; y represents the target loss value; α represents a predetermined learning rate.
5. The method of one of claims 1 to 4, wherein the sample density map is generated by:
determining a pre-labeled pixel point sequence in the sample image;
pre-labeling each pre-labeled pixel point in the pre-labeled pixel point sequence to generate a pre-labeled sample image;
generating a sample density map based on the pre-labeled sample image using the following formula:
Figure FDA0002707156100000021
wherein, sigma represents the parameter of the pre-marked pixel point; i represents a serial number; sigmaiRepresenting the parameter of the ith pre-labeled pixel point in the pre-labeled pixel point sequence; beta represents a preset weight; x represents the coordinate value of the pre-marked pixel point; x is the number ofiRepresenting the coordinate value of the ith pre-labeled pixel point in the pre-labeled pixel point sequence; m represents the number of pixel points adjacent to the pre-marked pixel points; j represents a serial number; x is the number ofijRepresenting the coordinate value of the jth pixel point adjacent to the ith pre-labeled pixel point in the pre-labeled pixel point sequence; ρ (x) represents a sample density map function; n represents a serial number; n represents the number of pixel points in the sample image; k represents a predetermined threshold; x is the number ofnRepresenting the coordinate value of the nth pixel point in the pre-labeled sample image;
Figure FDA0002707156100000022
representing a convolution kernel; denotes a convolution operation.
6. A vehicle annual inspection mark number detection method comprises the following steps:
inputting an image of a vehicle annual inspection mark to be detected into a pre-trained predicted density map network to generate a predicted density map of the vehicle annual inspection mark, wherein the predicted density map network is generated by the method of one of claims 1-5;
and determining the number of the annual inspection targets of the vehicles based on the predicted density map of the annual inspection targets of the vehicles.
7. An apparatus for generating a network of predicted density maps, comprising:
an acquisition unit configured to acquire a sample, wherein the sample comprises: a sample image, a sample density map corresponding to the sample image;
a first generating unit, configured to input the sample image to a network to be trained, and generate a predicted density map;
a second generation unit configured to determine a loss value of a predicted density map based on the sample density map and the predicted density map;
a determining unit configured to determine whether training of the network to be trained is completed based on the loss value and a target loss value;
an adjusting unit configured to adjust parameters in the network to be trained in response to determining that the network to be trained is not trained.
8. A vehicle annual survey mark number detection device comprising:
a generating unit configured to input an image of a vehicle annual inspection target to be detected into a pre-trained predicted density map network, and generate a predicted density map of the vehicle annual inspection target, wherein the pre-trained predicted density map network is generated by the method of one of claims 1 to 5;
a determination unit configured to determine a vehicle annual survey target number based on the predicted density map of the vehicle annual survey targets.
9. An electronic device, comprising:
one or more processors;
a storage device having one or more programs stored thereon,
when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-5 or claim 6.
10. A computer readable medium, having a computer program stored thereon, wherein the program, when executed by a processor, implements the method of any of claims 1-5 or 6.
CN202011042881.5A 2020-09-28 2020-09-28 Method for generating predicted density map network and vehicle annual inspection mark number detection method Pending CN112183627A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011042881.5A CN112183627A (en) 2020-09-28 2020-09-28 Method for generating predicted density map network and vehicle annual inspection mark number detection method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011042881.5A CN112183627A (en) 2020-09-28 2020-09-28 Method for generating predicted density map network and vehicle annual inspection mark number detection method

Publications (1)

Publication Number Publication Date
CN112183627A true CN112183627A (en) 2021-01-05

Family

ID=73945351

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011042881.5A Pending CN112183627A (en) 2020-09-28 2020-09-28 Method for generating predicted density map network and vehicle annual inspection mark number detection method

Country Status (1)

Country Link
CN (1) CN112183627A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112800930A (en) * 2021-01-25 2021-05-14 北京市商汤科技开发有限公司 Non-motor vehicle counting method, device, equipment and storage medium
CN113657397A (en) * 2021-08-17 2021-11-16 北京百度网讯科技有限公司 Training method for circularly generating network model, and method and device for establishing word stock
CN117495434A (en) * 2023-12-25 2024-02-02 天津大学 Electric energy demand prediction method, model training method, device and electronic equipment

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2018049400A (en) * 2016-09-20 2018-03-29 株式会社ココペリインキュベート Financial information analysis system, and program
CN108921293A (en) * 2018-06-11 2018-11-30 广州视源电子科技股份有限公司 Method and apparatus are determined based on the learning rate of deep learning
CN109117831A (en) * 2018-09-30 2019-01-01 北京字节跳动网络技术有限公司 The training method and device of object detection network
CN109344736A (en) * 2018-09-12 2019-02-15 苏州大学 A kind of still image people counting method based on combination learning
CN110188597A (en) * 2019-01-04 2019-08-30 北京大学 A kind of dense population counting and accurate positioning method and system based on attention mechanism circulation scaling
US20190370648A1 (en) * 2018-05-29 2019-12-05 Google Llc Neural architecture search for dense image prediction tasks
WO2020006961A1 (en) * 2018-07-03 2020-01-09 北京字节跳动网络技术有限公司 Image extraction method and device
CN110807409A (en) * 2019-10-30 2020-02-18 上海眼控科技股份有限公司 Crowd density detection model training method and crowd density detection method
US20200118423A1 (en) * 2017-04-05 2020-04-16 Carnegie Mellon University Deep Learning Methods For Estimating Density and/or Flow of Objects, and Related Methods and Software
CN111582252A (en) * 2020-06-16 2020-08-25 上海眼控科技股份有限公司 Crowd density map acquisition method and device, computer equipment and storage medium
US20210142108A1 (en) * 2018-11-15 2021-05-13 Tencent Technology (Shenzhen) Company Limited Methods, apparatus, and storage medium for classifying graph nodes
US20210209392A1 (en) * 2019-02-01 2021-07-08 Beijing Sensetime Technology Development Co., Ltd. Image Processing Method and Device, and Storage Medium

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2018049400A (en) * 2016-09-20 2018-03-29 株式会社ココペリインキュベート Financial information analysis system, and program
US20200118423A1 (en) * 2017-04-05 2020-04-16 Carnegie Mellon University Deep Learning Methods For Estimating Density and/or Flow of Objects, and Related Methods and Software
US20190370648A1 (en) * 2018-05-29 2019-12-05 Google Llc Neural architecture search for dense image prediction tasks
CN108921293A (en) * 2018-06-11 2018-11-30 广州视源电子科技股份有限公司 Method and apparatus are determined based on the learning rate of deep learning
WO2020006961A1 (en) * 2018-07-03 2020-01-09 北京字节跳动网络技术有限公司 Image extraction method and device
CN109344736A (en) * 2018-09-12 2019-02-15 苏州大学 A kind of still image people counting method based on combination learning
CN109117831A (en) * 2018-09-30 2019-01-01 北京字节跳动网络技术有限公司 The training method and device of object detection network
US20210142108A1 (en) * 2018-11-15 2021-05-13 Tencent Technology (Shenzhen) Company Limited Methods, apparatus, and storage medium for classifying graph nodes
CN110188597A (en) * 2019-01-04 2019-08-30 北京大学 A kind of dense population counting and accurate positioning method and system based on attention mechanism circulation scaling
US20210209392A1 (en) * 2019-02-01 2021-07-08 Beijing Sensetime Technology Development Co., Ltd. Image Processing Method and Device, and Storage Medium
CN110807409A (en) * 2019-10-30 2020-02-18 上海眼控科技股份有限公司 Crowd density detection model training method and crowd density detection method
CN111582252A (en) * 2020-06-16 2020-08-25 上海眼控科技股份有限公司 Crowd density map acquisition method and device, computer equipment and storage medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
常沛;夏勇;李玉景;吴涛;: "基于CNN的SAR车辆目标检测", 雷达科学与技术, no. 02, 15 April 2019 (2019-04-15) *
陈思秦;: "基于全卷积神经网络的人群计数", 电子设计工程, no. 02, 20 January 2018 (2018-01-20) *

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112800930A (en) * 2021-01-25 2021-05-14 北京市商汤科技开发有限公司 Non-motor vehicle counting method, device, equipment and storage medium
CN113657397A (en) * 2021-08-17 2021-11-16 北京百度网讯科技有限公司 Training method for circularly generating network model, and method and device for establishing word stock
CN113657397B (en) * 2021-08-17 2023-07-11 北京百度网讯科技有限公司 Training method for circularly generating network model, method and device for establishing word stock
CN117495434A (en) * 2023-12-25 2024-02-02 天津大学 Electric energy demand prediction method, model training method, device and electronic equipment
CN117495434B (en) * 2023-12-25 2024-04-05 天津大学 Electric energy demand prediction method, model training method, device and electronic equipment

Similar Documents

Publication Publication Date Title
CN109858445B (en) Method and apparatus for generating a model
CN108520220B (en) Model generation method and device
CN108710885B (en) Target object detection method and device
CN112598762B (en) Three-dimensional lane line information generation method, device, electronic device, and medium
CN111967467B (en) Image target detection method and device, electronic equipment and computer readable medium
CN112183627A (en) Method for generating predicted density map network and vehicle annual inspection mark number detection method
CN110956255B (en) Difficult sample mining method and device, electronic equipment and computer readable storage medium
CN112348029B (en) Local map adjusting method, device, equipment and computer readable medium
CN113607185B (en) Lane line information display method, lane line information display device, electronic device, and computer-readable medium
CN112328731B (en) Vehicle lane level positioning method and device, electronic equipment and computer readable medium
CN111986265B (en) Method, apparatus, electronic device and medium for calibrating camera
CN112330788A (en) Image processing method, image processing device, readable medium and electronic equipment
CN110852242A (en) Watermark identification method, device, equipment and storage medium based on multi-scale network
CN113808134B (en) Oil tank layout information generation method, oil tank layout information generation device, electronic apparatus, and medium
CN111414921B (en) Sample image processing method, device, electronic equipment and computer storage medium
CN113642510A (en) Target detection method, device, equipment and computer readable medium
CN114399555B (en) Data online calibration method and device, electronic equipment and computer readable medium
CN114842448B (en) Three-dimensional lane line generation method and device, electronic device and computer readable medium
CN112884794B (en) Image generation method, device, electronic equipment and computer readable medium
CN114663524B (en) Multi-camera online calibration method and device, electronic equipment and computer readable medium
CN111311616B (en) Method and apparatus for segmenting an image
CN116630436B (en) Camera external parameter correction method, camera external parameter correction device, electronic equipment and computer readable medium
CN113204661B (en) Real-time road condition updating method, electronic equipment and computer readable medium
CN114743077A (en) Image quality information generation method, image quality information generation model training method, and image quality information generation program
CN118170371A (en) Page generation method and device based on drag page component and electronic equipment

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