Image data set enhancement method based on expression tampering of key point disturbance and region transformation
Through the expression tampering image dataset enhancement method based on key point perturbation and region transformation, the problem of insufficient robustness of expression tampering in traditional detection methods is solved, and a realistic training dataset is generated, which improves the sensitivity and adaptability of the detection model.
Patent Information
- Application Number
- CN202510440528.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-09
- Publication Date
- 2025-07-11
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Traditional image detection methods are not robust enough to deal with expression tampering, especially when dealing with fine-grained feature changes in local expression tampering, and show insufficient detection capabilities.
The expression tampering image dataset enhancement method based on key point perturbation and area transformation is adopted. By performing accurate mathematical transformation and local area geometric transformation of the key point positions of the human face, subtle or exaggerated expression changes are simulated to generate a realistic training dataset.
The sensitivity and adaptability of the detection model to local tampering features is improved, and the generated data set can better capture the complex geometric deformation in expression tampering, enhancing the accuracy of detection.
Smart Images

Figure CN120299098A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of vision and image processing, and particularly to a method for enhancing an expression tampered image data set based on key point perturbation and region transformation. Background Art
[0002] Local expression tampering of a person usually focuses on key areas of the face, such as the corners of the mouth, eyes, eyebrows, etc. By modifying expression features to change the semantics of the image, the purpose of spoofing or insulting is achieved. This form of local tampering has high randomness and complexity, posing a huge challenge to the image detection model. Traditional detection methods often show insufficient robustness when dealing with fine-grained feature changes such as expression tampering. Summary of the Invention
[0003] In view of the above deficiencies in the prior art, the present invention provides a method for enhancing an expression tampered image data set based on key point perturbation and region transformation, aiming to solve problems such as the insufficient robustness often shown by traditional detection methods when dealing with fine-grained feature changes such as expression tampering.
[0004] To achieve the above invention purpose, the technical solution adopted by the present invention is as follows:
[0005] A method for enhancing an expression tampered image data set based on key point perturbation and region transformation, comprising the following steps:
[0006] S1: Key point perturbation enhancement: Key point perturbation enhancement performs precise mathematical transformations on the positions of key points on the human face to simulate the subtle or exaggerated changes that may occur in expression tampering, and truly reproduces the spoof features in areas such as the corners of the mouth, eyebrows, and eye corners;
[0007] S2: Parameter selection for key point perturbation enhancement: In key point perturbation enhancement, the parameters σ X and σ Y , respectively control the perturbation amplitudes of the key points in the horizontal and vertical directions, and their selection ranges should be dynamically adjusted according to the image resolution;
[0008] S3: Region transformation expansion: Region transformation expansion performs geometric transformations on local regions of the human face to simulate the common region shape and position changes in expression tampering;
[0009] S4: Parameter selection for region transformation expansion: In region transformation expansion, the matrix A of the affine transformation simulates the geometric changes of the local region by adjusting the rotation angle, scaling ratio, and shear angle.
[0010] Further, key point perturbation enhancement: includes the following steps:
[0011] Let the original coordinates of a certain key point be p = (x, y), and the coordinates after perturbation be p' = (x', y'). The perturbation formula includes the following parts:
[0012] (1) Linear perturbation: p' = p + Δp
[0013] where: Δp = (Δx, Δy) is a random offset generated from a Gaussian distribution: Δx ~ N(0, σ X 2 ), Δy ~ N(0, σ Y 2 ); Dynamically control the direction weights: Δx = k X *N(0, σ X 2 ), Δy = k Y *N(0, σ Y 2 )k X , k Y are the perturbation weights in the horizontal and vertical directions respectively, adjusting the significance of changes in specific directions;
[0014] (2) Nonlinear perturbation: p'_y = p_y + (a0 + α * |p_x - c x |) * sin((b0 + β * p_y) * p_x + c);
[0015] where: a0, b0 are the initial amplitudes and frequencies, and α, β control the dynamic adjustment; c X is the reference point, dynamically adjusting the amplitude and frequency.
[0016] Furthermore, the parameter selection for enhancing the key point perturbation includes the following steps:
[0017] Set it to 1% - 5% of the local feature size where the key point is located to ensure that the generated facial expression changes are both real and diverse;
[0018] At the same time, the directional weights k X and k Y are used to adjust the significance of the perturbation. The horizontal change of the corners of the mouth is more significant, set k X > k Y ;
[0019] The vertical change of the eyebrows is more obvious, then set k Y > k X , and its value ranges from 1.0 - 1.5;
[0020] For nonlinear perturbation, the amplitude parameter a0 and the dynamic adjustment factor α determine the curve amplitude of the perturbation, and the setting range is 1 - 3 pixels and 0.1 - 0.5 to simulate the changes of the corners of the mouth rising or the eyebrows bending;
[0021] The frequency parameter b0 and the dynamic adjustment factor β control the smoothness and detailed changes of the curve, and take values in the ranges of 0.1 - 0.5 and 0.05 - 0.2 respectively;
[0022] The phase offset c is randomly taken from [0, 2π] to avoid overly single disturbance patterns in the generated images;
[0023] In addition, the reference point c X is set as the center of the local area, so that the disturbance is concentrated inside the area and the enhancement effect is more natural.
[0024] Furthermore, the regional transformation expansion includes the following steps:
[0025] Let the set of coordinate points of the local area be R = {(x1, y1), (x2, y2),..., (x, y)}, and the set of transformed coordinate points be R' = {(x1', y1'), (x2', y2'),..., (x', y')}. The regional transformation formula is as follows:
[0026] (1) Affine transformation: p' = A * p + b
[0027] where: p = (x, y) is the original coordinate, p' = (x', y') is the transformed coordinate; A is a 2×2 affine transformation matrix for rotation, scaling, and shearing: A = [[a 11 , a 12 , [a 21 , a 22 ; b = [b X , b Y is the translation vector that controls the overall displacement of the area; dynamic perturbation matrix and vector: A' = A + ΔA, b' = b + Δb, where ΔA ~ N(0, σ 2 ), Δb ~ N(0, τ 2 );
[0028] (2) Dynamic scaling: p'_x = s X *x, p'_y = s Y *y
[0029] where: s X and s Y are the scaling factors in the horizontal and vertical directions; dynamic adjustment of the scaling factors: (c X , c Y ) is the center point of the area, and α, β control the dynamic changes of the scaling factors.
[0030] Furthermore, the parameter selection for the regional transformation expansion includes the following steps:
[0031] The rotation angle is set within the range of [-15°, 15°], the scaling factor is taken from [0.8, 1.2], and the shear angle is within [-10°, 10°]. These parameters need to ensure that the local area remains within the specific facial area after transformation to avoid distortion;
[0032] Meanwhile, to increase randomness, a random perturbation ΔA is added to the affine matrix A, and its value is sampled from a Gaussian distribution. The standard deviation is recommended to be set to 0.05;
[0033] The translation vector b is randomly valued within ±5% of the region width or height to simulate local minor translation changes
[0034] For dynamic scaling, the scaling factors s X and s Y The initial values are taken from [0.8, 1.2], and at the same time, dynamic adjustment factors α and β are added, and their values are set to 0.1 - 0.5, so that the scaling amplitude changes dynamically according to the distance between the point position and the center of the region. The points closer to the center change less, and the points farther from the center change more, thus generating a more natural deformation effect.
[0035] The beneficial effects of the present invention are:
[0036] The method for enhancing the expression tampering image dataset based on key point perturbation and region transformation of the present invention generates a realistic training dataset by designing diverse expression tampering simulation strategies, thereby improving the sensitivity and adaptability of the detection model to local tampering features. Description of the Drawings
[0037] Figure 1 It is a flowchart of the method for enhancing the expression tampering image dataset based on key point perturbation and region transformation of the present invention. Detailed Embodiment
[0038] The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings.
[0039] As Figure 1 shown, the method for enhancing the expression tampering image dataset based on key point perturbation and region transformation includes the following steps:
[0040] Key point perturbation enhancement:
[0041] Key point perturbation enhancement can realistically reproduce the spoof features in areas such as the corners of the mouth, eyebrows, and corners of the eyes by performing precise mathematical transformations on the key point positions of the human face to simulate the subtle or exaggerated changes that may occur in expression tampering.
[0042] Let the original coordinates of a certain key point be p = (x, y), and the perturbed coordinates be p' = (x', y'). The perturbation formula includes the following parts:
[0043] (1) Linear perturbation: p' = p + Δp
[0044] where: Δp = (Δx, Δy) is a random offset generated from a Gaussian distribution: Δx ~ N(0, σ X 2 ), Δy ~ N(0, σ Y 2 ); Dynamic control direction weights: Δx = k X *N(0, σ X 2 ), Δy = k Y *N(0, σ Y 2 ) k X , k Y are the perturbation weights in the horizontal and vertical directions respectively, adjusting the significance of changes in specific directions.
[0045] (2) Nonlinear perturbation: p'_y = p_y + (a0 + α * |p_x - c X |) * sin((b0 + β * p_y) * p_x + c).
[0046] where: a0, b0 are the initial amplitude and frequency, and α, β control the dynamic adjustment; c X is the reference point (such as the abscissa of the corner of the mouth or the center of the eyebrow), dynamically adjusting the amplitude and frequency.
[0047] Parameter selection for key point perturbation enhancement:
[0048] In key point perturbation enhancement, the parameters σ X and σ Y of linear perturbation control the perturbation amplitudes of key points in the horizontal and vertical directions respectively. Their selection ranges should be dynamically adjusted according to the image resolution, usually set to 1% - 5% of the local feature size where the key points are located, to ensure that the generated facial expression changes are both realistic and diverse.
[0049] Meanwhile, the directional weights k X and k Y are used to adjust the significance of the perturbation. For example, the horizontal change of the corner of the mouth is more significant, usually set k X > k Y ; while the vertical change of the eyebrow is more obvious, then set k Y > k X, and its value ranges from 1.0 to 1.5. For non-linear perturbations, the amplitude parameter a0 and the dynamic adjustment factor α determine the curve amplitude of the perturbation, with the setting range of 1 - 3 pixels and 0.1 - 0.5 to simulate the changes of the upturned corners of the mouth or the curved eyebrows; the frequency parameters b0 and the dynamic adjustment factor β control the smoothness of the curve and the detailed changes, with the values of 0.1 - 0.5 and 0.05 - 0.2 respectively. The phase offset c is randomly taken from [0, 2π] to avoid overly single perturbation patterns in the generated images.
[0050] In addition, the reference point c X is usually set as the center of the local area (such as the geometric center of the mouth or eyebrows), so that the perturbation is concentrated inside the area and the enhancement effect is more natural.
[0051] Region transformation expansion:
[0052] The region transformation expansion simulates the common changes in the shape and position of regions in expression tampering by performing geometric transformations on local regions of the face, such as the mouth, eyes or eyebrows. This method is particularly suitable for simulating exaggerated deformations of local regions, such as a widened mouth, elongated eyes or curved eyebrows.
[0053] Let the set of coordinate points of the local area be R = {(x1, y1), (x2, y2),..., (x, y)}, and the set of transformed coordinate points be R' = {(x1', y1'), (x2', y2'),..., (x', y')}. The region transformation formula is as follows:
[0054] (1) Affine transformation: p' = A * p + b
[0055] where: p = (x, y) is the original coordinate, p' = (x', y') is the transformed coordinate; A is a 2×2 affine transformation matrix for rotation, scaling and shearing: A = [[a 11 , a 12 , [a 21 , a 22 ; b = [b X , b Y is the translation vector to control the overall displacement of the region. Dynamic perturbation matrix and vector: A' = A + ΔA, b' = b + Δb, where ΔA ~ N(0, σ 2 ), Δb ~ N(0, τ 2 ).
[0056] (2) Dynamic scaling: p'_x = s X *x, p'_y = s Y *y
[0057] where: s X and s Yare the scaling factors in the horizontal and vertical directions; dynamically adjust the scaling factors: (c X ,c Y ) is the center point of the region, and α, β control the dynamic change of the scaling factor.
[0058] Parameter selection for region transformation expansion:
[0059] In the region transformation expansion, the matrix A of the affine transformation simulates the geometric changes of the local region by adjusting the rotation angle, scaling ratio, and shear angle. The rotation angle is usually set in the range of [-15°, 15°], the scaling factor takes [0.8, 1.2], and the shear angle is in [-10°, 10°]. These parameters need to ensure that the local region still remains within the specific facial region after transformation to avoid distortion.
[0060] At the same time, to increase randomness, a random perturbation ΔA can be added to the affine matrix A, and its value is sampled from a Gaussian distribution. The standard deviation is recommended to be set to 0.05; the translation vector b is randomly valued within ±5% of the region width or height to simulate local small translation changes. For dynamic scaling, the scaling factors s X and s Y The initial values take [0.8, 1.2], and at the same time, the dynamic adjustment factors α and β are added, and their values are set to 0.1 - 0.5, so that the scaling amplitude changes dynamically according to the distance between the point position and the center of the region. The points closer to the center change less, and the points farther from the center change more, thus generating a more natural deformation effect.
[0061] The method for enhancing the expression tampering image dataset based on key - point perturbation and region transformation of the present invention is based on face key - point detection and performs various forms of enhancement on local regions such as the corners of the mouth, eyes, and eyebrows, including linear perturbation, non - linear perturbation, etc. For example, by randomly adjusting the coordinates of the key - points at the corners of the mouth, simulating the upward or downward movement of the corners of the mouth; using the sine function to curve - modify the shape of the corners of the eyes or eyebrows to generate exaggerated expressions; achieving stretching or distortion of the local region through affine transformation to enhance the diversity of the images. Compared with traditional methods, the present invention focuses more on the fine - grained manipulation of local facial features and can accurately capture complex features such as geometric deformation in expression tampering.
[0062] The method for enhancing the expression tampering image dataset based on key - point perturbation and region transformation of the present invention is not only applicable to fields such as social media content review and public opinion monitoring, but also can be widely applied to scenarios such as copyright protection and content authenticity verification, providing strong technical support for maintaining the healthy development of the social environment.
[0063] The above are only the preferred embodiments of the present invention patent, and are not intended to limit the present invention patent. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention patent shall be included within the protection scope of the present invention patent.
Claims
1. An expression tampering image dataset enhancement method based on key point perturbation and region transformation, characterized in that Including the following steps: S1: Key-point perturbation enhancement: Key-point perturbation enhancement simulates the subtle or exaggerated changes that may occur in expression tampering through precise mathematical transformations of the key-point positions on the human face, and truly reproduces the spoof features in areas such as the corners of the mouth, eyebrows, and eye corners; S2: Parameter Selection for Key Point Perturbation Enhancement: In key point perturbation enhancement, the parameters σ x and σ γ respectively control the perturbation amplitudes of key points in the horizontal and vertical directions, and their selection ranges should be dynamically adjusted according to the image resolution; S3: Region transformation expansion: Region transformation expansion simulates the common changes in the shape and position of local regions in expression tampering through geometric transformations of local regions of the human face; S4: Parameter selection for region transformation expansion: In region transformation expansion, the matrix A of the affine transformation simulates the geometric changes of the local region by adjusting the rotation angle, scaling ratio, and shear angle.
2. The method for enhancing an expression tampering image data set based on key point perturbation and region transformation according to claim 1, wherein: Key-point perturbation enhancement: Including the following steps: Let the original coordinates of a certain key point be p = (x, y), and the coordinates after perturbation be p' = (x', y'). The perturbation formula includes the following parts: (1) Linear perturbation: p' = p + Δp where: Δp = (Δx, Δy) is a random offset, generated from a Gaussian distribution: Δx ~ N(0, σ x 2 ), Δy ~ N(0, σ γ 2 ); Dynamically control the direction weights: Δx = k x *N(0, σ x 2 ), Δy = k γ *N(0, σ γ 2 )k x , k y are the disturbance weights in the horizontal and vertical directions respectively, adjusting the significance of the change in a specific direction; (2) Nonlinear perturbation: p'_y = p_y + (a0 + α * |p_x - c x |) * sin((b0 + β * p_y) * p_x + c); Where: a0 and b0 are the initial amplitude and frequency, and α and β control the dynamic adjustment; c x is the reference point for dynamically adjusting the amplitude and frequency.
3. The method for enhancing an expression tampering image data set based on key point perturbation and region transformation according to claim 1, characterized in that: Parameter selection for key-point perturbation enhancement includes the following steps: It is set to 1% - 5% of the local feature size where the key point is located to ensure that the generated expression changes are both real and diverse; Meanwhile, the directional weight k x and k γ are used to adjust the significance of the perturbation. The horizontal change at the corners of the mouth is relatively significant, and k x > k γ ; If the vertical change of the eyebrows is more obvious, then set k γ >k x , and its value ranges from 1.0 to 1.5; For non-linear perturbation, the amplitude parameter a0 and the dynamic adjustment factor α determine the curve amplitude of the perturbation, and the setting range is 1 - 3 pixels and 0.1 - 0.5 to simulate the changes such as the upward curvature of the corners of the mouth or the bending of the eyebrows; The frequency parameter b0 and the dynamic adjustment factor β control the smoothness and detail changes of the curve, and take values of 0.1 - 0.5 and 0.05 - 0.2 respectively; The phase offset c is randomly taken from [0, 2π] to avoid the perturbation pattern of the generated image being too single; In addition, the reference point c x is set as the center of the local area, so that the perturbation is concentrated inside the area, and the enhancement effect is more natural.
4. The method for enhancing an expression tampering image data set based on key point perturbation and region transformation according to claim 1, wherein: Region transformation expansion includes the following steps: Let the set of coordinate points of the local region be R = {(x1, y1), (x2, y2),..., (x, y)}, and the set of coordinate points after transformation be R' = {(x1', y1'), (x2', y2'),..., (x', y')}. The region transformation formula is as follows: (1) Affine transformation: p' = A * p + b where: p=(x,y) is the original coordinate, p'=(x',y') is the transformed coordinate; A is a 2×2 affine transformation matrix for rotation, scaling, and shearing: A = [[a 11 ,a 12 ,[a 21 ,a 22 ; b = [b x ,b γ is the translation vector, controlling the overall displacement of the region; dynamic perturbation matrix and vector: A' = A + ΔA, b' = b + Δb, where ΔA ~ N(0,σ 2 ), Δb ~ N(0,τ 2 ); (2) Dynamic scaling: p'_x = s x *x, p'_y = s γ *y where: s x and s γ are the scaling factors in the horizontal and vertical directions; dynamically adjust the scaling factors: s x = s x0 + α * |x - c x |, s γ = s γ0 + β * |y - c γ |; (c x , c γ ) is the center point of the region, and α, β control the dynamic change of the scaling factor.
5. The method for enhancing an expression tampering image data set based on key point perturbation and region transformation according to claim 1, characterized in that: Parameter selection for region transformation expansion includes the following steps: The rotation angle is set in the range of [-15°, 15°], the scaling factor takes [0.8, 1.2], and the shear angle is in [-10°, 10°]. These parameters need to ensure that the local region still remains within the specific facial region after transformation to avoid distortion; At the same time, to increase randomness, a random perturbation ΔA is added to the affine matrix A, and its value is sampled from a Gaussian distribution, and the standard deviation is recommended to be set to 0.05; The translation vector b is randomly taken within ±5% of the width or height of the region to simulate local small translation changes For dynamic scaling, the scaling factors s in the horizontal and vertical directions x and s γ are initially set to [0.8, 1.2], and are added with dynamic adjustment factors α and β, whose values are set to 0.1 - 0.5, so that the scaling amplitude changes dynamically according to the distance between the point position and the center of the region. Points closer to the center change less, and points farther from the center change more, thus generating a more natural deformation effect.