Cosmetic quality detection method and system based on big data

By using big data technology and convolutional neural networks and graph neural networks to analyze mask images and videos, the problem of low efficiency in traditional mask shape detection has been solved, achieving efficient and automated mask shape and crack detection.

CN120047423BActive Publication Date: 2025-11-07SHANGHAI MEISI MACAO BIOLOGICAL TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510178577.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2024-02-18
Filing Date
2025-02-18
Publication Date
2025-11-07
Estimated Expiration
2045-02-18

AI Technical Summary

Technical Problem

Traditional face mask shape compliance testing is inefficient and easily affected by human factors, resulting in poor performance.

Method used

Using a big data-based approach, a convolutional neural network model is used to obtain the two-dimensional coordinate range of the mask image, and a graph neural network model is used to analyze the compliance of the mask shape. Various colored light irradiation and stretching video are combined to detect mask cracks.

Benefits of technology

It improves the efficiency and accuracy of mask shape compliance testing, and can automatically and accurately determine whether the mask shape meets the regulations and detect whether the mask has cracks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120047423B_ABST
    Figure CN120047423B_ABST
Patent Text Reader

Abstract

The application provides a cosmetic quality detection method and system based on big data, and relates to the technical field of cosmetic quality detection based on big data.The method comprises the following steps: determining the two-dimensional coordinate range of the whole mask, the two-dimensional coordinate range of the left eye part of the mask, the two-dimensional coordinate range of the right eye part of the mask, the two-dimensional coordinate range of the nose part of the mask and the two-dimensional coordinate range of the mouth part of the mask based on the image of the mask under white light illumination and using a coordinate determination model; constructing a plurality of nodes and a plurality of edges between the nodes; and processing the plurality of nodes and the plurality of edges between the nodes based on a graph neural network model to obtain whether the mask shape is compliant, so that the compliance detection efficiency of the mask shape can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of cosmetic quality detection based on big data, and particularly relates to a cosmetic quality detection method and system based on big data. BACKGROUND

[0002] A mask is a kind of cosmetic which is applied to the face as the main mode of action. The mask usually contains various nutritional ingredients such as vitamins, amino acids, plant essence, etc., for providing additional skin nutrition and moisturizing, preventing and repairing skin problems. The mask has become an important part of the user's daily skin care. However, in the process of using the mask, due to the error in the cutting of the mask in the production process, the user sometimes encounters the problem that the shape of the mask does not match the face, resulting in poor use effect. In order to solve this problem, sometimes the shape of the mask needs to be detected for compliance before the mask is shipped. The traditional compliance detection method of the mask shape is usually based on manual visual detection. This method is not only inefficient, but also easily affected by human factors.

[0003] Therefore, how to improve the compliance detection efficiency of the mask shape is a current problem to be solved. SUMMARY

[0004] The technical problem solved by the present application is how to improve the compliance detection efficiency of the mask shape.

[0005] According to a first aspect, the present application provides a cosmetic quality detection method based on big data, comprising: acquiring an image of a mask under white light illumination; determining a two-dimensional coordinate range of the mask as a whole, a two-dimensional coordinate range of a left eye part of the mask, a two-dimensional coordinate range of a right eye part of the mask, a two-dimensional coordinate range of a nose part of the mask, and a two-dimensional coordinate range of a mouth part of the mask based on the image of the mask under white light illumination using a coordinate determination model; constructing a plurality of nodes and a plurality of edges between the plurality of nodes, wherein the plurality of nodes include a left eye node, a right eye node, a nose node, and a mouth node, the node feature of the left eye node is the two-dimensional coordinate range of the left eye part of the mask, the node feature of the right eye node is the two-dimensional coordinate range of the right eye part of the mask, the node feature of the nose node is the two-dimensional coordinate range of the nose part of the mask and the two-dimensional coordinate range of the mask as a whole, and the node feature of the mouth node is the two-dimensional coordinate range of the mouth part of the mask; and processing the plurality of nodes and the plurality of edges between the plurality of nodes based on a graph neural network model to obtain whether the mask shape is compliant.

[0006] Further, the method further comprises: obtaining multiple images of the mask under illumination of multiple colored lights; determining multiple to-be-verified masks based on the multiple images of each mask under illumination of multiple colored lights using an illumination processing model; obtaining a stretch video of each to-be-verified mask; and determining whether the each to-be-verified mask has a crack based on the stretch video of the each to-be-verified mask using a stretch video processing model.

[0007] Further, the illumination processing model is a convolutional neural network model, an input of the illumination processing model is the multiple images of the mask under illumination of multiple colored lights, and an output of the illumination processing model is the multiple to-be-verified masks.

[0008] Further, the multiple images of the mask under illumination of multiple colored lights include multiple images of the mask under illumination of red light, multiple images of the mask under illumination of green light, and multiple images of the mask under illumination of blue light.

[0009] Further, the coordinate determination model is a convolutional neural network model, an input of the coordinate determination model is the image of the mask under illumination of white light, and an output of the coordinate determination model is a two-dimensional coordinate range of the mask as a whole, a two-dimensional coordinate range of a left eye part of the mask, a two-dimensional coordinate range of a right eye part of the mask, a two-dimensional coordinate range of a nose part of the mask, and a two-dimensional coordinate range of a mouth part of the mask.

