An image defect detection system based on cloud service

Through the cloud service-based image defect detection system, the GPU cluster and Socket communication connection technology of the cloud server are utilized to solve the problem of slow detection speed on the central processing unit and realize high-concurrency image defect detection for multiple users.

CN115100124BActive Publication Date: 2025-09-23GUANGDONG UNIV OF TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210663412.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-13
Publication Date
2025-09-23
Estimated Expiration
2042-06-13

AI Technical Summary

Technical Problem

The existing technology for image defect detection on the central processing unit is slow and inefficient, and cannot meet the high-concurrency image defect detection needs of multiple users.

Method used

A cloud-based image defect detection system is used, which utilizes the GPU cluster of the cloud server to accelerate model training. Combined with Socket communication connection technology and IO multiplexing technology, high-concurrency image defect detection for multiple users is achieved.

Benefits of technology

It achieves fast and efficient image defect detection and can handle image defect detection tasks for multiple users at the same time.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115100124B_ABST
    Figure CN115100124B_ABST
Patent Text Reader

Abstract

The present invention proposes an image defect detection system based on cloud services, which relates to the technical field of image detection. It solves the problem that the current integrated image defect detection method on the central processing unit has slow detection speed, low efficiency, and cannot meet the needs of multiple users for defect image detection. The client is used for multiple users to upload images to be detected. Multiple users can issue defect detection request instructions at the client's request port, and deploy several image defect detection models on the cloud server. They are then trained according to user needs. Each image defect detection model is matched with a corresponding image defect detection function and a listening port. The image defect detection model is called and pre-processed, and then the listening port is used to listen to the client to ensure the accuracy of the image defect detection model deployed on the cloud server being called, thereby achieving fast detection speed, high efficiency, and realizing high-concurrency image defect detection for multiple users.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of image detection, and in particular to an image defect detection system based on cloud services. Background Art

[0002] Cloud service, also known as cloud computing service, is an emerging business computing model that provides on-demand and scalable services through the Internet. It distributes computing tasks across a resource pool consisting of a large number of computers, enabling various application systems to obtain computing power, storage controls, and various software services as needed. It not only has strong computing power but is also an ideal replacement for PCs. Deep learning is a deep neural network structure with multiple convolutional layers. Based on its powerful learning and feature extraction capabilities in large amounts of data, applying deep learning technology to image defect detection can improve the quality of image defect detection.

[0003] At present, image defect detection technologies mainly include manual visual recognition and computer recognition. The manual visual recognition method is not only time-consuming, but also may result in missed detection or over-detection. The computer recognition method is mainly based on the theory of deep learning. For example, a method for constructing a target detection model is disclosed in the prior art. This solution generally combines deep learning technology to construct a deep convolutional neural network. The image to be detected is input into the deep convolutional neural network for prediction, and the detection result of the image to be detected can be obtained. However, the prediction and training processes of the deep convolutional neural network are both performed on the central processing unit, which occupies a large amount of computer memory and has a slow detection speed. Therefore, high-performance, high-configuration hardware and environment deployment are required, and defect detection can only be performed on a single image, and defect detection cannot be achieved on highly concurrent images of multiple users. Summary of the Invention

[0004] In order to solve the problem that the current method of performing image defect detection on the central processing unit is slow, inefficient, and cannot meet the needs of detecting defective images of multiple users, the present invention proposes an image defect detection system based on cloud services, which can achieve fast detection speed, high efficiency, and realize high-concurrency image defect detection for multiple users.

[0005] In order to achieve the above technical effects, the technical solutions of the present invention are as follows:

[0006] A cloud service-based image defect detection system, comprising:

[0007] The client is used by multiple users to upload images to be detected, and a request port is provided on the client;

[0008] Several image defect detection models are deployed on the cloud server to detect defects in the images to be inspected. Each image defect detection model is matched with corresponding image defect detection functions.

