CN115311514A - Sample updating method and device, electronic equipment and storage medium - Google Patents

Sample updating method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN115311514A
CN115311514A CN202210876128.9A CN202210876128A CN115311514A CN 115311514 A CN115311514 A CN 115311514A CN 202210876128 A CN202210876128 A CN 202210876128A CN 115311514 A CN115311514 A CN 115311514A
Authority
CN
China
Prior art keywords
detection
target
target object
detection result
detection model
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
CN202210876128.9A
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.)
Apollo Intelligent Technology Beijing Co Ltd
Original Assignee
Apollo Intelligent Technology Beijing 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 Apollo Intelligent Technology Beijing Co Ltd filed Critical Apollo Intelligent Technology Beijing Co Ltd
Priority to CN202210876128.9A priority Critical patent/CN115311514A/en
Publication of CN115311514A publication Critical patent/CN115311514A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/77Processing image or video features in feature spaces; using data integration or data reduction, e.g. principal component analysis [PCA] or independent component analysis [ICA] or self-organising maps [SOM]; Blind source separation
    • G06V10/774Generating sets of training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/764Arrangements for image or video recognition or understanding using pattern recognition or machine learning using classification, e.g. of video objects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/50Context or environment of the image
    • G06V20/56Context or environment of the image exterior to a vehicle by using sensors mounted on the vehicle
    • G06V20/58Recognition of moving objects or obstacles, e.g. vehicles or pedestrians; Recognition of traffic objects, e.g. traffic signs, traffic lights or roads
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/50Context or environment of the image
    • G06V20/56Context or environment of the image exterior to a vehicle by using sensors mounted on the vehicle
    • G06V20/58Recognition of moving objects or obstacles, e.g. vehicles or pedestrians; Recognition of traffic objects, e.g. traffic signs, traffic lights or roads
    • G06V20/584Recognition of moving objects or obstacles, e.g. vehicles or pedestrians; Recognition of traffic objects, e.g. traffic signs, traffic lights or roads of vehicle lights or traffic lights
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/60Type of objects
    • G06V20/62Text, e.g. of license plates, overlay texts or captions on TV images
    • G06V20/625License plates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V2201/00Indexing scheme relating to image or video recognition or understanding
    • G06V2201/07Target detection

Abstract

The disclosure provides a sample updating method and device, electronic equipment and a storage medium, and relates to the technical field of artificial intelligence, in particular to the fields of deep learning, computer vision, target detection and the like. The specific implementation scheme is as follows: inputting the first picture into a trained first detection model to obtain a detection result; executing identification processing under the condition that the first object and the second object in the detection result do not meet the preset condition to obtain a first target object associated with the second object; establishing association information according to the second object and the first target object; and updating the training sample used for executing the incremental training of the first detection model according to the associated information to obtain an updated training sample. By adopting the method and the device, the accuracy of updating the sample can be improved.

Description

