A defect detection system based on digital twin and machine vision

Through a defect detection system that combines digital twins and machine vision, using edge nodes and the E-twin IoT platform, combined with large AI models, the problem of defect identification and traceability in the textile industry is solved, and high-accuracy quality inspection and traceability are achieved. , meeting the industrial-level needs of the textile industry.

CN118411357BActive Publication Date: 2024-09-10BEIJING LIANYUAN ZHIWEI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410634962.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-05-22
Publication Date
2024-09-10
Estimated Expiration
2044-05-22

AI Technical Summary

Technical Problem

In the textile industry, due to the elasticity and material differences of textile materials during product quality inspection, it is difficult for machine vision algorithms to accurately identify defects, and the defect traceability is insufficient to meet industrial-level needs.

Method used

A defect detection system based on digital twins and machine vision is used to identify defect characteristics through edge nodes. It is combined with the E-twin local IoT platform and AI large model to perform data aggregation and three-dimensional reconstruction to build a large model for the textile industry to realize defects. Traceability and quality inspection.

Benefits of technology

It improves the accuracy of defect identification and product qualification rate, realizes industrial-grade quality inspection and defect traceability in the textile industry, reduces costs, and provides intuitive display effects and iterative optimization through the combination of deep learning algorithms and AI large models. ability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118411357B
    Figure CN118411357B
Patent Text Reader

Abstract

The present invention discloses a defect detection system based on digital twin and machine vision, which uses edge nodes to identify defect features, aggregates data through the E‑twin local Internet of Things platform, uses a deep learning algorithm to perform three-dimensional reconstruction of defective images, and finally builds a large model for the textile industry to achieve defect traceability. The implementation steps of the scheme include high-quality data set acquisition, machine vision model training, model deployment on edge nodes, data aggregation, traceability analysis, and result data post-processing; the edge node uses the Linux system, supports 485 communication, and can drive PLC and PWM controllers and defect amplification devices through the MODBUS protocol; the edge node can install the ONNX operating environment and support the deployment of machine vision models; the overall scheme can realize the implementation of AI in the textile industry, which not only saves a lot of labor, but also greatly improves the efficiency of quality inspection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of intelligent manufacturing, and in particular to a defect detection system based on digital twins and machine vision. Background Art

[0002] Quality inspection is a key link in the process of products from production line to market. This process can effectively eliminate unqualified products and significantly reduce the return and complaint rate. By ensuring product quality, quality inspection not only maintains the brand image, but also enhances consumer trust and satisfaction. The survey found that when the textile industry performs quality inspection, companies need to recruit a large number of employees to check the size, appearance and function of products, and the whole process consumes a lot of repetitive labor.

[0003] Enterprises have begun to use machine vision algorithms and automation technology to reduce their reliance on manpower and achieve long-term development. However, due to the physical properties of textile materials, the accuracy of defect feature recognition has always been difficult to reach industrial level. First, textile materials have very large differences in material, color, texture, etc., and model training requires a large data set; second, textile materials are elastic materials, and the matrix will shrink after damage, which brings difficulties to machine vision algorithms.

[0004] With the rapid development of artificial intelligence technology, AI big models have become one of the core technologies in various industries, and have been widely used in natural language processing, computer vision, health care and other fields. The textile industry has extremely high requirements for the accuracy of defect recognition, and the current big models cannot meet the needs of enterprises. To solve this problem, the project adopts a method that combines machine vision models with AI big models. Through the machine vision algorithm deployed on the edge device, the recognition results are subsequently passed to the big model, and finally defect recognition and traceability analysis for the textile industry is realized.

[0005] At present, there are also some patent technologies related to defect detection based on digital twins and machine vision on the market. For example: Chinese patent 202211157180.5 discloses a gear quality detection method and system based on machine vision. The scheme uses machine vision to extract image pixel feature points, and then fits the feature points into spline segments to calculate the parameters of the gear to be tested. However, textile materials have greater elasticity, and there is no obvious visual difference between the damaged contour and the normal area. In addition, for textile material production lines, in addition to product quality inspection, companies hope to be able to trace the source of defects and continuously improve the product qualification rate through iteration.