[0009] The training judgment module is deployed on the cloud server and is used to determine whether the image defect detection model needs to be trained. If so, the GPU cluster of the cloud server is used to perform online training on the image defect detection model that needs to be trained to obtain a trained image defect detection model. The trained image defect detection model is ready for call preprocessing. Otherwise, the image defect detection model that does not need to be trained is called for preprocessing.

[0010] Request transmission module: Each image defect detection model has a listening port. The user selects the corresponding image defect detection model to call according to the defect detection requirements, and sends the defect detection request instruction to the listening port through the client's request port;

[0011] The monitoring judgment module is used to monitor the client and determine whether the monitoring port of the image defect detection model receives the defect detection request instruction sent by the client's request port. If so, the monitoring is successful. The image defect detection model and the client communicate with each other using Socket communication connection technology, and the called image defect detection model performs image defect detection processing on the image to be detected; otherwise, the monitoring continues;

[0012] The analysis module is used to analyze the image defect detection processing results and transmit the results to the client.

[0013] In this technical solution, first, the client is used for multiple users to upload images to be detected. Multiple users can issue defect detection request instructions at the client's request port, and deploy several image defect detection models on the cloud server. The GPU cluster of the cloud server is used to speed up the training of the image defect detection model that needs to be trained. Each image defect detection model is matched with a corresponding image defect detection function and a listening port. Then, the image defect detection models that do not need to be trained and those that have been trained are called pre-processed so that the image defect detection models that do not need to be trained and those that have been trained can be successfully called. In addition, the user sends a defect detection request instruction to the listening port through the request port. If the listening port receives the information that the request instruction is issued by the client's request port, it proves that the request port is consistent with the listening port. Socket communication connection technology is used to enable the image defect detection model deployed on the cloud server to communicate with the client, thereby ensuring the accuracy of the image defect detection model deployed on the cloud server being called, achieving fast detection speed and high efficiency, and realizing high-concurrency image defect detection for multiple users.

[0014] Preferably, the request transmission module, monitoring judgment module and analysis module are also deployed on the cloud server, avoiding calculation processing on the central processing unit.

[0015] Preferably, whether the image defect detection model needs to be trained is selected based on user needs. The image defect detection model itself has statistical functions, statistically analyzes its own historical usage and feeds back to the user. The user chooses to train the image defect detection model whose usage frequency is greater than the frequency threshold.

[0016] Preferably, calling preprocessing refers to preparing to monitor a trained image defect detection model or an image defect detection model that does not require training, deploying the monitoring port of the trained image defect detection model or the image defect detection model that does not require training on the cloud server to monitor the request port of the client, and actively inquiring whether the user who has securely logged into the client has uploaded the image to be detected based on the IO multiplexing technology event poll, actively sending the request instruction for pre-defect detection to the handler interface on the cloud server, and assigning it to different processing threads for processing. The processing threads are divided into One-Stage first thread and Two-Stage second thread. The two threads contain different coroutines, each coroutine represents an image defect detection model, and the images to be detected uploaded by the user are stored in the processing queue in sequence and are defect-detected in a certain order. Different coroutines can jump to each other.

[0017] Preferably, the specific steps of online training the image defect detection model to be trained include:

[0018] S1. Obtain a certain number of image samples to form an image dataset;

[0019] S2. Annotate the ground-truth bounding box of the defect location of each image sample to obtain an image annotation sample corresponding to each image sample;

[0020] S3. Preprocess the image dataset and divide the image annotation samples corresponding to the image samples in the image dataset into a training set, a validation set, and a test set;

[0021] S4. Input the image annotation samples in the training set into the image defect detection model to be trained. The image defect detection model is trained on the image annotation samples in the training set for n rounds, and then the loss function is used to measure the effect of the image defect detection model training.

