A high-precision mask detection method based on scene classification adaptation

By adopting a scene-adaptive mask detection method, combined with multi-label classification and mask training techniques, and dynamically adjusting the image processing strategy, the problem of unstable mask detection accuracy in complex environments is solved, achieving high-precision and robust mask detection.

CN119649107BActive Publication Date: 2025-11-07E SURFING VISION TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411700670.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-26
Publication Date
2025-11-07
Estimated Expiration
2044-11-26

AI Technical Summary

Technical Problem

Existing mask testing technologies often suffer from limited accuracy in complex and variable environments, such as changes in lighting conditions, dense crowds, or significant differences in scene, and cannot adaptively optimize, resulting in unstable testing precision.

Method used

A high-precision mask detection method based on scene classification and adaptation is adopted. The scene classification model identifies the scene category to which the image belongs and selects the corresponding dedicated detection model for mask detection. By combining multi-label classification structure and mask training technology, the model training process is optimized and the image processing technology is dynamically adjusted to adapt to different scenes.

Benefits of technology

It significantly improves the accuracy and robustness of mask detection, can automatically switch the optimal detection strategy in complex environments, reduces dependence on large-scale fully labeled datasets, and improves the training efficiency and detection accuracy of the model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119649107B_ABST
    Figure CN119649107B_ABST
Patent Text Reader

Abstract

The application relates to a high-precision mask detection method based on scene classification self-adaption, and belongs to the field of computer vision.The method comprises the following steps: collecting mask images under various scene categories and performing model training to generate corresponding scene classification models; inputting an image into the scene classification model, identifying the scene category to which the image belongs by the scene classification model; and selecting a corresponding exclusive detection model for mask detection according to the scene category to which the image belongs, and outputting mask detection results corresponding to each scene category.The method can significantly improve the accuracy and robustness of mask detection.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application belongs to the field of computer vision, deep learning and intelligent monitoring, and particularly relates to a high-precision mask detection method based on scene classification self-adaptation. BACKGROUND

[0002] Mask detection technology has been widely used in public safety, medical care and social management. However, in complex scenes, the accuracy of mask detection is often limited due to factors such as lighting conditions, crowd density, and background interference. Traditional mask detection algorithms usually work in a single mode and cannot adaptively optimize according to the characteristics of different scenes, resulting in unstable detection accuracy. Existing mask detection technologies often have a significant decline in detection accuracy in complex and variable environments, such as changes in lighting conditions, crowded areas, or scenes with large differences, due to factors such as lighting conditions, crowd density, and background interference. SUMMARY

[0003] In view of the shortcomings of the prior art, the purpose of the present application is to provide a high-precision mask detection method based on scene classification self-adaptation, which can significantly improve the accuracy and robustness of mask detection.

[0004] The present application proposes a high-precision mask detection method based on scene classification self-adaptation, comprising:

[0005] S1, collecting mask images under various scene categories and training a model to generate a corresponding scene classification model;

[0006] During model training, a training set mask system is established, and a mask training technique is used to modify the training head of the model. The gradient of backpropagation is multiplied by a mask, which is 0 for unannotated categories and 1 for annotated categories, so that the model ignores the GroundTruth value when facing missing categories during training. The data description of the training set mask system is as follows:

[0007]

[0008] where Mi is the mask value;

[0009] Loss function modification: During training, the loss function L is adjusted as follows:

[0010] L' = L·M

[0011] where L' is the loss function adjusted by the mask, L is the original loss function, M is the mask vector, and the loss contribution of unannotated categories is set to zero.

[0012] Backpropagation gradient: gradient The calculation is as follows when back propagation:

[0013]

[0014] The gradient of the unmarked class is ignored and does not participate in the model parameter update, is the gradient of the original loss function;

[0015] S2, inputting the image into a scene classification model, identifying a scene category to which the image belongs by the scene classification model; wherein the scene category includes: outdoor, indoor, night, high exposure, personnel concentration, and special environment requiring wearing a mask;