[0006] In order to solve the above problems, the project designed an AI inspection box based on machine vision to address the difficult issues in textile material quality inspection. By controlling the background and using standard light sources, the impact of external variables on recognition accuracy is reduced. In addition, the system is equipped with a defect amplification device that can amplify defect features, ultimately improving the accuracy of the machine vision algorithm. The project combines the E-twin local IoT platform and the local AI big model to trace the source of defects and improve the product qualification rate. By running the big model locally, the working status of the production line is understood, and reference solutions are given for the types of faults, ultimately continuously improving product quality. Summary of the invention

[0007] In view of the above problems, the present invention provides a defect detection system based on digital twins and machine vision, which uses edge nodes to identify defect features, aggregates data through the E-twin local Internet of Things platform, and uses a deep learning algorithm to perform three-dimensional reconstruction of defective images. Finally, a large model for the textile industry is constructed to achieve defect tracing. A defect detection system based on digital twins and machine vision includes the following implementation steps:

[0008] S1: Acquisition of high-quality data sets and training of machine vision models: Use an expansion mechanism to magnify defect features; Use a black background during the shooting process to reduce environmental interference; Use an industrial camera to capture images of defects under yellow, white, and red light sources; Use a deep learning algorithm to remove background noise from the image; Preprocess the high-quality data set, including cropping, denoising, brightness adjustment, and filtering;

[0009] S2: Image capture: The edge node can drive the PLC controller, PWM controller, three-color light source, defect magnification device and industrial camera to capture defect images;

[0010] S3: Defect detection: Deploy the trained machine vision model on the edge node, identify the images captured by the edge node, and output the defect category and location; upload the images containing defects to the E-twin local IoT platform, and use the deep learning algorithm to reconstruct the images containing defects in three dimensions;

[0011] S4: Data aggregation: The edge node interacts bidirectionally with the E-twin local IoT platform through the MQTT protocol; the edge node uploads the production equipment status data, defect category, location and timestamp to the IoT platform, and the IoT platform can send control instructions to the edge node; the production equipment status data includes four sets of parameters: equipment number, product number, processing start time and processing time. After the product is processed, it is passed to the defect detection module through the assembly line to finally achieve product quality inspection;

[0012] S5: Traceability analysis: Build a large model for the textile industry to achieve defect traceability and pass the reasoning results to the IoT screen for visualization;

[0013] S6: Post-processing of result data and dynamic interaction: Defect images, defect causes and process data are stored and recorded to facilitate managers to trace back historical data and display defect features on a three-dimensional surface. Operation and maintenance engineers can interact dynamically based on the local large model and read database information by writing prompts.

[0014] The expansion mechanism adopts a spatial mechanism to amplify the damaged features of the flexible material without damaging the material matrix; the industrial camera has the functions of focal length adjustment and exposure time adjustment, thereby obtaining a high-definition image containing defect features.

[0015] The edge node adopts the Linux system, supports 485 communication, and can drive the PLC controller and the PWM controller through the MODBUS protocol; the edge node can drive the defect amplification device; the edge node can obtain the status data of the production equipment; the production equipment includes multiple sub-unit sequences, specifically: equipment one, equipment two, equipment three...equipment N; the edge node can install the ONNX operating environment and support the deployment of machine vision models.

[0016] The E-twin local IoT platform is a bridge for communication between edge nodes and users, and has four modules: data screen, equipment management, operation and maintenance monitoring, and system management. The data screen summarizes and displays the status data of production equipment on the assembly line. The operation and maintenance monitoring module mainly includes: IoT platform operation log, online debugging and remote configuration module. The online debugging module can dynamically interact with edge nodes, and then realize dynamic adjustment of the defect amplification device by controlling the PLC and PWM controller.

[0017] The textile industry big model is secondary developed based on the open source big model, and defect traceability is achieved through fine-tuning, quantification and deployment; the training data uses assembly line defective products, and the defect type and location are identified through machine vision algorithms. Subsequently, a neural network model and SVM algorithm are constructed to perform inference based on defect identification results, timestamps and production equipment status data to generate data labels.