[0022] S5. On the client, adjust the hyperparameters of the image defect detection model. Input the annotated image samples from the validation set into the image defect detection model during training to generate detection bounding boxes for the annotated image samples. Then, use the validation set to evaluate the image defect detection model during training. Output the ratio of the intersection of the detection bounding box and the ground-truth bounding box to the union of the detection bounding box and the ground-truth bounding box, i.e., the intersection over union (IOU). Determine whether the IOU is greater than a first threshold. If so, fix the hyperparameters for the resulting IOU result and execute step S6. Otherwise, return to S4.

[0023] S6. Input the test set into the image defect detection model in the training process, obtain the mean average precision (mAP) that measures the detection accuracy based on the output results, set a second threshold, and determine whether the mean average precision (mAP) is greater than the second threshold. If so, output the image defect detection model; otherwise, return to step S4.

[0024] Here, the image annotation samples corresponding to the image samples in the image dataset are divided into training set, validation set and test set. The image defect detection model is trained using the training set, and then the image defect detection model in the training process is evaluated using the validation set. The effectiveness of the image defect detection model is tested using the test set, and finally the trained image defect detection model is obtained.

[0025] Preferably, in step S4, the common parameters and weights of the image defect detection model to be trained are updated by gradient descent during the training process.

[0026] Preferably, in step S5, the hyperparameters include the number of iterations and the learning rate, and the learning rate is adjusted in the order of 0.1, 0.001, 0.0001, and 0.00001.

[0027] Preferably, in step S6, the image defect detection model is tested using a test set, and the predicted bounding box of the defect position in the image annotation sample of the test set and the classification probability of the predicted bounding box are output, wherein different confidence thresholds are set to determine whether the classification probability is greater than or equal to the confidence threshold. If so, the target in the predicted bounding box is classified as a positive sample; otherwise, the target in the predicted bounding box is classified as a negative sample, and then the positive and negative samples are analyzed and processed to obtain several groups of precision rates P and recall rates R.

[0028] Preferably, in step S6, when determining the classification probability, there may be correct judgments and incorrect judgments. The calculation formula for the accuracy rate P is as follows:

[0029]

[0030] Among them, TP represents the number of correctly judged positive samples, and FP represents the number of incorrectly judged positive samples; the calculation formula for the recall rate R is as follows:

[0031]

[0032] Among them, FN represents the number of samples that are incorrectly judged as negative;

[0033] In each set of precision P and recall R, R is used as the horizontal coordinate and P as the vertical coordinate to obtain several coordinate points (R, P). The RP curve is drawn using the above coordinate points (R, P). Several peak points will appear on the RP curve. A line segment is drawn to the left of each peak point until it intersects with the vertical line of the previous peak point. The area enclosed by the drawn line segment and the coordinate axis is set as the average precision AP. The image annotation samples are equipped with defect category labels. The calculation formula for the mean average precision mAP is as follows:

[0034]

[0035] Where q is the different defect categories, AP is the average precision, AP(q) is the average precision of all defect categories, Q R is a set of defect categories.

[0036] Preferably, the entire online training process of the image defect detection model is deployed on the GPU cluster of the cloud server.

[0037] Compared with the prior art, the beneficial effects of the technical solution of the present invention are:

[0038] The present invention proposes an image defect detection system based on cloud services. First, a client is used for multiple users to upload images to be detected. Multiple users can issue defect detection request instructions at the client's request port, and deploy several image defect detection models on the cloud server. The GPU cluster of the cloud server is used to speed up the training speed of the image defect detection model that needs to be trained. Each image defect detection model is matched with a corresponding image defect detection function and a listening port. Then, the image defect detection models that do not need to be trained and those that have been trained are called and preprocessed so that the image defect detection models that do not need to be trained and those that have been trained can be successfully called. In addition, the user sends a defect detection request instruction to the listening port through the request port. If the listening port receives the defect detection request instruction issued by the client's request port, it proves that the request port is consistent with the listening port. Socket communication connection technology is used to enable the image defect detection model deployed on the cloud server to communicate with the client, thereby ensuring the accuracy of the image defect detection model deployed on the cloud server being called, achieving fast detection speed and high efficiency, and realizing high-concurrency image defect detection for multiple users. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] Figure 1 A structural diagram showing a cloud service-based image defect detection system proposed in Example 1 of the present invention;