[0010] According to a second aspect, the present application provides a cosmetic quality detection system based on big data, comprising: an obtaining module configured to obtain an image of a mask under illumination of white light;

[0011] a coordinate determination module configured to determine, based on the image of the mask under illumination of white light, a two-dimensional coordinate range of the mask as a whole, a two-dimensional coordinate range of a left eye part of the mask, a two-dimensional coordinate range of a right eye part of the mask, a two-dimensional coordinate range of a nose part of the mask, and a two-dimensional coordinate range of a mouth part of the mask using a coordinate determination model;

[0012] a construction module configured to construct multiple nodes and multiple edges between the multiple nodes, wherein the multiple nodes include a left eye node, a right eye node, a nose node, and a mouth node, a node feature of the left eye node is the two-dimensional coordinate range of the left eye part of the mask, a node feature of the right eye node is the two-dimensional coordinate range of the right eye part of the mask, a node feature of the nose node is the two-dimensional coordinate range of the nose part of the mask and the two-dimensional coordinate range of the mask as a whole, and a node feature of the mouth node is the two-dimensional coordinate range of the mouth part of the mask;

[0013] a compliance judgment module configured to process the multiple nodes and the multiple edges between the multiple nodes based on a graph neural network model to obtain whether the shape of the mask is compliant.

[0014] Further, the system is also used for:

[0015] Further, the system is also used for:

[0016] Further, the light processing model is a convolutional neural network model, the input of the light processing model is the plurality of images of the mask under the illumination of the plurality of colored lights, and the output of the light processing model is the plurality of to-be-verified masks.

[0017] Further, the plurality of images of the mask under the illumination of the plurality of colored lights includes a plurality of images of the mask under the illumination of red light, a plurality of images of the mask under the illumination of green light, and a plurality of images of the mask under the illumination of blue light.

[0018] Further, the coordinate determination model is a convolutional neural network model, the input of the coordinate determination model is the image of the mask under the illumination of white light, and the output of the coordinate determination model is the two-dimensional coordinate range of the mask as a whole, the two-dimensional coordinate range of the left eye part of the mask, the two-dimensional coordinate range of the right eye part of the mask, the two-dimensional coordinate range of the nose part of the mask, and the two-dimensional coordinate range of the mouth part of the mask.

[0019] The present application provides a cosmetic quality detection method and system based on big data, which comprises the following steps: acquiring an image of a mask under the illumination of white light; determining the two-dimensional coordinate range of the mask as a whole, the two-dimensional coordinate range of the left eye part of the mask, the two-dimensional coordinate range of the right eye part of the mask, the two-dimensional coordinate range of the nose part of the mask, and the two-dimensional coordinate range of the mouth part of the mask based on the image of the mask under the illumination of white light using a coordinate determination model; constructing a plurality of nodes and a plurality of edges between the plurality of nodes, wherein the plurality of nodes comprises a left eye node, a right eye node, a nose node, and a mouth node, the node feature of the left eye node is the two-dimensional coordinate range of the left eye part of the mask, the node feature of the right eye node is the two-dimensional coordinate range of the right eye part of the mask, the node feature of the nose node is the two-dimensional coordinate range of the nose part of the mask and the two-dimensional coordinate range of the mask as a whole, and the node feature of the mouth node is the two-dimensional coordinate range of the mouth part of the mask; and processing the plurality of nodes and the plurality of edges between the plurality of nodes based on a graph neural network model to obtain whether the shape of the mask is compliant, so as to improve the compliance detection efficiency of the mask shape. BRIEF DESCRIPTION OF DRAWINGS

[0020] Figure 1A flowchart of a cosmetic quality detection method based on big data provided by an embodiment of the present application is shown in the figure.

[0021] Figure 2 A flowchart of a mask quality detection method by a light processing model provided by an embodiment of the present application is shown in the figure.

[0022] Figure 3 A schematic diagram of a cosmetic quality detection system based on big data provided by an embodiment of the present application is shown in the figure. DETAILED DESCRIPTION

[0023] In an embodiment of the present application, a cosmetic quality detection method based on big data is provided, as shown in the figure. Figure 1 The cosmetic quality detection method based on big data includes steps S1-S4.

[0024] Step S1, obtaining an image of a mask under white light illumination.

[0025] The mask is a kind of cosmetic product, and the mask is usually made of paper, cloth or other materials. For example, the mask is a patch type structure mask.

[0026] The image of the mask under white light illumination is the image of the mask under white light illumination. White light refers to white light in the visible spectrum.

[0027] Step S2, determining the two-dimensional coordinate range of the mask as a whole, the two-dimensional coordinate range of the left eye part of the mask, the two-dimensional coordinate range of the right eye part of the mask, the two-dimensional coordinate range of the nose part of the mask, and the two-dimensional coordinate range of the mouth part of the mask based on the image of the mask under white light illumination using a coordinate determination model.

