Image recognition method, device, electronic device, and storage medium

By integrating quality assessment values ​​and wearable assessment values, the problem of low accuracy in wearable compliance testing has been solved, achieving higher detection accuracy and a lower false alarm rate.

CN115376158BActive Publication Date: 2026-02-06ZHEJIANG DAHUA TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210814805.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-07-12
Publication Date
2026-02-06
Estimated Expiration
2042-07-12

AI Technical Summary

Technical Problem

Existing wearable compliance testing methods are affected by factors such as the performance of preset models, shooting angles, and scene types, resulting in low detection accuracy.

Method used

By acquiring the quality assessment value and wear assessment value of the target object in the image to be detected, and fusing them with the preset attribute assessment parameters and the trained detection model, the wear compliance recognition result is obtained, including the fusion of quality assessment value and wear assessment value.

Benefits of technology

It improved the accuracy of wearable compliance testing and reduced the false alarm and false judgment rates.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115376158B_ABST
    Figure CN115376158B_ABST
Patent Text Reader

Abstract

The application relates to an image recognition method and device, an electronic device and a storage medium. The image recognition method comprises the following steps: acquiring a quality evaluation value and a wearing evaluation value of a target object in a to-be-detected image; the wearing evaluation value represents the probability that the wearing of the target object conforms to a wearing compliance condition; and the quality evaluation value and the wearing evaluation value are fused to obtain a wearing compliance recognition result of whether the wearing of the target object conforms to the wearing compliance condition. Through the application, the quality evaluation value and the wearing evaluation value are fused, so that the accuracy of the wearing compliance detection of the target object can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of image processing, and in particular to an image recognition method and device, an electronic device, and a storage medium. BACKGROUND

[0002] With the development of science and technology, various intelligent technologies have been widely applied in various industries. For some simple and repetitive applications that consume a lot of manpower, using intelligent technology to replace manual work can save a lot of manpower costs. Therefore, applying artificial intelligence technology to the field of wearing compliance detection has become a feasible choice. At present, in the process of detecting wearing compliance based on image processing technology, a preset model is often directly used to judge the wearing behavior of a target person in a to-be-detected image, or the position relationship between a target object and a target person is used for judgment. The current wearing compliance detection method is disturbed by factors such as the actual performance of the preset model, the shooting angle, the scene type, and the posture of the person, so the accuracy of the current wearing compliance detection is low.

[0003] At present, there is no effective solution to the problem of low accuracy of wearing compliance detection in the related art. SUMMARY

[0004] An image recognition method, device, electronic device, and storage medium are provided in the present embodiment to solve the problem of low accuracy of wearing compliance detection in the related art.

[0005] In a first aspect, an image recognition method is provided in the present embodiment, and the method comprises:

[0006] obtaining a quality evaluation value and a wearing evaluation value of a target object in a to-be-detected image; the wearing evaluation value represents a probability that the wearing of the target object meets a wearing compliance condition;

[0007] fusing the quality evaluation value and the wearing evaluation value to obtain a wearing compliance recognition result of whether the wearing of the target object meets the wearing compliance condition.

[0008] In some embodiments, obtaining a quality evaluation value and a wearing evaluation value of a target object in a to-be-detected image comprises:

[0009] performing quality evaluation on a quality attribute of the target object in the to-be-detected image according to a preset attribute evaluation parameter to obtain a quality evaluation value of the target object; wherein the preset attribute evaluation parameter is determined based on a preset optimal detection index under a detection scene;

[0010] In response to the quality evaluation value meeting the preset quality condition, detecting the target object based on the trained wearing compliance detection model to obtain a wearing evaluation value of the target object.

[0011] In some embodiments, the method further comprises:

[0012] In response to the quality evaluation value not meeting the preset quality condition, identifying the wearing evaluation value of the target object as a preset value.

[0013] In some embodiments, the attribute evaluation parameter comprises a score mapping function, a quality threshold, and an attribute weight; and the quality evaluation of the quality attribute of the target object in the to-be-detected image according to the preset attribute evaluation parameter to obtain the quality evaluation value of the target object comprises:

[0014] performing score mapping on the quality attribute of the target object in the to-be-detected image according to the score mapping function to obtain an attribute score corresponding to the quality attribute;

[0015] performing binary processing on the attribute score based on the quality threshold to obtain a quality mark corresponding to the quality attribute;

[0016] weighting the attribute score according to the attribute weight, and fusing the weighting result and the quality mark to obtain the quality evaluation value of the target object.

[0017] In some embodiments, the fusing of the quality evaluation value and the wearing evaluation value to obtain the wearing compliance identification result of the target object as to whether the wearing complies with the wearing compliance condition comprises:

[0018] fusing the quality evaluation value of the target object in a single to-be-detected image and the wearing evaluation value of the target object in the single to-be-detected image to obtain a compliance fusion result of the target object in the single to-be-detected image;

[0019] statistically processing compliance fusion results of a preset number of to-be-detected images to obtain a compliance statistical result of the target object;

[0020] In response to the compliance statistical result being lower than a preset non-compliance threshold, obtaining the wearing compliance identification result of the target object as to the wearing complying with the preset wearing compliance condition.

[0021] In some embodiments, the fusing of the quality evaluation value of the target object in a single to-be-detected image and the wearing evaluation value of the target object in the single to-be-detected image to obtain a compliance fusion result of the target object in the single to-be-detected image comprises:

[0022] The quality evaluation value of the target object in the single frame to-be-detected image and the wearing evaluation value of the target object in the single frame to-be-detected image are processed according to a preset operation rule, to obtain a compliance fusion result of the target object in the single frame to-be-detected image.

[0023] In some embodiments, the method further includes:

[0024] In response to the wearing compliance identification result indicating that the wearing of the target object does not comply with the preset wearing compliance condition, generating an alarm information for the wearing compliance identification result.

[0025] In a second aspect, an image recognition device is provided in the embodiment, and the image recognition device includes an acquisition module and a fusion module.

[0026] The acquisition module is configured to acquire a quality evaluation value and a wearing evaluation value of a target object in a to-be-detected image, and the wearing evaluation value represents a probability that the wearing of the target object complies with a wearing compliance condition.

[0027] The fusion module is configured to fuse the quality evaluation value and the wearing evaluation value to obtain a wearing compliance identification result of whether the target object complies with the wearing compliance condition.

[0028] In a third aspect, an electronic device is provided in the embodiment, including a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the image recognition method of the first aspect when executing the computer program.

[0029] In a fourth aspect, a storage medium is provided in the embodiment, and the storage medium stores a computer program executable by a processor to implement the image recognition method of the first aspect.

[0030] Compared with the related art, the image recognition method, device, electronic device, and storage medium provided in the embodiment acquire a quality evaluation value and a wearing evaluation value of a target object in a to-be-detected image, the wearing evaluation value represents a probability that the wearing of the target object complies with a wearing compliance condition, and the quality evaluation value and the wearing evaluation value are fused to obtain a wearing compliance identification result of whether the wearing of the target object complies with the wearing compliance condition. The fusion of the quality evaluation value and the wearing evaluation value of the target object is implemented, and thus the accuracy of the wearing compliance detection of the target object is improved.

[0031] Details of one or more embodiments of the present application are presented in the following drawings and description to make other features, objects, and advantages of the present application more apparent. BRIEF DESCRIPTION OF DRAWINGS

[0032] The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiments of the application and together with the description serve to explain the application. In the drawings:

[0033] Figure 1 is a hardware structure block diagram of the intelligent terminal of the image recognition method of the embodiment;

[0034] Figure 2 is a flow chart of the image recognition method of the embodiment;

[0035] Figure 3 is a flow chart of the image recognition method of the preferred embodiment;

[0036] Figure 4 is a structure block diagram of the image recognition device of the embodiment. DETAILED DESCRIPTION

[0037] In order to more clearly understand the purpose, technical solutions and advantages of the present application, the present application is described and explained below in conjunction with the drawings and embodiments.

[0038] Unless otherwise defined, technical terms or scientific terms used in the present application shall have the general meaning understood by a person with ordinary skill in the art to which the present application belongs. In the present application, "one", "a", "an", "the", "these" and similar words do not represent a quantitative limitation, and they can be singular or plural. In the present application, the terms "include", "contain", "have" and any variants thereof have the purpose of covering non-exclusive inclusion; for example, a process, method and system, product or device containing a series of steps or modules (units) are not limited to the listed steps or modules (units), but can include steps or modules (units) not listed, or can include other steps or modules (units) inherent to the process, method, product or device. In the present application, the terms "connected", "connected", "coupled" and similar words are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect. In the present application, "multiple" means two or more. The association between the associated objects is described by "and / or", which means that there can be three relationships, for example, "A and / or B" can mean that A exists alone, A and B exist together, and B exists alone. In general, the character " / " represents an "or" relationship between the objects before and after it. In the present application, the terms "first", "second", "third" and the like are only used to distinguish similar objects, and do not represent a specific order of the objects.

