Brake disc surface quality detection method and system
By acquiring and preprocessing the brake disc surface image data in real time, and using deep learning algorithms to train the detection model to detect defects on the brake disc surface, the problems of low detection accuracy and insufficient adaptability in the prior art are solved, and efficient and accurate detection effects are achieved.
Patent Information
- Application Number
- CN202411896729.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-23
- Publication Date
- 2025-04-04
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
In the prior art, the detection accuracy of brake disc surface quality detection is not high and the adaptability is not strong. Especially when facing complex and variable brake disc surface defects, it is difficult to achieve ideal detection results.
A brake disc surface quality detection method and system are used to obtain brake disc surface image data in real time, perform picture preprocessing, and use a deep learning algorithm based on PatchCore to train the surface of the brake disc to detect defects. When a defect is detected, the alarm mechanism is triggered.
It improves detection accuracy and adaptability, realizes automated and intelligent detection, reduces the risks of missed and missed inspections, and provides data support to enterprises to help continuously improve product quality and production processes.
Smart Images

Figure CN119762468A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of brake disc quality detection, and in particular to a brake disc surface quality detection method and system. Background Art
[0002] In the traditional brake disc quality inspection process, manual visual inspection or simple mechanical inspection methods are mainly relied on. These methods are not only inefficient, but also prone to missed inspections or misdetections, resulting in unstable product quality and increased safety hazards. With the development of Industry 4.0 and smart manufacturing, automated and intelligent inspection methods have become a trend. However, existing automatic inspection systems often have problems such as low detection accuracy and poor adaptability. Especially when faced with complex and changeable brake disc surface defects, it is difficult to achieve ideal inspection results. Therefore, there is an urgent need for a method and system that can efficiently and accurately detect brake disc surface defects. Summary of the invention
[0003] In view of the above-mentioned technical deficiencies, the purpose of the present invention is to provide a brake disc surface quality detection method and system to solve the problems of low detection accuracy and poor adaptability in the prior art.
[0004] In order to solve the above technical problems, the present invention adopts the following technical solutions: In a first aspect, the present invention provides a method for detecting the surface quality of a brake disc, the method comprising: Step S100: acquiring brake disc surface image data in real time; Step S200: performing image preprocessing on the brake disc surface image data; Step S300: using a deep learning algorithm based on PatchCore to train a surface quality detection model; Step S400: using a surface quality inspection model to perform defect inspection on the brake disc surface; Step S500: When a defect is detected, an alarm mechanism is triggered.
[0005] Preferably, in a possible implementation manner of the first aspect, the brake disc surface image data is acquired by an industrial camera deployed in a brake disc quality inspection area.
[0006] Preferably, in a possible implementation manner of the first aspect, the image preprocessing includes image denoising, contrast enhancement and image size adjustment.
[0007] Preferably, in a possible implementation manner of the first aspect, the surface quality detection model is trained using historical brake disc surface images.
[0008] Preferably, in a possible implementation manner of the first aspect, the quality detection model structure includes: Feature extraction layer: used to extract feature vectors from the brake disc surface image; Core set construction layer: construct the core set using the feature vectors of historical normal brake disc surface images; Distance calculation layer: calculates the distance between the feature vector of the test sample and the feature vector in the core set; Anomaly score calculation layer: Based on the distance calculation results, the anomaly score is calculated for each test sample; Decision layer: compare anomaly score with anomaly score threshold Preferably, in a possible implementation manner of the first aspect, step S400 specifically includes: Input the pre-processed brake disc surface image data into the trained surface quality detection model; The model uses the feature extraction layer to extract feature vectors from the image; The distance between the extracted feature vector and the feature vector in the core set is calculated to obtain the distance result; Based on the distance results, calculate the anomaly score for each test sample; The anomaly score is compared with a preset threshold. If the anomaly score exceeds the threshold, it is determined that there is a defect on the brake disc surface.
[0009] Preferably, in a possible implementation manner of the first aspect, step S500 specifically includes: When the defect detection module determines that there is a defect on the brake disc surface, an alarm signal is triggered; Activate the sound and light alarm device to sound a sound and light alarm; The image data of the defective brake disc is saved in the database.
[0010] In a second aspect, the present invention provides a brake disc surface quality detection system, the system comprising: Image acquisition module, used to obtain image data of the brake disc surface in real time; The preprocessing module performs preprocessing operations such as denoising, contrast enhancement, and image size adjustment on the collected image data; The model training module uses a deep learning algorithm based on PatchCore to train a surface quality detection model using historical brake disc surface image data; The defect detection module receives the preprocessed image data, performs defect detection using the trained surface quality detection model, and outputs the detection results; Alarm module: When the defect detection module detects defects on the brake disc surface, the alarm mechanism is triggered, an audible and visual alarm is sounded, and the defect data is saved in the database.
[0011] The beneficial effects of the present invention are: by acquiring the image data of the brake disc surface in real time and performing image preprocessing, the image quality is improved, providing a reliable basis for subsequent detection. The surface quality detection model is trained using a deep learning algorithm based on PatchCore, which can make full use of historical data and improve the detection accuracy and adaptability of the model. During the detection process, the trained model is used to detect defects on the brake disc surface, and the detection results are output, realizing automated and intelligent detection. When a defect is detected, the alarm mechanism is triggered, the alarm sounds in time, and the defect data is saved to the database for subsequent analysis and processing. This not only improves the detection efficiency and reduces the risk of missed detection and false detection, but also provides data support for enterprises, which helps to continuously improve product quality and production processes. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0013] Figure 1 A flow chart of a brake disc surface quality detection method is provided for this application.
[0014] Figure 2 A brake disc surface quality detection system structure diagram is provided for this application.
[0015] Explanation of the accompanying drawings: 1-image acquisition module, 2-preprocessing module, 3-model training module, 4-defect detection module, 5-alarm module. DETAILED DESCRIPTION
[0016] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0017] Embodiment 1: Figure 1 As shown, the present invention provides a brake disc surface quality detection method, comprising: Step S100: Acquire brake disc surface image data in real time.
[0018] Specifically, the brake disc surface image data is obtained through an industrial camera deployed in the brake disc quality inspection area. After the industrial camera obtains the brake disc surface image data, it transmits the image to the data center.
[0019] In this embodiment, the industrial camera uses Basler ace acA640-120gm, and the Basler ace acA640-120gm camera and the control center use a wired Ethernet transmission method based on the GigE Vision standard for data transmission. GigE Vision is a machine vision communication protocol based on standard Ethernet technology, allowing the camera to transmit data to the control center through a network cable. This method is high-speed, stable, and reliable, and is suitable for real-time image acquisition and transmission tasks.
[0020] In the Basler ace acA640-120gm camera, the GigE interface enables the camera to be directly connected to an Ethernet network and communicate with a control center via the network. The control center receives and processes the image data transmitted by the camera by installing the pylon camera software suite provided by Basler.
[0021] Specifically, when the Basler ace acA640-120gm camera collects images of the brake disc surface in real time, it sends the image data to the Ethernet network via the GigE interface. The control center receives the image data through the Ethernet interface and processes and analyzes it. Since the GigE Vision protocol supports high-speed data transmission and real-time performance, it ensures that the control center can obtain image information of the brake disc surface in real time and perform subsequent image processing and quality inspection tasks.
[0022] Step S200: performing image preprocessing on the brake disc surface image data.
[0023] Specifically, after receiving the brake disc surface image data, the control center preprocesses the image, which includes image denoising, contrast enhancement and image size adjustment.
[0024] In this embodiment, a function named preprocess_image is first defined, which receives two parameters: image_path and output_size. Image_path is a string type parameter used to specify the path of the input image; output_size is a tuple type parameter used to specify the size of the output image.
[0025] Inside the function, use the cv2.imread() function to read the image specified by image_path and store the read image data in the variable image. If image is empty (that is, the image cannot be read), a ValueError exception is thrown and an error message is output, indicating the image path that cannot be read.
[0026] Next, the read image is denoised. Use the cv2.medianBlur() function to perform median filtering to reduce the noise in the image. The second parameter of the function is the kernel size of the filter, which is set to 5 in this embodiment. The denoised image data is stored in the variable denoised_image.
[0027] Then, the denoised image is contrast enhanced. First, use the cv2.createCLAHE() function to create a contrast-limited adaptive histogram equalization (CLAHE) object, where the clipLimit parameter is set to 2.0 to control the degree of contrast enhancement; the tileGridSize parameter is set to (8, 8) to specify the size of each small grid. Then, use the clahe.apply() function to perform contrast enhancement on the denoised image, and the processed image data is stored in the variable contrast_enhanced_image.
[0028] Finally, the contrast-enhanced image is resized. The cv2.resize() function is used to resize the image to the size specified by output_size, where the interpolation parameter is set to cv2.INTER_LINEAR, indicating that linear interpolation is used for scaling. The resized image data is stored in the variable preprocessed_image and used as the return value of the function.
[0029] Step S300: Using a deep learning algorithm based on PatchCore to train a surface quality detection model.
[0030] Specifically, the surface quality detection model is trained using historical brake disc surface images, which are obtained from the control center. The quality detection model structure includes: feature extraction layer: used to extract feature vectors from brake disc surface images; core set construction layer: using feature vectors of historical normal brake disc surface images to construct core sets; distance calculation layer: calculating the distance between the feature vector of the test sample and the feature vector in the core set; anomaly score calculation layer: based on the distance calculation results, calculating the anomaly score for each test sample; decision layer: comparing the anomaly score with the anomaly score threshold In this embodiment, a quality inspection data set is first established based on historical brake disc surface images, and LabelImg is selected as the annotation tool. For linear defects such as scratches and cracks, polygonal annotation is used to accurately depict their shapes; for regional defects such as spots and rust, rectangular or circular annotation is used to circle their range. After the annotation is completed, the export function of LabelImg is used to export the annotation results to json format, and the original image and annotation file are saved. The annotated quality inspection data set is divided into quality inspection training set, quality inspection verification set and quality inspection test set according to 8:1:1.
[0031] A quality detection model is received and constructed. The quality detection model includes a feature extraction layer, a core set construction layer, a distance calculation layer, an anomaly score calculation layer, and a decision layer.
[0032] The feature extraction layer contains a feature extractor (FeatureExtractor), which uses the pre-trained ResNet50 model as its main structure. In order to extract the feature vector of the image, the last classification layer of the ResNet50 model is removed. During the forward propagation of the feature extractor, the input image data will be processed by the ResNet50 model and finally the feature vector of the image will be output.
[0033] The core set construction layer constructs a core set builder (CoreSetBuilder) to build a core set from a normal image. The core set builder receives the feature vector output by the feature extractor as input and sets a memory_size parameter to limit the number of feature vectors in the core set. In the process of building the core set, the feature vectors of the normal image are first extracted using the feature extractor and stored in a list. Then, the feature vectors in this list are randomly shuffled and the first memory_size feature vectors are selected as the core set.
[0034] The distance calculation layer contains a distance calculator (DistanceCalculator) that calculates the distance between the feature vector of the test image and the feature vector in the core set. The distance calculator receives the feature vector of the test image and the core set as input and calculates the cosine similarity between the feature vector of the test image and each feature vector in the core set. The similarity is then converted to a distance for subsequent calculation of the anomaly score.
[0035] The anomaly score calculation layer contains an anomaly score calculator (AnomalyScoreCalculator), which is used to calculate the anomaly score based on the distance between the test image and the core set. The initialization process of the anomaly score calculator includes setting a distance threshold (distance_threshold). When calculating the anomaly score, the maximum distance between the image and the core set is used as the anomaly score.
[0036] The decision layer contains a decision maker (DecisionMaker), which is used to determine whether the test image is an abnormal image based on the anomaly score. The initialization process of the decision maker includes setting an anomaly score threshold (anomaly_threshold). When determining whether the test image is an abnormal image, the anomaly score is compared with the anomaly score threshold. If the anomaly score is greater than the anomaly score threshold, the test image is considered to be an abnormal image; otherwise, the test image is considered to be a normal image.
[0037] For the anomaly score threshold, the precision-recall curve (PR curve) is plotted based on the true labels and calculated anomaly scores in the validation dataset. The PR curve shows the relationship between precision and recall under different thresholds. According to the shape of the curve and the performance indicators, the threshold that makes the comprehensive performance of the model on the validation set reach the best is selected as the anomaly score threshold.
[0038] Step S400: Use a surface quality inspection model to perform defect inspection on the brake disc surface.
[0039] Specifically, the preprocessed brake disc surface image data is input into the trained surface quality detection model; the model uses the feature extraction layer to extract the feature vector in the image; the distance between the extracted feature vector and the feature vector in the core set is calculated to obtain the distance result; based on the distance result, the anomaly score of each test sample is calculated; the anomaly score is compared with the preset threshold, and if the anomaly score exceeds the threshold, it is determined that the brake disc surface has defects.
[0040] In this embodiment, in the brake disc quality inspection process, the pre-processed brake disc surface image data is input into a surface quality inspection model that has been trained and optimized.
[0041] The model first uses the feature extraction layer to perform deep feature extraction on the input brake disc surface image. The feature extractor in the feature extraction layer analyzes each pixel in the image to capture subtle features of the brake disc surface, such as texture, color changes, and possible defect morphology. These features are encoded into high-dimensional feature vectors.
[0042] The extracted feature vectors are then fed into the core set construction layer for distance calculation. The core set construction layer stores a core set consisting of feature vectors extracted from historical normal brake disc surface images. These feature vectors represent typical features of a normal brake disc surface. The model evaluates the similarity between the current test sample and the normal brake disc surface by calculating the distance between the feature vector of the current test sample and each feature vector in the core set.
[0043] The result of the distance calculation is passed to the anomaly score calculation layer. In this layer, the model calculates an anomaly score for each test sample based on the size of the distance. The anomaly score reflects the degree of deviation of the test sample from the surface characteristics of a normal brake disc. If the feature vector of the test sample is far away from the feature vector in the core set, then its anomaly score will be high, indicating that it may be an abnormal sample, that is, a defective brake disc.
[0044] Finally, the decision layer compares the calculated anomaly score with the preset threshold. This threshold is optimized during the model training process based on the performance of the validation data set to ensure that the model can accurately distinguish between normal and abnormal brake disc surfaces. If the anomaly score of the test sample exceeds the preset threshold, the model will determine that the brake disc surface is defective and output the corresponding test result.
[0045] Step S500: When a defect is detected, an alarm mechanism is triggered.
[0046] Specifically, when the defect detection module determines that there are defects on the surface of the brake disc, an alarm signal is triggered; the sound and light alarm device is started to sound an sound and light alarm; and the image data of the defective brake disc is saved in a database.
[0047] In this embodiment, when the surface quality detection model in the brake disc surface quality detection process determines that a brake disc surface has defects, an alarm signal will be generated inside the system to activate the sound and light alarm device. This device is usually installed in the brake disc quality detection control room so that relevant personnel can intuitively see and hear the alarm information. The sound and light alarm device will emit sound and light signals to attract the attention of personnel.
[0048] At the same time, the system will also save the image data of the defective brake disc to the database. After the image data of the defective brake disc is saved to the database, relevant personnel can obtain this information by querying the database for further analysis and processing of the defects. In addition, the database can also be used to record the historical data of brake disc quality inspection for quality traceability and statistical analysis.
[0049] Embodiment 2: Figure 2 As shown, the present invention provides a brake disc surface quality detection system, comprising: Image acquisition module 1, used to obtain image data of the brake disc surface in real time; Preprocessing module 2 performs preprocessing operations such as denoising, contrast enhancement, and image size adjustment on the collected image data; Model training module 3 uses a deep learning algorithm based on PatchCore to train a surface quality detection model using historical brake disc surface image data; Defect detection module 4 receives the preprocessed image data, performs defect detection using the trained surface quality detection model, and outputs the detection results; Alarm module 5, when the defect detection module detects defects on the brake disc surface, it triggers the alarm mechanism, emits an audible and visual alarm, and saves the defect data to the database.
[0050] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.
Claims
1. A method for detecting the surface quality of a brake disc, characterized in that: The method comprises: Step S100: acquiring brake disc surface image data in real time; Step S200: performing image preprocessing on the brake disc surface image data; Step S300: using a deep learning algorithm based on PatchCore to train a surface quality detection model; Step S400: using a surface quality inspection model to perform defect inspection on the brake disc surface; Step S500: When a defect is detected, an alarm mechanism is triggered.
2. The brake disc surface quality detection method according to claim 1, characterized in that: The brake disc surface image data is acquired through an industrial camera deployed in a brake disc quality inspection area.
3. The brake disc surface quality detection method according to claim 1, characterized in that: The image preprocessing includes image denoising, contrast enhancement and image size adjustment.
4. The brake disc surface quality detection method according to claim 1, characterized in that: The surface quality detection model is trained using historical brake disc surface images.
5. The brake disc surface quality detection method according to claim 4, characterized in that: The quality detection model structure includes: Feature extraction layer: used to extract feature vectors from the brake disc surface image; Core set construction layer: construct the core set using the feature vectors of historical normal brake disc surface images; Distance calculation layer: calculates the distance between the feature vector of the test sample and the feature vector in the core set; Anomaly score calculation layer: Based on the distance calculation results, the anomaly score is calculated for each test sample; Decision layer: compares the anomaly score with the anomaly score threshold.
6. The brake disc surface quality detection method according to claim 5, characterized in that: The step S400 specifically includes: Input the pre-processed brake disc surface image data into the trained surface quality detection model; The model uses the feature extraction layer to extract feature vectors from the image; The distance between the extracted feature vector and the feature vector in the core set is calculated to obtain the distance result; Based on the distance results, calculate the anomaly score for each test sample; The anomaly score is compared with a preset threshold. If the anomaly score exceeds the threshold, it is determined that there is a defect on the brake disc surface.
7. The brake disc surface quality detection method according to claim 1, characterized in that: The step S500 specifically includes: When the defect detection module determines that there is a defect on the brake disc surface, an alarm signal is triggered; Activate the sound and light alarm device to sound a sound and light alarm; The image data of the defective brake disc is saved in the database.
8. A brake disc surface quality detection system, characterized in that: The system comprises: Image acquisition module, used to obtain image data of the brake disc surface in real time; The preprocessing module performs preprocessing operations such as denoising, contrast enhancement, and image size adjustment on the collected image data; The model training module uses a deep learning algorithm based on PatchCore to train a surface quality detection model using historical brake disc surface image data; The defect detection module receives the preprocessed image data, performs defect detection using the trained surface quality detection model, and outputs the detection results; Alarm module: When the defect detection module detects defects on the brake disc surface, the alarm mechanism is triggered, an audible and visual alarm is sounded, and the defect data is saved in the database.
Citation Information
Patent Citations
Defect detection method, device and system and storage medium
CN116500042A
Abnormality detection method and device, electronic equipment and storage medium
CN117474918A
Automobile brake disc surface defect detection method based on deep learning
CN117541568A
Display defect detection method based on deep learning, detector and training method
CN117809137A
Image anomaly detection method and device, computer equipment and storage medium
CN118799634A
Cited By
Brake disc safety performance detection method and system
CN120741484A