[0018] The advantages of the present invention are:

[0019] 1. Extremely high recognition accuracy: The project uses standard background, standard light source and image preprocessing technology to reduce the interference of the external environment on the machine vision algorithm; the system uses a defect magnification device to amplify the defect features, improve the accuracy of algorithm recognition, and ultimately achieve industrial-grade product quality inspection;

[0020] 2. Fault tracing: This patent can not only perform quality inspection on products, but also trace the source of defects. The defect identification results and the status data of the assembly line production equipment are uploaded to the E-twin local IoT platform through the edge node. The AI ​​big model is then used to trace the defect source and determine the source location of the defect, ultimately improving the product quality of the production line;

[0021] 3. Low cost: The project adopts the method of machine vision algorithm + AI large model to realize the identification and traceability analysis of defects; the machine vision algorithm adopts the YOLO algorithm, which can be used in the background of the textile industry, effectively reducing the difficulty and workload of training; this method uses the machine vision algorithm to realize the application of AI large models in specific industries, and realizes the combination of model professionalism (machine vision algorithm) and versatility (AI large model);

[0022] 4. Strong intuitiveness and good display effect: Deep learning algorithms are used to reconstruct defective images in three dimensions, and the results are subsequently displayed on a large screen, achieving intuitive display of defect locations and defect types;

[0023] 5. Strong iterative optimization capabilities: Operation and maintenance engineers understand the working status of the production line through large models running locally, provide solutions for different fault types, and ultimately continuously improve product quality. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] The drawings described herein are used to provide a further understanding of the embodiments of the present invention, constitute a part of the present invention, and do not constitute a limitation of the embodiments of the present invention.

[0025] Figure 1 : Architecture of defect detection system based on digital twin and machine vision.

[0026] Figure 2 :Machine vision model training and deployment process.

[0027] Figure 3 : The composition of the defect detection system based on digital twins and machine vision: defect magnification device, camera, edge node, E-twin local Internet of Things platform, traceability analysis model and local large model.

[0028] Figure 4 : The relationship between edge nodes and environmental control modules, defect amplification devices and assembly lines.

[0029] Figure 5 : E-twin local Internet of Things platform system function display.

[0030] Figure 6 :Source analysis-model structure of neural network.

[0031] Figure 7: Tracing analysis-the principle of support vector machine algorithm.

[0032] Figure 8 :Local AI large model fine-tuning-quantization-deployment example. DETAILED DESCRIPTION

[0033] In order to make the objectives, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with embodiments and drawings. The exemplary embodiments of the present invention and their description are only used to explain the present invention and are not intended to limit the present invention.

[0034] Implementation Example 1

[0035] The digital economy has proposed new solutions for scenarios such as industrial Internet of Things, intelligent transportation, and smart healthcare. Figure 1 A defect detection system based on digital twins and machine vision is demonstrated. It uses edge nodes to identify defect features, aggregates data through the E-twin local IoT platform, and uses deep learning algorithms to reconstruct defective images in three dimensions. Finally, a large model for the textile industry is built to achieve defect tracing. The system is characterized in that a defect detection system based on digital twins and machine vision includes the following implementation steps:

[0036] S1: Acquisition of high-quality data sets and training of machine vision models: Use an expansion mechanism to magnify defect features; Use a black background during the shooting process to reduce environmental interference; Use an industrial camera to capture images of defects under yellow, white, and red light sources; Use a deep learning algorithm to remove background noise from the image; Preprocess the high-quality data set, including cropping, denoising, brightness adjustment, and filtering; The hyperparameters that need to be adjusted during the model training process include learning rate, batch size, and image size;

[0037] S2: Image capture: The edge node can drive the PLC controller, PWM controller, three-color light source, defect magnification device and industrial camera to capture defect images;