[0028] The coordinate determination model is a convolutional neural network model, the input of the coordinate determination model is the image of the mask under white light illumination, and the output of the coordinate determination model is the two-dimensional coordinate range of the mask as a whole, the two-dimensional coordinate range of the left eye part of the mask, the two-dimensional coordinate range of the right eye part of the mask, the two-dimensional coordinate range of the nose part of the mask, and the two-dimensional coordinate range of the mouth part of the mask.

[0029] The coordinate determination model can process the image of the mask under white light illumination to map the image of the mask under white light illumination to a two-dimensional coordinate system, and finally calculate the two-dimensional coordinate range of the mask as a whole, the two-dimensional coordinate range of the left eye part of the mask, the two-dimensional coordinate range of the right eye part of the mask, the two-dimensional coordinate range of the nose part of the mask, and the two-dimensional coordinate range of the mouth part of the mask.

[0030] The convolutional neural network can realize the perception of local regions of an image through the stacking of convolutional layers and pooling layers. In this way, detailed information such as edges and textures in the mask image can be captured. In the mask image, different parts of the mask have different texture and shape features, and the convolutional neural network can distinguish different parts by learning these features. The convolutional neural network can be trained by gradient descent method.

[0031] The two-dimensional coordinate range of the whole mask refers to the two-dimensional coordinate range occupied by the whole mask image in the two-dimensional coordinate system. The two-dimensional coordinate range of the whole mask includes the two-dimensional coordinate range of the left eye part of the mask, the two-dimensional coordinate range of the right eye part of the mask, the two-dimensional coordinate range of the nose part of the mask, and the two-dimensional coordinate range of the mouth part of the mask.

[0032] The two-dimensional coordinate range of the left eye part of the mask refers to the two-dimensional coordinate range occupied by the left eye part image of the mask in the two-dimensional coordinate system.

[0033] The two-dimensional coordinate range of the right eye part of the mask refers to the two-dimensional coordinate range occupied by the right eye part image of the mask in the two-dimensional coordinate system.

[0034] The two-dimensional coordinate range of the nose part of the mask refers to the two-dimensional coordinate range occupied by the nose part image of the mask in the two-dimensional coordinate system.

[0035] The two-dimensional coordinate range of the mouth part of the mask refers to the two-dimensional coordinate range occupied by the mouth part image of the mask in the two-dimensional coordinate system.

[0036] In some embodiments, the coordinate determination model comprises a part segmentation layer, a contour coordinate determination layer, a rectangular frame coordinate determination layer, and a two-dimensional coordinate range determination layer. The input of the part segmentation layer is the image of the mask under white light illumination, and the output of the part segmentation layer is the mask overall image, the mask left eye part image, the mask right eye part image, the mask nose part image, and the mask mouth part image. The input of the contour coordinate determination layer is the mask overall image, the mask left eye part image, the mask right eye part image, the mask nose part image, and the mask mouth part image. The output of the contour coordinate determination layer is the coordinates of the multiple points of the mask overall contour, the coordinates of the multiple points of the mask left eye part contour, the coordinates of the multiple points of the mask right eye part contour, the coordinates of the multiple points of the mask nose part contour, and the coordinates of the multiple points of the mask mouth part contour. The input of the rectangular frame coordinate determination layer is the coordinates of the multiple points of the mask overall contour, the coordinates of the multiple points of the mask left eye part contour, the coordinates of the multiple points of the mask right eye part contour, the coordinates of the multiple points of the mask nose part contour, and the coordinates of the multiple points of the mask mouth part contour. The output of the rectangular frame coordinate determination layer is the coordinate ranges of the multiple small rectangular frames within the mask overall contour, the coordinate ranges of the multiple small rectangular frames within the mask left eye part contour, the coordinate ranges of the multiple small rectangular frames within the mask right eye part contour, the coordinate ranges of the multiple small rectangular frames within the mask nose part contour, and the coordinate ranges of the multiple small rectangular frames within the mask mouth part contour. The input of the two-dimensional coordinate range determination layer is the coordinate ranges of the multiple small rectangular frames within the mask overall contour, the coordinate ranges of the multiple small rectangular frames within the mask left eye part contour, the coordinate ranges of the multiple small rectangular frames within the mask right eye part contour, the coordinate ranges of the multiple small rectangular frames within the mask nose part contour, and the coordinate ranges of the multiple small rectangular frames within the mask mouth part contour. The output of the two-dimensional coordinate range determination layer is the two-dimensional coordinate range of the mask overall, the two-dimensional coordinate range of the mask left eye part, the two-dimensional coordinate range of the mask right eye part, the two-dimensional coordinate range of the mask nose part, and the two-dimensional coordinate range of the mask mouth part.

[0037] The coordinates of the multiple points of the mask overall contour refer to the position coordinates of the multiple points on the mask overall contour. These coordinates can be calculated by the contour coordinate determination layer, and the coordinates of the multiple points of the mask overall contour can be used to describe the mask overall contour.

[0038] The coordinates of the multiple points of the mask left eye part contour, the coordinates of the multiple points of the mask right eye part contour, the coordinates of the multiple points of the mask nose part contour, and the coordinates of the multiple points of the mask mouth part contour are used to describe the position coordinates of the points of the corresponding part contour shape.