[0039] The method embodiments provided in this example can be executed in a smart terminal, server, or similar computing device. The smart terminal may include a smart camera, and the server may include a regular server, a cloud platform, or a distributed server, etc. For example, running on a smart terminal... Figure 1 This is a hardware structure block diagram of the smart terminal for the image recognition method of this embodiment. For example... Figure 1 As shown, the smart terminal may include one or more ( Figure 1 Only one is shown in the diagram. A processor 102 and a memory 104 for storing data are also included. The processor 102 may be, but is not limited to, a microprocessor (MCU) or a programmable logic device (FPGA). The aforementioned smart terminal may also include a transmission device 106 for communication functions and an input / output device 108. Those skilled in the art will understand that… Figure 1 The structure shown is for illustrative purposes only and does not limit the structure of the aforementioned smart terminal. For example, the smart terminal may also include components that are larger than... Figure 1 The more or fewer components shown, or having the same Figure 1 The different configurations shown are illustrated.

[0040] The memory 104 can be used to store computer programs, such as application software programs and modules, like the computer program corresponding to the image recognition method in this embodiment. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, thereby implementing the above-described method. The memory 104 may include high-speed random access memory and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include memory remotely located relative to the processor 102, and these remote memories can be connected to a smart terminal via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.

[0041] The transmission device 106 is used to receive or send data via a network. This network includes a wireless network provided by the communication provider of the smart terminal. In one example, the transmission device 106 includes a Network Interface Controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the transmission device 106 can be a Radio Frequency (RF) module used for wireless communication with the Internet.

[0042] This embodiment provides an image recognition method. Figure 2 This is a flowchart of the image recognition method in this embodiment, as follows:Figure 2 As shown, the flow includes the following steps:

[0043] In step S210, a quality evaluation value and a wearing evaluation value of a target object in the image to be detected are obtained; the wearing evaluation value represents a probability that the target object wears in compliance with the wearing compliance condition.

[0044] The target object is an object in an application scenario that needs to be detected by an image. For example, it can be a person who needs to be detected for wearing compliance. In addition, the quality evaluation value can be an evaluation value obtained by evaluating the image quality attribute and / or the semantic quality attribute. The image quality attribute represents the quality of optical imaging of the image, such as definition, contrast, and noise. The semantic quality attribute represents the semantic quality of the target object in the image, that is, the attribute at the high-level semantic level that will affect the identification of the target wearing compliance, such as the completeness of the target object, the orientation of the target object relative to the camera, the posture of the target object, such as standing, bending, squatting, and the like, and the perspective of the target object.

[0045] Specifically, related target detection, image tracking, and the like can be used to process the image to be detected to obtain tracking information of the target object, such as a head image, a shoulder image, and a human body image of the target object, and then process the tracking information of the target object based on an image quality detection technology to obtain the quality attribute of the target object, and then evaluate and quantify the quality attribute of the target object to obtain the quality evaluation value of the target object. For example, after analyzing the monitoring video stream in the detection scene or collecting the video, a frame of image to be detected can be obtained. The analyzed single frame of image to be detected is preprocessed, which can include scaling, image space transformation, and the like, so that the image meets the input requirements of the target detection stage. Then, the preprocessed image to be detected is input into the trained target detection model to obtain the position and type of all target objects in the image to be detected. Next, the information output by the target detection is processed using a logical strategy or model to assign the same id to the same target object detected in different frames, and associate each part of the same target object detected (such as head, shoulder, upper body, etc.) to obtain the tracking information of the target object.

[0046] In addition, the quality attribute detection can be implemented based on a trained attribute detection model. The related tracking information of the target object is input into the trained attribute detection model to output at least one of the image quality attribute and the semantic quality attribute of the target object. The attribute detection model can be implemented based on a convolutional neural network, and the specific implementation manner can be determined according to the actual application scenario, which is not limited in the embodiment.

[0047] Additionally, the wearing evaluation value of the target object can be obtained by processing the target object in the to-be-detected image based on a wearing compliance detection algorithm in the field of image processing. Further, the wearing evaluation value of the target object can be obtained by processing the tracking information of the target object based on a trained wearing compliance detection model. Specifically, the trained wearing compliance detection model can be a detection model that meets a preset training condition in terms of training degree. It should be noted that the wearing compliance detection model can be implemented by any neural network or deep algorithm applied to the field of image processing technology, and the specific implementation manner is not limited in the embodiment.

[0048] In the above case where the quality evaluation value of the target object meets a preset quality condition, for example, the quality evaluation value of the target object is higher than a preset threshold, the target object can be determined as a high-quality target object. Thus, the tracking information of the target object whose quality evaluation value meets the preset quality condition is input into the wearing compliance detection model for detection of wearing compliance, and a wearing evaluation value is output. It can be understood that the quality condition can be determined in advance according to an actual application scenario, for example, can be set in advance according to the demand for alarm accuracy and recall rate, and combined with experience.

[0049] For example, the wearing compliance detection model can analyze and process the tracking information by using image processing methods such as target detection, classification, and feature similarity comparison, and output a wearing evaluation value of a single frame of target object wearing non-compliance. The higher the wearing evaluation value, the greater the probability of target object wearing non-compliance.

[0050] In step S220, the quality evaluation value and the wearing evaluation value are fused to obtain a wearing compliance identification result of the target object.

[0051] Specifically, the quality evaluation value and the wearing evaluation value of the target object can be operated based on a preset operation rule and a statistical rule, so as to obtain the wearing compliance identification result of the target object. For example, the quality evaluation value and the wearing evaluation value of a single frame or multiple frames can be processed by weighted statistics, multiplication, etc., so as to obtain the wearing compliance identification result of the target object. It can be understood that the wearing compliance identification result can be determined by fusing the quality evaluation value and the wearing evaluation value of a single frame, or can be determined by fusing the quality evaluation value and the wearing evaluation value of multiple frames, and the specific fusion manner can be determined based on an actual application scenario.

[0052] For example, after obtaining the quality evaluation value of a single frame of target object and the wearing evaluation value of a single frame of target object based on the above step S210, the quality evaluation value and the wearing evaluation value of N frames are fused within a given preset frame number N, so as to obtain the wearing compliance identification result of the jth frame of the target object after fusion of N frames. Specifically, it can be as shown in the following formula:

[0053]

[0054] wherein, X j is a wearing evaluation value of the target object in the jth frame, S j is a quality evaluation value of the target object in the jth frame, Y j is a compliance statistical result of the jth frame obtained by fusing the quality evaluation value and the wearing evaluation value of the target object in N frames.

[0055] In a case where the compliance statistical result meets a preset range, it is confirmed that the wearing of the target object meets the preset wearing compliance condition. For example, a non-compliance threshold can be preset, and in a case where the compliance statistical result is lower than the non-compliance threshold, it is confirmed that the wearing of the target object meets the preset wearing compliance condition. For another example, in a case where the compliance statistical result of the target object meets a preset compliance range, it is confirmed that the wearing of the target object meets the preset wearing compliance condition. In addition, in a case where it is confirmed that the wearing of the target object does not meet the wearing compliance condition, an alarm can be given for the wearing compliance recognition result. By fusing the quality evaluation value and the wearing evaluation value of the target object, the accuracy of the wearing compliance recognition result of the target object can be improved, thereby reducing the false positive rate of the wearing compliance detection.

[0056] The steps S210 to S220 above, the quality evaluation value and the wearing evaluation value of the target object in the to-be-detected image are obtained; the wearing evaluation value represents the probability that the wearing of the target object meets the wearing compliance condition; the quality evaluation value and the wearing evaluation value are fused to obtain a wearing compliance recognition result of whether the wearing of the target object meets the wearing compliance condition. This realizes the fusion of the quality evaluation value and the wearing evaluation value of the target object, thereby improving the accuracy of the wearing compliance detection of the target object.

[0057] Further, in an embodiment, based on the step S210 above, the quality evaluation value and the wearing evaluation value of the target object in the to-be-detected image are obtained, which can specifically include the following steps:

[0058] The step S211, according to a preset attribute evaluation parameter, the quality attribute of the target object in the to-be-detected image is quality evaluated to obtain the quality evaluation value of the target object; wherein, the preset attribute evaluation parameter is determined based on a preset optimal detection index under a detection scene.

[0059] The attribute evaluation parameter is used to evaluate and quantify the quality attributes of the target object to obtain a quality evaluation value of the target object. The attribute evaluation parameter can be determined based on the actual application scenario and the task deployed by the intelligent terminal. For example, the attribute evaluation parameter can include attribute weight, quality threshold, and score mapping function. The attribute weight is used to measure the importance of different quality attributes in the quality score. The quality threshold is used to set the low quality threshold of each quality attribute to determine whether each quality attribute is a low quality attribute. The score mapping function is used to map the output of the attribute detection model to a single attribute branch. It can be understood that a set of different attribute evaluation parameters can correspond to different application scenarios. The attribute evaluation parameter can be determined based on the optimal detection index of the wearing compliance detection model in the evaluation test set under the current application scenario, wherein the optimal detection index is determined according to actual needs, for example, the recognition accuracy of the wearing compliance detection model, mAP(mean Average Precision), ROC(Receiver Operating Characteristi), etc. For example, when the optimal detection index is the recognition accuracy, the attribute evaluation parameter is a set of attribute evaluation parameters corresponding to the highest recognition accuracy of the wearing compliance detection model in the evaluation test set.

[0060] For example, when the detection scene is to judge whether the upper garment of the target object is worn in compliance, the quality attributes related to the upper body of the target object, such as the completeness of the upper body and the posture of the upper body, need to be focused on, and thus the attribute weight of the quality attributes related to the upper body can be increased in this detection scene. When the detection scene is to judge whether the target object wears a mask, the quality attributes of the head of the target object, such as the completeness of the head, the orientation of the head, and the posture, need to be focused on, and thus the attribute weight of these quality attributes can be increased. The process of determining the attribute evaluation parameter can be as follows:

[0061] W, T, C = argmax(G(P(x), Q(x) | W, T, C)) (2)

[0062] Wherein, W is an attribute weight, T is a quality threshold, and C is a score mapping function. P(x) is the output of the wearing recognition model when inputting x, Q(x) is the true value of the test set corresponding to input x, and G() is an effect evaluation function, such as a function corresponding to the determination of the above recognition accuracy, recall rate, mAP, ROC, etc. For example, when it is necessary to determine the recognition accuracy of the wearing recognition model, the G() function is a function for calculating the recognition accuracy; when it is necessary to determine the recall rate of the output of the wearing recognition model, the G() function is a function for calculating the recall rate. It can be understood that for different quality attributes, their corresponding attribute weights, quality thresholds, etc. are different. By obtaining the corresponding attribute evaluation parameters through the evaluation test set of different detection scenes, the accuracy and adaptability of the quality score of the target object in the corresponding detection scene can be improved.

[0063] After obtaining the above attribute evaluation parameters, the quality attributes can be processed based on the attribute evaluation parameters to obtain the quality evaluation value of the target object. Specifically, the quality attributes can be processed based on the above attribute weight, score mapping function, quality threshold, etc. to obtain the quality evaluation value. In this embodiment, the image quality attributes and / or semantic quality attributes of the target object are processed based on the attribute evaluation parameters to obtain the quality evaluation value of the target object, so that the quality attributes of the target object can be quantified, high-quality targets can be screened out, and the efficiency of wearing recognition can be improved.

[0064] Step S212, in response to the quality evaluation value meeting the preset quality condition, detecting the target object based on the trained wearing compliance detection model to obtain the wearing evaluation value of the target object.

[0065] Exemplarily, the preset quality condition can be a pre-set evaluation threshold. In the case where the quality evaluation value is lower than the evaluation threshold, it is determined that the quality evaluation value meets the preset quality condition, and the target object is detected based on the trained wearing compliance detection model, so as to obtain the wearing evaluation value of the target object. In this embodiment, the quality evaluation value of the target object is filtered based on the preset quality condition, and the wearing compliance detection is performed on the filtered target object, so that the accuracy of the output result of the wearing compliance detection can be improved, and the misjudgment rate of the wearing compliance detection of the target object can be reduced.

[0066] Further, in an embodiment, based on the steps S211 to S212 described above, the image recognition method can further include: in response to the quality evaluation value not meeting the preset quality condition, identifying the wearing evaluation value of the target object as a preset value. For example, in the case where the quality evaluation value is lower than the preset evaluation threshold, the target object can be determined as a low-quality target object, so that the wearing identification of the target object is directly determined as 0 without alignment. The embodiment can realize filtering of low-quality target objects by identifying the wearing evaluation value of the target object that does not meet the preset quality condition as a preset value, thereby improving the accuracy of wearing compliance detection.

[0067] Additionally, in an embodiment, based on the step S211 described above, the attribute evaluation parameter includes: a score mapping function, a quality threshold, and an attribute weight; and the quality attribute of the target object in the to-be-detected image is subjected to quality evaluation according to the preset attribute evaluation parameter, to obtain a quality evaluation value of the target object, which can specifically include:

[0068] Step S2111: the quality attribute of the target object in the to-be-detected image is subjected to score mapping according to the score mapping function, to obtain an attribute score corresponding to the quality attribute.

[0069] The score mapping function is used to map the output of the attribute detection model to a single attribute branch, that is, to map the corresponding attribute to an attribute score. For example, if the output of a certain quality attribute i in the attribute detection model is Out i , and the score mapping function corresponding to the quality attribute i is C i , then the attribute score s i of the quality attribute i is:

[0070] s i =C i (Out i ) (3)

[0071] Step S2112: the attribute score is subjected to binary processing based on the quality threshold, to obtain a quality flag corresponding to the quality attribute.

[0072] Specifically, the quality threshold is used to measure whether the quality attribute of the target object is a low-quality attribute. When the attribute score of a certain quality attribute of the target object is lower than the quality threshold, the quality attribute can be determined as a low-quality attribute. Specifically, it can be as shown in the following formula:

[0073] f i =s i ≥T i (4)

[0074] wherein s i is the attribute score obtained in the step S221 described above, and Ti is a quality threshold corresponding to the quality attribute i, f i is a low quality flag corresponding to the quality attribute i. The low quality flag of the quality attribute can be assigned as 1 when the attribute score of the quality attribute is higher than the quality threshold, and the low quality flag of the quality attribute can be assigned as 0 when the attribute score of the quality attribute is lower than the quality threshold. After obtaining the low quality flags of all quality attributes of the target object, the quality flag of the target object can be obtained by sequentially performing logical AND operation on all low quality flags, as shown in the following formula.

[0075] F = f i && f j && … && f m (5)

[0076] wherein F is the quality flag of the target object, i, j, m are different quality attributes. If the low quality flag of one of the quality attributes of the target object is 0, then the final quality flag of the target object is 0, indicating that the target object is a low-quality object.

[0077] In step S2113, the attribute scores are weighted according to the attribute weights, and the weighted results are fused with the quality flag to obtain the quality evaluation value of the target object.

[0078] Specifically, the attribute scores are weighted and counted based on the attribute weights to obtain the weighted results; the weighted results are fused with the quality flag to obtain the quality evaluation value of the target object.

[0079] wherein the attribute weights corresponding to different quality attributes are different. The specific calculation process can be as shown in the following formula:

[0080]

[0081] wherein S is the quality evaluation value of the target object, F is the quality flag of the target object, W i is the attribute weight corresponding to the quality attribute i, s i is the attribute score corresponding to the quality attribute i. By obtaining the attribute scores and the quality flag of the quality attribute based on the attribute evaluation parameters, and then obtaining the quality evaluation value, the quality of the target object can be quantified based on the attribute evaluation parameters, so as to realize the filtering of the quality of the target object.

[0082] Additionally, in one embodiment, based on the above step S220, the quality evaluation value and the wearing evaluation value are fused to obtain a wearing compliance identification result of whether the wearing of the target object conforms to the wearing compliance condition, which can specifically include the following steps:

[0083] In step S221, the quality evaluation value of the target object in the single frame to-be-detected image and the wearing evaluation value of the target object in the single frame to-be-detected image are fused to obtain a compliance fusion result of the target object in the single frame to-be-detected image. Specifically, the quality evaluation value and the wearing evaluation value of the target object in the single frame to-be-detected image can be weighted and summed, multiplied, or subjected to other operations based on a preset operation rule to obtain the compliance fusion result of the target object in the single frame to-be-detected image.

[0084] In step S222, the compliance fusion results of the to-be-detected images in a preset number of frames are counted to obtain a compliance statistical result of the target object. After obtaining the compliance fusion result of the target object in the single frame to-be-detected image, the compliance fusion results of each frame to-be-detected image in the preset number of frames can be counted to obtain the compliance statistical result of the multiple frames. For example, the compliance fusion results of each frame to-be-detected image in a preset N frames can be counted and summed to obtain the compliance statistical result of the N frames.

[0085] In step S223, in response to the compliance statistical result being lower than a preset non-compliance threshold, a wearing compliance identification result of the target object is obtained, in which the wearing of the target object meets a preset wearing compliance condition.

[0086] The steps S221 to S223 described above can improve the accuracy of the wearing compliance identification result of the target object by fusing the quality evaluation value and the wearing evaluation value of the target object in multiple frames, thereby reducing the false positive rate of the wearing compliance detection.

[0087] Further, in an embodiment, based on the step S221 described above, the quality evaluation value of the target object in the single frame to-be-detected image and the wearing evaluation value of the target object in the single frame to-be-detected image are fused to obtain the compliance fusion result of the target object in the single frame to-be-detected image. Specifically, the quality evaluation value of the target object in the single frame to-be-detected image and the wearing evaluation value of the target object in the single frame to-be-detected image can be subjected to operation processing based on a preset operation rule to obtain the compliance fusion result of the target object in the single frame to-be-detected image. For example, the quality evaluation value and the wearing evaluation value of the target object in the single frame to-be-detected image can be multiplied to obtain the compliance fusion result of the target object in the single frame to-be-detected image.

[0088] Additionally, in an embodiment, the image recognition method described above can further include the following steps:

[0089] In step S230, in response to the wearing compliance identification result indicating that the wearing of the target object does not meet the preset wearing compliance condition, an alarm information is generated for the wearing compliance identification result.

[0090] Wherein, after generating the alarm information, the specific alarm mode can be determined according to the actual situation, for example, it can include audible and visual alarm, voice prompt alarm, etc. Further, the wearing compliance condition can be determined based on the demand for alarm accuracy and recall rate in the actual application scene. For example, when the fusion result Y of the quality evaluation value and the wearing evaluation value of the target object is higher than the non-compliance threshold α, the alarm is performed according to the preset alarm mode. j The alarm is performed according to the preset alarm mode.

[0091] The present embodiment will be described and explained below through preferred embodiments.

[0092] Figure 3 is a flowchart of the image recognition method of the preferred embodiment. As shown in the figure, the image recognition method includes the following steps: Figure 3

[0093] Step S301, input the image to be detected;

[0094] Step S302, image preprocessing is performed on the image to be detected to obtain a preprocessed image;

[0095] Step S303, target detection is performed on the preprocessed image to obtain detection information of the target object;

[0096] Step S304, target tracking is performed on the target object based on the detection information to obtain tracking information;

[0097] Step S305, target quality evaluation is performed on the tracking information to obtain a quality evaluation value of the target object;

[0098] Step S306, it is judged whether the quality evaluation value meets the preset quality condition; if yes, step S307 is executed, otherwise, step S308 is executed;

[0099] Step S307, wearing compliance recognition is performed on the tracking information to obtain a wearing evaluation value;

[0100] Step S308, the wearing evaluation value of the target object is assigned as 0;

[0101] Step S309, the quality evaluation value and the wearing evaluation value of multiple frames are fused to obtain a wearing detection result;

[0102] Step S310, it is judged whether the wearing detection result reaches an alarm threshold; if yes, step S311 is executed;

[0103] Step S311, alarm result output.

[0104] ​In the embodiment, an image recognition device is also provided, which is used to implement the above-mentioned embodiments and preferred embodiments, and will not be described again. The terms "module", "unit", "sub-unit" and the like used below can be a combination of software and / or hardware that implements a predetermined function. Although the device described in the following embodiments is preferably implemented in software, hardware, or a combination of software and hardware is also possible and contemplated.

[0105] Figure 4 is a structural block diagram of the image recognition device 40 of the embodiment, as Figure 4 shown, the image recognition device 40 device includes: an acquisition module 42 and a fusion module 44; wherein:

[0106] The acquisition module 42 is configured to acquire a quality evaluation value and a wearing evaluation value of a target object in a to-be-detected image, and the wearing evaluation value represents a probability that the target object is in compliance with a wearing compliance condition.

[0107] The fusion module 44 is configured to fuse the quality evaluation value and the wearing evaluation value to obtain a wearing compliance recognition result of whether the target object is in compliance with the wearing compliance condition.

[0108] The image recognition device 40 described above acquires the quality evaluation value and the wearing evaluation value of the target object in the to-be-detected image, and the wearing evaluation value represents the probability that the target object is in compliance with the wearing compliance condition; and fuses the quality evaluation value and the wearing evaluation value to obtain the wearing compliance recognition result of whether the target object is in compliance with the wearing compliance condition. It realizes the fusion of the quality evaluation value and the wearing evaluation value of the target object, thereby being able to improve the accuracy of the wearing compliance detection of the target object.

[0109] It should be noted that each of the above modules can be a functional module or a program module, and can be implemented by software or hardware. For the modules implemented by hardware, each of the above modules can be located in the same processor; or each of the above modules can also be located in different processors in any combination.

[0110] In the embodiment, an electronic device is also provided, which includes a memory and a processor, the memory stores a computer program, and the processor is configured to run the computer program to perform the steps in any of the above method embodiments.

[0111] Optionally, the electronic device described above can further include a transmission device and an input and output device, wherein the transmission device is connected with the processor, and the input and output device is connected with the processor.

[0112] Optionally, in the embodiment, the processor can be configured to perform the following steps by the computer program:

[0113] obtain a quality evaluation value and a wearing evaluation value of the target object in the image to be detected; the wearing evaluation value represents a probability that the wearing of the target object conforms to a wearing compliance condition;

[0114] fuse the quality evaluation value and the wearing evaluation value to obtain a wearing compliance recognition result of whether the wearing of the target object conforms to the wearing compliance condition.

[0115] It should be noted that the specific examples in the present embodiment can refer to the examples described in the above embodiments and optional implementation manners, and will not be described herein again.

[0116] In addition, in combination with the image recognition method provided in the above embodiments, a storage medium can also be provided to implement the image recognition method in the present embodiment. The storage medium has a computer program stored thereon; the computer program is executed by a processor to implement any one of the image recognition methods in the above embodiments.

[0117] It should be understood that the specific embodiments described herein are only used to explain this application, but not to limit it. According to the embodiments provided in the present application, all other embodiments obtained by those of ordinary skill in the art without creative labor are within the scope of protection of the present application.

[0118] It should be noted that the user information (including but not limited to user equipment information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in the present application are all information and data authorized by the user or authorized by all parties.

[0119] Obviously, the drawings are only some examples or embodiments of the present application, and those of ordinary skill in the art can also apply the present application to other similar situations according to the drawings without creative labor. In addition, it can be understood that although the work done in the development process may be complex and long, for those of ordinary skill in the art, some design, manufacture or production changes according to the technical content disclosed in the present application are only routine technical means and should not be regarded as insufficient disclosure of the present application.

[0120] The word "embodiment" in the present application means that the specific features, structures or characteristics described in combination with the embodiments can be included in at least one embodiment of the present application. The appearance of this phrase in various places in the specification does not necessarily mean the same embodiment, nor does it mean independence or alternative to other embodiments. Those of ordinary skill in the art can clearly or implicitly understand that the embodiments described in the present application can be combined with other embodiments without conflict.

[0121] The above embodiments only express several implementation ways of the present application, and the description is specific and detailed, but it should not be understood as a limitation to the patent protection scope. It should be pointed out that, for ordinary skilled in the art, several modifications and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the appended claims.

Claims

1. An image recognition method characterized by, The method comprises the following steps: obtaining a quality evaluation value and a wearing evaluation value of a target object in a to-be-detected image; the wearing evaluation value represents the probability that the wearing of the target object meets the wearing compliance condition; fusing the quality evaluation value and the wearing evaluation value to obtain a wearing compliance identification result of the target object, i.e., whether the wearing of the target object meets the wearing compliance condition; wherein: the method for obtaining the quality evaluation value of the target object in the to-be-detected image comprises the following steps: performing score mapping on the quality attribute of the target object in the to-be-detected image according to a preset score mapping function to obtain an attribute score corresponding to the quality attribute; performing binary processing on the attribute score based on a preset quality threshold to obtain a quality mark corresponding to the quality attribute; weighting the attribute score according to a preset attribute weight, and fusing the weighting result and the quality mark to obtain the quality evaluation value of the target object; the score mapping function, the quality threshold, and the attribute weight are determined based on a preset optimal detection index under a detection scene.

2. The image recognition method of claim 1, wherein, The method for obtaining the wearing evaluation value of the target object in the to-be-detected image comprises the following steps: in response to the quality evaluation value meeting a preset quality condition, detecting the target object based on a trained wearing compliance detection model to obtain the wearing evaluation value of the target object.

3. The image recognition method of claim 2, wherein, The method further comprises the following steps: in response to the quality evaluation value not meeting the preset quality condition, identifying the wearing evaluation value of the target object as a preset value.

4. The image recognition method of claim 1, wherein, The method for fusing the quality evaluation value and the wearing evaluation value to obtain the wearing compliance identification result of the target object, i.e., whether the wearing of the target object meets the wearing compliance condition, comprises the following steps: fusing the quality evaluation value of the target object in a single to-be-detected image and the wearing evaluation value of the target object in the single to-be-detected image to obtain a compliance fusion result of the target object in the single to-be-detected image; statistically processing the compliance fusion results of a preset number of to-be-detected images to obtain a compliance statistical result of the target object; in response to the compliance statistical result being lower than a preset non-compliance threshold, obtaining a wearing compliance identification result of the target object, i.e., whether the wearing of the target object meets the wearing compliance condition.

5. The image recognition method of claim 4, wherein, The method for fusing the quality evaluation value of the target object in a single to-be-detected image and the wearing evaluation value of the target object in the single to-be-detected image to obtain a compliance fusion result of the target object in the single to-be-detected image comprises the following steps: performing operation processing on the quality evaluation value of the target object in the single to-be-detected image and the wearing evaluation value of the target object in the single to-be-detected image based on a preset operation rule to obtain the compliance fusion result of the target object in the single to-be-detected image.

6. The image recognition method of any one of claims 1 to 5, characterized in that, The method further comprises the following steps: in response to the wearing compliance identification result being that the wearing of the target object does not meet the preset wearing compliance condition, generating an alarm information for the wearing compliance identification result.

7. An image recognition apparatus characterized by comprising: The method comprises the following steps: an obtaining module and a fusion module; wherein: the obtaining module is configured to obtain a quality evaluation value and a wearing evaluation value of a target object in a to-be-detected image; the wearing evaluation value represents the probability that the wearing of the target object meets a wearing compliance condition; The fusion module is configured to fuse the quality evaluation value and the wearing evaluation value to obtain a wearing compliance identification result of whether the target object meets the wearing compliance condition. Wherein: The quality evaluation value of the target object in the to-be-detected image is obtained by: According to a preset score mapping function, scoring mapping is performed on a quality attribute of the target object in the to-be-detected image to obtain an attribute score corresponding to the quality attribute; According to a preset quality threshold, the attribute score is binarized to obtain a quality mark corresponding to the quality attribute; According to a preset attribute weight, the attribute score is weighted, and the weighted result is fused with the quality mark to obtain the quality evaluation value of the target object; the score mapping function, the quality threshold, and the attribute weight are determined based on a preset optimal detection index under a detection scene. 8.An electronic device comprising a memory and a processor, the electronic device comprising: The memory stores a computer program, and the processor is configured to run the computer program to execute the image recognition method of any one of claims 1-6.

9. A computer readable storage medium having stored thereon a computer program, characterized in that, The computer program is executed by the processor to implement the steps of the image recognition method of any one of claims 1-6.

Citation Information

Patent Citations

  • Attribute category identification method and device and computer storage medium

    CN113869357A