[0038] S3: Defect detection: Deploy the trained machine vision model on the edge node, identify the images captured by the edge node, and output the defect category and location; upload the images containing defects to the E-twin local IoT platform, and use the deep learning algorithm to reconstruct the images containing defects in three dimensions;

[0039] S4: Data aggregation: The edge node interacts bidirectionally with the E-twin local IoT platform through the MQTT protocol; the edge node uploads the production equipment status data, defect category, location and timestamp to the IoT platform, and the IoT platform can send control instructions to the edge node; the production equipment status data includes four sets of parameters: equipment number, product number, processing start time and processing time. After the product is processed, it is passed to the defect detection module through the assembly line to finally achieve product quality inspection;

[0040] S5: Traceability analysis: Build a large model for the textile industry to achieve defect traceability and pass the reasoning results to the IoT screen for visualization;

[0041] S6: Post-processing of result data and dynamic interaction: Defect images, defect causes and process data are stored and recorded to facilitate managers to trace back historical data and display defect features on a three-dimensional surface. Operation and maintenance engineers can interact dynamically based on the local large model and read database information by writing prompts.

[0042] The expansion mechanism adopts a spatial mechanism to magnify the damaged features of the flexible material without damaging the material matrix; the industrial camera has the functions of focal length adjustment and exposure time adjustment, thereby obtaining a high-definition image containing defect features.

[0043] The edge node adopts the Linux system, supports 485 communication, and can drive the PLC controller and the PWM controller through the MODBUS protocol; the edge node can drive the defect amplification device; the edge node can obtain the status data of the production equipment; the production equipment includes multiple sub-unit sequences, specifically: equipment one, equipment two, equipment three...equipment N; the edge node can install the ONNX operating environment and support the deployment of machine vision models.

[0044] The E-twin local IoT platform is a bridge for communication between edge nodes and users, and has four modules: data screen, equipment management, operation and maintenance monitoring, and system management. The data screen summarizes and displays the status data of production equipment on the assembly line. The operation and maintenance monitoring module mainly includes: IoT platform operation log, online debugging and remote configuration module. The online debugging module can dynamically interact with edge nodes, and then realize dynamic adjustment of the defect amplification device by controlling the PLC and PWM controller.

[0045] The textile industry big model is secondary developed based on the open source big model, and defect traceability is achieved through fine-tuning, quantification and deployment; the training data uses assembly line defective products, and the defect type and location are identified through machine vision algorithms. Subsequently, a neural network model and SVM algorithm are constructed to perform reasoning based on defect identification results, timestamps and production equipment status data to generate data labels.

[0046] Implementation Example 2

[0047] This implementation example demonstrates the process of capturing defect images.

[0048] Engineers use the three-tier architecture of camera + edge node + local server to conduct product quality inspection of textile materials. The relevant technology can effectively improve the production efficiency of the factory. Generally, the camera is equipped with a host computer software, and the user can capture the target image. However, the host computer software generally does not have the ability to deploy AI models, and the host computer module cannot drive the PLC and PWM controller, and cannot realize the integration of the defect detection system. Therefore, the project uses Python language to write the program code for controlling the camera and the driver program for the controller, and finally realizes the capture of defective images.

[0049] The network camera supports multiple protocols such as RTSP, FTP, and NTP. In the project, the edge node is used as the processing platform to obtain the video stream of the camera through RTSP, and then the machine vision algorithm is used to identify the defect features. Some of the codes are as follows:

[0050] import cv2

[0051] from PIL import Image

[0052] # RTSP address

[0053] rtsp_url = "rtsp: / / 192.168.0.121:554 / user=admin&password=&channel=1&stream =0.sdp?"

[0054] # Open RTSP stream

[0055] cap = cv2.VideoCapture(rtsp_url)

[0056] # Read a frame

[0057] ret, frame = cap.read()

[0058] # Convert OpenCV's BGR image to RGB image

[0059] frame_rgb = cv2.cvtColor(frame, cv2.COLOR_BGR2RGB)

[0060] # Convert numpy array to PIL image

[0061] img = Image.fromarray(frame_rgb)

[0062] img.save(full_path)

[0063] Implementation Example 3