[0016] S3, selecting a corresponding exclusive detection model according to the scene category to which the image belongs to perform mask detection, and outputting mask detection results corresponding to each scene category.

[0017] Further, in S1, the scene classification model adopts a BEiT-3 image classification model.

[0018] Further, in S1, a multi-label classification structure is used to classify and label the scene, including: setting one or more scene labels for the scene, and using a binary cross entropy loss function to identify multiple scene labels in a complex scene at the same time.

[0019] Further, when the scene category is outdoor, a pre-trained mask detection model for outdoor scenes is used to analyze the image lighting conditions and use adaptive histogram equalization technology to improve the local contrast of the image; the image is divided into multiple small blocks, and histogram equalization is applied to each small block to enhance the details of the face region; a multi-scale detection method is used to put the original image, the compressed twice image, and the enlarged twice image into the mask detection model for outdoor scenes for identification to obtain outdoor mask detection results.

[0020] Further, when the scene category is indoor, low-light image enhancement technology is applied to low-brightness images to improve the brightness and contrast of the image; the processed image is put into a mask detection model for indoor scenes for identification to obtain indoor mask detection results.

[0021] Further, when the scene category is night, low-light image enhancement technology is applied to low-brightness images to improve the brightness and contrast of the image; adaptive threshold segmentation technology is used to extract clear local mask features, and the processed image is put into a mask detection model for night scenes for identification to obtain night mask detection results.

[0022] Further, when the scene category is high exposure, a low-light image enhancement technique is applied to the image with low brightness to improve the brightness and contrast of the image; the processed image is put into a mask detection model for high exposure scenes for recognition to obtain a high exposure mask detection result.

[0023] Further, when the scene category is personnel dense, the number and distribution of personnel in the image are analyzed, including: pre-training a yolo v10 face detection high-precision model to detect the faces in the picture, when the number of faces in a certain area of the picture reaches a threshold, the area is considered as a personnel dense image area, and then the area is cropped and enlarged, and the image is put into a mask detection model for personnel dense scenes for recognition to obtain a personnel dense mask detection result.

[0024] Further, when the scene category is a special environment requiring wearing a mask, a pre-trained mask detection model for special environments requiring wearing a mask is used, and the image is put into the mask detection model for special environments requiring wearing a mask for recognition, wherein the mask detection model for special environments requiring wearing a mask adds training of easily misidentified targets and special masks during the training process to obtain a special environment mask detection result.

[0025] Further, the low-light image enhancement technique uses Gamma correction technology to adjust the brightness of the image.

[0026] The present application has the following advantages:

[0027] 1. Improve the accuracy of mask detection in complex environments

[0028] By combining target detection technology with scene classification, specific detection strategies are automatically applied for different scenes, significantly improving the accuracy and robustness of mask detection.

[0029] Specifically, in the process of scene classification and mask detection, seamless adaptation is achieved. First, the BEiT-3 image classification model is used to accurately identify the scene, and then specific mask detection strategies are adaptively applied according to different scenes. This cross-module dynamic optimization mechanism significantly improves detection accuracy in various scenes, such as outdoor, night, indoor, etc. In different environments, the optimal image processing and detection strategy is selected according to the specific scene.

[0030] By deeply integrating scene classification and mask detection, the present application can automatically switch the optimal detection strategy in different scenes. Whether it is outdoor, night, high exposure, indoor, or personnel dense environment, the system can perform image preprocessing and model selection according to the specific characteristics of the scene to ensure the accuracy of detection.

[0031] 2. Enhance the robustness and adaptability of the system

[0032] By adaptively analyzing the lighting, personnel density, etc. of the input image, dynamically adjusting the image processing techniques (such as adaptive histogram equalization, Gamma correction, etc.) and detection scale, the system can adapt to different distances, lighting and environmental noise changes, and improve the detection ability of mask wearing in specific scenes.

[0033] 3. Optimize the utilization efficiency of limited annotation resources