[0039] The coordinate range of the plurality of small rectangular frames within the overall contour of the mask refers to the coordinate range of the plurality of small rectangular frames divided within the contour of the mask as a whole, and the plurality of small rectangular frames are used to describe the position information of different regions inside the mask. The coordinate range of the plurality of small rectangular frames within the contour of the left eye part of the mask refers to the coordinate range of the plurality of small rectangular frames divided within the contour of the left eye part of the mask, and the plurality of small rectangular frames are used to describe the position information of the left eye part of the mask. The coordinate range of the plurality of small rectangular frames within the contour of the right eye part of the mask refers to the coordinate range of the plurality of small rectangular frames divided within the contour of the right eye part of the mask, and the plurality of small rectangular frames are used to describe the position information of the right eye part of the mask. The coordinate range of the plurality of small rectangular frames within the contour of the nose part of the mask refers to the coordinate range of the plurality of small rectangular frames divided within the contour of the nose part of the mask, and the plurality of small rectangular frames are used to describe the position information of the nose part of the mask. The coordinate range of the plurality of small rectangular frames within the contour of the mouth part of the mask refers to the coordinate range of the plurality of small rectangular frames divided within the contour of the mouth part of the mask, and the plurality of small rectangular frames are used to describe the position information of the mouth part of the mask.

[0040] As an example, assuming that the nose region is composed of a plurality of irregular curves or boundaries, we can divide it into a plurality of small rectangular continuous regions, and then use the two-dimensional coordinate range of each small rectangular region to describe the two-dimensional coordinate range of the nose part of the mask. For each small rectangular region, the two-dimensional coordinate range of the rectangular frame can be used to represent its two-dimensional coordinate range. Assuming that the left boundary of a small region is x1, the right boundary is x2, the upper boundary is y1, and the lower boundary is y2. Then the coordinate range of this small region can be represented as [x1, x2] x [y1, y2]. By merging the two-dimensional coordinate ranges of all small regions, the description of the entire nose region can be obtained. The coordinate range of each small region can be placed in a list to represent the coordinate range occupied by the nose region. The two-dimensional coordinate range determination layer merges the two-dimensional coordinate ranges of all small rectangular regions to obtain the description of the entire nose region. The two-dimensional coordinate range determination layer can place the coordinate range of each small region in a list, and this list represents the coordinate range occupied by the eye region.

[0041] The part segmentation layer is used to segment the mask image into five parts, namely the whole, left eye, right eye, nose and mouth, so as to subsequent processing. The contour coordinate determination layer is used to determine the point coordinates of the contour of each part, the rectangular frame coordinate determination layer is used to determine the coordinate range of a plurality of small rectangular frames in each part, and the two-dimensional coordinate range determination layer is used to merge the coordinate ranges of all small rectangular frames to obtain the two-dimensional coordinate range of the whole part. Dividing the coordinate determination model into multiple layers can make each layer focus on different tasks and improve the accuracy of the model. For example, the part segmentation layer is specifically used to segment the whole image into parts, and the contour coordinate determination layer focuses on determining the contour of each part. In addition, layering also facilitates the interpretability and debugging of the model.

[0042] Step S3, a plurality of nodes and a plurality of edges between the plurality of nodes are constructed, the plurality of nodes including a left eye node, a right eye node, a nose node, and a mouth node, a node feature of the left eye node being a two-dimensional coordinate range of a mask left eye part, a node feature of the right eye node being a two-dimensional coordinate range of a mask right eye part, a node feature of the nose node being a two-dimensional coordinate range of a mask nose part and a two-dimensional coordinate range of the mask whole, and a node feature of the mouth node being a two-dimensional coordinate range of a mask mouth part.

[0043] The graph structure data is a data structure composed of nodes and edges, the graph structure including a plurality of nodes and a plurality of edges between the plurality of nodes, and the graph neural network model is a neural network directly acting on the graph structure data.

[0044] By representing different parts of the mask as nodes, the structure of the mask can be more clearly organized and understood. Each node represents a specific part, making the analysis of the mask shape more interpretable.

[0045] In some embodiments, the plurality of edges between the plurality of nodes represent the positional relationship between the nodes, and the edge features of the plurality of edges represent the shortest distance between the nodes and the direction corresponding to the shortest distance. By connecting nodes with edges, the positional relationship between parts can be established. Such modeling can help further facial analysis and feature extraction.

[0046] According to the features of each part, the corresponding nodes are constructed, and they are connected using edges. This can be achieved through the graph data structure in graph theory, where each node represents a part and the edge represents the relationship between different parts. The node features can be stored as node attributes in the graph, and the edge can be used to represent the positional relationship between the nodes.

[0047] Step S4, processing the plurality of nodes and the plurality of edges between the plurality of nodes based on the graph neural network model to obtain whether the mask shape is compliant.

[0048] The graph neural network model includes a graph neural network (GNN) and a fully connected layer. The graph neural network model is used to process multiple nodes of the mask and multiple edges between the multiple nodes to determine whether the shape of the mask conforms to the regulation.