[0064] Attached Figure 2 The training and deployment process of the machine vision model is demonstrated. Among them, the edge node can realize data collection through the RS485 interface to obtain information from the PLC controller and the production equipment status collection sensor. The edge node can deploy machine learning algorithms, support data analysis based on artificial intelligence algorithms (neural networks, machine learning algorithms, SVM and data aggregation, etc.), realize data upload, and has very good scalability. The performance indicators of the edge node are: using Samsung 4418 core board as the main control, its processor frequency is 1.4GHz, the system memory is 512M, and the board has 8G eMMC storage and 4G modules, etc. The product uses the Debian system, and the specific installation steps are as follows:

[0065] 1. Use Win32 Disk Imager to burn the ISO file to a USB flash drive to ensure that the edge node can be loaded into the Debian environment through the TF card;

[0066] 2. Flash the system into eMMC, and then enter the armbian-config command through the serial port tool to open the system configuration interface.

[0067] After the system kernel is installed, you can compile program codes such as Python, C, Go, and Java, and finally implement the deployment of machine learning algorithms in this environment. The specific process is as follows:

[0068] The machine vision algorithm in the project uses a deep vision model represented by YOLO, and achieves lightweight deployment of edge nodes through model pruning. ONNX (Open Neural Network Exchange) was jointly developed by Microsoft and Facebook and open sourced at the end of 2017. It is an open deep learning model exchange format with advantages such as framework independence and easy deployment. In the project, the trained YOLO model is exported to ONNX format, and ONNX Runtime is used for reasoning later. After the machine vision algorithm is deployed, auxiliary code is written to output information such as defect category and target location.

[0069] The edge node not only needs to deploy machine vision algorithms to identify the defect features of the image, but also needs to drive the PLC and PWM controller through the 485 interface to ultimately achieve defect feature amplification and pipeline batch image capture. The deployment method of the environment is as follows:

[0070] The project uses Python as the development language and uses the pip install <library name> command to install the necessary environment. The specific libraries are: 1. Install miniconda to achieve environment management; 2. Install opencv, numpy, torch, and onnxruntime for defect feature recognition; 3. Install serial and minimalmodbus driver auxiliary devices to finally achieve pipeline batch image capture.

[0071] Implementation Example 4

[0072] Attached Figure 3 The defect detection system based on digital twin and machine vision is shown, including defect magnification device, camera, edge node, E-twin local IoT platform and traceability analysis model. The edge node has multiple 485 interfaces and can control PLC and PWM controller through MODBUS protocol, and finally drive the defect magnification device to work; the code example of edge node driving PLC in the project is as follows:

[0073] import minimalmodbus

[0074] import serial

[0075] ser = serial.Serial('COM8', baudrate=19200, bytesize=8, parity='N',stopbits=1, timeout=1)

[0076] instrument = minimalmodbus.Instrument(ser, slaveaddress=1)

[0077] instrument.write_bit(8, value=True)

[0078] The edge node can collect the operating status of the assembly line production equipment through sensors, including four sets of parameters: equipment number, product number, processing start time and processing time. After the product is processed, it is passed to the defect detection module through the assembly line to finally realize the product quality inspection.

[0079] Attached Figure 4 The relationship between the edge node and the environmental control module, defect amplification device and assembly line is demonstrated.

[0080] Attached Figure 5 The functional modules of the local IoT platform E-twin were demonstrated. The E-twin IoT platform drew on the advantages of Alibaba Cloud and Tencent Cloud IoT platforms during its development. It is the foundation for building digital twin applications and deploying artificial intelligence algorithms. The project combines years of engineering implementation experience and can meet the needs of industrial scenarios, aerospace, and electric power energy.

[0081] The left side of the IoT platform is the navigation bar, which includes the following functional modules:

[0082] 1. Home page;

[0083] 2. Equipment management: products, equipment, and groups;

[0084] 3. Operation and maintenance monitoring: remote configuration, online debugging, and log services;

[0085] 4. System management: user management, role management, menu list, interface management, and log management.

