Non-contact micro stress measurement device and method based on AI image recognition
By using an AI image recognition-based non-contact micro-stress measurement device, which utilizes an elastic reflective mirror panel and an image acquisition device, combined with AI visual preprocessing and data processing models, the problems of easy interference and high cost of existing measurement devices are solved, achieving low-cost and accurate measurement of force magnitude and position.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- JILIN UNIVERSITY
- Filing Date
- 2026-03-11
- Publication Date
- 2026-06-05
AI Technical Summary
Existing contact measuring devices are susceptible to electromagnetic interference and temperature drift, while non-contact measuring devices are costly and difficult to monitor force magnitude and location simultaneously, making them difficult to popularize in industrial testing.
A non-contact micro-stress measurement device based on AI image recognition is adopted. The device uses an elastic reflective mirror panel and an image acquisition unit to measure the magnitude of the force through a reflected light path system. The device combines AI visual preprocessing and YOLOv8n-seg model to identify the light spot boundary, and combines Kalman filtering and SVR model for data processing.
It achieves low cost, anti-interference, and simultaneous accurate measurement of force magnitude and location, with relative uncertainty controlled within 5%, and is suitable for various industrial and educational scenarios.
Smart Images

Figure CN122149702A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of interdisciplinary technology of physical measurement and artificial intelligence, and in particular to a non-contact force measurement device and method based on physical model constraints and AI vision. Background Technology
[0002] In industrial production, materials science, and precision engineering, accurate measurement of minute forces is crucial. Limitations of existing technologies: Traditional contact measurement devices (such as strain gauge sensors) must be in physical contact with the object being measured. This not only alters the object's force state but is also susceptible to electromagnetic interference and temperature drift, leading to measurement inaccuracies. Defects of existing non-contact technologies: Existing non-contact force measurement devices (such as laser interferometers) are often extremely expensive, bulky, and subject to strict limitations on the measurement environment and object material, making them difficult to widely implement in large-scale industrial testing or educational experiments, and hindering the simultaneous monitoring of force location and magnitude. Therefore, this invention aims to provide a low-cost, interference-resistant micro-stress measurement experimental device and method capable of simultaneously and accurately measuring force magnitude and location, with the potential for widespread application in large-scale industrial testing. Summary of the Invention
[0003] To address the aforementioned technical problems, this invention provides a non-contact micro-stress measurement device based on AI image recognition, comprising:
[0004] The supporting frame has closed light-shielding plates on all sides to shield the flicker caused by external light sources and the background noise superimposed on the brightness field.
[0005] An elastic reflective mirror panel is circumferentially fixed to the top of the support frame and is used to deform under load. The elastic reflective mirror panel is circular and the reflective surface faces the inside of the support frame.
[0006] A circular light source array is located in the lower part of the support frame and is positioned opposite to the reflective surface of the elastic reflector panel to provide uniform illumination; the circular light source array is preferably a circular cold light screen.
[0007] An image acquisition device is positioned between the elastic reflector panel and the array of circular light sources, facing the reflective surface of the elastic reflector panel, and is used to acquire the light spot image of the array of circular light sources reflected on the elastic reflector panel.
[0008] The flexible reflector panel, the circular light source array, and the image acquisition unit are coaxially arranged, with the diameter of the circular light source array being larger than that of the image acquisition unit;
[0009] The controller includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program. The computer program is used to control the opening and closing of the circular light source array and to control the image acquisition device to acquire images.
[0010] The power supply is connected to the circular light source array, image acquisition unit, and controller to provide electrical energy.
[0011] The device of the present invention further includes:
[0012] The image acquisition support column, vertically positioned at the center of the circular light source array, is manufactured using 3D printing. This columnary structure is used to fix the image acquisition unit, which is located at the top of the support column and coaxially aligned with it. The diameter of the support column is smaller than the diameter of the circular light source array.
[0013] A panel fixing device located at the top of the support frame is used to fix the elastic reflector panel. The panel fixing device includes a lower clamping plate and an upper clamping plate. The lower clamping plate is fixed to the top of the support frame around its perimeter, and the upper clamping plate is located above the lower clamping plate, clamping the elastic reflector panel between the upper and lower clamping plates. The upper and lower clamping plates are provided with corresponding circular through holes, the diameter of which is smaller than the diameter of the elastic reflector panel. Several connecting holes are provided on the upper and lower clamping plates around the circular through holes. Spring bolts are used to fix the upper and lower clamping plates through the connecting holes. The elastic coupling design using spring bolts realizes a collaborative mechanism of "rigid clamping - flexible connection". Under the premise of ensuring the positioning accuracy of the fixture, the stress relief structure effectively eliminates the internal stress of assembly, and controls the deformation interference of the fixture to the micron level.
[0014] Working principle of the device of this invention;
[0015] The research is based on a reflective optical path system: a circular light source array is set at the bottom, and a circumferentially fixed circular elastic reflective mirror panel is placed at the top. After the circular light source array is activated, the image of the array is reflected and imaged in the elastic reflective mirror panel. An image acquisition device can then capture images of the array of circular light sources reflected in the elastic reflective mirror panel. By applying a local load to the back of the elastic reflective mirror panel, the panel undergoes downward elastic deformation, resulting in distortion of the reflected light field. Due to the strict centrosymmetry of the optical path, the observed interference fringes exhibit radial contraction, and the degree of contraction corresponds to the mirror surface deformation. The magnitude of the pressure on the elastic reflective mirror panel can be obtained from the acquired image of the array of circular light sources reflected in the elastic reflective mirror panel.
[0016] The magnitude of the pressure P is:
[0017] P=mg
[0018]
[0019] Where m is the mass to be measured, and g is the acceleration due to gravity. Let H be the bending stiffness of the elastic reflector panel, and H be the distance from the image acquisition camera to the image. The distance from the point where the light ray is emitted to the origin. Let be the radius of deformation of the elastic reflector panel.
[0020] This invention also provides a non-contact micro-stress measurement method based on AI image recognition, which measures stress magnitude using the aforementioned measuring device, and includes the following steps:
[0021] Step 1: AI Visual Preprocessing
[0022] AI vision preprocessing includes camera calibration and ROI selection. By eliminating image distortion and focusing on the effective region, it lays the foundation for spot boundary detection in the YOLOv8n-seg model. The specific process is as follows:
[0023] Step 1.1, Camera Intrinsic Calibration and ROI Selection:
[0024] (1) Use a checkerboard calibration board to calibrate the intrinsic parameters of the image acquisition camera, obtain its intrinsic parameter matrix and distortion coefficients for distortion correction; the calibration process is based on Zhang Zhengyou calibration method, and the camera intrinsic parameters and distortion coefficients are calculated using multi-view images of the checkerboard pattern. The camera intrinsic parameters include focal length and principal point coordinates.
[0025] Furthermore, the specific steps for camera intrinsic parameter calibration are as follows:
[0026] (a) Prepare the calibration board and environment: Select a standard checkerboard calibration board, choose an indoor environment with uniform lighting to avoid strong light reflection or shadow interference, connect the camera and ensure that it is fixed on the experimental device with the lens facing the calibration board;
[0027] (b) Detecting checkerboard corner points: Load the acquired images, detect the checkerboard corner points in each image, set the corner points within the checkerboard size, and filter out images where corner point detection fails;
[0028] (c) Perform calibration calculations: Input corner data, calculate intrinsic parameter matrix, distortion coefficients, rotation vector and displacement vector; save the results for later use;
[0029] (d) Verification and application: Perform distortion correction on the test image and visually check whether the straight lines are straight; the calibration error should be less than 0.5 pixels. If the error is too high, re-acquire the image and repeat the process; in subsequent image processing, load these parameters to perform real-time correction on each frame of the image.
[0030] (2) Manually select a rectangular region (ROI) in the camera image for subsequent spot detection and force and force location estimation; ROI (Region of Interest) selection restricts the processing area to the location of the spot, reduces computational overhead and eliminates irrelevant interference, and improves the efficiency and accuracy of spot boundary detection of the YOLO model.
[0031] Furthermore, the specific steps for ROI selection are as follows:
[0032] (a) Enable camera preview: Start the camera to display the live feed, ensuring that the light source and flexible reflector panel are in place and the light spot is clearly visible;
[0033] (b) Detecting checkerboard corners: Load the acquired images, detect the checkerboard corners in each image, set the checkerboard size, and filter out images where corner detection fails;
[0034] (c) Manually draw the ROI: Draw a rectangular selection box and record the coordinates (x, y, width, height) of the ROI;
[0035] (d) Apply ROI: Load the saved ROI coordinates in the subsequent script, crop each frame image, and then pass it into the YOLO model for spot detection; periodically verify whether the ROI covers the entire area of the spot. If the camera field of view shifts due to mechanical impact, the selection needs to be re-selected.
[0036] (e) Validation and optimization: Test the cropped image to ensure that the light spot is centered and there is no edge cropping; combine the camera calibration results to perform distortion correction on the image within the ROI to improve accuracy.
[0037] Step 1.2: YOLOv8n-seg model segmentation, i.e., spot boundary recognition.
[0038] (1) Sample collection and labeling:
[0039] Different pressures are applied to the elastic reflector panel, and spot images within the ROI area are captured by a camera. The labelme tool is used to annotate the deformation area of the reflector in each image, and the center and edge extreme points of the deformation area are marked to generate a JSON annotation file containing mask coordinates, key point information and corresponding load values.
[0040] Furthermore, the specific steps for sample collection and labeling are as follows:
[0041] (a) Sample the light spot using the adjusted camera;
[0042] (b) Use labelme to classify and label the edges of objects;
[0043] (c) Place weights of different masses on the reflector to obtain different images;
[0044] (d) Train the YOLOv8n-seg model;
[0045] (e) Use the best model obtained from training to identify the target.
[0046] (2) Model training:
[0047] The training and test sets were divided in a 7:3 ratio. Training was started based on the Ultralytics framework. The mask loss, segmentation loss and validation set accuracy were monitored in real time during the training process to ensure that the model's mask mAP50 on the validation set was ≥0.96 and the deformation region recognition accuracy was ≥0.98 after training.
[0048] (3) Model reasoning and verification:
[0049] The optimal model saved after training is loaded, and inference is performed on the deformed images that were not trained. The deformed region mask and edge coordinates are automatically output. The radius of the deformed region is calculated by fitting the minimum circumcircle of the mask contour. The deformed radius output by the model is compared with the actual deformation measured by the high-precision camera to verify that the difference between the two is ≤0.02mm, ensuring that the model segmentation accuracy meets the analysis requirements when the mirror undergoes small deformations.
[0050] Step 2: Build the AI learning, training, and measurement module
[0051] Through data acquisition, predictive model training, intelligent evaluation, and an interactive interface, end-to-end automation is achieved from image feature mapping to force value mapping, including acquisition and prediction modes. Results are evaluated using a large language model, and an intuitive UI is provided to enhance user experience. Specific operation steps are as follows:
[0052] Step 2.1: Data Acquisition and Prediction
[0053] This step is divided into two modes: acquisition mode and prediction mode. In terms of image processing, Gaussian blur, binarization, and contour detection are used to extract the edge of the light spot. The expansion and contraction of the light spot are reflected by calculating the difference between the current light spot area and the reference area. Kalman filtering and time window averaging are added to reduce noise and achieve smooth data processing. Images are acquired from the camera, light spot features are extracted, and data acquisition or prediction values are switched according to the mode.
[0054] Furthermore, the specific operating steps are as follows:
[0055] (a) Script preparation and environment configuration;
[0056] (b) Acquisition mode operation: Turn on the camera, load the pre-trained YOLO model to detect the light spot boundary; apply Gaussian blur to reduce noise, binarize to separate the foreground, and extract the light spot edge by contour detection; calculate the area, compare it with the reference area when no load, and record the difference; initialize the Kalman filter to track the area change, and set the time window to smooth the data; save the data, including key point coordinates, area difference, and timestamp;
[0057] (c) Prediction mode operation: The steps are the same as the acquisition mode, but the data is not saved. Instead, the area difference and spot boundary data are output in real time for subsequent SVR prediction.
[0058] (d) Verification and optimization: Test the noise level under different lighting conditions and adjust the Gaussian kernel or threshold; ensure that the area tracking error is less than 0.01 after the Kalman filter Q / R parameters are optimized.
[0059] Step 2.2: Add the vector regression SVR model
[0060] SVR is a supervised learning algorithm in machine learning. SVR automatically learns the complex mapping relationship between the light spot boundary data collected by YOLO and the light spot area and force. After data collection is completed, the SVR model is automatically called, the training / validation sets are automatically divided, parameters are tuned, and the data is cross-validated. The SVR model is used for regression tasks. It learns nonlinear relationships through the support vector mechanism and maps YOLO keypoints and area differences to force values.
[0061] Furthermore, the specific operating steps are as follows:
[0062] (a) Data preparation: Load data from the CSV file generated by the acquisition mode, including features such as the light spot boundary data and area difference acquired by YOLO, and labels are the stress values obtained from the sensor;
[0063] (b) Model training and hyperparameter tuning: Start the SVR model and search for hyperparameters, including regularization parameter c, insensitive loss ϵ, kernel coefficient γ; cross-validate to evaluate MSE;
[0064] (c) Prediction Application: Load the model in the prediction mode and input the real-time feature prediction power value;
[0065] (d) Check the cross-validation score to ensure that overfitting is less than 5%.
[0066] Step 2.3, Intelligent Assessment
[0067] By calling the large language model KIMI-K2-Turbo through the API interface, the experimental data, prediction results and uncertainties are automatically analyzed to generate evaluation reports and optimization suggestions; this step realizes closed-loop feedback based on AI.
[0068] Furthermore, the specific operating steps are as follows:
[0069] (a) API configuration: Obtain the KIMI-K2 API key and set the request header; prepare the input data, including CSV results, MSE values, and image sample paths;
[0070] (b) Constructing and invoking prompts: Constructing a prompt template, including a summary of experimental data, prediction accuracy, and potential problems; sending a POST request and parsing the response to generate an evaluation;
[0071] (c) Integration and output: Automatically invoked after training, saving the evaluation to a report file; run periodically to monitor experimental iterations.
[0072] (d) Validation and optimization: Test different prompts to ensure consistent responses; if the API is rate-limited, add a retry mechanism.
[0073] Step 2.4: Build the user UI interface
[0074] Two user interfaces are designed: a main UI module and an AI response display UI module. The main UI provides functions for force measurement, force location measurement, and calling the intelligent assistant, which can be easily operated by users through buttons. The AI response display UI displays the analysis results of the KIMI-K2 model, helping users to quickly view experimental evaluations and suggestions.
[0075] Step 3: Train a model that can be used to measure the magnitude of force, as follows:
[0076] (1) Zero-position calibration: Click on the prediction data acquisition in the UI interface, open the script used to acquire training data, apply a small pressure and then undo it, and calibrate the state when no external force is applied;
[0077] (2) Data acquisition: Apply a load of known mass to the center of the elastic reflector panel, wait for the light spot image detected by the image acquisition device to stabilize, and input the stress value to complete the acquisition of a set of data. The force and diameter data are automatically saved.
[0078] (3) Model training: After several data collections, the saved data is divided into a validation set and a training set in a 2:8 ratio. The model is run directly to complete the training, and the training set and validation set data are automatically fitted to a curve and displayed in a visualization window.
[0079] (4) Training optimization: Based on the curve comparison results, change the training parameters and retrain until the model effect meets expectations.
[0080] Step 4: Use the trained model to measure the force in real time. The steps are as follows:
[0081] (1) Start the program: Click on the force magnitude prediction in the UI interface to start the force measurement model;
[0082] (2) Force prediction: Apply the load to be measured to the center of the elastic reflector panel. After the spot image stabilizes, the program will automatically display the predicted force value and the corresponding position of the mass of the load to be measured and the spot diameter in the model fitting curve.
[0083] (3) Evaluation and optimization: Input the data from the experiment into the large language model for analysis and evaluation, and generate suggestions for experiment optimization.
[0084] This invention further provides a non-contact micro-stress measurement method based on AI image recognition. The method measures the stress location using the aforementioned measuring device. The steps include: operation preparation, data acquisition, data cleaning and preprocessing, model training, model validation, and real-time online prediction. The steps are as follows:
[0085] Step 1: Operation Preparation
[0086] Based on the reflected light spot image acquired by the image acquisition device, the light spot deformation field, i.e. the polar coordinate discretized displacement vector field (dx,dy), is automatically extracted, and a lightweight convolutional classification network is trained to identify the force application position. The reflected light spot image is divided into 36 radial sectors with equal angles and 10 equally spaced concentric rings, with a total of 324 position grids excluding the central layer.
[0087] Step 2, Data Collection
[0088] (1) Start the acquisition mode: Enable the image acquisition device camera to capture loop and interactive interface;
[0089] (2) Single-frame image preprocessing:
[0090] (A) Camera intrinsic parameter calibration and ROI selection:
[0091] The intrinsic parameters of the image acquisition camera are calibrated using a checkerboard calibration board to obtain its intrinsic parameter matrix and distortion coefficients for distortion correction. The calibration process is based on Zhang Zhengyou's calibration method, which uses multi-view images of the checkerboard pattern to calculate the camera's intrinsic parameters and distortion coefficients. The camera's intrinsic parameters include focal length and principal point coordinates.
[0092] Manually select a rectangular region of interest (ROI) in the camera view for subsequent spot detection and force and force location estimation; the ROI selection restricts the processing area to the location of the spot.
[0093] (B) YOLOv8n-seg model segmentation, i.e., spot boundary recognition:
[0094] (a) Sample collection and labeling:
[0095] Different pressures are applied to the elastic reflector panel, and light spot images within the ROI area are captured by a camera; the labelme tool is used to annotate the deformation area of the reflector in each image, and the center and edge extreme points of the deformation area are marked to generate a JSON annotation file containing mask coordinates, key point information and corresponding load values.
[0096] (b) Model training:
[0097] The training and test sets were divided in a 7:3 ratio. Training was started based on the Ultralytics framework. The mask loss, segmentation loss and validation set accuracy were monitored in real time during the training process to ensure that the model's mask mAP50 on the validation set was ≥0.96 and the deformation region recognition accuracy was ≥0.98 after training.
[0098] (c) Model reasoning and validation:
[0099] Load the optimal model saved after training, perform inference on deformed images that were not trained, automatically output the deformed region mask and edge coordinates, and calculate the radius of the deformed region by fitting the minimum circumcircle of the mask contour; compare the deformed radius output by the model with the actual deformation measured by the high-precision camera to verify that the difference between the two is ≤0.02mm, ensuring that the model segmentation accuracy meets the analysis requirements when the mirror undergoes small deformations.
[0100] (3) Polar coordinate grid sampling: Calculate the intersection points of 36 equiangular radial lines and 9 radial layers with the centroid as the center. Find the first intersection point with the convex hull on each radial line and interpolate the sampling points of layers 1 to 9 (excluding the central layer) according to the proportion. The difference between the starting coordinates and the current coordinates (dx, dy) of each grid point is obtained, which is the displacement vector field. Store all 324 displacement vector fields in a fixed order.
[0101] (4) Human-computer annotation of force grid points and saving of samples: In the acquisition mode, the operator selects the corresponding sector and sub-loop as target grid points on the graphical interface according to the current physical force application position; the model encapsulates the displacement vector calculated in the current frame and the target grid points as sample entries for storage; no less than 10 valid samples are collected for each target grid point to ensure the diversity of samples within the class; the overall target is ≥300 samples to improve the generalization of the model;
[0102] (5) Data acquisition precautions and quality control: Before each sampling, check the camera parameters, light source stability and mirror fixation, and record the batch number for post-processing; if the light spot is obscured, saturated or has a broken outline, discard the frame and reacquire it; periodically retest the same grid point and calculate the mean square displacement difference between samples of the same grid point to evaluate the acquisition noise; if the noise is too high, check the lighting and camera stability.
[0103] Step 3: Data Cleaning and Preprocessing
[0104] (1) File integrity check: Read the stored samples and remove samples with incorrect format or missing fields; verify whether the displacement vector length of each sample is 324; if it is not equal to 324, record and investigate the acquisition process;
[0105] (2) Data balancing and augmentation: Check the class distribution. If the classes are extremely unbalanced, data augmentation or weighted training by class can be performed on the minority classes.
[0106] (3) Standardization and normalization: Normalize dx and dy to zero mean or normalize according to the standard deviation of the whole dataset to facilitate training convergence.
[0107] Step 4: AI Model Training
[0108] (1) Environment and hyperparameters:
[0109] Model: PolarNet, polar coordinate mesh shape parameters (2,9,36);
[0110] Number of output categories: 324;
[0111] Training parameters: set the number of times the model fully traverses the training dataset, BATCH_SIZE, and training / validation ratio;
[0112] Loss function: CrossEntropyLoss;
[0113] Optimizer: Adam.
[0114] (2) Training steps:
[0115] The cleaned sample data is loaded as displacement data, and the dataset is divided into training and validation sets in an 8:2 ratio. DataLoader is used to read the data in batches. During the training phase, model.train() is used, backpropagation is performed, and parameters are updated. During the validation phase, model.eval() is used to calculate the validation loss and accuracy.
[0116] Record the training curve, training / validation loss and validation accuracy; if training oscillates or overfits, take measures such as early stopping or learning rate decay.
[0117] (3) Training expectations and judgment criteria:
[0118] The Top-1 accuracy on the validation set should be ≥90%. If it is insufficient, supplement the sample or improve the segmentation or ROI method. Pay attention to the Top-3 accuracy and the class confusion matrix: if the error concentration occurs in adjacent sectors or rings, it indicates that the model has learned spatial uncertainty. Position smoothing or confidence thresholding strategies need to be added after the model output.
[0119] (4) Model persistence and version management:
[0120] Save the final model weights and record the training configuration, including random seed, number of samples, training epochs, and loss curve, for reproducibility; save timestamped model versions and export training logs for each significant change as needed.
[0121] Step 5: Model Validation and Real-time Online Prediction
[0122] (1) Prediction mode activated:
[0123] Start the trained model, open the polar coordinate grid in the interface, and the prediction results are displayed as highlighted grid points;
[0124] (2) Real-time processing flow:
[0125] For each frame, the convex hull, centroid, and dx,dy features of 324 points are calculated and constructed into a (2,9,36) tensor, which is then fed into the model for forward inference to obtain the class distribution. The highest confidence class is mapped to a sector + ring, highlighted in the interface, and the confidence level is output. The model output is recorded and compared with the synchronous manual annotation / sensor readings to calculate the real-time error.
[0126] (3) Online verification strategy:
[0127] During the verification phase, force is applied one by one at fixed test grid points and frame data for several seconds is recorded. The model prediction results are statistically analyzed. If persistent errors occur, backtracking is performed to check: whether the ROI has shifted, whether the camera has refocused, whether the lighting has changed, and whether the label is incorrect.
[0128] (4) Latency and performance metrics:
[0129] The system should monitor the processing latency of each frame, including distortion correction, segmentation, polar coordinate sampling, and model inference; the goal is to keep the inference time per frame within the experimental requirements.
[0130] Step 6, Post-processing
[0131] If the force value needs to be given at the same time, then the global features of the image are regressed and fitted to the true force value based on the classification output.
[0132] The beneficial effects of this invention are:
[0133] The device of this invention is low-cost and versatile, requiring only a common industrial camera and an acrylic sheet, making it inexpensive. By changing the mirror material with different Young's moduli, the measurement range can be flexibly adjusted, making it suitable for various industrial and educational scenarios.
[0134] This invention proposes a non-contact optical force measurement method. It inversely determines the magnitude and location of the external force by utilizing the curvature change and image distortion of a reflector under stress, avoiding errors caused by mechanical hysteresis, electromagnetic interference, or temperature drift in contact sensors, resulting in more stable and reliable measurements. Multiple AI-level hierarchical models are independently designed to participate in the entire experimental measurement process, enabling complex, multimodal experimental data acquisition and result output that are difficult to achieve with traditional physics experiments. By combining physics experiments with AI, the experimental process is simplified, measurement efficiency is improved, and experimental costs are reduced, significantly expanding the application scenarios of the measurement scheme in high-tech fields such as industrial production and aerospace. The Von Kármán thin-plate theory is introduced as a constraint term in the AI model, avoiding the "black box" uninterpretability of purely data-driven models, ensuring that the measurement results conform to physical laws and possess high precision and physical consistency. Experiments show that the relative uncertainty in force measurement can be controlled within 5%. This invention innovatively employs polar coordinate grid features and a PolarNet convolutional network to solve the problem of locating the force application point in non-contact measurement, achieving a radius error ≤1cm and an angle error ≤10°, ensuring precise force location. Combined with Kalman filtering and a time window smoothing algorithm, it effectively suppresses ambient light flicker and image jitter noise, exhibiting strong anti-interference and robustness. Attached Figure Description
[0135] Figure 1 This is a schematic diagram of the overall structure of the measuring device of the present invention;
[0136] 1. Support frame, 2. Elastic reflector panel, 3. Circular light source array, 4. Image acquisition unit, 5. Acquisition unit support column, 6. Lower clamping plate, 7. Upper clamping plate, 8. Spring bolts, 9. Foot, 10. Test weights, 11. Light shield.
[0137] Figure 2 This is a simplified structural diagram of the elastic reflective mirror panel under stress and deformation in Example 1.
[0138] Figure 3 This is a schematic diagram of the optical path structure when the elastic reflective mirror panel is deformed under stress in Example 1;
[0139] Figure 4 The image is taken from the camera's perspective in Example 2.
[0140] Figure 5 Example of ROI selection in Example 2;
[0141] Figure 6 This is a schematic diagram of the chessboard calibration process in Example 2;
[0142] Figure 7 This is a schematic diagram illustrating the YOLOv8n-seg recognition performance in Example 2;
[0143] Figure 8 This is a schematic diagram of the labelme annotation in Example 2;
[0144] Figure 9 This is a schematic diagram showing the mass-diameter relationship of the 2mm elastic reflective mirror panel in Example 2;
[0145] Figure 10 The relative uncertainty of the mass of the 2mm elastic reflective mirror panel in Example 2 was measured.
[0146] Figure 11 This is a schematic diagram of the least squares fitting of the mass-diameter measurement for the 2mm elastic reflective mirror panel in Example 2.
[0147] Figure 12 This is a schematic diagram showing the mass-diameter relationship of the 1mm elastic reflective mirror panel in Example 2;
[0148] Figure 13 The relative uncertainty of the mass of the 1mm elastic reflective mirror panel in Example 2 was measured. Detailed Implementation
[0149] Example 1
[0150] like Figure 1 As shown, this embodiment provides a non-contact micro-stress measurement device based on AI image recognition, comprising:
[0151] The supporting frame 1 has a light-shielding plate 11 on each side that is closed to shield the flicker caused by external light sources and the background noise superimposed on the brightness field.
[0152] The elastic reflective mirror panel 2 is circumferentially fixed to the top of the support frame 1 and is used to deform under load. The elastic reflective mirror panel 2 is circular and the reflective surface faces the inside of the support frame 1.
[0153] A circular light source array 3 is located in the lower part of the support frame 1 and is positioned opposite to the reflective surface of the elastic reflective mirror panel 2 to provide uniform illumination; the circular light source array 3 is preferably a circular cold light screen.
[0154] Image acquisition device 4 is positioned between the elastic reflective mirror panel 2 and the circular light source array 3, facing the reflective surface of the elastic reflective mirror panel 2, and is used to acquire the light spot image of the circular light source array 3 reflected on the elastic reflective mirror panel 2; image acquisition device 4 is preferably a 1080P distortion-free industrial camera.
[0155] The elastic reflector panel 2, the circular light source array 3, and the image acquisition device 4 are coaxially arranged, and the diameter of the circular light source array 3 is larger than that of the image acquisition device 4.
[0156] The controller includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program. The computer program is used to control the opening and closing of the circular light source array 3 and to control the image acquisition device 4 to acquire images.
[0157] The power supply is connected to the circular light source array 3, the image acquisition unit 4, and the controller to provide electrical energy.
[0158] The device also includes:
[0159] The collector support column 5, which is vertically located at the center of the circular light source array 3, is manufactured by 3D printing. It is a columnar body used to fix the image collector 4. The image collector 4 is located on the top of the collector support column 5 and is coaxially arranged with the collector support column 5. The diameter of the collector support column 5 is smaller than the diameter of the circular light source array 3.
[0160] A panel fixing device located at the top of the support frame 1 is used to fix the elastic reflector panel. The panel fixing device includes a lower clamping plate 6 and an upper clamping plate 7. The lower clamping plate 6 is fixed to the top of the support frame 1 around its perimeter, and the upper clamping plate 7 is located above the lower clamping plate 6, clamping the elastic reflector panel 2 between the upper clamping plate 7 and the lower clamping plate 6. The upper clamping plate 7 and the lower clamping plate 6 are provided with corresponding circular through holes, the diameter of which is smaller than the diameter of the elastic reflector panel 2. Several connecting holes are provided around the circular through holes on the upper clamping plate 7 and the lower clamping plate 6. Spring bolts 8 are used to fix the upper clamping plate 7 and the lower clamping plate 6 through the connecting holes. The elastic coupling design of the spring bolts 8 realizes the collaborative mechanism of "rigid clamping-flexible connection". Under the premise of ensuring the positioning accuracy of the fixture, the stress relief structure effectively eliminates the internal stress of assembly and controls the deformation interference of the fixture to the micron level.
[0161] The support frame 1 is a hexagonal frame made of aluminum profile, and the bottom is also equipped with feet 9.
[0162] This embodiment is based on a reflected light path system: a circular light source array 3 is set at the bottom, and a circumferentially fixed circular elastic reflective mirror panel 2 is configured at the top. After the circular light source array 3 is turned on, its image is reflected and imaged in the elastic reflective mirror panel 2. When the image acquisition device 4 is turned on, it can capture an image of the entire array of circular light sources 3 reflected in the elastic reflective mirror panel 2. By applying a local load (placing a test weight 10) on the back of the elastic reflective mirror panel 2, the elastic reflective mirror panel 2 undergoes downward elastic deformation, causing distortion of the reflected light field. Due to the strict central symmetry of the light path, the observed interference fringes exhibit radial contraction, and the degree of contraction corresponds to the mirror deformation.
[0163] like Figure 2As shown, when the elastic reflective mirror panel 2 is deformed under stress, the deformation of the elastic reflective mirror panel 2 is studied using the von Kármán large deformation plate equation:
[0164] (1)
[0165] in, For the deflection of the elastic reflector panel, Radial pressure, The distance from the point where the light ray is emitted to the origin. For partial derivative operators, The external pressure acting on the plate;
[0166] When the elastic reflective mirror panel is subjected to a pressure P at its center, expanding the above equations in polar coordinates and then making them dimensionless, we can obtain the following set of equations:
[0167] (2)
[0168] in, The dimensionless coefficient is set as follows for the diameter of the image:
[0169]
[0170]
[0171]
[0172]
[0173]
[0174] The normalized deflection is represented by S and T, respectively, and the normalized stress is represented by p in the s (perpendicular) and t (tangential) directions. For the Poisson's ratio of the elastic reflector panel, Let be the radius of deformation of the elastic reflector panel. The thickness of the flexible reflective mirror panel. The Young's modulus of the elastic reflector panel. This is tangential pressure.
[0175] After the elastic reflector panel is fixed with the panel fixing device, the circular boundary of the elastic reflector panel does not slip. At this time, the boundary conditions are as follows:
[0176] (3)
[0177] The equation can be solved using the perturbation method. ω1 and ω3 are the parameters of the first-order and third-order terms in the perturbation method, respectively. This method can provide solutions of different accuracies to meet different requirements depending on the actual situation.
[0178] In the experiment, when the applied load causes the center deflection ω0 of the elastic reflector panel to be less than 0.3 times the thickness h of the elastic reflector panel (i.e., ω0 < 0.3h), this is considered a small load. Under this condition, it is sufficient to find the first-order term to meet the requirements. The complete expression for the first-order term is:
[0179] (4)
[0180] Equation (4) gives the relationship between deflection ω and distance r, directly linking deformation and applied pressure. The linear relationship between pressure p and central deflection is as follows:
[0181] (5)
[0182] Considering that the deformation of thin plates is also small when the load is small, such as Figure 3 As shown in the figure, establish a two-dimensional coordinate axis, with the center of the elastic reflector panel as the origin, the vertical upward direction from the center of the elastic reflector panel as the z-axis, and the horizontal direction as the x-axis. The following ray equations are listed:
[0183] The equation of the incident ray L1 in the Oxz coordinate system is:
[0184] (6)
[0185] From the point-slope form of the straight line equation, we can obtain the equation of the reflected ray L2 in the Oxz coordinate system:
[0186] (7)
[0187] ( () represents the coordinates of the tangent point;
[0188] The equation of the tangent L3 at the point of contact between the light rays in the Oxz coordinate system is as follows:
[0189] (8)
[0190] The diameter of the entire circular light source;
[0191] Based on the geometric relationships in the diagram, the slope k2 of the reflected ray L2 can be obtained as follows:
[0192] (9)
[0193] H is the distance from the image acquisition camera to the image;
[0194] slope parameter of tangent L3 for:
[0195] (10)
[0196] From the perpendicular relationship at the point of tangency, the relationship between the slope of the incident ray k1, the slope of the reflected ray k2, and the slope of the normal k is as follows:
[0197] (11)
[0198] Find k2 as k1→∞:
[0199] (12)
[0200] The expression for the reflected ray L2:
[0201] (13)
[0202] The deformation is small, with The slope can be simplified to:
[0203] (14)
[0204] Furthermore, because the deformation is small, we can assume that the change in the z-axis direction of the image plane of the light source is approximately zero, and thus we can obtain:
[0205] (15)
[0206] The above formula is the corrected formula for the reflected ray L2. This equation shows that there is a linear relationship between the distance z from the center of the horizontal plane (i.e., the negative deflection ω) and the image radius x.
[0207] Optical path coupling equation:
[0208] Due to the constraints at the tangent point, z and f(x) in the linear formula (14) with respect to z and x are replaced with ω, where the gradient field of the deflection ω is determined by the following equation:
[0209] (16)
[0210] By combining equations (4), (14), and (15), the linear relationship between pressure P and image radius x can be obtained:
[0211] (17)
[0212] If pressure P is applied by adding weights, then:
[0213] P=mg(18)
[0214] Since the actual measurement is the image diameter, the image diameter d is used instead of the radius x from the image edge to the optical axis.
[0215] d=2x(19)
[0216] Substituting formulas (18) and (19) into formula (17), we get:
[0217] (20) (ω0<0.3h)
[0218] Where m is the mass to be measured, g is the gravitational acceleration, D is the bending stiffness of the elastic reflector panel, H is the distance from the image acquisition device to the image, r is the distance from the light emission point to the origin, and a is the radius of the elastic reflector panel.
[0219] Formula (20) gives the linear relationship between mass m and image diameter d.
[0220] Example 2
[0221] This embodiment provides a non-contact micro-stress measurement method based on AI image recognition. The method measures stress magnitude using the measuring device provided in Embodiment 1, and includes the following steps:
[0222] Step 1: AI Visual Preprocessing
[0223] AI visual preprocessing is a crucial step in ensuring the accuracy of subsequent spot recognition. Its core components include camera calibration and ROI selection. By eliminating image distortion and focusing on the effective region, it lays the foundation for spot boundary detection using the YOLOv8n-seg model. The specific process is as follows:
[0224] Step 1.1, Camera intrinsic parameter calibration and ROI selection, such as Figure 5 , 6 As shown:
[0225] (1) Use a checkerboard calibration board to calibrate the intrinsic parameters of the image acquisition camera, obtain its intrinsic parameter matrix and distortion coefficients for distortion correction; camera calibration is a key step to eliminate lens distortion (such as radial distortion and tangential distortion) and ensure the geometric accuracy of subsequent spot edge detection; the calibration process is based on Zhang Zhengyou calibration method, using multi-view images of checkerboard pattern to calculate camera intrinsic parameters (including focal length, principal point coordinates) and distortion coefficients.
[0226] Detailed operation steps:
[0227] (a) Prepare the calibration board and environment: a standard checkerboard calibration board (8x6 grids, each grid is 25mm x 25mm, ensuring the pattern is clear and symmetrical), select an indoor environment with uniform lighting to avoid strong light reflection or shadow interference, connect the camera and ensure it is fixed on the experimental setup with the lens facing the calibration board.
[0228] (b) Detecting chessboard corners: Load the acquired images, use OpenCV's cv2.findChessboardCorners function to detect chessboard corners in each image, set the chessboard size (e.g., (7,5) inner corners, because an 8x6 grid has 7×5 inner points), and filter out images that fail to detect corners.
[0229] (c) Perform calibration calculations: Use the cv2.calibrateCamera function to input corner data, calculate the intrinsic parameter matrix (cameraMatrix), distortion coefficients (distCoeffs), rotation vector, and displacement vector; save the results to a file (npz format) for later use.
[0230] (d) Verification and application: Use the cv2.undistort function to correct the distortion of the test image and visually check whether the straight lines are straight; the calibration error (reprojection error) should be less than 0.5 pixels. If the error is too high, reacquire the image and repeat the process; in subsequent image processing, load these parameters to perform real-time correction on each frame of the image.
[0231] (2) Manually select a rectangular region (ROI) in the camera image for subsequent spot detection and force and force location estimation.
[0232] The ROI (Region of Interest) selection restricts the processing area to the location of the spot, reducing computational overhead and eliminating irrelevant interference (such as background noise), thereby improving the efficiency and accuracy of spot boundary detection in the YOLO model.
[0233] Detailed operation steps:
[0234] (a) Enable camera preview: Use OpenCV to start the camera to display the image in real time, and ensure that the light source and flexible reflector panel are in place and the light spot is clearly visible.
[0235] (b) Detecting checkerboard corners: Load the acquired images, use OpenCV's cv2.findChessboardCorners function to detect checkerboard corners in each image, set the checkerboard size, and filter out images that fail to detect corners.
[0236] (c) Manually draw ROI: Implement interactive rectangle selection using OpenCV's mouse callback event (cv2.setMouseCallback); the user presses the left mouse button and drags to draw a rectangle, presses the 'c' key to confirm the selection, and presses the 'Esc' key to exit; record the coordinates (x, y, width, height) of the ROI.
[0237] (d) Apply ROI: Load the saved ROI coordinates in the subsequent script, crop each frame image (frame=frame[y:y+height,x:x+width]), and then pass it into the YOLO model for spot detection; periodically verify whether the ROI covers the entire area of the spot. If the camera field of view shifts due to mechanical impact, it is necessary to re-select the area.
[0238] (e) Validation and optimization: Test the cropped image to ensure that the spot is centered and there is no edge cropping; combine the camera calibration results to perform distortion correction on the image within the ROI to further improve accuracy.
[0239] Step 1.2: YOLOv8n-seg model segmentation (spot boundary recognition)
[0240] (1) Sample collection and labeling:
[0241] Different mass weights (10g-300g) were placed on the elastic reflector panel, and spot images of the ROI area were acquired using a camera (3-5 images were acquired for each mass, for a total of 120-150 samples). The labelme tool was used to label the deformation area of the reflector in each image (generating a closed mask, with the category set to "deformation_area"), and the center and edge extreme points of the deformation area were marked (to assist in subsequent deformation degree quantification). A JSON annotation file containing mask coordinates, key point information and corresponding load values was generated.
[0242] Detailed operation steps:
[0243] (a) Sample the light spot using the adjusted camera.
[0244] (b) Use labelme to classify and label the edges of objects.
[0245] (c) Place weights of different masses on the reflector and obtain different images.
[0246] (d) Train the YOLOv8n-seg model
[0247] (e) Load the best model best.pt obtained from training into the predict.py script to identify the target.
[0248] (2) Model training:
[0249] The training and test sets were divided in a 7:3 ratio. Training was started based on the Ultralytics framework. The mask loss, seg loss, and val_acc (validation accuracy) were monitored in real time during the training process to ensure that the model's mask mAP50 on the validation set was ≥0.96 and the deformation region recognition accuracy was ≥0.98 after training.
[0250] (3) Model reasoning and verification:
[0251] Load the best model (best.pt) saved after training, perform inference on deformed images that were not trained, automatically output the deformed region mask and edge coordinates, and calculate the radius of the deformed region by fitting the minimum circumcircle of the mask contour; compare the deformed radius output by the model with the actual deformation measured by the high-precision camera to verify that the difference between the two is ≤0.02mm, ensuring that the model segmentation accuracy meets the analysis requirements when the mirror undergoes small deformations.
[0252] Step 2: Build the AI learning, training, and measurement module
[0253] This step aims to build a training and measurement system integrating AI learning capabilities. Through data acquisition, predictive model training, intelligent evaluation, and a user-friendly interface, it achieves end-to-end automation from image features to force value mapping. This step is developed based on Python scripts and machine learning libraries (such as OpenCV, YOLO, and scikit-learn), combined with noise robustness processing, regression models, and a UI interface built with QtDesigner and PySide6 to ensure the real-time performance, accuracy, and ease of operation of the measurement process. The entire step supports acquisition mode (for data accumulation) and prediction mode (for real-time inference), and evaluates results through a large language model, while providing intuitive UI interaction to enhance the user experience.
[0254] like Figure 7 , 8 As shown, the specific operation steps are as follows:
[0255] Step 2.1: Data Acquisition and Prediction
[0256] This step is divided into two modes: acquisition mode and prediction mode. In terms of image processing, Gaussian blur, binarization, and contour detection are used to extract the edges of the light spot. The difference between the current light spot area and the reference area is calculated to reflect the expansion and contraction of the light spot. Furthermore, Kalman filtering and time window averaging are added to reduce noise and achieve data smoothing. This step is responsible for acquiring images from the camera, extracting light spot features, and switching between acquiring data or predicting power values according to the mode. The image processing pipeline includes noise suppression and edge detection to capture changes in the light spot area (reflecting specular deformation). Kalman filtering is used to dynamically track area changes, and time window averaging further smooths short-term fluctuations, ensuring data stability.
[0257] Detailed operation steps:
[0258] (a) Script preparation and environment configuration: Ensure that the necessary libraries (OpenCV, NumPy, YOLOv8) are installed; create the script file run.py; use command-line parameters to specify the acquisition mode or prediction mode;
[0259] (b) Acquisition mode operation: Turn on the camera, load the pre-trained YOLO model to detect the light spot boundary; apply Gaussian blur to reduce noise, binarize (threshold adaptive, such as cv2.THRESHOTSU) to separate the foreground, and extract the light spot edge using contour detection (cv2.findContours); calculate the area (cv2.contourArea), compare it with the reference area (preset to the area when unloaded), and record the difference; initialize the Kalman filter to track the area change, and set a time window (such as 10 frames average) to smooth the data; save the data to a CSV file, including key point coordinates, area difference, and timestamp.
[0260] (c) Prediction mode operation: The steps are the same as the acquisition mode, but the data is not saved. Instead, the area difference and spot boundary data are output in real time for subsequent SVR prediction; the force sensor input is ignored and reasoning is based directly on image features.
[0261] (d) Verification and optimization: Test the noise level under different lighting conditions and adjust the Gaussian kernel or threshold; ensure that the area tracking error is less than 0.01 after optimizing the Kalman filter Q / R parameters (process / measurement noise).
[0262] Step 2.2: Add the vector regression SVR model
[0263] SVR is a supervised learning algorithm in machine learning used to solve regression problems. SVR automatically learns the complex mapping relationship between the light spot boundary data collected by YOLO and the light spot area and force. As an AI tool, it can "learn" how to predict force values from data without requiring humans to manually write rules. After data collection is completed, the SVR model is automatically called, the training / validation sets are automatically divided, parameters are tuned, and cross-validation is performed on the data. The SVR model is used for regression tasks, learning nonlinear relationships through the support vector mechanism, mapping YOLO keypoints and area differences to force values. The script automates the training process, including data partitioning, hyperparameter tuning, and cross-validation, to improve generalization ability.
[0264] Detailed operation steps:
[0265] (a) Data preparation: Load data from a CSV file generated from the acquisition mode, featuring the YOLO-acquired spot boundary data and area difference, labeled with stress values obtained from the sensor.
[0266] (b) Model training and hyperparameter tuning: Start the SVR model and use GridSearchCV to search for hyperparameters, including regularization parameter c, insensitive loss ϵ, kernel coefficient γ; cross-validate to evaluate MSE.
[0267] (c) Prediction application: Load the model in the prediction mode and input the real-time feature prediction power value.
[0268] (d) Check the cross-validation score to ensure that the overfit is less than 5%; if the MSE is too high, increase the amount of data or adjust the feature engineering (such as PCA dimensionality reduction key points).
[0269] Step 2.3, Intelligent Assessment
[0270] By calling the large language model KIMI-K2-Turbo through the API interface, the experimental data, prediction results, and uncertainties are automatically analyzed to generate evaluation reports and optimization suggestions. This step achieves AI-driven closed-loop feedback.
[0271] Detailed operation steps:
[0272] (a) API configuration: Obtain the KIMI-K2 API key and set the request header; prepare the input data, including CSV results, MSE values, and image sample paths;
[0273] (b) Construct and invoke prompts: Construct a prompt template, including a summary of experimental data, prediction accuracy and potential problems; send a POST request, parse the response and generate an evaluation (e.g., "Accuracy 90%, lighting optimization recommended").
[0274] (c) Integration and output: Automatically invoked after training, saving the evaluation to a report file; run periodically to monitor experimental iterations.
[0275] (d) Validation and optimization: Test different prompts to ensure consistent responses; if the API is rate-limited, add a retry mechanism.
[0276] Step 2.4: Build the user UI interface
[0277] Two user interfaces were designed using QtDesigner and PySide6: a main UI module and an AI response display UI module. The main UI provides functions for force measurement, force location measurement, and invoking the intelligent assistant, allowing users to easily operate via buttons. The AI response display UI shows the analysis results of the KIMI-K2 model, helping users quickly view experimental evaluations and suggestions. The interface was designed using QtDesigner and implemented using PySide6, resulting in a simple, aesthetically pleasing interface suitable for desktop use.
[0278] Step 3: Train a model that can be used to measure the magnitude of force.
[0279] This step aims to train a model that can be used to predict the magnitude of force values, and the steps are as follows:
[0280] (1) Zero-position calibration: Click on the prediction data acquisition in the UI interface to open the script used to acquire training data, apply a small pressure and then cancel it, and enter 0N in the pop-up window to calibrate the state when no external force is applied.
[0281] (2) Data acquisition: Add a weight of known mass and place it in the center of the elastic reflector panel. After the light spot image detected by the image acquisition device stabilizes, input the stress value to complete the acquisition of a set of data. The force and diameter data are automatically saved.
[0282] (3) Model training: After several data collections, the saved data is divided into a validation set and a training set in a 2:8 ratio. The model is run directly to complete the training, and the training set and validation set data are automatically fitted to the curve and displayed in a visualization window.
[0283] (4) Training optimization: Based on the curve comparison results, change the training parameters (such as the number of training rounds) and retrain until the model effect meets expectations.
[0284] Step 4: Use the trained model to measure the force in real time.
[0285] This step aims to predict the forces applied using the trained model, and the steps are as follows:
[0286] (1) Start the program: Click on the force magnitude prediction in the UI interface to start the force measurement model;
[0287] (2) Force prediction: After adding weights and the spot image stabilizes, the program will automatically display the predicted force value and can also display the corresponding position of the weight mass and the spot diameter in the model fitting curve.
[0288] (3) Evaluation and optimization: Input the data from the experiment into the large language model for analysis and evaluation, and generate suggestions for experiment optimization.
[0289] Example 3
[0290] This embodiment provides a non-contact micro-stress measurement method based on AI image recognition. The method measures the stress position based on the measuring device provided in Embodiment 1. The steps include: operation preparation, data acquisition, data cleaning and preprocessing, model training, model verification and real-time online prediction. All steps aim to achieve an end-to-end system of "spot deformation → stress position (classification)" and strictly follow the principles of instrument calibration, data quality control and repeatability.
[0291] Step 1: Operation Preparation
[0292] Based on the reflected light spot image acquired by the image acquisition device, the light spot deformation field, i.e. the polar coordinate discretized displacement vector field (dx, dy), is automatically extracted, and a lightweight convolutional neural network (CNN) is trained to identify the force application position. The reflected light spot image is divided into 36 sectors with equal angles and 10 equally spaced concentric rings, with the center point of the reflected light spot image as the center, totaling 324 position grids excluding the central layer.
[0293] Step 2, Data Collection
[0294] (1) Start the acquisition mode: Enable the image acquisition device camera to capture loop and interactive interface.
[0295] (2) Single-frame image preprocessing:
[0296] (A) Camera intrinsic parameter calibration and ROI selection:
[0297] The intrinsic parameters of the image acquisition camera are calibrated using a checkerboard calibration board to obtain its intrinsic parameter matrix and distortion coefficients for distortion correction. The calibration process is based on Zhang Zhengyou's calibration method, which uses multi-view images of the checkerboard pattern to calculate the camera's intrinsic parameters and distortion coefficients. The camera's intrinsic parameters include focal length and principal point coordinates.
[0298] Manually select a rectangular region (ROI) in the camera view for subsequent spot detection and force and force location estimation; ROI selection restricts the processing area to the location of the spot, reduces computational overhead and eliminates irrelevant interference, and improves the efficiency and accuracy of spot boundary detection in the YOLO model.
[0299] Furthermore, the specific steps for camera intrinsic parameter calibration are as follows:
[0300] (a) Prepare the calibration board and environment: Select a standard checkerboard calibration board, choose an indoor environment with uniform lighting to avoid strong light reflection or shadow interference, connect the camera and ensure that it is fixed on the experimental device with the lens facing the calibration board;
[0301] (b) Detecting checkerboard corner points: Load the acquired images, detect the checkerboard corner points in each image, set the corner points within the checkerboard size, and filter out images where corner point detection fails;
[0302] (c) Perform calibration calculations: Input corner data, calculate intrinsic parameter matrix, distortion coefficients, rotation vector and displacement vector; save the results for later use;
[0303] (d) Verification and application: Perform distortion correction on the test image and visually check whether the straight lines are straight; the calibration error should be less than 0.5 pixels. If the error is too high, re-acquire the image and repeat the process; in subsequent image processing, load these parameters to perform real-time correction on each frame of the image.
[0304] Furthermore, the specific steps for ROI selection are as follows:
[0305] (a) Enable camera preview: Start the camera to display the live feed, ensuring that the light source and flexible reflector panel are in place and the light spot is clearly visible;
[0306] (b) Detecting checkerboard corners: Load the acquired images, detect the checkerboard corners in each image, set the checkerboard size, and filter out images where corner detection fails;
[0307] (c) Manually draw the ROI: Draw a rectangular selection box and record the coordinates (x, y, width, height) of the ROI;
[0308] (d) Apply ROI: Load the saved ROI coordinates in the subsequent script, crop each frame image, and then pass it into the YOLO model for spot detection; periodically verify whether the ROI covers the entire area of the spot. If the camera field of view shifts due to mechanical impact, the selection needs to be re-selected.
[0309] (e) Validation and optimization: Test the cropped image to ensure that the light spot is centered and there is no edge cropping; combine the camera calibration results to perform distortion correction on the image within the ROI to improve accuracy.
[0310] (B) YOLOv8n-seg model segmentation, i.e., spot boundary recognition
[0311] (a) Sample collection and labeling:
[0312] Different pressures are applied to the elastic reflector panel, and spot images within the ROI area are captured by a camera. The labelme tool is used to annotate the deformation area of the reflector in each image, and the center and edge extreme points of the deformation area are marked to generate a JSON annotation file containing mask coordinates, key point information and corresponding load values.
[0313] (b) Model training:
[0314] The training and test sets were divided in a 7:3 ratio. Training was started based on the Ultralytics framework. The mask loss, segmentation loss and validation set accuracy were monitored in real time during the training process to ensure that the model's mask mAP50 on the validation set was ≥0.96 and the deformation region recognition accuracy was ≥0.98 after training.
[0315] (c) Model reasoning and validation:
[0316] The optimal model saved after training is loaded, and inference is performed on the deformed images that were not trained. The deformed region mask and edge coordinates are automatically output. The radius of the deformed region is calculated by fitting the minimum circumcircle of the mask contour. The deformed radius output by the model is compared with the actual deformation measured by the high-precision camera to verify that the difference between the two is ≤0.02mm, ensuring that the model segmentation accuracy meets the analysis requirements when the mirror undergoes small deformations.
[0317] Furthermore, the specific steps for sample collection and labeling are as follows:
[0318] (a) Sample the light spot using the adjusted camera;
[0319] (b) Use labelme to classify and label the edges of objects;
[0320] (c) Place weights of different masses on the reflector to obtain different images;
[0321] (d) Train the YOLOv8n-seg model;
[0322] (e) Use the best model obtained from training to identify the target.
[0323] (3) Polar coordinate grid sampling: Calculate the intersection points of 36 equiangular radial lines and 9 radial layers with the centroid as the center. Find the first intersection point with the convex hull (closest intersection point) on each radial line, and interpolate the sampling points of layers 1 to 9 (excluding the central layer) according to the ratio. The difference between the starting coordinates and the current coordinates (dx, dy) of each grid point is obtained, which is the displacement vector field. Store all 324 displacement vector fields in a fixed order.
[0324] (4) Human-computer annotation of force grid points and saving of samples: In the acquisition mode, the operator selects the corresponding sector and sub-loop as target grid points on the PyQt graphical interface according to the current physical force application position; the model encapsulates the displacement vector calculated in the current frame and the target grid points as sample entries for storage; no less than 10-30 valid samples are collected for each target grid point to ensure the diversity of samples within the class; the overall target is ≥300 samples to improve the generalization of the model.
[0325] (5) Data acquisition precautions and quality control: Before each sampling, check the camera parameters, light source stability and mirror fixation, and record the batch number for post-processing; if the light spot is obscured, saturated or has a broken outline, discard the frame and reacquire it; periodically retest the same grid point and calculate the mean square displacement difference between samples of the same grid point to evaluate the acquisition noise; if the noise is too high, check the lighting and camera stability.
[0326] Step 3: Data Cleaning and Preprocessing
[0327] (1) File integrity check: Read the stored samples and remove samples with incorrect format or missing fields; verify whether the displacement vector length of each sample is 324; if it is not equal to 324, record and investigate the acquisition process.
[0328] (2) Data balancing and augmentation: Check the class distribution (324 classes). If the classes are extremely imbalanced, data augmentation (micro-affine transformation, adding a small amount of noise) or weighted training by class can be performed on the minority classes. Simple geometric noise injection (adding small Gaussian noise to dx, dy) can be used to improve the robustness of the model to sensor jitter.
[0329] (3) Standardization and normalization: Normalize dx and dy to zero mean or normalize according to the standard deviation of the whole dataset to facilitate training convergence.
[0330] Step 4: AI Model Training
[0331] (1) Environment and hyperparameters:
[0332] Model: PolarNet (polar coordinate mesh shape parameters (2,9,36));
[0333] Number of output categories: 324;
[0334] Training parameters: Number of times the model fully traverses the training dataset = 1000, BATCH_SIZE = 32, training / validation ratio 8:2;
[0335] Loss function: CrossEntropyLoss;
[0336] Optimizer: Adam.
[0337] (2) Training steps:
[0338] The cleaned sample data is loaded as displacement data, and the dataset is divided into training and validation sets in an 8:2 ratio. DataLoader is used to read the data in batches. During the training phase, model.train() is used, backpropagation is performed, and parameters are updated. During the validation phase, model.eval() is used to calculate the validation loss and accuracy.
[0339] Record the training curves (training / validation loss and validation accuracy); if training oscillates or overfits, implement early stopping or learning rate decay measures.
[0340] (3) Training expectations and judgment criteria:
[0341] The Top-1 accuracy on the validation set is ≥90% (depending on the amount of data and the quality of the annotations); if it is insufficient, additional samples should be collected or the segmentation or ROI method should be improved.
[0342] Additionally, pay attention to Top-3 accuracy and class confusion matrix: if errors are concentrated in adjacent sectors or rings, it indicates spatial uncertainty learned by the model, and position smoothing or confidence thresholding strategies need to be added after the model output.
[0343] (4) Model persistence and version management:
[0344] Save the final model weights and record the training configuration (random seed, number of samples, training epochs, loss curve) for reproducibility; save timestamped model versions and export training logs for each significant change as needed.
[0345] Step 5: Model Validation and Real-time Online Prediction
[0346] (1) Prediction mode activated:
[0347] Start the trained model, open the polar coordinate grid in the interface, and the prediction results will be displayed as highlighted grid points.
[0348] (2) Real-time processing flow:
[0349] For each frame, the convex hull, centroid, and dx,dy features of 324 points are calculated and constructed into a (2,9,36) tensor, which is then fed into the model's forward inference (PyTorch) to obtain the class distribution (softmax). The highest confidence class is mapped to a sector + ring sub-class, highlighted in the interface, and the confidence score is output. The model output can be recorded and compared with synchronous manual annotations / sensor readings to calculate the real-time error.
[0350] (3) Online verification strategy:
[0351] During the validation phase, force is applied to each of the fixed 10–20 test grid points one by one, and frame data for several seconds is recorded. The model prediction results are statistically analyzed (accuracy, average response delay, confidence distribution). If persistent errors occur (multiple prediction errors at the same grid point), backtracking is performed to check: whether the ROI has shifted, whether the camera has refocused, whether the lighting has changed, and whether the label is incorrect.
[0352] (4) Latency and performance metrics:
[0353] The system should monitor the processing latency of each frame (including distortion correction, segmentation, polar coordinate sampling, and model inference). The goal is to keep the inference time per frame within the experimental requirements.
[0354] Step 6, Post-processing
[0355] If the force value needs to be given at the same time, you can choose to perform regression fitting between the global features of the image (such as spot diameter d, area ΔS, center offset) and the true force value based on the classification output (linear regression, SVR or small neural network can be used).
[0356] Experimental data processing
[0357] The data recording table for mass measurement using a 2mm thick elastic reflective mirror panel in Example 2 is shown below:
[0358]
[0359] The experimental data of the 2mm elastic reflective mirror panel were fitted using the least squares method as follows: Figure 11 As shown, the slope can be calculated to be -22.34, indicating that the measurement result is basically consistent with the theoretical prediction formula 20. This verifies that there is a linear relationship between the mass of the weight and the radius of the image.
[0360] The mass measurement data recorded using a 1mm thick elastic reflective mirror panel in Example 2 is shown in the table below:
[0361]
[0362] Depend on Figure 9 and 10 It can be seen that the uncertainty of the 2mm elastic reflective mirror panel is relatively large in the range of 0-150g, while the measurement results are more accurate when m>150g. Overall, the relative uncertainty is less than 3%. The results meet the measurement requirements of the physical experiment. Figure 12 and 13 As shown, a 1mm thin plate is more accurate in the 0-150g range, so the 0-150g measurement value can be corrected using the results of a 1mm flexible reflective panel.
[0363] The mass measurement data recorded using a 1mm thick elastic reflective mirror panel in Example 3 is shown in the table below:
[0364]
[0365] Of the 50 predictions, groups 2, 4, 7, 9, 11, 16, 18, 21, 22, 26, 29, 31, 34, 38, 42, 45, 47, and 48, a total of 18 groups, had inconsistent force application and prediction positions, accounting for 36% of the total. In all 50 predictions, the radius deviation did not exceed 1 cm, and the phase angle deviation did not exceed one sector. That is, the radius prediction error for all samples was less than 2 cm, and the phase angle prediction error was less than 20 degrees, fully meeting the requirements for industrial applications.
Claims
1. A non-contact micro-stress measurement device based on AI image recognition, characterized in that: include: The supporting frame has closed light-shielding plates on all sides to shield the flicker caused by external light sources and the background noise superimposed on the brightness field. An elastic reflective mirror panel is circumferentially fixed to the top of the support frame and is used to deform under load. The elastic reflective mirror panel is circular and the reflective surface faces the inside of the support frame. An array of circular light sources is located in the lower part of the support frame, opposite to the reflective surface of the elastic reflector panel, to provide uniform illumination; An image acquisition device is positioned between the elastic reflector panel and the array of circular light sources, facing the reflective surface of the elastic reflector panel, and is used to acquire the light spot image of the array of circular light sources reflected on the elastic reflector panel. The flexible reflector panel, the circular light source array, and the image acquisition unit are coaxially arranged, with the diameter of the circular light source array being larger than that of the image acquisition unit; The controller includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program. The computer program is used to control the opening and closing of the circular light source array and to control the image acquisition device to acquire images. The power supply is connected to the circular light source array, image acquisition unit, and controller to provide electrical energy.
2. The non-contact micro-stress measurement device based on AI image recognition according to claim 1, characterized in that: Also includes: A collector support column is vertically positioned at the center of the circular light source array to fix the image collector. The image collector is located on top of the collector support column and is coaxially arranged with the collector support column. The diameter of the collector support column is smaller than the diameter of the circular light source array. A panel fixing device located at the top of the support frame is used to fix the elastic reflector panel. The panel fixing device includes a lower clamping plate and an upper clamping plate. The lower clamping plate is fixed to the top of the support frame around its perimeter, and the upper clamping plate is located above the lower clamping plate, clamping the elastic reflector panel between the upper and lower clamping plates. The upper and lower clamping plates are provided with corresponding circular through holes, the diameter of which is smaller than the diameter of the elastic reflector panel. Several connecting holes are provided on the upper and lower clamping plates around the circular through holes, and spring bolts are used to fix the upper and lower clamping plates through the connecting holes.
3. A non-contact micro-stress measurement method based on AI image recognition, characterized in that, The stress magnitude measurement based on the measuring device provided in claim 1 or 2 includes the following steps: Step 1: AI Visual Preprocessing Step 1.1, Camera Intrinsic Calibration and ROI Selection: (1) Use a checkerboard calibration board to calibrate the intrinsic parameters of the image acquisition camera, obtain its intrinsic parameter matrix and distortion coefficients for distortion correction; the calibration process is based on Zhang Zhengyou calibration method, and the camera intrinsic parameters and distortion coefficients are calculated using multi-view images of the checkerboard pattern. The camera intrinsic parameters include focal length and principal point coordinates. (2) Manually select a rectangular region (ROI) in the camera view for subsequent spot detection and force and force location estimation; the ROI selection restricts the processing area to the location of the spot; Step 1.2: YOLOv8n-seg model segmentation, i.e., spot boundary recognition. (1) Sample collection and labeling: Different pressures are applied to the elastic reflector panel, and spot images within the ROI area are captured by a camera; the labelme tool is used to annotate the deformation area of the reflector in each image, and the center and edge extreme points of the deformation area are marked to generate an annotation file containing mask coordinates, key point information and corresponding load values. (2) Model training: The training and test sets are divided proportionally, and training is started based on the Ultralytics framework. (3) Model reasoning and verification: Load the optimal model saved after training, perform inference on deformed images that were not trained, automatically output the deformed region mask and edge coordinates, and calculate the radius of the deformed region by fitting the minimum circumcircle of the mask contour; compare the deformed radius output by the model with the actual deformation measured by the high-precision camera to verify that the difference between the two is ≤0.02mm, ensuring that the model segmentation accuracy meets the analysis requirements when the mirror undergoes small deformations. Step 2: Build the AI learning, training, and measurement module Step 2.1: Data Acquisition and Prediction This step is divided into two modes: acquisition mode and prediction mode. In terms of image processing, Gaussian blur, binarization, and contour detection are used to extract the edge of the light spot. The expansion and contraction of the light spot are reflected by calculating the difference between the current light spot area and the reference area. Kalman filtering and time window averaging are added to reduce noise and achieve smooth data processing. Images are acquired from the camera, light spot features are extracted, and data acquisition or prediction values are switched according to the mode. Step 2.2: Add the vector regression (SVR) model The SVR model learns the complex mapping relationship between the light spot boundary data and the light spot area and force acquired by YOLO; after data acquisition is completed, the SVR model is automatically called, the training / validation sets are automatically divided, parameters are tuned, and the data is cross-validated; the SVR model learns nonlinear relationships through the support vector mechanism, mapping YOLO keypoints and area differences to force values. Step 2.3, Intelligent Assessment By calling the large language model KIMI-K2-Turbo through the API interface, the experimental data, prediction results and uncertainties are automatically analyzed to generate evaluation reports and optimization suggestions; this step realizes closed-loop feedback based on AI. Step 2.4: Build the user UI interface Design two user interfaces: a main UI module and an AI response display UI module; the main UI provides functions for force measurement, force location measurement, and invoking the intelligent assistant; the AI response display UI shows the analysis results of the KIMI-K2 model; Step 3: Train a model that can be used to measure the magnitude of force, as follows: (1) Zero-position calibration: Click on the prediction data acquisition in the UI interface, open the script used to acquire training data, apply a small pressure and then undo it, and calibrate the state when no external force is applied; (2) Data acquisition: Apply a load of known mass to the center of the elastic reflector panel, wait for the light spot image detected by the image acquisition device to stabilize, and input the stress value to complete the acquisition of a set of data. The force and diameter data are automatically saved. (3) Model training: After several data collections, the saved data is divided into a validation set and a training set in a 2:8 ratio. The model is run directly to complete the training, and the training set and validation set data are automatically fitted to a curve and displayed in a visualization window. (4) Training optimization: Based on the curve comparison results, change the training parameters and retrain until the model performance meets expectations; Step 4: Use the trained model to measure the force in real time. The steps are as follows: (1) Start the program: Click on the force magnitude prediction in the UI interface to start the force measurement model; (2) Force prediction: Apply the load to be measured to the center of the elastic reflector panel. After the spot image stabilizes, the program will automatically display the predicted force value and the corresponding position of the mass of the load to be measured and the spot diameter in the model fitting curve. (3) Evaluation and optimization: Input the data from the experiment into the large language model for analysis and evaluation, and generate suggestions for experiment optimization.
4. The non-contact micro-stress measurement method based on AI image recognition according to claim 3, characterized in that, In step 1.1, the specific steps for camera intrinsic parameter calibration are as follows: (a) Prepare the calibration board and environment: Select a standard checkerboard calibration board, choose an indoor environment with uniform lighting to avoid strong light reflection or shadow interference, connect the camera and ensure that it is fixed on the experimental device with the lens facing the calibration board; (b) Detecting checkerboard corner points: Load the acquired images, detect the checkerboard corner points in each image, set the corner points within the checkerboard size, and filter out images where corner point detection fails; (c) Perform calibration calculations: Input corner data, calculate intrinsic parameter matrix, distortion coefficients, rotation vector and displacement vector; save the results for later use; (d) Verification and application: Perform distortion correction on the test image and visually check whether the straight lines are straight; the calibration error should be less than 0.5 pixels. If the error is too high, re-acquire the image and repeat the process; in subsequent image processing, load these parameters to perform real-time correction on each frame of the image; The specific steps for selecting ROI are as follows: (a) Enable camera preview: Start the camera to display the live feed, ensuring that the light source and flexible reflector panel are in place and the light spot is clearly visible; (b) Detecting checkerboard corners: Load the acquired images, detect the checkerboard corners in each image, set the checkerboard size, and filter out images where corner detection fails; (c) Manually draw the ROI: Draw a rectangular selection box and record the coordinates of the ROI; (d) Apply ROI: Load the saved ROI coordinates in the subsequent script, crop each frame image, and then pass it into the YOLO model for spot detection; periodically verify whether the ROI covers the entire area of the spot. If the camera field of view shifts due to mechanical impact, the selection needs to be re-selected. (e) Validation and optimization: Test the cropped image to ensure that the light spot is centered and there is no edge cropping; combine the camera calibration results to perform distortion correction on the image within the ROI to improve accuracy.
5. The non-contact micro-stress measurement method based on AI image recognition according to claim 3, characterized in that, In step 1.2, the specific steps for sample collection and labeling are as follows: (a) Sample the light spot using the adjusted camera; (b) Use labelme to classify and label the edges of objects; (c) Place weights of different masses on the reflector to obtain different images; (d) Train the YOLOv8n-seg model; (e) Use the best model obtained from training to identify the target.
6. The non-contact micro-stress measurement method based on AI image recognition according to claim 3, characterized in that, Step 2.1 Data Acquisition and Prediction: The specific steps are as follows: (a) Script preparation and environment configuration; (b) Acquisition mode operation: turn on the camera, load the pre-trained YOLO model to detect the light spot boundary; apply Gaussian blur to reduce noise, binarize to separate the foreground, and extract the light spot edge by contour detection; Calculate the area, compare it with the baseline area under no-load conditions, and record the difference; initialize the Kalman filter to track area changes, and set a time window to smooth the data; save the data, including key point coordinates, area difference, and timestamp; (c) Prediction mode operation: The steps are the same as the acquisition mode, but the data is not saved. Instead, the area difference and spot boundary data are output in real time for subsequent SVR prediction. (d) Verification and optimization: Test the noise level under different lighting conditions and adjust the Gaussian kernel or threshold; ensure that the area tracking error is less than 0.01 after the Kalman filter Q / R parameters are optimized.
7. The non-contact micro-stress measurement method based on AI image recognition according to claim 3, characterized in that, Step 2.2: The specific steps for adding the vector regression SVR model are as follows: (a) Data preparation: Load data from the CSV file generated by the acquisition mode, including features such as the light spot boundary data and area difference acquired by YOLO, and labels are the stress values obtained from the sensor; (b) Model training and hyperparameter tuning: Start the SVR model and search for hyperparameters, including regularization parameter c, insensitive loss ϵ, kernel coefficient γ; cross-validate to evaluate MSE; (c) Prediction Application: Load the model in the prediction mode and input the real-time feature prediction power value; (d) Check the cross-validation score to ensure that overfitting is less than 5%.
8. The non-contact micro-stress measurement method based on AI image recognition according to claim 3, characterized in that, Step 2.3 The specific operation steps of intelligent assessment are as follows: (a) API configuration: Obtain the KIMI-K2 API key and set the request header; prepare the input data, including CSV results, MSE values, and image sample paths; (b) Constructing and calling prompts: Constructing prompt templates, including a summary of experimental data, prediction accuracy, and potential problems; Send a POST request, parse the response, and generate an evaluation. (c) Integration and output: Automatically invoked after training, saving the evaluation to a report file; run periodically to monitor experimental iterations; (d) Verification and optimization: Test different prompts to ensure consistent responses; If the API is rate-limited, add a retry mechanism.
9. A non-contact micro-stress measurement method based on AI image recognition, characterized in that, The force position is measured using the measuring device provided in claim 1 or 2, and the steps are as follows: Step 1: Operation Preparation Based on the reflected light spot image acquired by the image acquisition device, the light spot deformation field, i.e. the polar coordinate discretized displacement vector field (dx,dy), is automatically extracted, and a lightweight convolutional classification network is trained to identify the force application position. The reflected light spot image is divided into 36 radial sectors with equal angles and 10 equally spaced concentric rings, with a total of 324 position grids excluding the central layer. Step 2, Data Collection (1) Start the acquisition mode: Enable the image acquisition device camera to capture loop and interactive interface; (2) Single-frame image preprocessing: (A) Camera intrinsic parameter calibration and ROI selection: The intrinsic parameters of the image acquisition camera are calibrated using a checkerboard calibration board to obtain its intrinsic parameter matrix and distortion coefficients for distortion correction. The calibration process is based on Zhang Zhengyou's calibration method, which uses multi-view images of the checkerboard pattern to calculate the camera's intrinsic parameters and distortion coefficients. The camera's intrinsic parameters include focal length and principal point coordinates. Manually select a rectangular region of interest (ROI) in the camera view for subsequent spot detection and force and force location estimation; the ROI selection restricts the processing area to the location of the spot. (B) YOLOv8n-seg model segmentation, i.e., spot boundary recognition: (a) Sample collection and labeling: Different pressures are applied to the elastic reflector panel, and light spot images within the ROI area are captured by a camera; the labelme tool is used to annotate the deformation area of the reflector in each image, and the center and edge extreme points of the deformation area are marked to generate a JSON annotation file containing mask coordinates, key point information and corresponding load values. (b) Model training: The training and test sets were divided in a 7:3 ratio. Training was started based on the Ultralytics framework. The mask loss, segmentation loss and validation set accuracy were monitored in real time during the training process to ensure that the model's mask mAP50 on the validation set was ≥0.96 and the deformation region recognition accuracy was ≥0.98 after training. (c) Model reasoning and validation: Load the optimal model saved after training, perform inference on deformed images that were not trained, automatically output the deformed region mask and edge coordinates, and calculate the radius of the deformed region by fitting the minimum circumcircle of the mask contour; compare the deformed radius output by the model with the actual deformation measured by the high-precision camera to verify that the difference between the two is ≤0.02mm, ensuring that the model segmentation accuracy meets the analysis requirements when the mirror undergoes small deformations. (3) Polar coordinate grid sampling: Calculate the intersection points of 36 equiangular radial lines and 9 radial layers with the centroid as the center. Find the first intersection point with the convex hull on each radial line and interpolate the sampling points of layers 1 to 9 (excluding the central layer) according to the proportion. The difference between the starting coordinates and the current coordinates (dx, dy) of each grid point is obtained, which is the displacement vector field. Store all 324 displacement vector fields in a fixed order. (4) Human-computer annotation of force grid points and saving of samples: In the acquisition mode, the operator selects the corresponding sector and sub-loop as target grid points on the graphical interface according to the current physical force application position; the model encapsulates the displacement vector calculated in the current frame and the target grid points as sample entries for storage; no less than 10 valid samples are collected for each target grid point to ensure the diversity of samples within the class; the overall target is ≥300 samples to improve the generalization of the model; (5) Data acquisition precautions and quality control: Before each sampling, check the camera parameters, light source stability and mirror fixation, and record the batch number for post-processing; if the light spot is obscured, saturated or has a broken outline, discard the frame and re-acquire it; Periodically retest the same grid point and calculate the mean square displacement difference between samples at the same grid point to assess the acquisition noise. If the noise is too loud, check the lighting and camera stability; Step 3: Data Cleaning and Preprocessing (1) File integrity check: Read the stored samples and remove samples with incorrect format or missing fields; verify whether the displacement vector length of each sample is 324; if it is not equal to 324, record and investigate the acquisition process; (2) Data balancing and augmentation: Check the class distribution. If the classes are extremely unbalanced, data augmentation or weighted training by class can be performed on the minority classes. (3) Standardization and normalization: Normalize dx and dy to zero mean or according to the standard deviation of the whole dataset to facilitate training convergence; Step 4: AI Model Training (1) Environment and hyperparameters: Model: PolarNet, polar coordinate mesh shape parameters (2,9,36); Number of output categories: 324; Training parameters: set the number of times the model fully traverses the training dataset, BATCH_SIZE, and training / validation ratio; Loss function: Cross-entropy; Optimizer: Adam; (2) Training steps: The cleaned sample data is loaded as displacement data, and the dataset is divided into training and validation sets in an 8:2 ratio. DataLoader is used to read the data in batches. During the training phase, model.train() is used, backpropagation is performed, and parameters are updated. During the validation phase, model.eval() is used and the validation loss and accuracy are calculated. Record the training curve, and record the training / validation loss and validation accuracy; if training oscillates or overfits, take measures such as early stopping or learning rate decay. (3) Training expectations and judgment criteria: The Top-1 accuracy on the validation set is ≥90%; if it is insufficient, additional samples are taken or the segmentation or ROI method is improved. (4) Model persistence and version management: Save the final model weights and record the training configuration, including random seed, number of samples, training epochs, and loss curve; save timestamped model versions and export training logs for each significant change as needed. Step 5: Model Validation and Real-time Online Prediction (1) Prediction mode activated: Start the trained model, open the polar coordinate grid in the interface, and the prediction results are displayed as highlighted grid points; (2) Real-time processing flow: For each frame, the convex hull, centroid, and dx,dy features of 324 points are calculated and constructed into a (2,9,36) tensor, which is then fed into the model for forward inference to obtain the class distribution. The highest confidence class is mapped to a sector + ring, highlighted in the interface, and the confidence level is output. The model output is recorded and compared with the synchronous manual annotation / sensor readings to calculate the real-time error. (3) Online verification strategy: During the verification phase, force is applied one by one at fixed test grid points and frame data for several seconds is recorded. The model prediction results are then statistically analyzed. If persistent errors occur, backtrack and check: whether the ROI has shifted, whether the camera has refocused, whether the lighting has changed, and whether the label is incorrect; (4) Latency and performance metrics: The system should monitor the processing latency of each frame, including distortion correction, segmentation, polar coordinate sampling, and model inference; the goal is to keep the inference time per frame within the experimental requirements.
10. A non-contact micro-stress measurement method based on AI image recognition according to claim 9, characterized in that, It also includes step 6, post-processing. Based on the classification output, the global features of the image are regressed and fitted with the true force value, and the magnitude of the force value is given.