[0049] In the mask shape analysis, the nodes represent different parts of the mask, such as the left eye, the right eye, the nose, and the mouth. Each node has specific node features, such as a two-dimensional coordinate range. Through the nodes, each part of the mask can be modeled and analyzed.

[0050] The graph neural network model can learn global features of the mask, including the relative positions, shapes, and sizes of each part. Through global feature learning, it can more comprehensively determine whether the shape of the mask conforms to the regulation. By processing multiple nodes and multiple edges, the correlation between each part of the mask can be captured. For example, the position of the nose should be between the two eyes, and the position of the mouth should be below the nose. By modeling and processing these nodes and edges, the shape of the mask and the distribution of each part can be more accurately determined. In some embodiments, a labeled mask dataset of compliance and non-compliance can be used to train the graph neural network model. Then, the graph neural network model can make inferences on new mask data and determine whether the shape of the mask is compliant.

[0051] The input of the graph neural network model is the multiple nodes and the multiple edges between the multiple nodes, and the output of the graph neural network model is mask shape compliance or mask shape non-compliance. If the output of the graph neural network model is mask shape non-compliance, non-compliance information can be sent to the management terminal.

[0052] In some embodiments, mask quality detection can also be performed through the light processing model to determine whether the mask has cracks, Figure 2 The process of mask quality detection through the light processing model provided by the embodiments of the present application includes steps S21-S24.

[0053] Step S21, obtaining multiple images of the mask under illumination of multiple colored lights.

[0054] The multiple images of the mask under illumination of multiple colored lights include multiple images of the mask under red light illumination, multiple images of the mask under green light illumination, and multiple images of the mask under blue light illumination.

[0055] The multiple images of the mask under illumination of multiple colored lights can be obtained by a camera or other image acquisition device under the illumination of set red, green, and blue lights.

[0056] Step S22, determining the plurality of to-be-verified masks based on the plurality of images of each mask under the illumination of the plurality of colored lights using an illumination processing model.

[0057] The plurality of to-be-verified masks refers to the plurality of masks that need to be further verified through the stretching test.

[0058] Red light, green light and blue light have different wavelengths. When light of different wavelengths is shone on the mask, the mask material will produce different reflections and absorptions of light. These reflection and absorption phenomena will exhibit different image characteristics, thereby affecting the detection of cracks. Specifically, when light of different wavelengths is shone on the mask, the color and contrast of the mask surface will change. Red light has a longer wavelength and can penetrate deeper into the mask, so it can better detect deep cracks in the mask. Green light has a moderate wavelength and can reflect the cracks on the surface and middle layer of the mask. Blue light has a shorter wavelength and can reflect small cracks on the surface of the mask. By using light of different wavelengths to illuminate the mask, the cracks on the surface and inside of the mask can be more comprehensively captured, improving the accuracy and effectiveness of crack detection.

[0059] The convolutional neural network can capture the spatial features in the plurality of images of each mask under the illumination of the plurality of colored lights through convolutional layers and pooling layers, thereby detecting possible cracks. The convolutional neural network can learn the patterns and differences between normal and abnormal areas of the mask through training. By training a large number of mask images with known cracks, the convolutional neural network can learn the features of these cracks and determine the plurality of to-be-verified masks.

[0060] The illumination processing model can analyze and compare images under different lighting conditions to determine the plurality of to-be-verified masks that need to be further verified.

[0061] The illumination processing model is a convolutional neural network model, the input of the illumination processing model is the plurality of images of the mask under the illumination of the plurality of colored lights, and the output of the illumination processing model is whether there are cracks.

[0062] Step S23, obtaining the stretching video of each to-be-verified mask.

[0063] In some embodiments, a dedicated stretching test instrument, such as a tensile testing machine, can be used to stretch each to-be-verified mask and simultaneously capture a video of the to-be-verified mask during the stretching process to obtain the stretching video of each to-be-verified mask.

[0064] Step S24, determining whether each to-be-verified mask has cracks based on the stretching video of each to-be-verified mask using a stretching video processing model.

[0065] The stretching video processing model is a gated recurrent unit. The input of the stretching video processing model is the stretching video of each mask to be verified. The output of the stretching video processing model is whether each mask to be verified has a crack or each mask to be verified does not have a crack.

[0066] The gated recurrent unit (GRU) is used to process sequence data and time series information. The gated recurrent unit includes three components: a memory unit, an update gate, and a reset gate. The memory unit stores information from previous time steps and passes it to the input and hidden state of the current time step to preserve historical information. The update gate determines whether to update the information of the memory unit. It controls the degree of update of the memory unit according to the input of the current time step and the hidden state of the previous time step. When the update gate is close to 1, more past information will be retained; when the update gate is close to 0, more new information will be passed. The reset gate determines how to use the memory unit of the previous time step. It decides which information to discard according to the input of the current time step and the hidden state of the previous time step. The role of the reset gate is to better adapt to the current input. The gated recurrent unit effectively solves the gradient vanishing problem through the adjustment of the update gate and the reset gate, so that the model can better handle the dependency relationship of long sequence data.