[0034] Through the innovative mask training technology, the invention solves the model interference problem when some categories of data are missing. The system can effectively learn under incomplete annotation, improving the accuracy of mask detection in specific scenes, reducing the dependence on large-scale, fully annotated data sets, and improving the training efficiency of the model.

[0035] 4. Multi-label classification structure and mask training

[0036] The invention optimizes the traditional single-label classification model, introduces a multi-label classification structure, so that the system can efficiently identify multiple scene labels in complex scenes. The mask training system is used innovatively, which can ignore the gradient calculation of unannotated categories under incomplete annotation data, ensuring that the model can still learn effectively under data scarcity or incomplete annotation, avoiding interference and maintaining high detection accuracy. BRIEF DESCRIPTION OF DRAWINGS

[0037] The accompanying drawings are for the purpose of illustrating preferred embodiments of the present invention only, and are not to be construed as limiting the invention thereto, wherein the same reference numerals and gates designate the same components throughout the several views of the drawing; and it is readily apparent to one skilled in the art that other explicit embodiments of the drawings can be derived from these drawings without departing from the scope of the present invention.

[0038] Figure 1 A flowchart of a high-precision mask detection method based on scene classification adaptation according to an embodiment of the present invention;

[0039] Figure 2 A schematic diagram of a high-precision mask detection method based on scene classification adaptation according to an embodiment of the present invention;

[0040] Figure 3 A schematic diagram of mask training according to an embodiment of the present invention. DETAILED DESCRIPTION

[0041] In the following, the technical solutions of the present application will be described clearly and completely in conjunction with the drawings, obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. It should be understood that these descriptions are only exemplary, and are not used to limit the scope of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without creative labor should belong to the scope of protection of the present application.

[0042] In addition, in the following description, the description of well-known structures and techniques is omitted to avoid unnecessary confusion of the concepts disclosed in the present application.

[0043] In the description of the present application, it should be noted that, unless otherwise explicitly specified and limited, the orientation or positional relationship indicated by the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer" and the like is based on the orientation or positional relationship shown in the drawings, and is only for the convenience of describing the present application and simplifying the description, and therefore cannot be understood as indicating or implying that the device or element referred to must have a particular orientation, be constructed and operated in a particular orientation, and therefore cannot be understood as limiting the present application. In addition, the terms "first", "second", "third" are only for description purposes, and cannot be understood as indicating or implying relative importance. The terms "mounting", "connecting", "connecting" should be understood broadly, for example, it can be fixedly connected, or it can be detachably connected, or integrally connected; it can be mechanically connected, or it can be electrically connected; it can be directly connected, or it can be indirectly connected through an intermediate medium, or it can be the communication between two elements. For those skilled in the art, the specific meaning of the above terms in the present application can be understood according to the specific circumstances.

[0044] The exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Rather, they are merely examples of methods and systems consistent with some aspects of the present application as detailed in the appended claims.

[0045] The technical terms related to the present application are described as follows:

[0046] Beit-3: BEiT-3 is an advanced multi-modal base model proposed by Microsoft, which can effectively extract image features, and realize efficient scene classification by combining the latest technologies.

[0047] Binary Cross Entropy (BCE): Binary Cross Entropy, a kind of loss function, is used for binary classification or multi-label classification problems, which measures the difference between the predicted probability of the model output and the true label.

[0048] Adaptive Histogram Equalization (AHE): An image enhancement technique that improves image details by locally adjusting the contrast of the image, especially in uneven lighting conditions. It is based on the histogram calculation of local regions of the image to improve the local contrast of the image.

[0049] Gamma Correction: A non-linear image processing technique used to adjust the brightness of an image, which can enhance or weaken the details of the dark or bright parts of the image.

[0050] The present application provides a high-precision mask detection method based on scene classification adaptation, which can achieve more accurate mask detection in diversified and complex scenes, ensure stable and effective operation of the system in different environments, and meet the current social demand for high-precision mask detection system.