[0040] Figure 2 This figure shows a block diagram of the multi-channel IO multiplexing high-concurrency processing work proposed in Example 1 of the present invention;

[0041] Figure 3 A diagram showing the steps of online training of the image defect detection model proposed in Example 2 of the present invention;

[0042] Figure 4 It represents the RP curve proposed in Example 3 of the present invention. DETAILED DESCRIPTION

[0043] The accompanying drawings are for illustrative purposes only and are not to be construed as limiting this patent;

[0044] In order to better illustrate the present embodiment, some parts of the drawings may be omitted, enlarged, or reduced, and do not represent actual sizes. The description of the directions of parts such as "upper" and "lower" does not limit this patent;

[0045] It is understandable to those skilled in the art that some well-known contents may be omitted in the drawings;

[0046] The positional relationships described in the drawings are for illustrative purposes only and should not be construed as limiting this patent.

[0047] The technical solution of the present invention is further described below with reference to the accompanying drawings and embodiments.

[0048] Example 1

[0049] Figure 1 The structure diagram of the image defect detection system based on cloud service proposed in embodiment 1 of the present invention is shown in FIG. Figure 1 , including the following systems:

[0050] Client 11, used for multiple users to upload images to be detected, and a request port is provided on the client;

[0051] Several image defect detection models 12 are deployed on the cloud server and are used to detect defects in the image to be detected. Each image defect detection model is matched with a corresponding image defect detection function.

[0052] The training judgment module 13 is deployed on the cloud server and is used to determine whether the image defect detection model needs to be trained. Whether the image defect detection model needs to be trained is selected based on user needs. The image defect detection model itself has a statistical function, which statistically analyzes its own historical usage and provides feedback to the user. The user selects an image defect detection model with a usage frequency greater than a frequency threshold for training. If the judgment result is that training is required, the GPU cluster of the cloud server is used to perform online training on the image defect detection model that needs to be trained to obtain a trained image defect detection model. The trained image defect detection model waits for call preprocessing; otherwise, the image defect detection model that does not need training is called for preprocessing;

[0053] In the training judgment module 13, calling preprocessing means preparing to monitor the trained image defect detection model or the image defect detection model that does not need to be trained. The monitoring port of the trained image defect detection model or the image defect detection model that does not need to be trained is deployed on the cloud server and monitors the client's request port. Based on the IO multiplexing technology event poll, it actively queries whether the user who has securely logged in to the client has uploaded the image to be detected. Figure 2 , the request instruction for pre-defect detection is actively sent to the handler interface on the cloud server and assigned to different processing threads for processing. The processing threads are divided into One-Stage first thread and Two-Stage second thread. The two threads contain different coroutines, each coroutine represents an image defect detection model. The images to be detected uploaded by the user are stored in the processing queue in sequence and are defect-detected in a certain order. Different coroutines can jump to each other, that is, different image defect detection models can jump to each other. For example, the first image defect detection model can jump to the n+1th image defect detection model. When calling an image defect detection model, the image defect detection model can be temporarily stopped and another image defect detection model can be called. Among them, the use of coroutines can customize the running direction of the thread, avoiding the problem that a user inputs a large number of detection images and has to wait until the image defect detection of another user is completed before processing, ensuring that each user can complete image defect detection in a short time;

[0054] Request transmission module 14: Each image defect detection model is equipped with a listening port. The user selects the corresponding image defect detection model to call according to the defect detection requirements, and sends a defect detection request instruction to the listening port through the client's request port. The listening port of each image defect detection model is different. To ensure the accuracy of calling the image defect detection model, the client's request port needs to send a defect detection request instruction to the listening port. Only after the listening port receives the information can the connection between the client and the image defect detection model be completed, realizing communication and data transmission;