[0067] The gated recurrent unit can process the stretching video of each mask to be verified in a continuous time period and comprehensively consider the features of the correlation between the stretching video of each mask to be verified at each time point, so that the output features are more accurate and comprehensive.

[0068] Multiple images under multiple color lights can provide different angles and details of the mask surface, but this method also has certain limitations. For example, using a specific wavelength light source may mask some subtle cracks, leading to missed detection. During the stretching process, the original cracks of the mask will deform. These deformations can be captured through consecutive frames, so the stretching video can more accurately capture the crack information of the mask. The mask may undergo slight deformation and cracking during the stretching process, and these changes are difficult to capture in static images. By analyzing the dynamic changes of the mask between consecutive frames through the gated recurrent unit, the dynamic features of the mask can be learned, thereby enhancing the detection ability of the cracks.

[0069] In some embodiments, the stretch video processing model comprises a crack site positioning layer, a crack stretch video segment segmentation layer, and a crack determination layer. The input of the crack site positioning layer is the stretch video of each mask to be verified, the output of the crack site positioning layer is the suspected crack site of each mask to be verified, the input of the crack stretch video segment segmentation layer is the suspected crack site of each mask to be verified and the stretch video of each mask to be verified, the output of the crack stretch video segment segmentation layer is the stretch segmentation video of the suspected crack site of each mask to be verified, and the input of the crack determination layer is the stretch segmentation video of the suspected crack site of each mask to be verified. The output of the crack determination layer is whether each mask to be verified has a crack or not. By dividing the stretch video processing model into multiple layers, the information of the crack can be extracted, analyzed and determined step by step, so as to realize the crack detection of the mask to be verified. Each layer undertakes a specific task and cooperates with each other to complete the whole processing process. Such hierarchical design can improve the robustness and efficiency of the system.

[0070] based on the same inventive concept, Figure 3 A big data-based cosmetic quality detection system provided for an embodiment of the present application, the big data-based cosmetic quality detection system comprises:

[0071] The acquisition module 31 is configured to acquire an image of the mask under white light illumination.

[0072] The coordinate determination module 32 is configured to determine, based on the image of the mask under white light illumination, a two-dimensional coordinate range of the mask as a whole, a two-dimensional coordinate range of a left eye part of the mask, a two-dimensional coordinate range of a right eye part of the mask, a two-dimensional coordinate range of a nose part of the mask, and a two-dimensional coordinate range of a mouth part of the mask using a coordinate determination model.

[0073] The construction module 33 is configured to construct a plurality of nodes and a plurality of edges between the plurality of nodes, wherein the plurality of nodes comprises a left eye node, a right eye node, a nose node, and a mouth node, the node feature of the left eye node is the two-dimensional coordinate range of the left eye part of the mask, the node feature of the right eye node is the two-dimensional coordinate range of the right eye part of the mask, the node feature of the nose node is the two-dimensional coordinate range of the nose part of the mask and the two-dimensional coordinate range of the mask as a whole, and the node feature of the mouth node is the two-dimensional coordinate range of the mouth part of the mask.

[0074] The compliance judgment module 34 is configured to process the plurality of nodes and the plurality of edges between the plurality of nodes based on a graph neural network model to obtain whether the shape of the mask is compliant.

Claims