[0051] The method provided by the present application first passes the input image through a scene classification model to identify which category the image belongs to, then selects different special models and special strategy optimization for mask detection according to different categories. The present application formulates a series of strategies for different scenes to improve the precision of mask detection.

[0052] As shown in Figure 1 The high-precision mask detection method based on scene classification adaptation of the present application embodiment comprises the following steps:

[0053] S1, collect mask images under various scene categories and perform model training to generate corresponding scene classification models.

[0054] The scene classification model includes: a mask detection model for outdoor scenes, a mask detection model for indoor scenes, a mask detection model for night scenes, a mask detection model for high exposure scenes, a mask detection model for crowded scenes, and a mask detection model for special environments where masks are required. It should be noted that the scene classification model is not limited to the above examples, and other types can also be included, which can be set as needed.

[0055] Specifically, a multi-label classification structure is used to classify and label the scene, including: setting one or more scene labels for the scene, and using a binary cross entropy loss function to identify multiple scene labels in a complex scene. Among them, the scene classification model adopts the BEiT-3 image classification model.

[0056] Specifically, for the scene classification model, an advanced BEiT-3 image classification model is used. On the basis of BEit-3, the network structure is optimized, a multi-label classification structure is introduced, the single-label classification head is modified to a multi-label classification head, and a binary cross entropy loss function is used, so that multiple scenes (such as "indoor" and "kitchen") can be identified at the same time in a complex scene, ensuring the comprehensiveness and accuracy of the detection.

[0057] In addition, in order to further optimize the model performance and make full use of limited artificial annotation resources, the application also innovatively realizes mask training. Specifically, for a certain training set, artificial annotation only has N categories, and the model can identify M, where M>N. According to the previous traditional training method, this case must change the missing M-N categories to negative samples (GroundTruth is set to 0) for training. In this way, because the missing categories may be positive samples in some training samples, the training is greatly disturbed, and the training effect is greatly reduced.

[0058] The application innovatively uses mask training technology to establish a training set mask system, modifies the training head of the model, and multiplies the loss function (or the gradient of back propagation) by a mask. The mask is 0 for unannotated categories and 1 for annotated categories. Therefore, during the training process of the model, the missing categories will be ignored in the face of the GroundTruth value, and the gradient of the missing categories will not participate in back propagation, so it will not interfere with normal training, so that the model can still effectively learn when facing images annotated with only part of the categories. This training method significantly enhances the adaptability of the model in the case of data scarcity and improves the recognition accuracy of specific objects by means of the principle of self-supervised learning.

[0059] The following describes the specific definition of the mask training system.

[0060] Let the training set be D, which contains N artificial annotation categories and M model identifiable categories, and M>N. In the traditional training method, the missing M-N categories are regarded as negative samples, that is, their Ground Truth is set to 0, which greatly reduces the training effect.

[0061] To solve the above problems, the application innovatively proposes a mask training technology, which can be described by the following mathematical formula.

[0062] The mask is defined as follows:

[0063]

[0064] where M i is the mask value.

[0065] Loss function modification: During the training process, the loss function L is adjusted as:

[0066] L' = L · M

[0067] where L' is the loss function adjusted by the mask, L is the original loss function, M is the mask vector, and the loss contribution of the unmarked class is set to zero.

[0068] Backpropagation gradient: Gradient is calculated as:

[0069]

[0070] In this way, the gradient of the unmarked class will be ignored and will not participate in the model parameter update, is the original loss function gradient.

[0071] Figure 3 is a schematic diagram of mask training. As shown in Figure 3 , the model prediction value is (1, 1, 0, 0 , 0 , 1), the Ground Truth value is (1, 0 , 0, 1 , 1 , 1), and the backpropagation gradient (0, 0.5 , 0, 0.5 , 0.5 , 0) is obtained. The mask (1, 0 , 1, 1, 1, 1) is added to the above backpropagation gradient, and the masked backpropagation gradient (0, 0 , 0, 0.5, 0.5, 0) is obtained. Then, the model is trained using the masked backpropagation gradient.