[0055] The monitoring judgment module 15 is used to monitor the client. The traditional select / poll technology, when multiple users have securely logged in to the client, there will be users who do not perform image defect detection. Each call of the select / poll technology will linearly scan the status of all client devices. The client device status refers to whether the user uploads the image to be detected on the client or not, resulting in a decrease in detection performance. Therefore, in this monitoring judgment module, the IO multiplexing technology eventpoll is used to actively monitor whether the client has input photos at all times, ensuring that multiple users perform image defect detection at the same time, improving detection performance, and determining whether the monitoring port of the image defect detection model receives the request instruction for defect detection issued by the client's request port. If so, the monitoring is successful. Socket communication connection technology refers to two programs on the network exchanging data through a bidirectional communication connection. One end of this connection is called a socket. Establishing a network communication connection requires at least a pair of port numbers. When the port numbers are consistent, the server and the client can complete a long connection to achieve data transmission. Therefore, this embodiment adopts the socket communication connection technology. The image defect detection model communicates with the client, and the called image defect detection model performs image defect detection processing on the image to be detected; otherwise, the monitoring continues;

[0056] The analysis module 16 is used to analyze the results of the image defect detection process and transmit the results to the client.

[0057] Example 2

[0058] See also Figure 3 The specific steps for online training of the image defect detection model to be trained include:

[0059] S1. Obtain a certain number of image samples to form an image dataset;

[0060] S2. Annotate the ground-truth bounding box of the defect location of each image sample to obtain an image annotation sample corresponding to each image sample;

[0061] S3. Preprocess the image dataset and divide the image annotation samples corresponding to the image samples in the image dataset into a training set, a validation set, and a test set;

[0062] S4. Input the annotated image samples from the training set into the image defect detection model to be trained. The image defect detection model is trained on the annotated image samples from the training set for n rounds, and the training effect of the image defect detection model is measured using a loss function. During the training process, the common parameters and weights of the image defect detection model to be trained are updated using gradient descent.

[0063] S5. Adjust the hyperparameters of the image defect detection model on the client. Input the annotated image samples in the validation set into the image defect detection model during training to generate detection boxes for the annotated image samples. Then, use the validation set to evaluate the image defect detection model during training. Output the ratio of the intersection of the detection box and the ground-truth bounding box to the union of the detection box and the ground-truth bounding box, i.e., the intersection-over-union (IOU) ratio. Determine whether the IOU ratio is greater than a first threshold. If so, fix the hyperparameters of the IOU ratio result and execute step S6. Otherwise, return to S4. The hyperparameters include the number of iterations and the learning rate. The learning rate is adjusted in the order of 0.1, 0.001, 0.0001, and 0.00001.

[0064] S6. Input the test set into the image defect detection model in the training process, obtain the mean average precision (mAP) that measures the detection accuracy based on the output results, set a second threshold, and determine whether the mean average precision (mAP) is greater than the second threshold. If so, output the image defect detection model; otherwise, return to step S4.

[0065] Among them, the entire online training process of the image defect detection model is deployed on the GPU cluster of the cloud server.

[0066] Example 3

[0067] See also Figure 3 and Figure 4 In step S6, the image defect detection model is tested using the test set, and the predicted bounding box of the defect location in the image annotation sample of the test set and the classification probability of the predicted bounding box are output. Among them, three groups of confidence thresholds are set, namely 0.9, 0.8 and 0.7, to determine whether the classification probability is greater than or equal to the confidence threshold. If so, the target in the predicted bounding box is classified as a positive sample; otherwise, the target in the predicted bounding box is classified as a negative sample. Then, the positive and negative samples are analyzed and processed to obtain the precision P and recall R corresponding to each group of confidence thresholds. When judging the classification probability, there will be correct judgments and incorrect judgments. The calculation formula for the precision P is as follows:

[0068]

[0069] Among them, TP represents the number of samples correctly judged as positive, and FP represents the number of samples incorrectly judged as positive;