[0086] The E-twin local IoT platform is written in go language and uses MySQL and TDengine databases, where MySQL is used to store relational data and TDengine is used for time series data storage. The E-twin IoT platform uses MinIO as an object storage server to store unstructured data such as videos and files.

[0087] The E-twin local IoT platform integrates a large model to process, utilize and display local data in a dynamic and interactive manner, making it easier for operation and maintenance engineers to understand the operation of the production line and continuously improve product quality based on the improvement plans proposed by the algorithm.

[0088] Implementation Example 5

[0089] Attached Figure 6-7 The model structure of the neural network and the implementation principle of the support vector machine algorithm (SVM) are demonstrated for the traceability analysis of defective products. The project makes inferences based on the defect type, timestamp, and production equipment status data, traces the cause of the defect, and finally passes the inference results to the IoT large screen for visualization.

[0090] The edge node can collect the operating status of the assembly line production equipment through sensors, including four sets of parameters: equipment number, product number, processing start time and processing time. After the product is processed, it is passed to the defect detection module through the assembly line to finally realize the product quality inspection.

[0091] The prediction methods for defect tracing include: prediction methods based on statistical characteristics, time series analysis methods, and artificial intelligence algorithms. This implementation example takes the artificial neural network (ANN) algorithm as an example to show the detailed process of textile material defect tracing. The specific implementation steps are:

[0092] S1: Data collection: Collect defect feature data, operation status data of production line equipment and fault source label data. Defect data mainly includes: defect type and location; operation status data mainly includes: equipment number, product number, processing start time and processing time;

[0093] S2: Data preprocessing: normalize the data, remove outliers and erroneous data, and randomly divide the data set into three types: training set, validation set, and test set;

[0094] S3: Selection of neural network model parameters: Select a suitable neural network structure and determine the number of input layer neurons, hidden layer neurons and output layer neurons; in this example, the quantity to be predicted is the location where the defect occurs on the production line, so the number of output layer neurons is selected as N, where N represents the production line process link;

[0095] S4: Model training and verification: Select the Adam optimizer, iteratively optimize, and continuously improve the prediction accuracy of the model;

[0096] S5: Deployment of the algorithm on the E-twin local IoT platform;

[0097] S6: Result display and visualization: Display the results on the local IoT platform data screen.

[0098] Attached Figure 6 The implementation principle of support vector machine (SVM) is demonstrated. SVM has excellent pattern recognition ability and is suitable for processing small sample problems. It is a powerful supervised learning algorithm. Its core idea is to find an optimal hyperplane. The specific process is:

[0099] S1: Kernel function selection: The project uses the Gaussian kernel function, specifically:

[0100]

[0101] S2: Construct optimization objective: Construct optimization objective function, specifically:

[0102]

[0103] S3: Training model: Use the training data set to train the model and obtain the model parameters through the gradient descent algorithm;

[0104] S4: Model deployment and application: The trained neural network model and SVM algorithm are deployed on the server to realize defect traceability of textile materials.

[0105] Implementation Example 6

[0106] Figure 8 An example of fine-tuning, quantization, and deployment of a local AI big model was demonstrated. With the rapid development of artificial intelligence technology, AI big models have become one of the core technologies in various industries, and have been widely used in natural language processing, computer vision, healthcare, and other fields. The textile industry has extremely high requirements for the accuracy of defect recognition, and the current AI big models cannot meet the needs of enterprises. To solve this problem, the project adopts a method that combines machine vision models with AI big models. Through the machine vision algorithm deployed on the edge device, the recognition results are subsequently passed to the big model, ultimately realizing defect recognition and traceability analysis for the textile industry. Among them, the deployment process of the local AI big model is:

[0107] S1: Local AI big model construction: fine-tune based on the open source AI big model, and finally build a big model for the textile industry;

[0108] S2: Dataset construction: Based on machine vision algorithms, images are identified to obtain the damage category and location information of textile materials. Subsequently, a neural network model and SVM algorithm are constructed to automatically generate defect label data based on defect results, timestamps, and production status data. Finally, manual verification is performed to obtain a defect traceability dataset for the textile industry.