[0072] where the 2nd "1", 4th "0" and 5th "0" in the model prediction value (1, 1, 0, 0, 0, 1) are the objects of attention. Among them, "object of attention" refers to the parameters in the figure that need the user's attention.

[0073] The 2nd "0", 4th "1" and 5th "1" in the Ground Truth value (1, 0 , 0, 1 , 1 , 1) are the objects of attention.

[0074] Backpropagation gradient (0, 0.5 , 0, 0.5 , 0.5 , 0) in the 2nd bit "0.5", the 4th bit "0.5" and the 5th bit "0.5" are the focus.

[0075] The 2nd bit "0" in the mask (1, 0 , 1, 1, 1, 1) is the focus.

[0076] The 2nd bit "0" in the backpropagation gradient after masking (0, 0 , 0, 0.5, 0.5, 0) is the focus.

[0077] In summary, in the scene classification, by using the Beit3 model, the multi-label classification structure, and the mask training system, the application not only improves the accuracy of scene classification, but also shows excellent robustness when dealing with diversification and complex environment.

[0078] S2, input the image to the scene classification model, and identify the scene category to which the image belongs by the scene classification model. The scene category includes: outdoor, indoor, night, high exposure, personnel intensive, and special environment requiring wearing a mask. It should be noted that the scene category is not limited to the above examples, and other categories can also be included, which are set as needed.

[0079] S3, according to the scene category to which the image belongs, select the corresponding exclusive detection model to perform mask detection, and output the mask detection result corresponding to each scene category.

[0080] Specifically, the image is input into the scene classification model, and whether it belongs to six specific scenes such as outdoor, indoor, night, high exposure, personnel intensive, kitchen, and hospital environment requiring wearing a mask is identified.

[0081] For these six specific scenes, special data sets are used for training, and high-precision mask detection models for each scene are developed to further improve the accuracy and robustness of detection. According to the experimental results, the accuracy of the special scene model is generally 10%-20% higher than that of the general model. For these six scenes, in addition to the special model, each will undergo a specific strategy to achieve high-precision mask detection effect.

[0082] The following will be combined Figure 2 The identification process of each scene will be described.

[0083] (1) Outdoor

[0084] When the scene category is outdoor, a pre-trained mask detection model for outdoor scenes is used.

[0085] Specifically, for outdoor scenes, the system will use a pre-trained mask detection model for outdoor scenes. Analyze the picture light condition, use the adaptive histogram equalization (CLAHE) technology, which improves the local contrast of the image, especially in the case of uneven lighting. By dividing the image into multiple small blocks, applying histogram equalization to each small block, the details of the face region can be effectively enhanced, ensuring that the face region of the picture is clear and visible. A multi-scale detection method is used, and the original image, the compressed twice image and the enlarged twice image are all put into the mask detection model for outdoor scenes for identification, to ensure that no matter how far the distance is, the mask wearing situation can be accurately identified, and finally the outdoor mask detection result is obtained.

[0086] (2) Indoor

[0087] When the scene category is indoor, a pre-trained mask detection model for indoor scenes is used.

[0088] Specifically, for indoor scenes, there may be insufficient light problems. If the overall image brightness level is detected to be low, low-light image enhancement technology will be applied to low-light images to improve image brightness and contrast, ensuring that facial features are clear and visible. The processed image is put into the mask detection model for indoor scenes for identification to obtain the indoor mask detection result.

[0089] Among them, the low-light image enhancement technology uses Gamma correction technology to adjust the brightness of the image and enhance the details of the dark area.

[0090] (3) Night

[0091] When the scene category is night, a pre-trained mask detection model for night scenes is used. This model is trained on a large amount of mask data in night scenes and has strong robustness in night scenes.