[0070] The calculation formula for recall rate R is as follows:

[0071]

[0072] Among them, FN represents the number of samples that are incorrectly judged as negative;

[0073] Set the first set of threshold confidence thresholds to 0.9, and obtain a recall rate R of 0.33 and a precision rate P of 1; set the second set of threshold confidence thresholds to 0.8, and obtain a recall rate R of 0.33 and a precision rate P of 0.5; set the third set of threshold confidence thresholds to 0.7, and obtain a recall rate R of 0.67 and a precision rate P of 0.67; in each set of precision P and recall rate R, use R as the horizontal coordinate and P as the vertical coordinate to obtain three coordinate points (R, P), which are (0.33, 1), (0.33, 0.5) and (0.67, 0.67), respectively. Use the above coordinate points (R, P) to draw the RP curve. There will be two peak points on the RP curve. Draw a line segment to the left of each peak point until it intersects with the vertical line of the previous peak point. The area enclosed by the drawn line segment and the coordinate axis is set as the average precision AP. The image annotation samples are provided with defect category labels. The calculation formula for the mean average precision mAP is as follows:

[0074]

[0075] Where q is the different defect categories, AP is the average precision, AP(q) is the average precision of all defect categories, Q R is a set of defect categories.

[0076] Obviously, the above embodiments of the present invention are merely examples for the purpose of clearly illustrating the present invention, and are not intended to limit the embodiments of the present invention. Those skilled in the art will appreciate that other variations or modifications can be made based on the above description. It is not necessary and impossible to enumerate all embodiments here. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention shall be included within the scope of protection of the claims of the present invention.

Claims

1. A cloud-based image defect detection system, characterized in that: The system comprises: The client is used by multiple users to upload images to be detected, and a request port is provided on the client; Several image defect detection models are deployed on the cloud server to detect defects in the images to be inspected. Each image defect detection model is matched with corresponding image defect detection functions. The training judgment module is deployed on the cloud server and is used to determine whether the image defect detection model needs to be trained. If so, the GPU cluster of the cloud server is used to perform online training on the image defect detection model that needs to be trained to obtain a trained image defect detection model. The trained image defect detection model waits for call preprocessing. Otherwise, the image defect detection model that does not need to be trained is called for preprocessing. Call preprocessing refers to monitoring preparation for the trained image defect detection model or the image defect detection model that does not need to be trained. The listening port of the trained image defect detection model or the image defect detection model that does not need to be trained is deployed on the request port of the client that listens to the cloud server. Based on the IO multiplexing technology event poll, it actively queries whether the user who has securely logged into the client has uploaded the image to be detected. The request instruction for pre-defect detection is actively sent to the handler interface on the cloud server and assigned to different processing threads for processing. The processing threads are divided into a one-stage first thread and a two-stage second thread. The two threads contain different coroutines, each coroutine representing an image defect detection model. The images to be detected uploaded by the user are stored in the processing queue in sequence and are detected for defects in a certain order. Different coroutines can jump to each other. The specific steps for online training of the image defect detection model to be trained include: S1. Obtain a certain number of image samples to form an image dataset; S2. Annotate the ground-truth bounding box of the defect location of each image sample to obtain an image annotation sample corresponding to each image sample; S3. Preprocess the image dataset and divide the image annotation samples corresponding to the image samples in the image dataset into a training set, a validation set, and a test set; S4. Input the image annotation samples in the training set into the image defect detection model to be trained. The image defect detection model is trained on the image annotation samples in the training set for n rounds, and then the loss function is used to measure the effect of the image defect detection model training. S5. On the client, adjust the hyperparameters of the image defect detection model. Input the annotated image samples from the validation set into the image defect detection model during training to generate detection bounding boxes for the annotated image samples. Then, use the validation set to evaluate the image defect detection model during training. Output the ratio of the intersection of the detection bounding box and the ground-truth bounding box to the union of the detection bounding box and the ground-truth bounding box, i.e., the intersection over union (IOU). Determine whether the IOU is greater than a first threshold. If so, fix the hyperparameters for the resulting IOU result and execute step S6. Otherwise, return to S4. S6. Input the test set into the image defect detection model during training, obtain the mean average precision (mAP) as a measure of detection accuracy based on the output results, set a second threshold, and determine whether the mean average precision (mAP) is greater than the second threshold. If so, output the image defect detection model; otherwise, return to step S4; Request transmission module: Each image defect detection model has a listening port. The user selects the corresponding image defect detection model to call according to the defect detection requirements, and sends the defect detection request instruction to the listening port through the client's request port; The monitoring and judgment module is used to utilize the event poll technology of IO multiplexing to actively monitor whether the client has input photos at all times and determine whether the monitoring port of the image defect detection model has received the defect detection request instruction sent by the client's request port. If so, the monitoring is successful. Using the Socket communication connection technology, the image defect detection model and the client communicate with each other, and the called image defect detection model performs image defect detection processing on the image to be detected; otherwise, the monitoring continues; The analysis module is used to analyze the results of image defect detection processing and transmit the results to the client.