1. A cosmetic quality detection method based on big data, characterized by, The method comprises: acquiring an image of the mask under white light illumination; based on the image of the mask under white light illumination, determining the two-dimensional coordinate range of the mask as a whole, the two-dimensional coordinate range of the left eye part of the mask, the two-dimensional coordinate range of the right eye part of the mask, the two-dimensional coordinate range of the nose part of the mask, and the two-dimensional coordinate range of the mouth part of the mask using a coordinate determination model, the coordinate determination model being a convolutional neural network model, the input of the coordinate determination model being the image of the mask under white light illumination, the output of the coordinate determination model being the two-dimensional coordinate range of the mask as a whole, the two-dimensional coordinate range of the left eye part of the mask, the two-dimensional coordinate range of the right eye part of the mask, the two-dimensional coordinate range of the nose part of the mask, and the two-dimensional coordinate range of the mouth part of the mask, the coordinate determination model comprising a part segmentation layer, a contour coordinate determination layer, a rectangular frame coordinate determination layer, and a two-dimensional coordinate range determination layer, the input of the part segmentation layer being the image of the mask under white light illumination, the output of the part segmentation layer being the mask image as a whole, the left eye part image of the mask, the right eye part image of the mask, the nose part image of the mask, and the mouth part image of the mask, the input of the contour coordinate determination layer being the mask image as a whole, the left eye part image of the mask, the right eye part image of the mask, the nose part image of the mask, and the mouth part image of the mask, the output of the contour coordinate determination layer being the coordinates of a plurality of points of the mask contour as a whole, the coordinates of a plurality of points of the left eye part contour of the mask, the coordinates of a plurality of points of the right eye part contour of the mask, the coordinates of a plurality of points of the nose part contour of the mask, and the coordinates of a plurality of points of the mouth part contour of the mask, the input of the rectangular frame coordinate determination layer being the coordinates of a plurality of points of the mask contour as a whole, the coordinates of a plurality of points of the left eye part contour of the mask, the coordinates of a plurality of points of the right eye part contour of the mask, the coordinates of a plurality of points of the nose part contour of the mask, and the coordinates of a plurality of points of the mouth part contour of the mask, the output of the rectangular frame coordinate determination layer being the coordinate range of a plurality of small rectangular frames within the mask contour as a whole, the coordinate range of a plurality of small rectangular frames within the left eye part contour of the mask, the coordinate range of a plurality of small rectangular frames within the right eye part contour of the mask, the coordinate range of a plurality of small rectangular frames within the nose part contour of the mask, and the coordinate range of a plurality of small rectangular frames within the mouth part contour of the mask, the input of the two-dimensional coordinate range determination layer being the coordinate range of a plurality of small rectangular frames within the mask contour as a whole, the coordinate range of a plurality of small rectangular frames within the left eye part contour of the mask, the coordinate range of a plurality of small rectangular frames within the right eye part contour of the mask, the coordinate range of a plurality of small rectangular frames within the nose part contour of the mask, and the coordinate range of a plurality of small rectangular frames within the mouth part contour of the mask, and the output of the two-dimensional coordinate range determination layer being the two-dimensional coordinate range of the mask as a whole, the two-dimensional coordinate range of the left eye part of the mask, the two-dimensional coordinate range of the right eye part of the mask, the two-dimensional coordinate range of the nose part of the mask, and the two-dimensional coordinate range of the mouth part of the mask. constructing a plurality of nodes and a plurality of edges between the plurality of nodes, the plurality of nodes comprising a left eye node, a right eye node, a nose node, a mouth node, a node feature of the left eye node being a two-dimensional coordinate range of a left eye part of the mask, a node feature of the right eye node being a two-dimensional coordinate range of a right eye part of the mask, a node feature of the nose node being a two-dimensional coordinate range of a nose part of the mask and a two-dimensional coordinate range of the mask as a whole, and a node feature of the mouth node being a two-dimensional coordinate range of a mouth part of the mask; processing the plurality of nodes and the plurality of edges between the plurality of nodes based on a graph neural network model to obtain whether the mask shape is compliant; the method further comprises: obtaining a plurality of images of the mask under illumination of a plurality of colored lights, the plurality of images of the mask under illumination of the plurality of colored lights comprising a plurality of images of the mask under red light illumination, a plurality of images of the mask under green light illumination, and a plurality of images of the mask under blue light illumination; based on the plurality of images of each mask under illumination of the plurality of colored lights, determining a plurality of masks to be verified using an illumination processing model; obtaining a stretch video of each mask to be verified; based on the stretch video of each mask to be verified, determining whether the each mask to be verified has a crack using a stretch video processing model, the stretch video processing model being a gated recurrent unit, the stretch video processing model comprising a crack site positioning layer, a crack stretch video segment segmentation layer, and a crack determination layer, an input of the crack site positioning layer being the stretch video of the each mask to be verified, an output of the crack site positioning layer being a suspected crack site of the each mask to be verified, an input of the crack stretch video segment segmentation layer being the suspected crack site of the each mask to be verified and the stretch video of the each mask to be verified, an output of the crack stretch video segment segmentation layer being a stretch segmented video of the suspected crack site of the each mask to be verified, an input of the crack determination layer being the stretch segmented video of the suspected crack site of the each mask to be verified, and an output of the crack determination layer being that the each mask to be verified has a crack or that the each mask to be verified does not have a crack.