Sample updating method and device, electronic equipment and storage medium
Technical Field
The present disclosure relates to the field of industrial intelligence technology, and in particular, to the fields of deep learning, computer vision, target detection, and the like.
Background
With the development of the technology, the hardware performance can be improved through artificial intelligence, and the applicable application scenes are various, for example, in the hardware design of application scenes related to computer vision, such as target detection, single target tracking, OCR recognition, image processing, video processing and the like, the artificial intelligence technology can be adopted, that is, the hardware design of the application scenes is that: and deploying the trained model in hardware to improve the processing speed and the processing accuracy of the hardware. The target detection is used as a core task in the field of computer vision, and because the resolution of a target object is not high, and the detection precision is not high due to the fact that the target object is a small target such as a license plate, a human face and the like which are difficult to accurately detect, how to obtain a more accurate training sample in practical application is needed to solve, and further improve the precision of the target detection.
Disclosure of Invention
The disclosure provides a sample updating method, a sample updating device, an electronic device and a storage medium.
According to an aspect of the present disclosure, there is provided a sample update method, including:
inputting the first picture into a trained first detection model to obtain a detection result;
executing identification processing under the condition that the first object and the second object in the detection result do not meet the preset condition to obtain a first target object associated with the second object;
establishing association information according to the second object and the first target object;
and updating the training sample used for executing incremental training of the first detection model according to the associated information to obtain an updated training sample.
According to another aspect of the present disclosure, there is provided a sample update apparatus including:
the detection module is used for inputting the first picture into the trained first detection model to obtain a detection result;
the identification module is used for executing identification processing under the condition that the first object and the second object in the detection result do not meet the preset condition to obtain a first target object associated with the second object;
the association module is used for establishing association information according to the second object and the first target object;
and the sample updating module is used for updating the training sample used for executing the incremental training of the first detection model according to the association information to obtain an updated training sample.
According to another aspect of the present disclosure, there is provided an electronic device including:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein, the first and the second end of the pipe are connected with each other,
the memory stores instructions executable by the at least one processor to cause the at least one processor to perform a method as provided by any one of the embodiments of the present disclosure.
According to another aspect of the present disclosure, there is provided a non-transitory computer readable storage medium storing computer instructions for causing a computer to perform a method provided by any one of the embodiments of the present disclosure.
According to another aspect of the present disclosure, there is provided a computer program product comprising computer instructions which, when executed by a processor, implement the method provided by any one of the embodiments of the present disclosure.
By adopting the method and the device, the first picture can be input into the trained first detection model to obtain the detection result, the identification processing is executed under the condition that the first object and the second object in the detection result do not meet the preset condition to obtain the first target object associated with the second object, and the association information is established according to the second object and the first target object to serve as the updated training sample. Because the associated information is used as the training sample for the first detection model to perform the incremental training, the training sample for the first detection model to perform the incremental training is updated according to the associated information, and the obtained updated training sample is more accurate.
It should be understood that the statements in this section are not intended to identify key or critical features of the embodiments of the present disclosure, nor are they intended to limit the scope of the present disclosure. Other features of the present disclosure will become apparent from the following description.
Drawings
The drawings are included to provide a better understanding of the present solution and are not to be construed as limiting the present disclosure. Wherein:
FIG. 1 is a schematic diagram of a distributed cluster processing scenario according to an embodiment of the present disclosure;
FIG. 2 is a schematic flow diagram of a sample update method according to an embodiment of the present disclosure;
FIG. 3 is a schematic diagram of implementing detection based on sample updates according to an embodiment of the present disclosure;
FIG. 4 is a schematic diagram of license plate detection according to an application example of the present disclosure;
FIG. 5 is a schematic diagram of brake light detection according to an application example of the disclosed embodiments;
FIG. 6 is a schematic diagram of face detection on a road according to an application example of the present disclosure;
FIG. 7 is a schematic diagram of face detection on a vehicle according to an application example of the present disclosure;
FIG. 8 is a schematic diagram of multi-application scenario detection for an application example in accordance with an embodiment of the present disclosure;
FIG. 9 is a schematic diagram of a sample update apparatus according to an embodiment of the present disclosure;
FIG. 10 is a block diagram of an electronic device used to implement the sample update method of an embodiment of the present disclosure.
Detailed Description
Exemplary embodiments of the present disclosure are described below with reference to the accompanying drawings, in which various details of the embodiments of the disclosure are included to assist understanding, and which are to be considered as merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the disclosure. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
The term "and/or" herein is merely an association describing 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. The term "at least one" herein means any one of a plurality or any combination of at least two of a plurality, for example, including at least one of a, B, C, and may mean including any one or more elements selected from the group consisting of a, B, and C. The terms "first" and "second" as used herein are intended to refer to and distinguish one from another, are not intended to limit the order in which the terms are used, or are intended to limit the order in which the terms are used, and are intended to refer to two or more features, e.g., a first feature and a second feature, where the first feature may be one or more and the second feature may be one or more.
Furthermore, in the following detailed description, numerous specific details are set forth in order to provide a better understanding of the present disclosure. It will be understood by those skilled in the art that the present disclosure may be practiced without some of these specific details. In some instances, methods, means, elements and circuits that are well known to those skilled in the art have not been described in detail so as not to obscure the present disclosure.
According to an embodiment of the present disclosure, fig. 1 is a schematic diagram of a distributed cluster processing scenario according to an embodiment of the present disclosure, where the distributed cluster system is an example of a cluster system, and exemplarily describes that detection (which may be detection for small targets such as license plates, brake lights, faces, and the like) may be performed by using the distributed cluster system, and specifically, model training may be performed on a first detection model based on an updated training sample (for example, a training sample used by the first detection model to perform incremental training is updated according to association information to obtain the updated training sample) to obtain a second detection model, so that the small target detection is realized by the second detection model, and a small target may be directly output. The present disclosure is not limited to detection on a single machine or multiple machines, and the accuracy of detection can be further improved by using distributed processing. As shown in fig. 1, in the distributed cluster system 100, a plurality of nodes (e.g., server cluster 101, server 102, server cluster 103, server 104, and server 105) are included, the server 105 may further be connected to electronic devices, such as a mobile phone 1051 and a desktop 1052, and the plurality of nodes and the connected electronic devices may jointly perform one or more detection tasks. Optionally, a plurality of nodes in the distributed cluster system may execute a detection task in a data parallel manner; a plurality of nodes in the distributed cluster system can also execute detection tasks in a model parallel mode. Optionally, after each round of detection task is completed, data exchange (e.g., data synchronization) may be performed between multiple nodes.
According to an embodiment of the present disclosure, a sample updating method is provided, and fig. 2 is a schematic flowchart of the sample updating method according to the embodiment of the present disclosure, and the method may be applied to a sample updating apparatus, for example, the apparatus may be deployed in a situation where a terminal or a server or other processing devices in a single-machine, multi-machine, or cluster system execute, and may implement sample updating and the like. The terminal may be a User Equipment (UE), a mobile device, a Personal Digital Assistant (PDA), a handheld device, a computing device, a vehicle-mounted device, a wearable device, or the like. In some possible implementations, the method may also be implemented by a processor invoking computer readable instructions stored in a memory. As shown in fig. 2, the method is applied to any node or electronic device (mobile phone or desktop, etc.) in the cluster system shown in fig. 1, and includes:
s201, inputting the first picture into the trained first detection model to obtain a detection result.
S202, under the condition that the first object and the second object in the detection result do not meet the preset condition, the identification processing is executed, and a first target object associated with the second object is obtained.
And S203, establishing association information according to the second object and the first target object.
And S204, updating the training sample used for executing the incremental training of the first detection model according to the association information to obtain an updated training sample.
In an example of S201-S204, the first picture may be a picture carrying a small target (e.g., a license plate, a brake light, a human face, etc.), and in contrast to the small target, the first picture may further include a large target relative to the small target (e.g., a vehicle relative to the license plate, a vehicle relative to the brake light, a human body relative to the human face, etc.). The detection result obtained by the trained first detection model may include a first object (e.g., a small target object) and a second object (e.g., a large target object), and in consideration of "a stable position or an inclusion relationship exists between the first object and the second object" in a class of application scenarios, for example, a human body is used as the second object, and a human body corresponds to a human face of the same person by default, as can be seen: one of the purposes of the detection: it is required that both the first object and the second object can be matched; the second purpose of detection is: when a first object (such as a small target object) is difficult to accurately detect, a second object (such as a large target object) larger than a target is detected through the association information established based on the first object and the second object, and then the first target object corresponding to the second object can be accurately detected according to the association information. The first target object is a small target detection result (i.e. a small target detection result matched with the second object) which is more accurate than the first object which does not satisfy the preset condition with the second object. Therefore, in consideration of the above search purposes, the related information can be used as a training sample for performing incremental training on the first detection model, the first detection model is subjected to model improvement to obtain a second detection model, and further, the second detection model is used for detecting the first picture, so that an accurate small target detection result can be directly obtained.
Wherein, the foregoing does not satisfy the preset condition, including but not limited to the following cases:
the first and second objects are associated with (or matched with) the first target object, for example, a second object (e.g. a human body) corresponds to a first target object (e.g. a human face) by default, but the human body and the human face cannot meet a preset condition when the two objects are matched because the detection accuracy of the human face is not enough;
the second object and the first object are not related (or are called to be matched), for example, a second object (such as a human body) corresponds to a first object (such as a human face) by default, but one human body does not correspond to the human face, or one human body corresponds to a plurality of human faces, so that the human body and the human face cannot meet preset conditions under the condition that the second object and the first object are not matched.
By adopting the method and the device, the first picture can be input into the trained first detection model to obtain the detection result, the identification processing is executed under the condition that the first object and the second object in the detection result do not meet the preset condition to obtain the first target object associated with the second object, and the association information is established according to the second object and the first target object to serve as the updated training sample. The associated information is used as the training sample for the first detection model to perform the incremental training, so that the training sample for the first detection model to perform the incremental training is updated according to the associated information, the obtained updated training sample is more accurate, and the second detection model obtained after model training is performed on the basis of the updated training sample is more accurate for target detection, so that the precision of the target detection is improved.
In one embodiment, the association information includes: an inclusion relationship between the second object and the first target object; and/or a relative positional relationship between the second object and the first target object.
In some examples, the first target object may be a small target object, the second target object may be a large target object relative to the small target object, and the small target object may be included in the large target object, and the small target object may also have a relative positional relationship with the large target object.
In some examples, where the first target object is a small target object, the second object is a large target object relative to the first target object. Incremental training can be performed on the first detection model according to the updated training samples to obtain a second detection model, and small targets are detected according to the second detection model to obtain a target detection result including the first target object. Considering that the second detection model is trained based on the association information, compared to the first detection model, it is possible to directly output a small target corresponding to a large target, which is different from the first detection model, and from the conventional detection model, that is: the target detection result output by the second detection model may only carry the first target object, or may output the first target object and the second object associated with the first target object according to the actual application requirement.
By adopting the embodiment, the small target can be detected according to the second detection model to obtain the target detection result, and because the second detection model is obtained by taking the associated information as the training sample for the first detection model to execute the incremental training, new knowledge can be continuously learned from the new sample through the incremental training, and most of the previously learned knowledge can be stored, the detection of the small target is well improved, so the detection precision is higher for the detection of the small target, and the second detection model can be suitable for various application scenes for detecting the small target, in particular to scenes in which the small target object and the large target object have stable relative positions or contain relationships.
In one embodiment, the method further comprises: and when the first object and the second object in the detection result do not meet the preset condition, the following conditions are adopted: in case the first object does not reach the accuracy threshold, there are two solutions:
1) And amplifying the first picture to obtain an amplified first picture, inputting the amplified first picture into the first detection model, and updating the detection result to obtain an updated detection result. The updated detection results may include: the first target object and the second object associated with the first target object are different from the first object and the second object which are not associated in the previous detection result, so that the detection accuracy can be improved through the first detection model.
2) And extracting a second object from the detection result, amplifying the second object to obtain an amplified second object, inputting the amplified second object into the first detection model, and updating the detection result to obtain an updated detection result. The updated detection result may include: the first target object and the second object associated with the first target object are different from the first object and the second object which are not associated in the previous detection result, so that the detection accuracy can be improved through the first detection model.
If the solution is adopted, the first object and the second object in the updated detection result obtained based on the first detection model still do not satisfy the preset condition, and are detected for multiple times or not matched, the identification processing needs to be executed to obtain the first target object associated with the second object, so that the second detection model is obtained through model improvement of the first detection model, and the detection accuracy of the model is improved.
It should be noted that, for the detection of large targets (such as vehicles relative to license plates, vehicles relative to stop lamps, human bodies relative to human faces, and the like), the detection accuracy generally reaches the standard, but for the detection of small targets, such as human faces, license plates, stop lamps, and the like, the detection accuracy is not sufficient. The training samples can be updated by any of the above embodiments, so as to improve the detection accuracy of the model, for example, in the case of small target detection inaccuracy, at least including: under the conditions that the small target is not detected accurately or the detection is not accurate due to the fact that the large target and the small target do not meet preset conditions, the first detection model is improved by searching the association information between the small target and the large target and using the association information as the update data of the training sample to obtain the second detection model, and then a more accurate small target detection result can be obtained in the improved model (namely the second detection model).
In some examples, for the case that the detection of the small target itself is not accurate, when the first object (i.e., the small target object, such as a human face, a license plate, and a brake light) does not reach the accuracy threshold, the first picture (the picture carrying the small target object and the large target object) is enlarged, for example, by upsampling the first picture, so that the enlarged first picture can be obtained, and since the enlarged first picture is also enlarged, the large target object carried by the enlarged first picture is actually enlarged, so that the enlarged first picture is input into the first detection model, and an updated detection result is obtained, so that the detection accuracy of the small target object and/or the large target object can be improved, and if the small target object is not accurately detected, the small target object and the small target object are determined (an inclusion relationship or a relative position relationship exists) by considering that the large target object is associated with the small target object, so that the detection accuracy of the small target object is also improved according to the associated information.
In some examples, in the case that the detection of the small target itself is not accurate, when the first object (i.e., the small target object, such as a human face, a license plate, and a brake light) does not reach the accuracy threshold, the second object (e.g., the large target object) is extracted from the detection result, and the second object is amplified, for example, by up-sampling the second object, the amplified second object may be obtained.
More specifically, for example, the large target object is a human body, the small target object is a human face, and one human body is matched with one human face by default, but the human face is not accurate, and the whole picture or the whole human body is enlarged and then the corresponding human face is detected, so that the detection accuracy of the human face can be improved.
By adopting the embodiment, the detection precision of the small target can be improved by amplifying the whole first picture or the whole large target object and then detecting the corresponding small target.
In one embodiment, when the first object and the second object in the detection result do not satisfy the preset condition, performing recognition processing to obtain a first target object associated with the second object, includes: and extracting the second object from the detection result, and identifying the target position of the first target object relative to the second object according to the configuration parameters. Performing cutout processing at the target position to obtain a first target object, wherein the configuration parameters comprise: a specified geometric parameter or a specified scale.
It should be noted that, for the first target object, when the detected second object (i.e., the large target object) and the first object (e.g., the small target object) do not satisfy the preset condition, it is necessary to further identify an accurate small target object (a scene having an inclusion relationship between the two or having a stable relationship between the two is suitable for target detection in this embodiment) included in the current large target object, where the accurate small target is taken as the first target object.
In some examples, the large target object is a human body, the small target object is a human face, one human body is matched with one human face by default, the position of the human face in the human body can be identified according to the human body in the detection result, for example, a human face area in the human body is determined according to the proportion of the human face in the human body, and the human face is subjected to matting processing to obtain the human face uniquely associated with the human body.
By adopting the embodiment, the target position of the first target object relative to the second object can be identified according to the configuration parameters, so that the first target object can be obtained by performing matting processing on the target position without performing detection on the first target object by using a second detection model, the detection precision is improved, and the detection cost is reduced.
In one embodiment, the method further comprises: and under the condition that the first object and the second object in the detection result do not meet the preset condition, if the first object corresponding to the second object is a non-first target object, inputting the first object into the trained classification model, and identifying the first target object corresponding to the first object in the classification model according to the classification label.
It should be noted that, for the first target object, when the detected second object (i.e., the large target object) and the first object (e.g., the small target object) do not satisfy the preset condition, it is necessary to further identify an accurate small target object (a scene having an inclusion relationship between the two or a stable relationship between the two is suitable for the target detection of this embodiment) included in the current large target object, where the accurate small target is taken as the first target object.
In some examples, the large target object is a human body, the small target object is a human face, one human body is matched with one human face by default, if the corresponding human body is not a human face but a hindbrain (i.e., is not a first target object), so that a condition that a preset condition is not met is caused, the human face and the hindbrain can be classified and detected through a classification model, and an accurate human face (i.e., is a first target object) is obtained.
By adopting the embodiment, the first object is input into the trained classification model, and the first target object corresponding to the first object can be identified in the classification model according to the classification label, so that the detection precision is improved.
Fig. 3 is a schematic diagram of a detection framework according to an embodiment of the present disclosure, and as shown in fig. 3, a first picture carrying a small target is input into a first detection model, the first picture may also carry a large target, if a small target object is matched with a large target object in a detection result output by the first detection model, a small target detection result is directly output, the small target detection result includes an accurate small target object, and further, association information may be established between the small target object and the large target object; and if the small target object and the large target object in the detection result output by the first detection model do not meet the preset condition, performing model improvement on the first detection model to obtain a trained second detection model, and accordingly, inputting the first picture carrying the small target into the second detection model again to output a small target detection result, wherein the small target detection result comprises an accurate small target object.
In a detection result output by the first detection model, when the small target object and the large target object do not satisfy a preset condition, one mode may be: performing identification processing to obtain a small target object associated with a large target object, so as to establish associated information between the small target object and the large target object, and taking the associated information as a training sample of incremental training of the first detection model; another way may be: and extracting a small target object from the detection result, inputting the small target object into a classification model for classification and identification to obtain a small target object associated with a large target object, so as to establish associated information between the small target object and the large target object, and taking the associated information as a training sample for incremental training of the first detection model to obtain a second detection model.
As shown in fig. 4, small target detection can be performed on a single scene (such as a license plate detection scene), and a license plate 401 in a vehicle can be identified by using the second detection model obtained by the sample updating method of any of the above embodiments.
As shown in fig. 5, small target detection can be performed for a single scene (e.g., a brake light detection scene), and a brake light 501 in a vehicle can be identified by using the second detection model obtained by the sample updating method of any of the above embodiments.
As shown in fig. 6, small target detection may be performed on a single scene (e.g., a road face detection scene), and a face 601 corresponding to a person walking on the road may be identified by using the second detection model obtained by the sample updating method of any of the above embodiments.
As shown in fig. 7, small target detection may be performed on a single scene (e.g., a face detection scene on a vehicle), and a face 701 corresponding to a person in a cab of the vehicle may be identified by using the second detection model obtained by the sample updating method of any of the embodiments.
As shown in fig. 8, the detection can be performed for multiple scenes in a comprehensive manner, and the detection is versatile. Wherein, the multi-scene includes: at least two of a face detection scene 801 of a cab, a face detection scene 802 on the road, a license plate detection scene 803 and a brake light detection scene 804 can be used for identifying small target objects (such as faces, license plates, brake lights and the like) in corresponding scenes by adopting the second detection model obtained by the sample updating method of any one of the embodiments.
In an application example, in addition to directly implementing small target detection by using the second detection model obtained according to the sample update method of any of the above embodiments, an association relationship between a small target object and a large target object may be found, and the large target object is recalled by using the first detection model, and then the small target object is presumed by using the association relationship between the large target object and the small target object, so as to recall the small target object.
In another application example, if the multiple detections are still inaccurate, the second detection model obtained by the sample updating method of any of the above embodiments may be used to directly implement small target detection, and taking the case that there is an association relationship between a human body and a human face, the human face needs to be anonymized to block the features of the human face, so that the position of the human face in the human body needs to be determined. Wherein, the matching condition of the human body and the human face is as follows: one human body is associated with one face by default, and the condition that the human body and the face do not meet the preset condition is as follows: for example, a human body is associated with a face, but not with a face, and the association is with a hindbrain; or, a human body is not related to the brain; or, one human body is associated with a plurality of faces (or a plurality of postbrains), and the like, and the model is improved by considering the following factors:
1) The pixels occupied by the human face in the image are very small, usually less than 32 pixels, the characteristics are very unobvious (the division between the human face and the background is not high, the lens is not necessarily right facing, and the like), and the direct recall detection of the human face is very difficult;
2) In the technical system of image recognition, if a human body is recalled, the difficulty is reduced by several orders of magnitude compared with the face recognition;
3) The human face and the human body have a stable relative position relationship, and the proportion of the head area of the human body to the height of the human body is 1/7 or 1/8;
4) If the human body is recalled, the possible head area of the upper part of the human body is recalled as a human face, simple position conversion can be carried out, the picture can be cut to the area with only the human face, and then the picture is enlarged in size for image recognition again;
5) Compared with the direct recall of the face, after the whole head area is recalled, the user does not necessarily need to directly face the lens to acquire the image;
6) For the coverage area of the human face, the coverage area can be expanded or reduced for adjustment, and the recall area can be expanded or reduced.
In consideration of the above factors, it is possible to obtain a training sample that facilitates improvement of the model (i.e., the first detection model) by using the association relationship between the human body and the human face and the classification and recognition of the human face and the back of the brain thereof, thereby obtaining a more accurate detection model (i.e., the second detection model).
Wherein, human body and human face can be detected by the first detection model, however, in the detection result, there may exist: detecting a human body and a human face, but the human body does not correspond to the human face; or, the human body and the head region where the human face is located can correspond to each other, and are the same person, but the head region corresponding to the human body is a hindbrain and is not the human face, and at this time, if the detected hindbrain of the human corresponds to the human body instead of the human face, classification and identification need to be performed through a classification model to correct errors, that is, correct an incorrect association relationship, so as to correspond the human face to the human body. Such requires retraining the first detection model. Further, the association relationship between the human body and the face may be obtained through an association model (a model trained in advance for identifying the position or the inclusion relationship between the human body and the face) in addition to the specified geometric parameters or proportion. Furthermore, after the face is obtained, the face can be amplified or in other modes to meet the requirements of other downstream application scenes.
By adopting the application example, the training sample is specific, but the improved detection model is universal and can be applied to various application scenes, and the detection method is not limited to the detection scenes of the human body and the human face.
According to an embodiment of the present disclosure, there is provided a sample update apparatus, fig. 9 is a schematic structural diagram of a sample update apparatus according to an embodiment of the present disclosure, and as shown in fig. 9, the sample update apparatus includes: the detection module 901 is configured to input the first picture into the trained first detection model to obtain a detection result; an identifying module 902, configured to perform identification processing when the first object and the second object in the detection result do not satisfy a preset condition, so as to obtain a first target object associated with the second object; a correlation module 903, configured to establish correlation information between the second object and the first target object according to the second object; and a sample updating module 904, configured to update the training sample used by the first detection model to perform incremental training according to the association information, so as to obtain an updated training sample.
In one embodiment, the association information includes: an inclusion relationship between the second object and the first target object; and/or a relative positional relationship between the second object and the first target object.
In one embodiment, when the first target object is a small target, the second object is a large target relative to the first target object; the small target detection module is used for performing the incremental training on the first detection model according to the updated training sample to obtain a second detection model; and detecting the small target according to the second detection model to obtain a target detection result comprising the first target object.
In an embodiment, the apparatus further includes a first amplifying module, configured to, when the preset condition is not satisfied: and under the condition that the first object does not reach the precision threshold, amplifying the first picture to obtain an amplified first picture.
In an embodiment, the system further includes a first detection updating module, configured to input the amplified first picture into the first detection model, and update the detection result to obtain an updated detection result.
In an embodiment, the apparatus further includes a second amplifying module, configured to, when the preset condition is not satisfied: under the condition that the first object does not reach the precision threshold value, extracting the second object from the detection result; and carrying out amplification processing on the second object to obtain an amplified second object.
In an embodiment, the system further includes a second detection updating module, configured to input the amplified second object into the first detection model, and update the detection result to obtain an updated detection result.
In an embodiment, the system further includes a classification module, configured to, when the preset condition is not satisfied: under the condition that the first object corresponding to the second object is a non-first target object, inputting the first object into a trained classification model; and identifying the first target object corresponding to the first object according to a classification label in the classification model.
In one embodiment, the identifying module 902 is configured to extract the second object from the detection result; identifying a target position of the first target object relative to the second object according to the configuration parameters; performing matting processing on the target position to obtain the first target object; wherein the configuration parameters include: a specified geometric parameter or a specified scale.
In the technical scheme of the disclosure, the acquisition, storage, application and the like of the personal information of the related user all accord with the regulations of related laws and regulations, and do not violate the good customs of the public order.
The present disclosure also provides an electronic device, a readable storage medium, and a computer program product according to embodiments of the present disclosure.
FIG. 10 illustrates a schematic block diagram of an example electronic device 1000 that can be used to implement embodiments of the present disclosure. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be examples only, and are not meant to limit implementations of the disclosure described and/or claimed herein.
As shown in fig. 10, the electronic device 1000 includes a computing unit 1001 that can perform various appropriate actions and processes according to a computer program stored in a Read Only Memory (ROM) 1002 or a computer program loaded from a storage unit 1008 into a Random Access Memory (RAM) 1003. In the RAM 1003, various programs and data necessary for the operation of the electronic apparatus 1000 can also be stored. The calculation unit 1001, the ROM 1002, and the RAM 1003 are connected to each other by a bus 1004. An input/output (I/O) interface 1005 is also connected to bus 1004.
A number of components in the electronic device 1000 are connected to the I/O interface 1005, including: an input unit 1006 such as a keyboard, a mouse, and the like; an output unit 1007 such as various types of displays, speakers, and the like; a storage unit 1008 such as a magnetic disk, optical disk, or the like; and a communication unit 1009 such as a network card, a modem, a wireless communication transceiver, or the like. The communication unit 1009 allows the electronic device 1000 to exchange information/data with other devices through a computer network such as the internet and/or various telecommunication networks.
Computing unit 1001 may be a variety of general and/or special purpose processing components with processing and computing capabilities. Some examples of the computing unit 1001 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various dedicated Artificial Intelligence (AI) computing chips, various computing units running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, and so forth. The calculation unit 1001 performs the respective methods and processes described above, such as the sample update method. For example, in some embodiments, the sample update method may be implemented as a computer software program tangibly embodied in a machine-readable medium, such as the storage unit 1008. In some embodiments, part or all of the computer program may be loaded and/or installed onto electronic device 1000 via ROM 1002 and/or communications unit 1009. When the computer program is loaded into RAM 1003 and executed by computing unit 1001, one or more steps of the sample update method described above may be performed. Alternatively, in other embodiments, the computing unit 1001 may be configured to perform the sample update method in any other suitable manner (e.g., by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuitry, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), system on a chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs that are executable and/or interpretable on a programmable system including at least one programmable processor, which may be special or general purpose, receiving data and instructions from, and transmitting data and instructions to, a storage system, at least one input device, and at least one output device.
Program code for implementing the methods of the present disclosure may be written in any combination of one or more programming languages. These program code may be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the program code, when executed by the processor or controller, causes the functions/acts specified in the flowchart and/or block diagram to be performed. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on 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 compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form, including acoustic, speech, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a back-end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back-end, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), and the Internet.
The computer system may include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server may be a cloud server, a server of a distributed system, or a server with a combined blockchain.
It should be understood that various forms of the flows shown above may be used, with steps reordered, added, or deleted. For example, the steps described in the present disclosure may be executed in parallel or sequentially or in different orders, and are not limited herein as long as the desired results of the technical solutions of the present disclosure can be achieved.
The above detailed description should not be construed as limiting the scope of the disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may be made in accordance with design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present disclosure should be included in the scope of protection of the present disclosure.