2. The cloud-based image defect detection system according to claim 1, characterized in that: The request transmission module, monitoring judgment module and analysis module are also deployed on the cloud server.

3. The cloud-based image defect detection system according to claim 2, characterized in that: Whether the image defect detection model needs to be trained is determined by user needs. The image defect detection model itself has statistical functions, which statistically analyzes its own historical usage and provides feedback to the user. The user selects an image defect detection model with a usage frequency greater than a frequency threshold for training.

4. The cloud-based image defect detection system according to claim 1, characterized in that: In step S4, the common parameters and weights of the image defect detection model to be trained are updated by using a gradient descent method during the training process.

5. The cloud-based image defect detection system according to claim 1, characterized in that: In step S5, the hyperparameters include the number of iterations and the learning rate, and the learning rate is adjusted in the order of 0.1, 0.001, 0.0001, and 0.00001.

6. The cloud-based image defect detection system according to claim 1, characterized in that: In step S6, the image defect detection model is tested using a test set, and the predicted bounding box of the defect location in the image annotation sample of the test set and the classification probability of the predicted bounding box are output. Different confidence thresholds are set to determine whether the classification probability is greater than or equal to the confidence threshold. If so, the target in the predicted bounding box is classified as a positive sample; otherwise, the target in the predicted bounding box is classified as a negative sample. The positive and negative samples are then analyzed and processed to obtain several groups of precision P and recall R.

7. The cloud-based image defect detection system according to claim 6, characterized in that: In step S6, when determining the classification probability, there may be correct judgments and incorrect judgments. The calculation formula for the accuracy rate P is as follows: Among them, TP represents the number of samples correctly judged as positive, and FP represents the number of samples incorrectly judged as positive; The calculation formula for recall rate R is as follows: Among them, FN represents the number of samples that are incorrectly judged as negative; In each set of precision P and recall R, use R as the horizontal coordinate and P as the vertical coordinate to obtain several coordinate points (R, P). Use the above coordinate points (R, P) to draw the RP curve. Several peak points will appear on the RP curve. Draw a line segment to the left of each peak point until it intersects with the vertical line of the previous peak point. The area enclosed by the drawn line segment and the coordinate axis is set as the average precision AP. The image annotation samples are equipped with defect category labels. The calculation formula for the mean average precision mAP is as follows: Where q is the different defect categories, AP is the average precision, AP(q) is the average precision of all defect categories, Q R is a set of defect categories.

8. The cloud-based image defect detection system according to claim 1, wherein: The entire online training process of the image defect detection model is deployed on the GPU cluster of the cloud server.

Citation Information

Patent Citations

  • Multi-user co-simulation resource scheduling method for aero-engine control system

    CN107292500A

  • Multi-person online semi-automatic image labeling method and system

    CN112966772A