2. The big data-based cosmetic quality detection method of claim 1, wherein, the illumination processing model being a convolutional neural network model, an input of the illumination processing model being the plurality of images of the mask under illumination of the plurality of colored lights, and an output of the illumination processing model being the plurality of masks to be verified. 3.A cosmetic quality detection system based on big data, characterized in that, comprising: an obtaining module configured to obtain an image of a mask under white light illumination; The coordinate determination module is configured to determine, based on the image of the mask under white light illumination, a two-dimensional coordinate range of the mask as a whole, a two-dimensional coordinate range of a left eye part of the mask, a two-dimensional coordinate range of a right eye part of the mask, a two-dimensional coordinate range of a nose part of the mask, and a two-dimensional coordinate range of a mouth part of the mask using a coordinate determination model. The coordinate determination model is a convolutional neural network model. An input of the coordinate determination model is the image of the mask under white light illumination. An output of the coordinate determination model is the two-dimensional coordinate range of the mask as a whole, the two-dimensional coordinate range of the left eye part of the mask, the two-dimensional coordinate range of the right eye part of the mask, the two-dimensional coordinate range of the nose part of the mask, and the two-dimensional coordinate range of the mouth part of the mask. The coordinate determination model comprises a part segmentation layer, a contour coordinate determination layer, a rectangular frame coordinate determination layer, and a two-dimensional coordinate range determination layer. An input of the part segmentation layer is the image of the mask under white light illumination. An output of the part segmentation layer is a mask as a whole image, a mask left eye part image, a mask right eye part image, a mask nose part image, and a mask mouth part image. An input of the contour coordinate determination layer is the mask as a whole image, the mask left eye part image, the mask right eye part image, the mask nose part image, and the mask mouth part image. An output of the contour coordinate determination layer is coordinates of a plurality of points of a mask as a whole contour, coordinates of a plurality of points of a mask left eye part contour, coordinates of a plurality of points of a mask right eye part contour, coordinates of a plurality of points of a mask nose part contour, and coordinates of a plurality of points of a mask mouth part contour. An input of the rectangular frame coordinate determination layer is the coordinates of the plurality of points of the mask as a whole contour, the coordinates of the plurality of points of the mask left eye part contour, the coordinates of the plurality of points of the mask right eye part contour, the coordinates of the plurality of points of the mask nose part contour, and the coordinates of the plurality of points of the mask mouth part contour. An output of the rectangular frame coordinate determination layer is a coordinate range of a plurality of small rectangular frames in the mask as a whole contour, a coordinate range of a plurality of small rectangular frames in the mask left eye part contour, a coordinate range of a plurality of small rectangular frames in the mask right eye part contour, a coordinate range of a plurality of small rectangular frames in the mask nose part contour, and a coordinate range of a plurality of small rectangular frames in the mask mouth part contour. An input of the two-dimensional coordinate range determination layer is the coordinate range of the plurality of small rectangular frames in the mask as a whole contour, the coordinate range of the plurality of small rectangular frames in the mask left eye part contour, the coordinate range of the plurality of small rectangular frames in the mask right eye part contour, the coordinate range of the plurality of small rectangular frames in the mask nose part contour, and the coordinate range of the plurality of small rectangular frames in the mask mouth part contour. An output of the two-dimensional coordinate range determination layer is the two-dimensional coordinate range of the mask as a whole, the two-dimensional coordinate range of the left eye part of the mask, the two-dimensional coordinate range of the right eye part of the mask, the two-dimensional coordinate range of the nose part of the mask, and the two-dimensional coordinate range of the mouth part of the mask. The system is further configured to: obtain a plurality of images of a plurality of masks under illumination of a plurality of color lights, the plurality of images of the plurality of masks under illumination of the plurality of color lights comprising a plurality of images of the mask under red light, a plurality of images of the mask under green light, and a plurality of images of the mask under blue light; determine a plurality of masks to be verified based on the plurality of images of each mask under illumination of the plurality of color lights using a light processing model; obtain a stretch video of each mask to be verified; determine whether the each mask to be verified has a crack based on the stretch video of the each mask to be verified using a stretch video processing model, the stretch video processing model being a gated recurrent unit, the stretch video processing model comprising a crack position positioning layer, a crack stretch video segment segmentation layer, and a crack determination layer, an input of the crack position positioning layer being the stretch video of the each mask to be verified, an output of the crack position positioning layer being a suspected crack position of the each mask to be verified, an input of the crack stretch video segment segmentation layer being the suspected crack position of the each mask to be verified and the stretch video of the each mask to be verified, an output of the crack stretch video segment segmentation layer being a stretch segmented video of the suspected crack position of the each mask to be verified, an input of the crack determination layer being the stretch segmented video of the suspected crack position of the each mask to be verified, and an output of the crack determination layer being that the each mask to be verified has a crack or that the each mask to be verified does not have a crack. The light processing model is a convolutional neural network model, an input of the light processing model being the plurality of images of the mask under illumination of the plurality of color lights, and an output of the light processing model being the plurality of masks to be verified. The system is further configured to:

4. The big data-based cosmetic quality detection system of claim 3, wherein, obtain a plurality of images of a plurality of masks under illumination of a plurality of color lights, the plurality of images of the plurality of masks under illumination of the plurality of color lights comprising a plurality of images of the mask under red light, a plurality of images of the mask under green light, and a plurality of images of the mask under blue light; determine a plurality of masks to be verified based on the plurality of images of each mask under illumination of the plurality of color lights using a light processing model; obtain a stretch video of each mask to be verified; determine whether the each mask to be verified has a crack based on the stretch video of the each mask to be verified using a stretch video processing model, the stretch video processing model being a gated recurrent unit, the stretch video processing model comprising a crack position positioning layer, a crack stretch video segment segmentation layer, and a crack determination layer, an input of the crack position positioning layer being the stretch video of the each mask to be verified, an output of the crack position positioning layer being a suspected crack position of the each mask to be verified, an input of the crack stretch video segment segmentation layer being the suspected crack position of the each mask to be verified and the stretch video of the each mask to be verified, an output of the crack stretch video segment segmentation layer being a stretch segmented video of the suspected crack position of the each mask to be verified, an input of the crack determination layer being the stretch segmented video of the suspected crack position of the each mask to be verified, and an output of the crack determination layer being that the each mask to be verified has a crack or that the each mask to be verified does not have a crack. The light processing model is a convolutional neural network model, an input of the light processing model being the plurality of images of the mask under illumination of the plurality of color lights, and an output of the light processing model being the plurality of masks to be verified.

Citation Information

Patent Citations

  • Customized mask pack manufacturing system and manufacturing method

    CN110678104A

  • Dynamic expression recognition method and system based on space-time diagram convolutional neural network

    CN112800903A