Claims (21)

1. A sample update method, comprising:
inputting the first picture into a trained first detection model to obtain a detection result;
executing identification processing under the condition that a first object and a second object in the detection result do not meet a preset condition to obtain a first target object associated with the second object;
establishing association information according to the second object and the first target object;
and updating the training sample used for executing incremental training of the first detection model according to the association information to obtain an updated training sample.
2. The method of claim 1, wherein the association information comprises:
an inclusion relationship between the second object and the first target object; and/or the presence of a gas in the gas,
a relative positional relationship between the second object and the first target object.
3. The method of claim 2, wherein the second object is a large target relative to the first target object if the first target object is a small target;
further comprising:
performing the incremental training on the first detection model according to the updated training sample to obtain a second detection model;
and detecting the small target according to the second detection model to obtain a target detection result comprising the first target object.
4. The method of claim 3, further comprising:
and when the preset condition is not met, the following conditions are adopted: and under the condition that the first object does not reach the precision threshold, amplifying the first picture to obtain an amplified first picture.
5. The method of claim 4, further comprising:
and inputting the amplified first picture into the first detection model, and updating the detection result to obtain an updated detection result.
6. The method of claim 3, further comprising:
and when the preset condition is not met, the following conditions are adopted: under the condition that the first object does not reach the precision threshold value, extracting the second object from the detection result;
and carrying out amplification processing on the second object to obtain an amplified second object.
7. The method of claim 6, further comprising:
and inputting the amplified second object into the first detection model, and updating the detection result to obtain an updated detection result.
8. The method of claim 3, further comprising:
when the preset condition is not met, the following conditions are adopted: under the condition that the first object corresponding to the second object is a non-first target object, inputting the first object into a trained classification model;
and identifying the first target object corresponding to the first object according to a classification label in the classification model.
9. The method according to any one of claims 1 to 8, wherein performing recognition processing on the first object and the second object in the detection result if the first object and the second object do not satisfy a preset condition to obtain a first target object associated with the second object comprises:
extracting the second object from the detection result;
identifying a target position of the first target object relative to the second object according to the configuration parameters;
performing matting processing on the target position to obtain the first target object;
wherein the configuration parameters include: a specified geometric parameter or a specified scale.
10. A sample update apparatus comprising:
the detection module is used for inputting the first picture into the trained first detection model to obtain a detection result;
the identification module is used for executing identification processing under the condition that the first object and the second object in the detection result do not meet the preset condition to obtain a first target object associated with the second object;
the association module is used for establishing association information according to the second object and the first target object;
and the sample updating module is used for updating the training sample used for executing the incremental training of the first detection model according to the associated information to obtain an updated training sample.
11. The apparatus of claim 10, wherein the association information comprises:
an inclusion relationship between the second object and the first target object; and/or the presence of a gas in the gas,
a relative positional relationship between the second object and the first target object.
12. The apparatus of claim 11, wherein the second object is a large target relative to the first target object if the first target object is a small target;
further comprising: a small target detection module to:
performing the incremental training on the first detection model according to the updated training sample to obtain a second detection model;
and detecting the small target according to the second detection model to obtain a target detection result comprising the first target object.
13. The apparatus of claim 12, further comprising a first amplification module to:
and when the preset condition is not met, the following conditions are adopted: and under the condition that the first object does not reach the precision threshold, amplifying the first picture to obtain an amplified first picture.
14. The apparatus of claim 13, further comprising a first detection update module to:
and inputting the amplified first picture into the first detection model, and updating the detection result to obtain an updated detection result.
15. The apparatus of claim 12, further comprising a second amplification module to:
and when the preset condition is not met, the following conditions are adopted: under the condition that the first object does not reach a precision threshold value, extracting the second object from the detection result;
and carrying out amplification processing on the second object to obtain an amplified second object.
16. The apparatus of claim 15, further comprising a second detection update module to:
and inputting the amplified second object into the first detection model, and updating the detection result to obtain an updated detection result.
17. The apparatus of claim 12, further comprising a classification module to:
and when the preset condition is not met, the following conditions are adopted: under the condition that the first object corresponding to the second object is a non-first target object, inputting the first object into a trained classification model;
and identifying the first target object corresponding to the first object according to a classification label in the classification model.
18. The apparatus of any one of claims 10-17, wherein the identification module is to:
extracting the second object from the detection result;
identifying a target position of the first target object relative to the second object according to the configuration parameters;
performing matting processing on the target position to obtain the first target object;
wherein the configuration parameters include: a specified geometric parameter or a specified scale.
19. An electronic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-9.
20. A non-transitory computer readable storage medium having stored thereon computer instructions for causing the computer to perform the method of any one of claims 1-9.
21. A computer program product comprising a computer program which, when executed by a processor, implements the method according to any one of claims 1-9.
CN202210876128.9A 2022-07-25 2022-07-25 Sample updating method and device, electronic equipment and storage medium Pending CN115311514A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210876128.9A CN115311514A (en) 2022-07-25 2022-07-25 Sample updating method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210876128.9A CN115311514A (en) 2022-07-25 2022-07-25 Sample updating method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN115311514A true CN115311514A (en) 2022-11-08