[0092] Specifically, low-light image enhancement technology is applied to low-light images in night scenes to improve image brightness and contrast. Among them, the low-light image enhancement technology uses Gamma correction technology to adjust the brightness of the image and implement low-light image enhancement strategies to improve the brightness and contrast of the image, so as to clearly identify facial features. Using adaptive threshold (adaptiveThreshold) segmentation technology, clear local mask features are extracted, ensuring that masks can still be accurately detected under low-light conditions. Finally, the processed image is put into the mask detection model for night scenes for identification to obtain the night mask detection result.

[0093] (4) High exposure

[0094] When the scene category is high exposure, a pre-trained mask detection model for high exposure scenes is used. This model is trained using a large number of high exposure light-colored masks, which can effectively improve the accuracy of mask recognition in this scene.

[0095] Specifically, in a high exposure scene, a low light image enhancement technique is applied to low brightness images to improve image brightness and contrast. Among them, the low light image enhancement technique uses Gamma correction technology to adjust the brightness of the image. The brightness of the image is adjusted using Gamma correction to reach a normal level. Then the processed image is put into the mask detection model for high exposure scenes for recognition to get the high exposure mask detection result.

[0096] (5) Personnel concentration

[0097] When the scene category is personnel concentration, such as streets and classrooms, a pre-trained mask detection model for personnel concentration scenes is used.

[0098] Specifically, the number and distribution of personnel in the image are analyzed, including: pre-training a yolo v10 face detection high-precision model to detect faces in the image, and when the number of faces in a certain area of the image reaches a threshold, it is considered as a personnel-concentrated image area. Further, the area is cropped and enlarged, and then the image is put into the mask detection model for personnel concentration scenes for recognition to get the personnel concentration mask detection result, to ensure that whether the person is concentrated or not, the mask wearing situation can be accurately identified.

[0099] (6) Special environment requiring mask wearing

[0100] When the scene category is a special environment requiring mask wearing, such as kitchen, hospital, etc. requiring mask wearing, a pre-trained mask detection model for special environments requiring mask wearing is used. This model adds a large number of kitchen, hospital scene clutter and other easily misidentified targets during training. In addition, the mask detection model for special environments requiring mask wearing adds easily misidentified targets and special masks for training, such as medical masks, N95 masks, transparent masks, etc. A large number of special masks are trained to improve the model recognition accuracy in such scenes.

[0101] Specifically, the image is put into the mask detection model for special environments requiring mask wearing for recognition to get the special environment mask detection result.

[0102] In summary, through this series of scene classification-based adaptive mask detection system, the accuracy and robustness of mask detection are significantly improved, ensuring that the system can effectively operate in various complex environments and meet the high-precision detection requirements.

[0103] The high-precision mask detection method based on scene classification self-adaption provided by the application provides high-precision mask detection technology, and can be widely applied in public safety, medical treatment and social management.

[0104] Specifically, the application can be applied to occasions requiring monitoring of mask wearing, such as public transportation, indoor and outdoor public places, hospitals, schools, factories and the like. Through the adaptive scene classification technology, the system can optimize mask detection in different environments (such as complex lighting, high personnel density, etc.), improve detection accuracy and robustness, and be suitable for real-time monitoring requirements in various complex scenes.

[0105] Finally, it should be noted that the above examples are only used to illustrate the technical solutions of the embodiments of the application, and not to limit them. Although the application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that they can modify the technical solutions recorded in the foregoing embodiments, or make equivalent substitutions for some technical features; and these modifications or substitutions do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the application. Any changes or substitutions that can be easily thought of by those skilled in the art within the scope of the disclosed technology should be covered within the protection scope of the application.

Claims

