Visual detection-based earphone appearance shell appearance defect detection method
Through multi-angle image acquisition, adaptive lighting adjustment and deep learning algorithms, combined with multimodal image fusion, high-precision automatic detection and classification of headphone shell defects are achieved, solving the problems of low efficiency and high false detection rate in traditional methods, and improving production efficiency and product quality control.
Patent Information
- Application Number
- CN202510739281.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-04
- Publication Date
- 2025-09-16
- Estimated Expiration
- 2045-06-04
AI Technical Summary
Traditional headphone shell appearance defect detection relies on manual inspection, which has low efficiency and high missed detection rate. In addition, existing visual inspection methods have high false detection rate and missed detection rate in complex environments, which makes it difficult to meet the needs of high precision and high efficiency.
Combining multi-angle image acquisition, adaptive lighting adjustment, multimodal image fusion and deep learning algorithms, convolutional neural networks are used to identify and classify defects, generate defect grading reports, and perform online model optimization.
It achieves high-precision automatic detection and classification of earphone shell defects, reduces false detections and missed detections, improves detection efficiency and quality control levels, and adapts to changes in different production environments.
Smart Images

Figure CN120655596A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer vision and deep learning technologies, and in particular to a method for detecting appearance defects of an earphone casing based on visual inspection. Background Art
[0002] With the growing market demand for consumer electronics products like headphones, product appearance quality has become a key factor influencing consumer purchasing decisions. Traditionally, headphone casing appearance defect detection relies primarily on manual inspection, which suffers from low efficiency, high missed detection rates, and significant subjective errors. This makes it difficult to meet the high-precision and high-efficiency requirements of large-scale production. Therefore, automated defect detection methods have become a pressing technical challenge for the industry.
[0003] Currently, some visual inspection-based defect detection technologies have been applied to production lines, but most of them focus on two-dimensional image processing and simple defect identification, lacking the comprehensive acquisition of multi-angle images and the integration of high-precision deep learning algorithms. Furthermore, existing inspection systems still suffer from high false detection and missed detection rates under varying lighting conditions, surface reflections, and complex textures. Therefore, how to accurately identify, classify, and locate defects in headphone casings through multi-angle image acquisition, image processing, and deep learning algorithms in complex production environments has become a pressing technical challenge.
[0004] By combining multi-angle image acquisition technology, advanced image processing algorithms and deep learning models, the present invention can automatically detect and classify various defects on the surface of the headphone casing, and accurately locate and grade the defects according to their type and location, effectively improving the accuracy and efficiency of detection, and meeting the needs of the modern consumer electronics manufacturing industry for high-quality and high-efficiency detection systems. Summary of the Invention
[0005] The present invention provides a method for detecting appearance defects of headphone shells based on visual inspection, so as to solve the problem of how to automatically identify and classify various types of defects on the surface of headphone shells based on multi-angle image acquisition, image processing and deep learning algorithms, and realize high-precision and real-time defect positioning and grading, thereby improving the quality control level of headphone shells.
[0006] In order to solve the above technical problems, the present invention provides a method for detecting appearance defects of earphone shells based on visual inspection, comprising:
[0007] Based on the adaptive lighting adjustment module, the lighting environment parameters of the earphone shell are obtained, the fill light intensity and angle are adjusted, and a preliminary imaging data sequence is generated;
[0008] performing multimodal image fusion on the preliminary imaging data sequence, extracting texture, edge, and morphological features of the earphone shell, and generating a multimodal feature image;
[0009] Inputting the multimodal feature image into a deep learning detection model, analyzing and classifying defect features, and generating defect detection results including defect type and location;
[0010] Based on the defect detection results and preset classification standards, evaluate the defect level and severity, and generate a defect classification report and dynamic decision parameters;
[0011] The defect classification report and dynamic decision parameters are input into the model training module, and the parameters of the deep learning detection model are optimized and updated online to generate an updated intelligent detection model.
[0012] Furthermore, the step of obtaining the lighting environment parameters of the earphone housing specifically includes:
[0013] Through multiple light sources and camera equipment, image data of the headphone shell at different angles is collected in real time, and the lighting parameters are adjusted according to the ambient light intensity and direction.
[0014] Furthermore, the multimodal fusion step of the image data specifically includes:
[0015] The preliminary imaging data is processed with grayscale equalization, noise removal, and edge enhancement, and fused with different lighting and image channels to extract the detailed texture and surface features of the headphone shell.
[0016] Furthermore, the deep learning detection model trains the multimodal feature image through a convolutional neural network to generate a deep feature vector for defect classification and positioning.
[0017] Furthermore, the CNN model is trained on earphone housing defects using a labeled dataset and is able to identify various types of defects such as scratches, dents, and stains.
[0018] Furthermore, the defect grading report and decision parameter generation step specifically includes:
[0019] Defects are evaluated using pre-set grading criteria based on their type, area, confidence level, and bounding box to generate a grade and severity for the defect.
[0020] Furthermore, the defect level and severity assessment is processed using a machine learning algorithm combined with a rule model to support automatic adjustment of the production line.
[0021] Furthermore, during the deep learning detection model optimization process, the model training module performs batch training on the model parameters through the back propagation algorithm to adjust the detection accuracy and classification strategy.
[0022] Furthermore, the updated version of the deep learning detection model is redeployed into the detection system.
[0023] Furthermore, a headphone shell appearance defect detection system based on visual inspection includes:
[0024] A data acquisition module, configured to acquire image data related to headphone housing appearance defect detection from multiple data sources. The data acquisition module uses a high-resolution camera, optical sensors, and infrared imaging equipment to collect multi-angle image data of the headphone housing in real time, and automatically adjusts the fill light intensity and angle according to lighting conditions;
[0025] An image preprocessing and feature extraction module, configured to perform grayscale equalization, noise removal, and edge enhancement on the image data, extract the texture, edge, and morphological features of the earphone housing, and generate a multimodal feature image;
[0026] A defect detection and classification module, configured to input the multimodal feature image into a pre-trained convolutional neural network model, analyze and classify the defect features, and generate a defect detection result including the defect type and location;
[0027] A defect grading and decision support module is used to evaluate the defect level and severity based on the defect detection results and preset grading standards, and generate a defect grading report and dynamic decision parameters;
[0028] A model optimization and online update module is used to collect and construct new training data sets based on the defect classification reports and dynamic decision parameters, perform batch training and iterative optimization of the model, and update and deploy the optimized deep learning detection model;
[0029] The user interaction and visualization module provides an intuitive user interface, displays the system's test results and analysis data, and supports real-time feedback to help users understand test information and make decisions quickly.
[0030] The system monitoring and adaptation module is used to continuously monitor the operating status of the system and optimize model parameters and system settings through adaptive learning.
[0031] The key innovations of the present invention include:
[0032] (1) Adaptive illumination adjustment module: By dynamically adjusting the illumination intensity and angle, it solves the problem of poor imaging quality under different illumination conditions and ensures high-quality input of image data.
[0033] (2) Multimodal image fusion and feature extraction: The texture, edge and morphological features of the headphone shell are extracted through multimodal image fusion technology, which enhances the ability to identify complex defects.
[0034] (3) Application of deep learning models: Convolutional neural networks are used for defect classification and location prediction, which improves detection accuracy and automation and reduces the need for manual intervention.
[0035] (4) Defect classification and dynamic decision-making: Defect classification reports are generated based on the type and severity of defects, supporting real-time adjustments to the production line and effectively optimizing the decision support system in the production process.
[0036] The following are its main beneficial effects:
[0037] The method for detecting defects in the appearance shell of an earphone based on visual inspection provided by the present invention can automatically and efficiently perform defect detection on the earphone shell, significantly improving the accuracy and efficiency of detection compared to traditional manual detection methods. Through adaptive lighting adjustment and multi-angle image acquisition, high-quality image data can be obtained under different lighting environments, avoiding the problems of missed detection or false detection caused by insufficient lighting or inappropriate angles in traditional methods. At the same time, the use of deep learning models for automatic extraction of image features and defect classification can accurately identify various defect types, and classify them according to the severity of the defects, thereby optimizing the defect processing and decision-making process. Through real-time feedback and online optimization, the system can automatically adjust according to changes in the production environment, ensuring that the model operates stably under different production conditions, greatly improving production efficiency and product quality control. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] Figure 1 A flowchart of a method for detecting appearance defects of an earphone housing based on visual inspection provided in an embodiment of the present application;
[0039] Figure 2 This is a structural block diagram of a headphone exterior shell appearance defect detection system based on visual inspection provided in an embodiment of the present application. DETAILED DESCRIPTION
[0040] Example 1: Reference Figure 1 , is a flow chart of a method for detecting appearance defects of an earphone housing based on visual inspection provided by an embodiment of the present invention. The flow chart may include at least steps S100-S500:
[0041] S100, based on the adaptive illumination adjustment module, obtaining illumination environment parameters of the earphone housing, adjusting fill light intensity and angle, and generating a preliminary imaging data sequence;
[0042] S200, performing multimodal image fusion on the preliminary imaging data sequence, extracting texture, edge, and morphological features of the earphone shell, and generating a multimodal feature image;
[0043] S300: Input the multimodal feature image into a deep learning detection model, analyze and classify defect features, and generate a defect detection result including defect type and location;
[0044] S400, based on the defect detection results and preset classification standards, evaluate the defect level and severity, and generate a defect classification report and dynamic decision parameters;
[0045] S500: Input the defect classification report and dynamic decision parameters into the model training module, optimize the parameters of the deep learning detection model and update it online to generate an updated intelligent detection model.
[0046] Step S100 at least includes steps S110-S130:
[0047] S110: Collecting light intensity, direction, and environmental reflection characteristics from the detection environment of the earphone shell to generate a light environment parameter sequence
[0048] Specifically, the light intensity sensor and angle sensor are used to collect the light intensity I in the detection environment in real time. env , light source incident angle θ env And the environmental reflectivity parameter R env .
[0049] Formula definition:
[0050] P env =I env ,θ env ,R env
[0051] Among them, I env : Ambient light intensity, in lux (Lx); θ env : incident angle of ambient light, in degrees (°); R env : Ambient surface reflectivity, dimensionless proportional value (0-1).
[0052] Generate a sequence of lighting environment parameters based on a data set of multiple sampling points:
[0053]
[0054] Where n is the number of sampling points.
[0055] S120: Adjust the fill light intensity and angle of the light source according to the lighting environment parameter sequence to optimize the lighting distribution of the earphone housing.
[0056] Furthermore, based on the lighting environment parameter sequence P seq , calculate the light compensation factor C by the following formula adj :
[0057]
[0058] Among them, I target : Target light intensity, preset value, used to ensure imaging uniformity.
[0059] According to the calculated light compensation factor C adj , adjust the intensity of the fill light in real time I comp and the incident angle θ comp :
[0060] I comp =I target □C adj
[0061] If the light source cannot be angled, increase the number of fill light sources or adjust the direction of the light source to ensure full coverage of the headphone housing.
[0062] The adjusted light source parameters are defined as:
[0063] P comp =I comp ,θ comp
[0064] S130 : Based on the adjusted illumination setting, obtain multi-angle imaging data of the earphone housing and generate a preliminary imaging data sequence.
[0065] Understandably, the parameter P is set based on the adjusted lighting comp , control the rotating stage in sequence to make the earphone shell rotate at multiple angles i Rotate and acquire imaging data at each angle.
[0066] Imaging data collection formula:
[0067]
[0068] Among them, φ i : Current rotation angle; Image data at the i-th angle.
[0069] Aggregate multi-angle imaging data to generate a preliminary imaging data sequence:
[0070]
[0071] Where m is the number of detection angles of the rotation stage.
[0072] Description of the connection between the previous and the next: In S110, the generated lighting environment parameter sequence P seq Used for light source compensation and angle adjustment calculations in S120.
[0073] In S120, the adjusted light source setting parameters P comp The images are input into S130 for multi-angle image capture of the earphone housing.
[0074] In S130, the final generated preliminary imaging data sequence I seq It will be used as input data for S200 to perform multimodal image fusion and feature extraction.
[0075] Step S200 at least includes steps S210-S230:
[0076] S210 , performing grayscale equalization and noise filtering on each image in the preliminary imaging data sequence to obtain a standardized image sequence.
[0077] Specifically, from the preliminary imaging data sequence Get each image Perform histogram equalization to adjust the grayscale distribution. The formula is as follows:
[0078]
[0079] in, is the image after grayscale equalization; HistEq(□) represents the histogram equalization operation.
[0080] The grayscale balanced image Perform Gaussian filtering to reduce random noise in the image using the following formula:
[0081]
[0082] in, is the image after Gaussian filtering; G(□,σ) represents the Gaussian filter function with standard deviation (σ).
[0083] Sum all normalized images to generate a normalized image sequence:
[0084]
[0085] S220: Perform edge enhancement and contour detection on the standardized image sequence to extract edge feature images of the earphone shell.
[0086] For the standardized image sequence I std Each image in Perform Laplace edge enhancement processing to obtain an edge-enhanced image:
[0087]
[0088] in, represents the edge-enhanced image; LapEnh(·) represents the Laplace edge enhancement operation.
[0089] Using Canny algorithm to enhance the edge of the image Perform contour detection and extract edge line information. The formula is expressed as:
[0090]
[0091] in, is the contour detection result; Represents the Canny algorithm, where T low and T high is the threshold parameter.
[0092] Combine the extracted edge images into an edge feature image sequence:
[0093]
[0094] S230 , performing multimodal image fusion on the edge feature image and the texture feature image to generate a multimodal feature image.
[0095] For the standardized image sequence I std Each image in Use Gabor filter to extract texture features:
[0096]
[0097] in, represents the texture feature image; f represents the frequency; θ represents the direction angle.
[0098] Perform pixel-level fusion of the edge feature image and the texture feature image to generate a fused image:
[0099]
[0100] in, represents the multimodal feature image; α and β are fusion weight coefficients.
[0101] Aggregate multimodal images to generate a multimodal feature image sequence:
[0102]
[0103] Description of the connection between the front and back:
[0104] Connection between S210 and S220: Standardized image sequence I obtained in S210 std It is directly used in the edge enhancement and contour detection process in S220.
[0105] The connection between S220 and S230: the edge feature image sequence I obtained in S220 edge_seq and texture feature image sequence in S210 are used together for the multimodal image fusion processing in S230.
[0106] Step S300 at least includes steps S310-S330:
[0107] S310: Input the multimodal feature image into a pre-trained convolutional neural network model to extract a deep feature vector.
[0108] From the multimodal feature image sequence In , multimodal images are input one by one to a pre-trained convolutional neural network (CNN) model.
[0109] Perform standardization preprocessing to ensure that the pixel values of the input image are within the acceptable range of the model:
[0110]
[0111] in, represents the normalized image input to the model; Norm(□) represents the normalization function.
[0112] Deep Feature Extraction:
[0113] In the convolutional layer and pooling layer of the CNN model, the feature map matrix is extracted:
[0114]
[0115] in, is the feature mapping matrix after convolution; W conv is the weight matrix of the convolution kernel.
[0116] Deep feature vector generation:
[0117] Perform a fully connected operation to expand the feature map matrix into a deep feature vector:
[0118]
[0119] in, Represents the depth feature vector of the i-th image.
[0120] S320: Based on the depth feature vector, a multi-classification model is used to perform defect type discrimination and location prediction to generate preliminary detection results.
[0121] Using the pre-trained multi-classification model M class , for the depth feature vector Defect type prediction:
[0122]
[0123] in, Indicates the defect type category of the i-th image.
[0124] Defect location prediction:
[0125] Use the bounding box regression model to predict the defect location and generate location parameters:
[0126]
[0127] in, are the predicted bounding box coordinates;
[0128] M bbox Represents a bounding box prediction model.
[0129] Generate preliminary detection results:
[0130] Summarize defect type and location information to generate preliminary inspection results:
[0131]
[0132] S330: Based on the prediction results of the detection model, combined with the confidence and defect boundary estimation algorithm, the defect detection results including the defect type and location are output.
[0133] For each inspection result, calculate the confidence of the defect prediction
[0134]
[0135] Among them, Z (i) A vector representing the output values of a classification model.
[0136] Based on the bounding box prediction results Use the non-maximum suppression (NMS) algorithm to remove overlapping prediction boxes and optimize the bounding box position:
[0137]
[0138] Among them, T nms is the non-maximum suppression threshold.
[0139] Summarize the corrected defect type, location, and confidence level, and output the final defect detection results:
[0140]
[0141] Connection between S310 and S320: Deep feature vector extracted in S310 It is directly input into S320 for inference calculation of defect type classification and location prediction model.
[0142] The connection between S320 and S330: Preliminary test results obtained in S320 It is input into S330 and generates the final defect detection result through confidence calculation and bounding box correction.
[0143] Step S400 at least includes steps S410-S430:
[0144] S410 , extracting defect type, area, location, and boundary features from the defect detection results to generate a defect description parameter set.
[0145] Defect detection result sequence output from S330:
[0146]
[0147] in, Defect type; defect bounding box coordinates;
[0148] Defect confidence score.
[0149] Calculate the area of the defect based on the bounding box coordinates
[0150]
[0151] Based on the extracted defect features, define the defect description parameter set:
[0152]
[0153] S420: Match and compare the defect description parameter set with a preset grading standard to evaluate the severity and grade of the defect.
[0154] According to the preset grading standard table S grade , compare the defect type, area and confidence level in the defect description parameter set and perform matching:
[0155]
[0156] in, Indicates the grade of the defect; f match is the matching function.
[0157] Define severity scores based on defect level and area
[0158]
[0159] Among them, α, β, and γ are weight coefficients, reflecting the importance of defect area, confidence level, and grade.
[0160] S430: Generate a defect grading report and dynamic decision parameters based on the defect severity and level.
[0161] Based on the evaluation results, a defect classification report sequence is generated:
[0162]
[0163] Generate dynamic decision parameter sets based on defect classification reports:
[0164]
[0165] Among them, T alert The alarm threshold indicating a serious defect; T adjust Indicates the operational threshold for production adjustments.
[0166] Output the generated defect classification report and dynamic decision parameters for use by subsequent modules:
[0167] {R report ,P decision}
[0168] Connection between S410 and S420: Defect description parameter set generated in S410 It is directly used for defect matching and severity assessment in S420.
[0169] Connection between S420 and S430: The defect level and severity score generated in S420 are used as the basis for generating defect grading reports and dynamic decision parameters in S430.
[0170] Step S500 at least includes steps S510-S530:
[0171] S510: Based on the defect classification report and dynamic decision parameters, collect labeled data samples and construct a model optimization data set.
[0172] Defect grading report and dynamic decision parameter sequence output from S430:
[0173]
[0174] Extract data labels for model training from the decision parameter set Includes defect type label, severity level, and corrected bounding box parameters.
[0175] Sample data annotation matching:
[0176] Based on the defect type and location in the defect classification report, match similar image data in the labeled sample database:
[0177]
[0178] in, Annotated training image samples;
[0179] The true defect category labels in the samples;
[0180] Ground truth bounding box parameters in the sample.
[0181] Build a model optimization dataset:
[0182] Summarize decision parameters and labeled data samples to generate a model optimization dataset:
[0183]
[0184] S520: Batch training and iterative updating are performed on the model optimization data set to adjust the detection parameters and classification strategy of the deep learning model.
[0185] Load the parameters of the current deep learning detection model:
[0186] θ old ={θ class ,θ bbox}
[0187] Among them, θ class : weight parameter of the classification model; θ bbox : Weight parameters of the bounding box prediction model.
[0188] Optimize the model dataset D train Perform batch training using the cross entropy loss function and the bounding box regression loss function:
[0189]
[0190] Among them, L class : Classification loss function (cross entropy); L bbox : Bounding box regression loss function (smooth L1 loss); λ: weight coefficient of bounding box loss.
[0191] Use gradient descent methods (such as the Adam optimizer) to iteratively update the model parameters:
[0192]
[0193] Among them, θ new : updated model parameters; η: learning rate; The gradient of the loss function with respect to the model parameters.
[0194] S530: Redeploy the optimized model to the defect detection system to generate an updated intelligent detection model.
[0195] The optimized model parameter set θ new Save to the model library, mark the version number and training time:
[0196] M update ={θ new ,time,version}
[0197] Load the updated model into the defect detection system for the next round of inspection tasks:
[0198] M deployed =Load(M update )
[0199] Monitor model performance in real time in production, recording classification accuracy and bounding box prediction accuracy:
[0200] Metrics={Accuracy,Recall,Precision,IoU}
[0201] If the performance degrades, the next round of optimization process is triggered.
[0202] Connection between S510 and S520: Model optimization dataset D constructed in S510 train The data is input into S520 for batch training and parameter adjustment of the deep learning model.
[0203] Connection between S520 and S530: Model parameters θ updated in S520 new It is loaded into S530 to complete the model redeployment and production environment testing.
[0204] The key innovations of the present invention include:
[0205] (1) Adaptive illumination adjustment module: By dynamically adjusting the illumination intensity and angle, it solves the problem of poor imaging quality under different illumination conditions and ensures high-quality input of image data.
[0206] (2) Multimodal image fusion and feature extraction: The texture, edge and morphological features of the headphone shell are extracted through multimodal image fusion technology, which enhances the ability to identify complex defects.
[0207] (3) Application of deep learning models: Convolutional neural networks are used for defect classification and location prediction, which improves detection accuracy and automation and reduces the need for manual intervention.
[0208] (4) Defect classification and dynamic decision-making: Defect classification reports are generated based on the type and severity of defects, supporting real-time adjustments to the production line and effectively optimizing the decision support system in the production process.
[0209] The following are its main beneficial effects:
[0210] The method for detecting defects in the appearance shell of an earphone based on visual inspection provided by the present invention can automatically and efficiently perform defect detection on the earphone shell, significantly improving the accuracy and efficiency of detection compared to traditional manual detection methods. Through adaptive lighting adjustment and multi-angle image acquisition, high-quality image data can be obtained under different lighting environments, avoiding the problems of missed detection or false detection caused by insufficient lighting or inappropriate angles in traditional methods. At the same time, the use of deep learning models for automatic extraction of image features and defect classification can accurately identify various defect types, and classify them according to the severity of the defects, thereby optimizing the defect processing and decision-making process. Through real-time feedback and online optimization, the system can automatically adjust according to changes in the production environment, ensuring that the model operates stably under different production conditions, greatly improving production efficiency and product quality control.
[0211] Example 2: Figure 2 FIG. 1 shows a structural block diagram of a headphone housing appearance defect detection system based on visual inspection according to an embodiment of the present invention. Figure 2 As shown, the system may include:
[0212] The data acquisition module 10 is used to acquire image data related to headphone housing exterior defect detection from multiple data sources. This module uses a high-resolution camera, optical sensors, and infrared imaging equipment to capture multi-angle image data of the headphone housing in real time. Specifically, the module automatically adjusts the intensity and angle of the fill light based on varying lighting conditions, ensuring high contrast and clarity in captured images, adapting to various production environments.
[0213] Implementation: Capture images of the headphone housing from multiple light sources. The captured image data is used for subsequent preprocessing and feature extraction. This module preprocesses the captured image data, including grayscale equalization and denoising, to ensure consistent and high-quality input data.
[0214] The image preprocessing and feature extraction module 20 is used to perform preliminary processing on the collected image data. Specifically, the module first performs grayscale equalization and noise filtering operations on the image, and then uses edge detection, texture enhancement and other algorithms to extract edge features and surface texture information of the headphone shell.
[0215] Specific implementation: Perform grayscale equalization and Gaussian filtering on the original image to remove noise and improve image quality.
[0216] The standardized image is subjected to edge enhancement and texture extraction. The contour information of the headphone shell is extracted using an edge detection algorithm, and the features of surface defects are extracted through texture analysis.
[0217] The processed image data is fed into subsequent modules for defect detection and classification.
[0218] The defect detection and classification module 30 uses a convolutional neural network (CNN) based on a deep learning algorithm to perform defect detection on the processed image data. This module classifies each image, identifying whether there are defects on the headphone housing surface, and determines the type of defect (such as scratches, dents, stains, etc.) and its location.
[0219] Specific implementation: Input the preprocessed image data into the pre-trained convolutional neural network model to extract deep features.
[0220] Use the trained deep learning model to predict the defect type of the image and output the defect category label and bounding box coordinates.
[0221] The predicted defect type and location information are provided to subsequent modules for decision analysis.
[0222] The defect classification and decision support module 40 assesses the severity and grade of defects based on defect detection results and pre-set classification criteria. This module inputs parameters such as defect type, defect area, confidence level, and location into a classification model. Using rules or machine learning algorithms, it assesses defect severity and generates a defect classification report and decision parameters.
[0223] Specific implementation: Calculate the area and severity of the defect based on the predicted defect type, confidence level, and defect location.
[0224] According to the preset grading standards (such as defect area, defect type, etc.), the level and severity of the defects are evaluated and a defect grading report is generated.
[0225] Based on the severity of the defect, dynamic decision parameters are automatically generated to support real-time adjustments to the production line.
[0226] The model optimization and online update module 50 is used to continuously optimize and update the deep learning model. Based on real-time inspection results and defect classification reports, this module collects and constructs new training datasets, performs batch training and iterative optimization of the model, and adjusts model parameters and classification strategies to ensure that the model is always in optimal condition.
[0227] Specific implementation: Based on the collected defect classification reports and detection data, a new model optimization dataset is constructed.
[0228] The dataset is used to train the deep learning model in batches, and the model parameters are optimized through the back-propagation algorithm.
[0229] The updated intelligent detection model is redeployed into the system to ensure the detection accuracy and stability of the model in different environments.
[0230] The User Interaction and Visualization Module 60 provides an intuitive user interface that displays the system's test results and analytical data, helping users understand the information and make quick decisions. This module also supports multi-scenario simulation and real-time feedback, improving user convenience and efficiency.
[0231] Specific implementation: Display the detected defect type, defect location and classification report, and provide detailed defect information analysis.
[0232] Support users to set parameters according to different needs and adjust the detection accuracy and sensitivity of the system.
[0233] Provides real-time data visualization to help production line operators quickly identify problems and make adjustments.
[0234] The system monitoring and adaptation module 70 continuously monitors the operating status of the system and optimizes model parameters and system settings through adaptive learning to ensure that the system operates stably and efficiently in various complex environments.
[0235] Specific implementation:
[0236] Monitor the system's operation in real time to ensure the normal operation of data acquisition, image processing, model reasoning and other links.
[0237] Adjust system parameters based on real-time monitoring data and environmental changes to adapt to new production environments and testing requirements.
[0238] Automatically update and optimize system configuration to ensure that the detection system is always in the best performance state.
[0239] The method and system for detecting defects in the headphone housing based on visual inspection provided by the present invention have the following beneficial effects:
[0240] 1. High-precision detection: Using multimodal image fusion and deep learning models, it can accurately identify various subtle headphone casing defects such as scratches, dents, stains, etc., and provide high-precision classification and positioning information.
[0241] 2. Strong real-time performance: Through adaptive lighting adjustment and optimized model update mechanism, the system can respond to changes in the production line in real time, ensuring stable detection performance under different environmental conditions.
[0242] 3. Intelligence and automation: The system automatically performs defect classification, decision analysis, and provides real-time feedback, which can significantly improve production efficiency and quality control levels and reduce manual intervention.
[0243] 4. Continuous optimization capability: Through online learning and model updates, the system can continuously improve detection accuracy, adapt to changing production needs, and ensure the long-term stable operation of the detection system.
[0244] Obviously, the embodiments described above are only some of the embodiments of the present application, rather than all of the embodiments. The preferred embodiments of the present application are given in the accompanying drawings, but they do not limit the patent scope of the present application. The present application can be implemented in many different forms. On the contrary, the purpose of providing these embodiments is to make the understanding of the disclosure of the present application more thorough and comprehensive. Although the present application has been described in detail with reference to the aforementioned embodiments, for those skilled in the art, it is still possible to modify the technical solutions described in the aforementioned specific embodiments, or to make equivalent replacements for some of the technical features therein. Any equivalent structure made using the contents of the present application specification and the accompanying drawings, directly or indirectly used in other related technical fields, is also within the scope of patent protection of the present application.
Claims
1. A method for detecting appearance defects of earphone shells based on visual inspection, characterized in that: The method comprises the following steps: Based on the adaptive lighting adjustment module, the lighting environment parameters of the earphone shell are obtained, the fill light intensity and angle are adjusted, and a preliminary imaging data sequence is generated; performing multimodal image fusion on the preliminary imaging data sequence, extracting texture, edge, and morphological features of the earphone shell, and generating a multimodal feature image; Inputting the multimodal feature image into a deep learning detection model, analyzing and classifying defect features, and generating defect detection results including defect type and location; Based on the defect detection results and preset classification standards, evaluate the defect level and severity, and generate a defect classification report and dynamic decision parameters; The defect classification report and dynamic decision parameters are input into the model training module, and the parameters of the deep learning detection model are optimized and updated online to generate an updated intelligent detection model.
2. The headphone shell appearance defect detection method based on visual inspection according to claim 1 is characterized in that: The step of obtaining the lighting environment parameters of the earphone housing specifically includes: Through multiple light sources and camera equipment, image data of the headphone shell at different angles is collected in real time, and the lighting parameters are adjusted according to the ambient light intensity and direction.
3. The headphone shell appearance defect detection method based on visual inspection according to claim 1 is characterized in that: The multimodal fusion step of the image data specifically includes: The preliminary imaging data is processed with grayscale equalization, noise removal, and edge enhancement, and fused with different lighting and image channels to extract the detailed texture and surface features of the headphone shell.
4. The headphone shell appearance defect detection method based on visual inspection according to claim 1, characterized in that: The deep learning detection model trains the multimodal feature image through a convolutional neural network to generate a deep feature vector for defect classification and positioning.
5. The headphone shell appearance defect detection method based on visual inspection according to claim 4 is characterized in that: The CNN model is trained on earphone housing defects using a labeled dataset and is capable of identifying various types of defects such as scratches, dents, and stains.
6. The headphone shell appearance defect detection method based on visual inspection according to claim 1, characterized in that: The defect classification report and decision parameter generation steps specifically include: Defects are evaluated using pre-set grading criteria based on their type, area, confidence level, and bounding box to generate a grade and severity for the defect.
7. The headphone shell appearance defect detection method based on visual inspection according to claim 6, characterized in that: The assessment of defect level and severity is processed using a machine learning algorithm combined with a rule model to support automatic adjustment of the production line.
8. The method for detecting appearance defects of earphone shells based on visual inspection according to claim 1, characterized in that: During the deep learning detection model optimization process, the model training module performs batch training on model parameters through the back propagation algorithm to adjust the detection accuracy and classification strategy.
9. The headphone shell appearance defect detection method based on visual inspection according to claim 1, characterized in that: The updated version of the deep learning detection model is redeployed into the detection system.
Citation Information
Patent Citations
Appearance defect detection method and system based on adaptive illumination
CN118408939A
Speed reducer appearance detection method and system based on deep learning
CN118799592A
Glass defect detection method and device based on image recognition
CN119000727A
New energy automobile part surface defect testing method based on computer vision
CN119091186A
Automatic optical detection method and system based on gasket surface defects
CN119643448A
Cited By
Industrial production quality detection method and system based on stepping visual detection
CN121236049A
Induction cooker production line part defect detection method based on image recognition
CN121304548A