Image acquisition frequency determination method and device, readable storage medium and program product
By continuously collecting face images in skin state detection and performing average value calculation of detection results, the problem of micro-expression influences in the acquisition process is solved, and the accuracy and efficiency of detection are improved.
Patent Information
- Application Number
- CN202411958728.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-27
- Publication Date
- 2025-05-02
AI Technical Summary
In skin state detection, the process of face image acquisition is easily affected by the acquisition method and changes in the user's micro-expression, resulting in inaccurate evaluation of skin state.
By continuously collecting the faces of the target object within a preset time, at least two groups of face image groups are obtained, and skin status detection is performed in the order of acquisition, and the average value of the detection results of each group of image groups is calculated. If the error conditions are met, the number of image acquisition times is determined to achieve a stable detection result.
It improves the accuracy and efficiency of skin detection results, reduces the influence of image detection results on user micro-expressions, and avoids excessive image acquisition and analysis.
Smart Images

Figure CN119919973A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a method, apparatus, computer device, computer-readable storage medium and computer program product for determining the number of image acquisition times. Background Art
[0002] With the rapid development of computer vision and artificial intelligence technology, skin condition detection technology has been widely used in the fields of beauty, medical treatment, and personalized skin care. By using special detection instruments to capture and analyze the user's face, the skin condition detection results can be obtained.
[0003] However, in practical applications, the facial image acquisition process is often affected by the image acquisition method and changes in user micro-expressions, which in turn affects the accurate assessment of skin condition. Summary of the invention
[0004] Based on this, the present application provides a method, apparatus, computer device, computer-readable storage medium and computer program product for determining the number of image acquisition times, which can improve the accuracy of skin detection results.
[0005] In one aspect, the present application provides a method for determining the number of image acquisition times, comprising:
[0006] Continuously collecting images of the face of the target object within a preset time to obtain at least two groups of face image groups;
[0007] According to the collection order of the at least two groups of face image groups, skin condition detection is performed based on the face image groups in turn to obtain a detection result of the first face image group and a detection result of the second face image group;
[0008] Determine an average value of the detection result of the second face image group and the detection result of the first face image group to obtain an average value of target detection corresponding to the second face image group;
[0009] If the target detection average value satisfies the error condition, the image acquisition times corresponding to the second face image group are determined to be the target acquisition times.
[0010] In one embodiment, the error condition includes a first error condition, and if the target detection average value satisfies the error condition, determining the number of image acquisition times corresponding to the second face image group as the target acquisition times includes:
[0011] After completing the skin condition detection of all the face image groups, determining the total detection average value of the at least two groups of face image groups;
[0012] Determine a first difference between the target detection average value corresponding to the second face image group and the total detection average value;
[0013] If the first difference satisfies a first error condition, the number of image acquisition times corresponding to the second facial image group is determined to be a target acquisition time.
[0014] In one embodiment, if the target detection average value satisfies the error condition, determining the number of image acquisitions corresponding to the second face image group as the target acquisition number includes:
[0015] Determine the target detection average value corresponding to the previous face image group; the previous face image group is a face image group adjacent to the second face image group;
[0016] Determine a second difference between an average value of target detection corresponding to the second facial image group and an average value of target detection corresponding to the previous facial image group;
[0017] If the second difference satisfies a second error condition, the number of image acquisition times corresponding to the second facial image group is determined to be a target acquisition time.
[0018] In one embodiment, the error condition includes a second error condition, and the method further includes:
[0019] If the second difference satisfies the second error condition, the average value of the target detection corresponding to the second face image group is output as the detection result.
[0020] In one embodiment, each group of facial images includes a first facial image, a second facial image and a third facial image, wherein the first facial image is an image captured under a first lighting condition, the second facial image is an image captured under a second lighting condition, and the third facial image is an image captured under a third lighting condition.
[0021] In one of the embodiments, the detection results of the first face image group and the detection results of the second face image group are detection results in a target detection dimension, and the error condition is an error condition corresponding to the target detection dimension.
[0022] In one embodiment, the method further comprises:
[0023] Continuously performing target acquisition number of image acquisitions on the face of the subject to be detected within a preset time to obtain an image group of the target acquisition number of times;
[0024] Perform skin condition detection on each of the image groups respectively to obtain detection results corresponding to each image group;
[0025] Based on the detection results corresponding to each group of image groups, the skin condition detection results of the object to be detected are determined.
[0026] In one aspect, the present application further provides a device for determining the number of image acquisition times, comprising:
[0027] An image acquisition module is used to continuously acquire images of the face of a target object within a preset time to obtain at least two groups of face image groups;
[0028] A skin detection module, configured to perform skin condition detection based on the facial image groups in sequence according to the collection order of the at least two facial image groups, and obtain a detection result of the first facial image group and a detection result of the second facial image group;
[0029] a detection average value determination module, used to determine the average value of the detection result of the second face image group and the detection result of the first face image group, and obtain the target detection average value corresponding to the second face image group;
[0030] The target acquisition times determination module is used to determine the image acquisition times corresponding to the second face image group as the target acquisition times if the target detection average value meets the error condition.
[0031] On the one hand, the present application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of any of the above methods when executing the computer program.
[0032] On the one hand, the present application also provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps of any of the methods described above are implemented.
[0033] On the one hand, the present application also provides a computer program product, including a computer program, which implements the steps of any of the methods described above when executed by a processor.
[0034] The above-mentioned method, device, computer equipment, computer-readable storage medium and computer program product for determining the number of image acquisition times continuously acquire images of the face of the target object within a preset time to obtain at least two groups of face image groups, and perform skin condition detection based on the face image groups in the acquisition order of the at least two groups of face image groups to obtain the detection result of the first face image group and the detection result of the second face image group, determine the average value of the detection result of the second face image group and the detection result of the first face image group, obtain the target detection average value corresponding to the second face image group, confirm whether the target detection average value satisfies the error condition, and determine whether the skin condition evaluation of the second face image group has stabilized. When the target detection average value has satisfied the error condition, it is considered that a sufficiently accurate skin condition evaluation result has been obtained, and the number of image acquisitions corresponding to the second face image group can be determined as the target acquisition number. When skin condition detection is performed subsequently, continuous image acquisition is performed only according to the target acquisition number, thereby reducing the influence of the user's micro-expressions on the image detection results while avoiding excessive image acquisition and analysis, thereby improving the accuracy and efficiency of skin detection. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0036] Figure 1 A diagram showing an application environment of a method for determining the number of image acquisition times in one embodiment;
[0037] Figure 2 A schematic diagram of a flow chart of a method for determining the number of image acquisition times in one embodiment;
[0038] Figure 3 A schematic diagram of capturing images under different lighting conditions in an embodiment;
[0039] Figure 4 A schematic diagram of score distribution corresponding to some detection dimensions in an embodiment;
[0040] Figure 5 A schematic diagram of score distribution corresponding to each dimension in an embodiment;
[0041] Figure 6 It is a structural block diagram of a device for determining the number of image acquisition times in one embodiment;
[0042] Figure 7 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0043] In order to make the purpose, technical solution and beneficial effects of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0044] The method for determining the number of image acquisition times provided in the embodiment of the present application can be applied to the following examples: Figure 1 In the application environment shown. Among them, the terminal 102 communicates with the server 104 through the network. The data storage system can store the data that the server 104 needs to process. The data storage system can be integrated on the server 104, or it can be placed on the cloud or other network servers. The method for determining the number of image acquisitions can be executed by the terminal 102 or the server 104 alone, or by the terminal 102 and the server 104 in collaboration. In some embodiments, the method for determining the number of image acquisitions is executed by the terminal 102, and the terminal 102 continuously acquires images of the face of the target object within a preset time to obtain at least two groups of face image groups; according to the acquisition order of the at least two groups of face image groups, the skin state detection is performed based on the face image groups in turn to obtain the detection result corresponding to the second face image group; the average value of the detection result of the second face image group and the detection result of the first face image group is determined to obtain the target detection average value corresponding to the second face image group; the first face image group is a face image group acquired before the second face image group; if the target detection average value meets the error condition, the image acquisition number corresponding to the second face image group is determined to be the target acquisition number.
[0045] The terminal 102 may be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, IoT devices, and portable wearable devices. The IoT devices may be smart speakers, smart TVs, smart air conditioners, smart car devices, projection devices, skin detection devices, etc. Portable wearable devices may be smart watches, smart bracelets, head-mounted devices, etc. The head-mounted devices may be virtual reality (VR) devices, augmented reality (AR) devices, smart glasses, etc. The server 104 may be an independent physical server, a server cluster or distributed system consisting of multiple physical servers, or a cloud server that provides cloud computing services.
[0046] In one embodiment, the method for determining the number of image acquisition times is performed by a computer device, which may be, for example, Figure 1 The terminal 102 or server 104 shown. Figure 2 As shown, the method may include the following steps:
[0047] S202, continuously collecting images of the face of the target object within a preset time to obtain at least two groups of face image groups.
[0048] It refers to the time period set in advance during the image acquisition process, which is used to limit the total duration of continuous image acquisition. During this time period, the system will continuously acquire face images at a certain frequency until the preset time is over.
[0049] The target object refers to the individual for skin condition detection, which may be a person. The number of target objects may be one or more. For example, if the number of target objects is 10, images of faces of 10 different target objects may be collected separately within a preset time.
[0050] A face image group refers to a group of images obtained by performing a one-time image acquisition operation on the face of a target object under a set of lighting conditions, wherein the set of lighting conditions includes at least one of white light lighting conditions, cross-polarized light lighting conditions, and parallel polarized light lighting conditions. Correspondingly, each face image group includes a face image taken under at least one lighting condition. For example, each set of lighting conditions includes one lighting condition, which can specifically be that each face image group includes only one face image taken under the corresponding lighting condition. For example, each set of lighting conditions includes two lighting conditions, and each face image group includes only two face images taken under different lighting conditions.
[0051] In one embodiment, the set of illumination conditions includes a first illumination condition, a second illumination condition, and a third illumination condition. If n images of a face of a certain object are continuously captured within a preset time, then n groups of face image groups corresponding to the object may be obtained. Each face image group includes a first face image, a second face image, and a third face image. The first face image is an image captured under the first illumination condition, the second face image is an image captured under the second illumination condition, and the third face image is an image captured under the third illumination condition. It should be noted that in skin detection, white light is often used to capture the basic color and overall texture of the skin, which can more realistically present the natural state of the skin. In skin detection, cross-polarized light can help remove the oily sheen or other surface reflections on the facial skin, clearly show the surface features of the skin such as pores and fine lines, and is particularly suitable for the detection of skin blemishes. Parallel polarized light can be used to detect deep-level skin features such as skin texture and capillaries, which can reveal the health status of the skin to a certain extent, such as blood flow, skin density, etc. By capturing images of the face under three different illumination conditions, comprehensive and accurate skin state detection can be achieved.
[0052] like Figure 3As shown, the face of a subject is photographed under different lighting conditions to obtain a group of face images, which includes a first face image under white light lighting conditions, a second face image under cross-polarized light lighting conditions, and a third face image under parallel polarized light conditions.
[0053] It is understandable that when there are multiple target objects, by continuously capturing n images of the faces of the target objects within a preset time, n groups of face images corresponding to each target object can be obtained.
[0054] S204, performing skin condition detection based on the face image groups in sequence according to the collection order of at least two face image groups, to obtain detection results of the first face image group and detection results of the second face image group.
[0055] Among them, the second face image group refers to the latest group of face images currently being analyzed, which is relative to the face image group that has been analyzed. The first face image group is the face image group collected before the second face image group and is in a state where skin condition detection is completed. For example, the second face image group is the kth face image group, and the first face image group is the 1st face image group, the 2nd face image group,..., the k-1th face image group.
[0056] Specifically, for any target object, after obtaining the corresponding facial image group, each group of facial image groups is input into a pre-trained skin condition detection model in sequence according to the collection order to perform skin condition detection, and the detection results of the first facial image group and the second facial image group are obtained.
[0057] Among them, the pre-trained skin condition detection model performs skin condition detection including skin condition detection in the target detection dimension, and the obtained detection result can be a score value, a score level or an index value of the skin condition in the target detection dimension. For example, the target detection dimension is the skin's moisturizing degree and the corresponding index value is the skin moisture content; when the detection result is a score value in the target detection dimension, if the number of target detection dimensions is at least two, the obtained detection result can also be a comprehensive score in at least two target detection dimensions. The target detection dimension can specifically be at least one of skin age, ITA (skin tone index), skin color L channel, skin color a channel, skin color b channel, total wrinkle score, forehead wrinkles, glabellar wrinkles, periorbital wrinkles, crow's feet, nasolabial folds, mouth wrinkles, tear troughs, eye bags, sagging eyelids, dark circles, pores, blackheads, acne, pigmentation, spots, freckles, acquired nevus of Ota, chloasma, age spots, sensitivity, uniform skin color, and skin texture.
[0058] In one embodiment, for any target object, after obtaining the corresponding n groups of facial image groups, the terminal can first perform skin condition detection on the first group of facial image groups in the order of acquisition of the n groups of facial image groups to obtain the detection results corresponding to the first group of facial image groups. At this time, the first group of facial image groups is the second facial image group. Then, the terminal can perform skin condition detection on the second group of facial image groups to obtain the detection results corresponding to the second group of facial image groups. At this time, the second group of facial image groups is the second facial image group. And so on, skin condition detection is performed on each subsequent facial image group.
[0059] In one embodiment, for any target object, the terminal can perform skin condition analysis while performing image acquisition, that is, the processes of image acquisition and skin condition analysis are parallel. After acquiring the first group of facial images, the terminal performs skin condition detection on the first group of facial images to obtain the detection results corresponding to the first group of facial images. At this time, the first group of facial images is the second facial image group. At the same time, the terminal continues to acquire the second group of facial images. After acquiring the second group of facial images, the terminal performs skin condition detection on the second group of facial images to obtain the detection results corresponding to the second group of facial images. At this time, the second group of facial images is the second facial image group, and so on. Subsequently, each facial image group continues to be acquired and the skin condition detected.
[0060] S206, determining an average value of the detection result of the second face image group and the detection result of the first face image group, and obtaining an average value of target detection corresponding to the second face image group.
[0061] Among them, the first face image group is the face image group collected before the second face image group. For example, the second face image group is the kth face image group, the first face image group is the 1st face image group, the 2nd face image group,..., the k-1th face image group, and the target detection average value corresponding to the second face image group is the average value of the detection results of the first k face image groups.
[0062] For example, assuming that 5 groups of face images have been collected and detected for a certain object, the 6th group of images is now being analyzed (that is, the second face image group is the 6th group). The detection result of the 6th group of images is D6, and the detection results of the 1st to 5th groups are D1, D2, D3, D4, and D5, respectively. At this time, the second face image group is the 6th group, and the target detection average value corresponding to the 6th group can be expressed as follows: (D1+D2+D3+D4+D5+D6) / 6.
[0063] It can be understood that the target detection average value corresponding to the second face image group can be the target detection average value in the corresponding target detection dimension. When the number of target detection dimensions is at least two, the obtained target detection average value can also be the comprehensive target detection average value in at least two target detection dimensions.
[0064] S208: If the target detection average value satisfies the error condition, determine the image acquisition times corresponding to the second face image group as the target acquisition times.
[0065] Among them, the error condition is a standard used to determine whether the image acquisition and skin condition detection results have become stable, and can be set according to actual needs.
[0066] The target acquisition number refers to the minimum number of image acquisitions required to complete the skin condition assessment.
[0067] Specifically, after obtaining the target detection average value corresponding to the second face image group, the terminal can detect whether the target detection average value corresponding to the second face image group meets the preset error condition. If so, it is determined that the image acquisition number corresponding to the second face image group is the target acquisition number.
[0068] For example, for any target object, if the target detection average value corresponding to the kth group of face images meets the error condition, the target acquisition number is determined to be k times. It can be understood that if the target detection average value corresponding to the kth group of face images is the target detection average value in the corresponding target detection dimension, then the target acquisition number k times is the minimum image acquisition number that can achieve stable detection results in the target detection dimension. When the number of target detection dimensions is at least two, if the obtained target detection average value corresponding to the kth group of face images is the comprehensive target detection average value in at least two target detection dimensions, then the target acquisition number k times is the minimum image acquisition number that can achieve stable comprehensive detection results in at least two target detection dimensions.
[0069] In the above-mentioned image acquisition number method, by continuously acquiring images of the target object's face within a preset time, at least two groups of face image groups are obtained, and skin condition detection is performed based on the face image groups in sequence according to the acquisition order of the at least two groups of face image groups to obtain the detection result of the first face image group and the detection result of the second face image group, and the average value of the detection result of the second face image group and the detection result of the first face image group is determined to obtain the target detection average value corresponding to the second face image group, and confirm whether the target detection average value satisfies the error condition, and it can be determined whether the skin condition evaluation of the second face image group has stabilized. When the target detection average value has satisfied the error condition, it is considered that a sufficiently accurate skin condition evaluation result has been obtained, and the image acquisition number corresponding to the second face image group can be determined as the target acquisition number. When skin condition detection is performed subsequently, continuous image acquisition is performed only according to the target acquisition number, thereby reducing the influence of the user's micro-expressions on the image detection results while avoiding excessive image acquisition and analysis, thereby improving the accuracy and efficiency of skin detection.
[0070] In one embodiment, the error condition includes a first error condition. If the target detection average satisfies the error condition, the process by which the terminal determines that the number of image acquisition times corresponding to the second face image group is the target acquisition time includes the following steps: after completing the skin condition detection of all face image groups, determining the total detection average of at least two groups of face image groups; determining a first difference between the target detection average and the total detection average corresponding to the second face image group; if the first difference satisfies the first error condition, determining that the number of image acquisition times corresponding to the second face image group is the target acquisition time.
[0071] The first error condition is a condition set according to the difference between the target detection average value of the second face image group and the total detection average value of all image groups.
[0072] Specifically, when the number of target objects is one, after obtaining the corresponding n groups of face image groups, the terminal inputs a pre-trained skin condition detection model to each group of face image groups to perform skin condition detection, obtains the detection result corresponding to each group of face image groups, and calculates the average value of the detection results of the n groups of face image groups to obtain the total detection average value, and determines the target detection average value corresponding to each group of face image groups in turn according to the image acquisition order, and calculates the first difference between the partial detection value corresponding to the second face image group and the total detection average value, and compares the absolute value of the first difference with the first error threshold corresponding to the first error condition. If the absolute value of the first difference is less than or equal to the first error threshold, it is determined that the first difference satisfies the first error condition, and the number of image acquisitions corresponding to the second face image group is determined to be the target acquisition number; when the number of target objects is more than two, for any target object, the terminal obtains the corresponding After obtaining n groups of face image groups, a pre-trained skin condition detection model is input into each group of face image groups for skin condition detection to obtain the detection results corresponding to each group of face image groups, and in each detection dimension, the average value of the detection results of all target objects is calculated to obtain the target detection average value of each detection dimension in the kth group, and the average value of the detection results of each detection dimension of the n groups is calculated to obtain the total detection average value of each detection dimension. In any detection dimension, the target detection average value corresponding to the kth group is determined in sequence according to the image acquisition order, and the first difference between the partial detection value corresponding to the kth group and the total detection average value is calculated, and the absolute value of the first difference is compared with the first error threshold corresponding to the first error condition. If the absolute value of the first difference is less than or equal to the first error threshold, it is determined that the first difference meets the first error condition, and the number of image acquisitions corresponding to the kth group is determined to be the target acquisition number corresponding to the corresponding detection dimension.
[0073] It can be understood that the size of the first error threshold can be set according to the detection dimension corresponding to the detection result.
[0074] The above embodiment is explained below in conjunction with an actual scenario. The terminal used in this scenario is a skin analyzer with multiple light sources. The skin analyzer can achieve shooting under various lighting conditions. The skin analyzer includes a fixing device for fixing the face of the target object. When shooting, the target object can place the chin on the fixing device to keep the face angle unchanged. In this application scenario, the number of target objects is 61, and the preset shooting time is 2 minutes. Each person shoots 10 groups of face image groups. The lighting conditions for each group of shooting include white light, cross-polarized light, and parallel polarized light. Each group of face image groups obtained includes a first face image under white light conditions, a second face image under cross-polarized light conditions, and a third face image under parallel polarized light conditions. During the shooting process, the target object does not make large gestures, thereby capturing slight changes in slight gestures and facial micro-expressions. After the 61 people were photographed, the skin condition of each group of face images was detected to obtain the score of the target object corresponding to each group of face images in each dimension. Then, these scores were analyzed to determine the minimum number of image shootings corresponding to each dimension. The analysis process includes the following steps:
[0075] 1. For each person and each dimension, the average score of the 10 groups is the target score S for the corresponding dimension. n .
[0076] 2. Calculate the average score S of each person and each dimension using the first k groups (k = 1, 2, ..., 10) of images k , with the target score S n The absolute value of the calculated difference is taken as the error.
[0077] 3. For each dimension, average the errors of the first k groups of images for all people to obtain the MAE (Mean Average Error) of the first k groups of images in each dimension.
[0078] 4. Comprehensive MAE, that is, calculating the MAE mean of all dimensions.
[0079] 5. Find the number of image groups required when MAE<δ in each dimension.
[0080] Specifically, step 5 includes step 5a) and step 5b), wherein:
[0081] 5a). MAE<δ: This indicates that when the mean of the first k groups of images is calculated for this dimension, the error between the mean calculated for the first ten groups of images is less than δ.
[0082] 5b). For dimensions directly derived from the deep learning network, such as wrinkle dimensions and eye area dimensions, which are easily affected by micro-expressions, a looser δ=1 (short dashed line) can be used as a reference; for statistical value scores or comprehensive scores, a stricter δ=0.5 (long dashed line) can be used as a reference.
[0083] 6. Shaded range: The range represented is based on a 95% confidence level. In other words, if the same experiment is repeated many times, 95% of the time, the true mean will fall within this range.
[0084] refer to Figure 4 The relationship between the score MAE and the number of acquisitions corresponding to some of the detection dimensions shown in the figure can be understood as follows: Figure 4 Only the score MAE relationship table of some detection dimensions such as skin age and forehead wrinkles is shown. In addition, in actual scenarios, the score MAE relationship table of tear grooves, pores, spots and other detection dimensions can also be constructed. Based on the score MAE distribution of each detection dimension, a MAE relationship table can also be constructed. Figure 5 The comprehensive score MAE relationship table is shown.
[0085] By analyzing the above relationship tables, taking MAE<1 as an example, we can draw the following conclusions:
[0086] 1. The convergence of periorbital wrinkles is slow, and it takes 5 sets of pictures to converge to MAE < 1. This also proves that periorbital wrinkles are easily affected by eye micro-expressions, that is, the minimum number of shots is 5.
[0087] 2. Other deep learning network scoring dimensions: forehead wrinkles, frown lines, crow's feet, nasolabial folds, and mouth wrinkles. It takes at most 3 sets of pictures to converge to MAE < 1, that is, the minimum number of shots is 3 times.
[0088] 3. Other comprehensive / statistical scoring dimensions: sensitivity, skin tone uniformity, skin texture. To converge to MAE < 1, at most 2 sets of pictures are required, that is, the minimum number of shots is 2.
[0089] In general, if you need to balance the convergence of each dimension, you can choose 3-5 groups of pictures to ensure that all dimensions are controlled within a difference of 1 point, that is, the minimum number of shots is 3-5 times.
[0090] Similarly, we can also use MAE<0.5 as the standard to analyze the convergence and determine the minimum number of shots required for different dimensions.
[0091] Furthermore, we continuously collected data by taking multiple sets of data, and used the average score calculation method to analyze the number of shots required to keep the score difference within a certain range. This verified that in most dimensions, as long as three consecutive skin tests were collected, a relatively stable score could be obtained, and the fluctuation of the score difference could be converged to within 1 point (out of 100), effectively solving the fluctuation problem of short-term skin tests for customers by skin care institutions or skin care brands.
[0092] In the above embodiment, by using the total detection average value as a benchmark and comparing the target detection average value with the total detection average value, it is possible to determine whether the current image group is consistent with the overall detection result, thereby determining whether the detection result of the second face image group has stabilized. If the difference between the partial detection value of the second face image group and the total detection average value is less than or equal to the error threshold, it means that the current result is close to the overall result and meets the stability requirement, thereby improving the evaluation accuracy of the detection result of the second face image group. When skin condition detection is performed subsequently, continuous image acquisition is only performed according to the target acquisition number, thereby reducing the impact of user micro-expressions on the image detection results while avoiding excessive image acquisition and analysis, thereby improving the accuracy and efficiency of skin detection.
[0093] In one embodiment, the error condition includes a second error condition. If the target detection average value satisfies the error condition, determining the number of image acquisition times corresponding to the second face image group as the target acquisition times includes: determining the target detection average value corresponding to the previous face image group; determining a second difference between the target detection average value corresponding to the second face image group and the target detection average value corresponding to the previous face image group; if the second difference satisfies the second error condition, determining the number of image acquisition times corresponding to the second face image group as the target acquisition times.
[0094] The second error condition is a condition set according to the difference in detection results between the second face image group and the previous face image group. The previous face image group is the adjacent previous face image group of the second face image group. For example, if the second face image group is the kth face image group, then the previous face image group is the k-1th face image group. The target detection average value corresponding to the second face image group is the average value of the detection results of the previous k face image groups, and the target detection average value corresponding to the previous face image group is the average value of the detection results of the previous k-1 face image groups.
[0095] Specifically, when the number of target objects is one, after obtaining the target detection average value of the kth group of face image groups and the target detection average value of the k-1th group of face image groups of the target object, a second difference between the two target detection average values is calculated, and the absolute value of the second difference is compared with the second error threshold value corresponding to the second error condition. If the absolute value of the second difference is less than or equal to the second error threshold value, it is determined that the second difference satisfies the second error condition, and the number of image acquisitions corresponding to the second face image group is determined to be the target acquisition number; when the number of target objects is more than two, for any target object, after obtaining the corresponding n groups of face image groups, the terminal inputs a pre-trained image into each group of face image groups. A skin condition detection model is used to perform skin condition detection to obtain a detection result corresponding to each group of face images, and in each detection dimension, the average value of the detection results of all target objects is calculated to obtain the target detection average value of the k-1th group and the target detection average value of the k-1th group in each detection dimension. In any detection dimension, the second difference between the target detection average value of the kth group and the target detection average value of the k-1th group of face images is calculated, and the absolute value of the second difference is compared with the second error threshold corresponding to the second error condition. If the absolute value of the second difference is less than or equal to the second error threshold, it is determined that the second difference satisfies the second error condition, and the number of image acquisitions corresponding to the kth group is determined to be the target acquisition number.
[0096] It is understandable that the size of the second error threshold can be set according to the detection dimension corresponding to the detection result. In the example of the present application, for the same detection dimension, the first error threshold and the second error threshold corresponding thereto can be the same or different.
[0097] In the above embodiment, the terminal can determine whether the detection result of the current image group has stabilized by introducing a comparison between the detection average value of the previous group of images and the detection result of the current image group. If the difference between the current group and the previous group is small, it means that the detection result of the current image group is consistent with the previous group, reflecting the stability of the skin condition, thereby improving the evaluation accuracy of the detection result of the second face image group. When the skin condition is detected subsequently, continuous image acquisition is only performed according to the target acquisition number, thereby reducing the influence of the user's micro-expressions on the image detection results, avoiding excessive image acquisition and analysis, and improving the accuracy and efficiency of skin detection.
[0098] In one embodiment, the above-mentioned method for determining the number of image acquisition times further includes the following steps: if the second difference satisfies the second error condition, outputting the target detection average value corresponding to the second face image group as the detection result.
[0099] For example, for any target object, the terminal can perform skin condition analysis while performing image acquisition, that is, the processes of image acquisition and skin condition analysis are parallel. After acquiring the first group of face images, the terminal performs skin condition detection on the first group of face images to obtain the detection results corresponding to the first group of face images. At the same time, the terminal continues to acquire the second group of face images. After acquiring the second group of face images, the terminal performs skin condition detection on the second group of face images to obtain the detection results corresponding to the second group of face images, and determines the target detection average value corresponding to the second group of face images, calculates the difference between the target detection average value corresponding to the second group of face images and the target detection average value corresponding to the first group of face images (that is, the detection results of the first group of face images). If the absolute value of the difference is greater than the second error threshold, continue to The third group of facial images is subjected to skin condition detection to obtain detection results corresponding to the third group of facial images, and the target detection average value corresponding to the third group of facial images is determined. The difference between the target detection average value corresponding to the third group of facial images and the target detection average value corresponding to the second group of facial images is calculated. If the absolute value of the difference is less than or equal to the second error threshold, it is determined that the current detection result has stabilized, and the target detection average value corresponding to the third group of facial images can be output as the skin condition detection result of the target object, without the need to analyze subsequent facial image groups. If the absolute value of the difference is greater than the second error threshold, the next group of facial images is continued to be analyzed until it is determined that the detection results of a subsequent group have stabilized, and the target detection average value corresponding to the group of facial images is output as the skin condition detection result of the target object.
[0100] In the above embodiment, the terminal determines whether the detection result has stabilized through the second error condition. When the detection result is stable, the result is output immediately without waiting for more image acquisition and processing. This can greatly improve the efficiency of the evaluation process, especially in application scenarios with tight time or high real-time requirements, and can reduce the waiting time of users.
[0101] In one embodiment, the above-mentioned method for determining the number of image acquisition times also includes the following steps: continuously performing a target number of image acquisitions on the face of the object to be detected within a preset time to obtain an image group with the target number of image acquisitions; performing skin condition detection on each image group to obtain a detection result for each image group; and determining the skin condition detection result of the object to be detected based on the detection result of each image group.
[0102] Specifically, after determining the target number of acquisitions, the terminal can continuously acquire images of the face of the object to be detected for the target number of acquisitions within a preset time when it is necessary to perform skin condition detection on the object to be detected in the future, so as to obtain image groups with the target number of acquisitions, and perform skin condition detection on each image group to obtain the detection result of each image group, and determine the average value of these detection results, and output this average value as the skin condition detection result of the object to be detected.
[0103] In the above embodiment, after the terminal determines the minimum number of image acquisitions, that is, the number of image acquisitions with a relatively stable evaluation result, when it is necessary to perform skin condition detection on a new object, it continuously performs image acquisition of the target number of times on the face of the object to be detected within a preset time to obtain an image group of the target number of times, and performs independent skin condition detection on each group of images. This can effectively reduce the impact of accidental factors (such as shooting angle, light changes, temporary fluctuations in skin condition, etc.) on the final result. The detection results of multiple image groups can smooth out accidental errors after statistical analysis, thereby improving the robustness and credibility of the evaluation, avoiding excessive image acquisition and analysis, and also improving the accuracy and efficiency of skin detection.
[0104] In one embodiment, the above-mentioned method for determining the number of image acquisition times also includes the following steps: continuously performing a target number of image acquisitions on the face of the object to be detected within a preset time to obtain an image group with a target number of image acquisitions; performing skin condition detection on the last image group acquired in the image group to obtain the detection result of the last image group acquired; and determining the skin condition detection result of the object to be detected based on the detection result of the last image group acquired.
[0105] Specifically, after determining the target number of acquisitions, the terminal can continuously acquire images of the face of the object to be detected for the target number of acquisitions within a preset time when it is needed to perform skin condition detection on the object to be detected in the future, and obtain an image group of the target number of acquisitions, and only perform skin condition detection on the last acquired image group in the image group to obtain the detection result of the last acquired image group. Therefore, the detection result at this time has tended to be stable, and therefore, skin condition detection can be performed only on the last acquired image group, and the detection result of the last acquired image group can be output as the skin condition detection result of the object to be detected.
[0106] In the above embodiment, after the terminal determines the minimum number of image acquisitions, that is, the number of image acquisitions with relatively stable evaluation results, when it is necessary to perform skin condition detection on a new object, it continuously performs image acquisition for the target number of times of the face of the object to be detected within a preset time to obtain an image group with the target number of times of acquisition, and only performs skin condition detection on the image group acquired for the last time, thereby avoiding repeated detection of all image groups and greatly reducing the time and resource consumption of calculation and processing.
[0107] It should be understood that, although the various steps in the flowcharts involved in the various embodiments described above are displayed in sequence according to the indications of the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless there is a clear description in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a portion of the steps in the flowcharts involved in the various embodiments described above may include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a portion of the steps or stages in other steps.
[0108] Based on the same inventive concept, the embodiment of the present application also provides an image acquisition number determination device for implementing the image acquisition number determination method involved above. The implementation solution provided by the device to solve the problem is similar to the implementation solution recorded in the above method, so the specific limitations of one or more image acquisition number determination device embodiments provided below can refer to the limitations of the image acquisition number determination method above, and will not be repeated here.
[0109] In an exemplary embodiment, Figure 6 As shown, a device for determining the number of image acquisition times is provided, comprising: an image acquisition module 602, a skin detection module 604, a detection average value determination module 606 and a target acquisition number determination module 608, wherein:
[0110] An image acquisition module 602 is used to continuously acquire images of the face of a target object within a preset time to obtain at least two groups of face image groups;
[0111] A skin detection module 604 is used to perform skin condition detection based on the face image groups in sequence according to the collection order of at least two face image groups, and obtain a detection result of the first face image group and a detection result of the second face image group;
[0112] The detection average value determination module 606 is used to determine the average value of the detection result of the second face image group and the detection result of the first face image group to obtain the target detection average value corresponding to the second face image group;
[0113] The target acquisition times determination module 608 is used to determine the image acquisition times corresponding to the second face image group as the target acquisition times if the target detection average value meets the error condition.
[0114] In the above embodiment, by continuously capturing images of the target object's face within a preset time, at least two groups of face image groups are obtained, and skin condition detection is performed based on the face image groups in sequence according to the capture order of the at least two groups of face image groups to obtain the detection result of the first face image group and the detection result corresponding to the second face image group, and the average of the detection result of the second face image group and the detection result of the first face image group is determined to obtain the target detection average corresponding to the second face image group, and confirm whether the target detection average satisfies the error condition, and it can be determined whether the skin condition evaluation of the second face image group has stabilized. When the target detection average has satisfied the error condition, it is considered that a sufficiently accurate skin condition evaluation result has been obtained, and the number of image captures corresponding to the second face image group can be determined as the target capture number. When skin condition detection is performed subsequently, continuous image capture is performed only according to the target capture number, thereby reducing the influence of the user's micro-expressions on the image detection results while avoiding excessive image capture and analysis, thereby improving the accuracy and efficiency of skin detection.
[0115] In one embodiment, the error condition includes a first error condition, and the target acquisition number determination module 608 is also used to: determine the total detection average value of at least two groups of face image groups after completing the skin condition detection of all face image groups; determine the first difference between the target detection average value and the total detection average value corresponding to the second face image group; if the first difference satisfies the first error condition, determine the image acquisition number corresponding to the second face image group as the target acquisition number.
[0116] In one embodiment, the target acquisition times determination module 608 is further used to: determine the target detection average value corresponding to the previous face image group; the previous face image group is the adjacent previous face image group of the second face image group; determine the second difference between the target detection average value corresponding to the second face image group and the target detection average value corresponding to the previous face image group; if the second difference satisfies the second error condition, determine that the image acquisition times corresponding to the second face image group is the target acquisition times.
[0117] In one embodiment, the error condition includes a second error condition, and the target acquisition times determination module 608 is further used to: if the second difference satisfies the second error condition, output the target detection average value corresponding to the second face image group as the detection result.
[0118] In one embodiment, each group of facial images includes a first facial image, a second facial image and a third facial image, the first facial image is an image captured under a first lighting condition, the second facial image is an image captured under a second lighting condition, and the third facial image is an image captured under a third lighting condition.
[0119] In one of the embodiments, the detection results of the first face image group and the detection results corresponding to the second face image group are detection results in the target detection dimension, and the error condition is the error condition corresponding to the target detection dimension.
[0120] In one embodiment, the image acquisition module 602 is further used to: continuously acquire images of the face of the subject to be detected for a target acquisition number of times within a preset time to obtain an image group for the target acquisition number of times;
[0121] The skin detection module 604 is further used to perform skin condition detection on each image group respectively to obtain a detection result corresponding to each image group;
[0122] The detection average value determination module 606 is further used to determine the skin condition detection result of the object to be detected based on the detection result corresponding to each group of image groups.
[0123] Each module in the above-mentioned image acquisition number determination device can be implemented in whole or in part by software, hardware or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute the operations corresponding to each module.
[0124] In an exemplary embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as shown in FIG. Figure 7As shown. The computer device includes a processor, a memory, an input / output interface, a communication interface and an input device. The processor, the memory and the input / output interface are connected via a system bus, and the communication interface, the display unit and the input device are connected to the system bus via the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be implemented through WIFI, a mobile cellular network, near field communication (Near Field Communication, NFC) or other technologies. When the computer program is executed by the processor, a method for determining the number of image acquisition times is implemented.
[0125] Those skilled in the art will understand that Figure 7 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0126] In one embodiment, a computer device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above method embodiments when executing the computer program.
[0127] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.
[0128] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.
[0129] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.
[0130] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.
[0131] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0132] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A method for determining the number of image acquisition times, characterized in that: The method comprises: Continuously collecting images of the face of the target object within a preset time to obtain at least two groups of face image groups; According to the collection order of the at least two groups of face image groups, skin condition detection is performed based on the face image groups in turn to obtain a detection result of the first face image group and a detection result of the second face image group; Determine an average value of the detection result of the first face image group and the detection result of the second face image group to obtain an average value of target detection corresponding to the second face image group; If the target detection average value satisfies the error condition, the image acquisition number corresponding to the second face image group detection result is determined as the target acquisition number.
2. The method according to claim 1, characterized in that The error condition includes a first error condition, and if the target detection average value satisfies the error condition, determining the number of image acquisitions corresponding to the second face image group as the target acquisition number includes: After completing the skin condition detection of all the face image groups, determining the total detection average value of the at least two groups of face image groups; Determine a first difference between the target detection average value corresponding to the second face image group and the total detection average value; If the first difference satisfies a first error condition, the number of image acquisition times corresponding to the second facial image group is determined to be a target acquisition number.
3. The method according to claim 1, characterized in that: The error condition includes a second error condition, and if the target detection average value satisfies the error condition, determining the number of image acquisitions corresponding to the second face image group as the target acquisition number includes: Determine the target detection average value corresponding to the previous face image group; the previous face image group is a group of face images adjacent to the second face image group; Determine a second difference between an average value of target detection corresponding to the second facial image group and an average value of target detection corresponding to the previous facial image group; If the second difference satisfies a second error condition, the number of image acquisition times corresponding to the second facial image group is determined to be a target acquisition time.
4. The method according to claim 3, characterized in that The method further comprises: If the second difference satisfies the second error condition, the average value of the target detection corresponding to the second face image group is output as the detection result.
5. The method according to any one of claims 1 to 4, characterized in that Each group of facial images includes a first facial image, a second facial image and a third facial image. The first facial image is an image captured under a first lighting condition, the second facial image is an image captured under a second lighting condition, and the third facial image is an image captured under a third lighting condition.
6. The method according to any one of claims 1 to 4, characterized in that The detection results of the first face image group and the detection results of the second face image group are detection results in a target detection dimension, and the error condition is an error condition corresponding to the target detection dimension.
7. The method according to any one of claims 1 to 4, characterized in that The method further comprises: Continuously performing target acquisition number of image acquisitions on the face of the subject to be detected within a preset time to obtain an image group of the target acquisition number of times; Perform skin condition detection on each of the image groups respectively to obtain detection results corresponding to each image group; Based on the detection results corresponding to each group of image groups, the skin condition detection results of the object to be detected are determined.
8. A device for determining the number of image acquisition times, characterized in that: The device comprises: An image acquisition module is used to continuously acquire images of the face of a target object within a preset time to obtain at least two groups of face image groups; A skin detection module, configured to perform skin condition detection based on the facial image groups in sequence according to the collection order of the at least two facial image groups, and obtain a detection result of the first facial image group and a detection result of the second facial image group; a detection average value determination module, used to determine an average value of the detection result of the second face image group and the detection result of the first face image group, to obtain a target detection average value of the second face image group; The target acquisition times determination module is used to determine the image acquisition times corresponding to the second face image group as the target acquisition times if the target detection average value meets the error condition.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.