1. A high-precision mask detection method based on scene classification self-adaptation, characterized in that, Comprise: S1, collect mask images under various scene categories and perform model training to generate corresponding scene classification models; During model training, a training set mask system is established, and a mask training technique is used to modify the training head of the model, multiply the gradient of back propagation by a mask, and the mask is 0 for unmarked categories and 1 for marked categories, so that the model ignores the GroundTruth value in the face of missing categories during training; The data description of the training set mask system is as follows: Wherein Mi is the mask value; Loss function modification: during training, the loss function L is adjusted as: L' = L·M Wherein, L' is the loss function adjusted by the mask, L is the original loss function, M is the mask vector, and the loss contribution of the unmarked category is set to zero; Backpropagation gradient: Gradient Computed at backpropagation time as: The gradient of un-labeled classes is ignored and does not participate in model parameter update, is the gradient of the original loss function; S2, input the image into the scene classification model to identify the scene category to which the image belongs; wherein the scene category includes: outdoor, indoor, night, high exposure, personnel concentration, and special environment requiring wearing a mask; S3, according to the scene category to which the image belongs, select the corresponding exclusive detection model for mask detection, and output the mask detection result corresponding to each scene category.

2. The high-precision mask detection method based on scene classification adaptation according to claim 1, characterized in that, In S1, the scene classification model uses BEiT-3 image classification model.

3. The high-precision mask detection method based on scene classification adaptation according to claim 1, characterized in that, In S1, a multi-label classification structure is used to classify and label the scene, including: setting one or more scene labels for the scene, and using a binary cross entropy loss function to identify multiple scene labels in a complex scene at the same time.

4. The high-precision mask detection method based on scene classification adaptation according to claim 1, characterized in that, When the scene category is outdoor, a pre-trained mask detection model for outdoor scenes is used to analyze the image lighting conditions and use adaptive histogram equalization technology to improve the local contrast of the image; the image is divided into multiple small blocks, and histogram equalization is applied to each small block to enhance the details of the face region; a multi-scale detection method is used to put the original image, the compressed twice image and the enlarged twice image into the mask detection model for outdoor scenes for identification to obtain the outdoor mask detection result.

5. The high-precision mask detection method based on scene classification adaptation according to claim 1, characterized in that, When the scene category is indoor, low-light image enhancement technology is applied to low-light images to improve the brightness and contrast of the image; the processed image is put into the mask detection model for indoor scenes for identification to obtain the indoor mask detection result.

6. The high-precision mask detection method based on scene classification adaptation according to claim 1, characterized in that, When the scene category is night, low-light image enhancement technology is applied to low-light images to improve the brightness and contrast of the image; adaptive threshold segmentation technology is used to extract clear local mask features, and the processed image is put into the mask detection model for night scenes for identification to obtain the night mask detection result.

7. The high-precision mask detection method based on scene classification adaptation according to claim 1, characterized in that, When the scene category is high exposure, low-light image enhancement technology is applied to low-light images to improve the brightness and contrast of the image; the processed image is put into the mask detection model for high exposure scenes for identification to obtain the high exposure mask detection result.

8. The high-precision mask detection method based on scene classification adaptation according to claim 1, characterized in that, When the scene category is a person-dense scene, the number and distribution of persons in the image are analyzed, including: pre-training a yolov10 face detection high-precision model, detecting the face in the picture, when the number of faces in a certain region of the picture reaches a threshold, regarding the region as a person-dense image region, and then cropping and enlarging the region, and then putting the image into a mask detection model for a person-dense scene for identification to obtain a person-dense mask detection result.

9. The high-precision mask detection method based on scene classification adaptation according to claim 1, characterized in that, When the scene category is a special environment requiring wearing a mask, a pre-trained mask detection model for a special environment requiring wearing a mask is used, and then the image is put into the mask detection model for a special environment requiring wearing a mask for identification, wherein the mask detection model for a special environment requiring wearing a mask is trained with easy misidentification targets and special masks in the training process to obtain a special environment mask detection result.

10. The high-precision mask detection method based on scene classification adaptation according to any one of claims 5-7, characterized in that, The low-light image enhancement technology uses a Gamma correction technology to adjust the brightness of the image.

Citation Information

Patent Citations

  • Image contrast enhancement method and device, storage medium and electronic equipment

    CN112102175A

  • Cross-domain remote sensing scene classification method adaptive to mask image modeling guide domain

    CN116580243A