[0109] S3: Model fine-tuning: fine-tune the AI ​​large model based on PEFT and perform quantitative operations;

[0110] S4: Local AI large model deployment: First install LM Studio software locally, then download the AI ​​large model to the local computer and load the model;

[0111] S5: AI large model parameter adjustment: batch size, temperature and GPU load setting lights when loading models;

[0112] S6: AI big model API service: Through the API service, the AI ​​big model is directly integrated with the IoT platform E-twin to achieve defect traceability.

[0113] The specific implementation method described above provides a detailed description of the objectives, technical solutions and beneficial effects of the present invention. It should be understood that the above is only a specific implementation method of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.

Claims

1. A defect detection system based on digital twins and machine vision, which uses edge nodes to identify defect features, aggregates data through the E-twin local IoT platform, uses deep learning algorithms to perform three-dimensional reconstruction of defective images, and finally builds a large model for the textile industry to achieve defect tracing, characterized in that: A digital twin and machine vision-based defect detection system is used to implement the following steps: S1: Acquisition of high-quality data sets and training of machine vision models: Use a spreading mechanism to magnify defect features; A black background is used during the shooting process to reduce environmental interference. An industrial camera is used to capture images of defects under yellow, white and red light sources. A deep learning algorithm is used to remove the background in the image. The high-quality data set is preprocessed, including cropping, denoising, brightness adjustment and filtering. S2: Image capture: The edge node can drive the PLC controller, PWM controller, defect magnification device and industrial camera to capture defect images; S3: Defect detection: Deploy the trained machine vision model on the edge node, identify the images captured by the edge node, and output the defect category and location; upload the images containing defects to the E-twin local IoT platform, and use the deep learning algorithm to reconstruct the images containing defects in three dimensions; S4: Data aggregation: The edge node interacts bidirectionally with the E-twin local IoT platform through the MQTT protocol; the edge node uploads the production equipment status data, defect category, location and timestamp to the IoT platform, and the IoT platform can send control instructions to the edge node; the production equipment status data includes four sets of parameters: equipment number, product number, processing start time and processing time. After the product is processed, it is passed to the defect detection module through the assembly line to finally achieve product quality inspection; S5: Traceability analysis: Build a large model for the textile industry to achieve defect traceability and pass the reasoning results to the IoT screen for visualization; S6: Result data post-processing and dynamic interaction: store and record defect images, defect causes and process data to facilitate management personnel to trace back historical data; Display defect features on a three-dimensional surface; operation and maintenance engineers can dynamically interact based on the local large model and read database information by writing prompts; The expansion mechanism adopts a spatial mechanism to amplify the damage features of the flexible material without damaging the material matrix; the industrial camera has the functions of focal length adjustment and exposure time adjustment, so as to obtain high-definition images containing defect features; the edge node adopts the Linux system, supports 485 communication, and can drive the PLC and PWM controller through the MODBUS protocol; the edge node can drive the defect amplification device; the edge node can obtain the status data of the production equipment; the production equipment includes multiple sub-unit sequences, specifically: equipment one, equipment two, equipment three, ..., equipment N; the edge node can install the ONNX operating environment to support the deployment of machine vision models; The E-twin local IoT platform is a bridge for communication between edge nodes and users, and has four modules: data screen, equipment management, operation and maintenance monitoring, and system management. The data screen summarizes and displays the status data of production equipment on the assembly line. The operation and maintenance monitoring module includes: IoT platform operation log, online debugging, and remote configuration module. The online debugging module can dynamically interact with edge nodes, and then realize dynamic adjustment of the defect amplification device by controlling PLC and PWM controllers. The big model for the textile industry is secondary developed based on the open source big model, and defect traceability is achieved through fine-tuning, quantification and deployment; the training data uses assembly line defective products, and the defect type and location are identified through machine vision algorithms. Subsequently, a neural network model and SVM algorithm are constructed to perform inference based on defect identification results, timestamps and production equipment status data to generate data labels.