Family

ID=83859109

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210876128.9A Pending CN115311514A (en) 2022-07-25 2022-07-25 Sample updating method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115311514A (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111476083A (en) * 2020-02-07 2020-07-31 山东理工大学 Automatic identification method for wearing of safety helmet of electric power staff
CN111523414A (en) * 2020-04-13 2020-08-11 绍兴埃瓦科技有限公司 Face recognition method and device, computer equipment and storage medium
CN112036214A (en) * 2019-06-03 2020-12-04 上海湃道智能科技有限公司 Method for identifying small target in low-image-quality video in real time

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112036214A (en) * 2019-06-03 2020-12-04 上海湃道智能科技有限公司 Method for identifying small target in low-image-quality video in real time
CN111476083A (en) * 2020-02-07 2020-07-31 山东理工大学 Automatic identification method for wearing of safety helmet of electric power staff
CN111523414A (en) * 2020-04-13 2020-08-11 绍兴埃瓦科技有限公司 Face recognition method and device, computer equipment and storage medium

Similar Documents

Publication Publication Date Title
CN113920307A (en) Model training method, device, equipment, storage medium and image detection method
EP3852008A2 (en) Image detection method and apparatus, device, storage medium and computer program product
CN112861885B (en) Image recognition method, device, electronic equipment and storage medium
CN114187459A (en) Training method and device of target detection model, electronic equipment and storage medium
CN113537374A (en) Confrontation sample generation method
CN113205041A (en) Structured information extraction method, device, equipment and storage medium
CN113378712A (en) Training method of object detection model, image detection method and device thereof
CN113537192B (en) Image detection method, device, electronic equipment and storage medium
CN113436233A (en) Registration method and device of automatic driving vehicle, electronic equipment and vehicle
CN113326796A (en) Object detection method, model training method and device and electronic equipment
CN113191261A (en) Image category identification method and device and electronic equipment
CN114674328B (en) Map generation method, map generation device, electronic device, storage medium, and vehicle
CN114429631B (en) Three-dimensional object detection method, device, equipment and storage medium
CN113627526B (en) Vehicle identification recognition method and device, electronic equipment and medium
CN115311514A (en) Sample updating method and device, electronic equipment and storage medium
CN113869147A (en) Target detection method and device
CN114445682A (en) Method, device, electronic equipment, storage medium and product for training model
CN114419564A (en) Vehicle pose detection method, device, equipment, medium and automatic driving vehicle
CN113869317A (en) License plate recognition method and device, electronic equipment and storage medium
CN113963186A (en) Training method of target detection model, target detection method and related device
CN113654548A (en) Positioning method, positioning device, electronic equipment and storage medium
CN113379592A (en) Method and device for processing sensitive area in picture and electronic equipment
CN114158119B (en) Driving direction identification method and device, electronic equipment and medium
CN113963322B (en) Detection model training method and device and electronic equipment
CN114092874B (en) Training method of target detection model, target detection method and related equipment thereof

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