A visual inspection device and method for the assembly quality of a central electrical distribution box
By combining the YOLO inspection network with LED diffuse reflection light source, the problem of insufficient semantic recognition capability in the visual inspection of central electrical distribution boxes is solved, realizing accurate and rapid detection of assembly defects and production history traceability, and adapting to multi-model mixed production lines.
Patent Information
- Application Number
- CN202611464649.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-20
- Publication Date
- 2026-11-17
AI Technical Summary
Existing visual inspection methods for central electrical distribution boxes suffer from defects such as lack of semantic recognition capabilities, sensitivity to lighting and offset, cumbersome template production, and high false alarm rate. They cannot accurately, quickly, and traceably detect assembly defects such as wrong parts, missing parts, extra parts, and misalignment.
A YOLO detection network is used in conjunction with an LED diffuse reflection light source and a constant current drive circuit to provide stable illumination. Through image preprocessing and YOLO inference, the target category, confidence level and bounding box of the device are output. The assembly verification is carried out in conjunction with the intelligent judgment and decision module, and high and low confidence level thresholds are set for judgment. The mechanical control execution module is used for power diversion and alarm.
It enables accurate and rapid inspection of the assembly quality of the central electrical distribution box, reduces the risk of misjudgment and omission, supports production history traceability, adapts to the needs of flexible mixed-line production, and continuously optimizes inspection capabilities.
Smart Images

Figure CN123118593A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of central electrical distribution box processing technology, specifically to a visual inspection device and method for the assembly quality of a central electrical distribution box. Background Technology
[0002] Traditional central electrical distribution boxes (EDBs, commonly known as fuse boxes) mainly refer to products containing printed circuit boards (PCBs), relays, fuses, current-limiting resistors, diodes, and other components, as well as structural components such as housings. Connectors, fuse connectors, relay connectors, resistors, and diodes are mounted on the PCB by soldering. Then, according to the overall vehicle's electrical requirements, fuses and relays of appropriate specifications are inserted into the corresponding positions, and the housing and other structural components are then installed to complete the assembly. Fuses are usually indicated by the color of their housings to indicate their rated current specifications (e.g., red 10A, brown 7.5A, blue 15A, yellow 20A, green 30A, etc.). The number of components on a single board is large, with various specifications and a compact layout.
[0003] Because components such as fuses and relays are still mainly assembled manually, assembly defects such as incorrect insertion (insertion of the wrong specification), missing insertion (missing parts), multiple insertions (excess parts), and misalignment are common on production lines. Once these defects enter the vehicle assembly process, they can cause electrical malfunctions at best, and abnormal power supply circuits or even burn-out risks at worst. Therefore, 100% assembly quality must be inspected before leaving the factory.
[0004] Currently, there are two main types of methods for inspecting assembly quality: (1) Manual visual inspection. The inspectors check the color and position of each component against the assembly drawing. Due to the large number of components on a single board (dozens to hundreds), the similarity in color between some specifications (such as the small color difference between red and brown, or between natural and light yellow fuses), and the wide variety of single board models, manual inspection is slow, prone to fatigue, and prone to missing inspections. The accuracy and cycle time cannot be guaranteed.
[0005] (2) Machine vision inspection based on color threshold and template comparison. This is also the closest existing technical solution to the present invention. Its typical implementation is as follows: the single board enters the light-shielding dark box along the guide rail via a belt conveyor mechanism. A constant light source and an industrial camera are arranged in the dark box. The single board blocks the infrared light to trigger the camera to capture the image. For each type of single board, a template is pre-made manually, that is, several rectangular detection areas and a positioning area are manually drawn on the master image. During the inspection, the captured image is first compared with the positioning area to complete the offset correction, and then the color similarity is compared with the template area by area (its color recognition is based on the threshold segmentation of color spaces such as RGB / HSV / YUV). If the similarity exceeds the alarm threshold set by experience, it is judged as abnormal and an alarm is triggered. This type of solution essentially reduces the difficulty of visual recognition by constraining environmental conditions - uniform lighting, uniform speed and upright movement of the single board, and fixed capture position. This solution solves the problem of manual inspection to a certain extent, but still has the following problems and disadvantages: ① Essentially, it's a pixel-level color similarity comparison, lacking device semantic recognition capabilities. It can only detect "the color of this area is inconsistent with the template," but cannot directly answer "what specification of device is inserted at this station." For fuses of different specifications with similar colors (such as red 10A and brown 7.5A, or two specifications of the same color but different shades), the misjudgment rate is high under conditions of device batch color difference and lighting fluctuations; ② Color thresholds and similarity are highly sensitive to lighting conditions. Aging of the light source, fluctuations in power supply voltage, and reflections on the surface of the device can all cause color judgment drift, requiring frequent recalibration of the thresholds. Furthermore, it is difficult to simultaneously reduce the false alarm rate and the missed alarm rate. Alarm judgment parameters (upper and lower alarm thresholds, average alarm coefficient, etc.) need to be repeatedly adjusted based on production line experience. Different models and different batches need to be explored separately, lacking adaptive capabilities. ③ Relies on the positioning area for offset correction. When the capture offset is slightly large or the board is tilted within the guide rail, the offset correction fails, the overall comparison fails, and a large number of invalid alarms or even missed detections are generated. ④ Template creation is tedious and relies heavily on manual experience. Each model requires drawing the detection area on the master image one by one and repeatedly adjusting the rectangle range, resulting in a long new product introduction cycle; even a slight change in product layout requires remaking the template. ⑤ The detection output is a similarity difference area, which cannot output defect types such as missing parts, wrong parts, multiple parts, and skew in a structured way, as well as device station information, which is not conducive to the statistical analysis of quality data and process improvement; ⑥ The templates of different models are isolated from each other, historical images and experience of misjudgment cannot be accumulated and reused, and the system capabilities do not improve with the use time.
[0006] In recent years, single-stage deep learning object detection technology, represented by YOLO (You Only Look Once), has matured. It models detection as an end-to-end forward inference of an image, directly outputting the category, confidence score, and bounding box of all targets. It combines semantic recognition capabilities with real-time performance and has demonstrated good robustness to changes in lighting, positional shifts, and target pose changes in the industrial quality inspection field. However, applying this technology to scenarios like central electrical distribution boxes—characterized by numerous small targets of various models, multiple device specifications that can be inserted at the same workstation, and the need for workstation-by-workstation verification according to assembly requirements—still lacks complete devices and methods. A series of specific problems need to be addressed, such as how to obtain samples, how to define the category system, how to verify detection results against assembly requirements, how to close loops in case of misjudgments, and how to handle mixed-model switching. No solutions have yet been proposed for these technical issues. Summary of the Invention
[0007] To address the problems in related technologies, this invention proposes a visual inspection device and method for the assembly quality of central electrical distribution boxes, in order to overcome the aforementioned technical problems existing in the prior art. The purpose of this invention is to overcome the shortcomings of existing visual inspection methods for central electrical distribution boxes based on color threshold and template comparison, such as lack of semantic recognition capability, sensitivity to illumination and offset, cumbersome template production, and high false alarm rate, so as to achieve accurate, rapid, traceable, and continuously optimized automatic detection of assembly defects such as wrong parts, missing parts, multiple parts, and skewing.
[0008] To achieve the above objectives, the present invention provides the following technical solution: a visual inspection device for the assembly quality of a central electrical distribution box, comprising a light-shielding dark box, wherein the interior of the light-shielding dark box is provided with a cavity, and openings are provided on both the left and right sides of the light-shielding dark box; an image capture module, a light source system, an image digitization module, a digital image processing module, an intelligent judgment and decision module, and a mechanical control execution module are arranged inside the cavity. The image capture module includes an industrial camera with a lens mounted on it. The industrial camera is fixedly mounted on the top of the cavity via a rigid bracket. The industrial camera is used to image the central electrical distribution box board passing through the light-shielding dark box. The light source system includes an LED diffuse reflection light source disposed at the top of the cavity and a constant current driving circuit for driving the LED diffuse reflection light source. A diffuser is also disposed on one side of the LED diffuse reflection light source. The light source system is used to provide stable lighting conditions for the industrial camera. The image digitization module includes an analog-to-digital conversion unit and a digital image interface disposed inside the industrial camera. The image digitization module is used to convert the optical images captured by the industrial camera into digital images. The digital image processing module includes an edge computing unit, which includes an image preprocessing module and a YOLO inference engine. The edge computing unit has an industrial control computer built in. The digital image processing module is used to preprocess the digital image and output the category, confidence level and bounding box of the device target on the central electrical distribution box board through the YOLO detection network. The intelligent judgment and decision module includes a host computer software system, which includes an assembly verification engine and a three-level confidence judgment module. The intelligent judgment and decision module is used to perform assembly verification by comparing the detection results output by the YOLO inference engine with the pre-stored assembly layout definition file, and to make a judgment based on the confidence threshold. The mechanical control execution module includes a conveying mechanism, an NG product diversion mechanism, and an audible and visual alarm. The audible and visual alarm is used to issue an audible and visual prompt when an abnormality is detected. The control terminal of the mechanical control execution module is connected to the output terminal of the intelligent judgment and decision module. The mechanical control execution module is used to convey the central electrical distribution box board, and to divert the central electrical distribution box board that is determined to be NG and issue an alarm.
[0009] Preferably, the conveying mechanism includes a belt conveyor line, and guide rails are provided on both sides of the belt conveyor line. The guide rails are used to constrain the traveling posture of the central electrical distribution box board.
[0010] Preferably, it also includes an infrared trigger, which includes a transmitter and a receiver respectively disposed on both sides inside the cavity.
[0011] Preferably, it also includes a barcode scanner, which is used to read the one-dimensional barcode of the central electrical distribution box board to obtain the board number, and to uniquely bind the detection image and detection result with the board number.
[0012] Preferably, the host computer software system further includes at least one of the following: a login and permission management module, a model configuration management module, a data recording and query module, a production process control module, and a production history export module; the login and permission management module is used to write user operations and configuration changes into a log.
[0013] Preferably, it also includes a database server, which is used to store captured images, detection results, production history, difficult samples and model version information, and supports traceability query and export by board number and batch number.
[0014] Preferably, it also includes a display for displaying the captured image, detection box markings, and defect details in real time.
[0015] To achieve the above objectives, the present invention also provides the following technical solution: A visual inspection method for the assembly quality of a central electrical distribution box includes the following steps: Step S1, Scan and bind: Scan the barcode of the central electrical distribution box board to obtain the board number, select or automatically identify the board model by the barcode, and automatically load the YOLO detection model and assembly layout definition file corresponding to the model. Step S2, Image Acquisition: The central electrical distribution box board enters the light-shielding dark box along the belt conveyor, blocking the infrared light path and triggering the industrial camera to capture the image, obtaining a top view image of the central electrical distribution box board. Step S3, Image preprocessing: Normalize the brightness of the top view image of the central electrical distribution box single board, and if necessary, slice the image into sections according to a fixed grid, and then merge the results after inference. Step S4, YOLO Inference: Input the preprocessed image into the YOLO detection network, and output the category, confidence score and bounding box of all device targets in the image in one forward inference; Step S5, Assembly Verification: (1) Workstation matching: Under the condition that the Euclidean distance between the center of the detection frame and the coordinates of the desired workstation does not exceed the position tolerance, the detection results are matched with the desired workstations one by one; (2) Type verification: If the actual inspection category is inconsistent with the expected category at the matching station, it is judged as an incorrect part; (3) Counting and verification: If there are no test results within the expected workstation tolerance range, it is determined to be a missing part; if there are test results that cannot be matched with any expected workstation, it is determined to be an extra part; (4) Posture check: If the category is correct but the center of the detection box is offset from the expected coordinates or the box size exceeds the tolerance, it is judged as a suspected posture abnormality such as skew or floating. Step S6, Confidence Level Three Determination: Set high confidence threshold T1 and low confidence threshold T2: (1) If there are no abnormalities in the assembly and the confidence level of the key judgment criteria is not lower than the high confidence threshold T1: the automatic judgment is OK and the vehicle is released directly; (2) If there is an abnormality in the assembly check and the corresponding detection confidence level is not lower than the high confidence threshold T1: NG is automatically determined, and the defect station, defect type and component category are marked on the display with a colored border box. The sound and light alarm is triggered, and the NG product is taken off the line and diverted. (3) If the confidence level of the judgment basis is lower than the high confidence threshold T1: transfer to the manual review channel, and archive it after manual confirmation; Step S7, Data entry: All captured images, annotation results, defect details and judgment conclusions are written into the database by board number, supporting single-unit and batch tracking; Step S8, data closure: The misjudged samples and low-confidence samples that were manually reviewed and corrected are automatically entered into the difficult sample library for incremental model updates.
[0016] Preferred options also include: Step S9, Model Training and Incremental Update: (1) Sample collection: Collect historical snapshots of the production line and normal and defective samples taken manually; (2) Labeling: Use tools to label the bounding boxes and categories of the samples to form a labeled dataset; (3) Data augmentation: Data augmentation is performed on the labeled dataset, including at least one of HSV color perturbation, brightness / contrast perturbation, random rotation, translation, scaling, Gaussian blur, Mosaic stitching and random occlusion; (4) Training: Transfer learning is used to load pre-trained weights for fine-tuning training to obtain the YOLO detection model; (5) Evaluation: Evaluation was conducted using mAP@0.5 and precision and recall for each category as indicators; (6) Deployment: Export the qualified models to ONNX or TensorRT format and deploy them to the edge computing unit; (7) Incremental update: After the number of difficult samples is accumulated to a set number, they are mixed into the original dataset for incremental fine-tuning. After evaluation and gray-scale verification, they are replaced and put online; the model version and effective time are entered into the database.
[0017] Preferred options also include: Step S10, Multi-model mixed-line detection: When switching to a new model, use the existing category system to label a small number of samples to fine-tune the model or directly reuse the existing model, write the assembly layout definition file for the model, and register it in the model configuration management module; the detection device hardware is reused.
[0018] Compared with the prior art, the beneficial effects of the present invention are: (1) The present invention is a visual inspection device and method for the assembly quality of a central electrical distribution box. It directly outputs the category, confidence level and bounding box of the target device on the single board of the central electrical distribution box through the YOLO inspection network. The device specification category is used as the judgment basis, rather than relying on color threshold comparison. It can stably distinguish devices such as fuses with similar colors but different specifications, overcome the inherent confusion defect of the color threshold method, and significantly improve the detection accuracy. (2) The present invention is a visual inspection device and method for the assembly quality of a central electrical distribution box. It provides stable illumination through LED diffuse reflection light source and constant current drive circuit, and performs semantic-level recognition of the target by combining YOLO detection network, without the need for positioning area offset correction step; light fluctuation, slightly large capture position offset or slight device misalignment will not cause overall recognition failure, and invalid alarms are greatly reduced; YOLO single frame inference is on the order of hundreds of milliseconds, and the central electrical distribution box board can complete capture and inference by passing through a light-shielding dark box with belt conveyor line, realizing non-stop transmission detection, and the single board detection cycle is comparable to or shorter than the existing solution; (3) The present invention is a visual inspection device and inspection method for the assembly quality of a central electrical distribution box. By setting a high confidence threshold T1 and a low confidence threshold T2, the assembly is automatically judged as OK and released when there are no abnormalities and the confidence level meets the standard; when there are abnormalities and the confidence level meets the standard, the defect station, defect type and component category are marked with a colored border box on the display, and an audible and visual alarm is triggered to divert the NG products off the line; when the confidence level is insufficient, the product is transferred to the manual re-inspection channel, and is archived after manual confirmation, which effectively reduces the risk of misjudgment and omission. (4) The present invention is a visual inspection device and inspection method for the assembly quality of a central electrical distribution box. The misjudged samples and low confidence samples corrected by manual re-inspection are automatically entered into the difficult sample library. After accumulating to a set number, they are mixed into the original dataset for incremental fine-tuning. After evaluation and grayscale verification, they are replaced and put online. The model version and effective time are entered into the library to realize continuous optimization of the detection capability and overcome the defects of the template method that experience cannot be accumulated and the capability does not improve with use. (5) This invention is a visual inspection device and inspection method for the assembly quality of a central electrical distribution box. All captured images, annotation results, defect details and judgment conclusions are written into the database by single board number. It supports traceability query and export by single board number and batch number, realizing complete retention of production history and quality traceability. When switching to a new model, a small number of samples can be annotated using the existing category system to fine-tune the model, or the existing model can be directly reused. Only the assembly layout definition file of the model needs to be written and registered in the model configuration management module. The hardware of the inspection device can be reused to adapt to the needs of flexible mixed production lines. (6) The present invention is a visual inspection device and inspection method for the assembly quality of a central electrical distribution box. It realizes single board number binding and automatic model identification through a barcode scanner, realizes automatic capture triggering through an infrared trigger, and realizes data storage, real-time display and production process control through a database server, a display and a host computer software system. The host computer software system may also include modules such as login and permission management, model configuration management, data recording and query, production process control and production history export. The system has a high degree of integration and is convenient for production line deployment and function expansion. Attached Figure Description
[0019] Figure 1 This is a schematic diagram of the frame structure of the detection device of the present invention; Figure 2 This is a schematic diagram of the cross-section of the light-shielding dark chamber of the detection device of the present invention; Figure 3 This is a schematic diagram of the overall process of the detection method of the present invention; Figure 4 This is a schematic diagram of the model training and incremental update process of the detection method of the present invention; Figure 5 This is a schematic diagram of the assembly and verification process of the detection method of the present invention. Attached image description: 1. Darkroom; 2. Industrial camera; 3. Lens; 4. Rigid bracket; 5. LED diffuse light source; 6. Transmitter; 7. Receiver; 8. Barcode scanner. Detailed Implementation
[0021] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention.
[0022] Example 1 Please see Figure 1-2 As shown, this invention proposes a visual inspection device for the assembly quality of a central electrical distribution box, including a light-shielding dark box 1. The light-shielding dark box 1 has a cavity inside, and openings are provided on both the left and right sides of the light-shielding dark box 1. The cavity contains an image capture module, a light source system, an image digitization module, a digital image processing module, an intelligent judgment and decision module, and a mechanical control execution module. Specifically, the light-shielding dark box 1 shields stray ambient light to ensure the consistency and reproducibility of imaging illumination conditions under any time period and any ambient light conditions. The openings facilitate the passage of belt conveyors and central electrical distribution box boards. The inner wall of the light-shielding dark box 1 is treated with a matte light-absorbing finish to suppress secondary reflections from the inner wall of the cavity, so that the illumination light is dominated only by the LED diffuse reflection light source 5, eliminating interference from ambient light and reflected light inside the light-shielding dark box 1 on the imaging. The image capture module includes an industrial camera 2, on which a lens 3 is mounted. The industrial camera 2 is fixedly mounted at the top of the cavity via a rigid bracket 4. The industrial camera 2 is used to image the central electrical distribution box board passing through the light-shielding dark box 1. Specifically, the industrial camera 2 is a high-resolution color global shutter industrial camera. The optical axis of the lens 3 on the industrial camera 2 is perpendicular to the plane of the central electrical distribution box board, and the entire view of the central electrical distribution box board is captured from above at a fixed working distance to avoid perspective distortion introduced by oblique shooting. For the large-sized central electrical distribution box board, the field of view is divided into two acquisition channels (either by a single camera acquiring a high-resolution image and then splitting it by software). Although splitting increases the number of image channels, it significantly improves the effective pixel density of small targets such as fuses in a single image, reducing the difficulty of recognition. The light source system includes an LED diffuse reflection light source 5 located at the top of the cavity and a constant current driving circuit for driving the LED diffuse reflection light source 5. A diffuser is also provided on one side of the LED diffuse reflection light source 5. The light source system is used to provide stable lighting conditions for the industrial camera 2. Specifically, the LED diffuse reflection light source 5 can make the illuminance of the single board surface of the central electrical distribution box uniform and the color temperature stable, avoiding local highlights, shadows and specular reflections on the surface of the device caused by direct illumination from a point light source. The LED diffuse reflection light source 5 is driven by a constant current driving circuit to suppress illuminance and color temperature drift caused by power supply voltage fluctuations, thus stabilizing the imaging conditions from a hardware level. The image digitization module includes an analog-to-digital conversion unit and a digital image interface installed inside the industrial camera 2. The image digitization module is used to convert the optical images captured by the industrial camera 2 into digital images. The digital image processing module includes an edge computing unit, which includes an image preprocessing module and a YOLO inference engine. The edge computing unit has an industrial control computer built in. The digital image processing module is used to preprocess digital images and output the category, confidence level and bounding box of the device target on the central electrical distribution box board through the YOLO detection network. The intelligent judgment and decision module includes a host computer software system, which includes an assembly verification engine and a three-level confidence judgment module. The intelligent judgment and decision module is used to verify the detection results output by the YOLO inference engine with the pre-stored assembly layout definition file and make a judgment based on the confidence threshold. The mechanical control execution module includes a conveying mechanism, an NG (Not Good) product diversion mechanism, and an audible and visual alarm. The audible and visual alarm is used to issue an audible and visual alert when an abnormality is detected. The control end of the mechanical control execution module is connected to the output end of the intelligent judgment and decision module. The mechanical control execution module is used to convey the central electrical distribution box board and divert the central electrical distribution box board that is determined to be NG and issue an alarm.
[0023] Please see Figure 2 As shown, the conveying mechanism further includes a belt conveyor, with guide rails on both sides of the belt conveyor. The guide rails are used to constrain the travel posture of the central electrical distribution box board.
[0024] In this embodiment, the spacing between the two guide rails can be adjusted according to the width of the central electrical distribution box board to accommodate different models, so that the central electrical distribution box board passes through the imaging area of the light-shielding dark box 1 at a stable speed and with an upright posture, avoiding skewed movement.
[0025] Please see Figure 2 As shown, it further includes an infrared trigger, which includes a transmitter 6 and a receiver 7 respectively disposed on both sides inside the cavity.
[0026] In this embodiment, the light path of the infrared trigger spans the travel path of the central electrical distribution box board and is aligned with the device surface of the central electrical distribution box board. The trigger signal is output the instant the central electrical distribution box board blocks the light path, triggering the industrial camera 2 to capture an image.
[0027] Please see Figures 1-2 As shown, it further includes a barcode scanner 8, which is used to read the one-dimensional barcode of the central electrical distribution box board to obtain the board number and to uniquely bind the detection image and detection result with the board number.
[0028] In this embodiment, the barcode scanner 8 is installed in front of, inside of, or beside the entrance of the light-shielding dark box 1, with its scanning area aligned with the QR code, barcode, or DMC code on the single board of the central electrical distribution box. The barcode scanner 8 can read single board number information including product serial number, batch number, model, production date, workstation number, and serial number, and sends the single board number to the host computer software system. Upon receiving the single board number, the host computer software system uniquely binds subsequent captured images, detection results, detection time, equipment number, operator information, YOLO model version, and assembly layout definition file version to that single board number, forming a complete detection record. If the barcode scanner 8 fails to read the code, an audible and visual alarm can be triggered to prompt the operator for handling. The barcode scanner 8 also supports multi-code reading, duplicate code detection, and code quality scoring. When the same single board number appears repeatedly, the host computer software system can prompt a duplicate code anomaly; when the code quality score is lower than a preset threshold, it can prompt for re-coding or manual confirmation. The reading results from the barcode scanner 8 can also be used to automatically call the assembly layout definition file, light source brightness formula, and YOLO model version of the corresponding model, so as to achieve flexible production.
[0029] Please see Figure 1 As shown, the host computer software system further includes at least one of the following modules: login and permission management module, model configuration management module, data recording and query module, production process control module, and production history export module; the login and permission management module is used to write user operations and configuration changes into the log.
[0030] In this embodiment, the login and permission management module can set access levels for operators, engineers, and administrators, with different levels of users having access to different functions. Operators can perform daily inspections, view results, and handle alarms; engineers can modify parameters such as model configuration, light source formula, confidence threshold, and YOLO model version; administrators can manage user accounts, permission allocation, system parameters, and data export. Login methods include account and password, work card swiping, fingerprint recognition, facial recognition, or QR code login. The login and permission management module writes user login, logout, parameter modification, model switching, model update, threshold adjustment, data export, and alarm confirmation operations into a log. The log content includes operation time, user account, operation type, value before modification, value after modification, board number, batch number, etc. The log cannot be deleted arbitrarily and can be exported for auditing. The model configuration management module can store the test formulas for different models of central electrical distribution box boards, including guide rail spacing, conveyor speed, industrial camera 2 trigger delay, light source brightness, exposure time, gain, white balance, YOLO model version, assembly layout definition file, confidence threshold, NG diversion strategy, etc. The data recording and query module allows users to query inspection records by board number, batch number, model, inspection time, inspection result, NG type, operator, and other criteria. Users can also view captured images, inspection frame annotations, confidence levels, assembly verification results, and handling status. The production process control module controls the start, stop, reset, emergency stop, single-step operation, automatic operation, and alarm reset of the inspection station, and can connect to other stations for online control. The production history export module can export inspection records, image paths, NG details, statistical reports, model versions, configuration versions, etc., to Excel, CSV, PDF, or JSON formats for easy quality traceability and customer review.
[0031] Please see Figure 1 As shown, it further includes a database server, which is used to store captured images, detection results, production history, difficult samples and model version information, and supports traceability query and export by board number and batch number.
[0032] In this embodiment, the database server can be a local server, an industrial control computer's built-in database, an edge server, or a cloud server. The database type can be MySQL, PostgreSQL, SQL Server, SQLite, MongoDB, or a time-series database. The database server can store structured and unstructured data. Structured data includes board number, batch number, model, inspection time, inspection result, confidence level, bounding box coordinates, NG type, disposal status, operator, equipment number, model version, configuration version, etc. Unstructured data includes original captured images, pre-processed images, labeled images, hard sample images, video clips, log files, etc. The database server can be configured with regular backups, incremental backups, and disaster recovery mechanisms to prevent data loss. During traceability queries, the entire lifecycle inspection record of a board can be queried by board number, and the inspection results, NG rate, NG type distribution, and image records of all boards in a batch can be queried by batch number. The database server can also interact with manufacturing execution systems, enterprise resource planning systems, or quality management systems to achieve unified management of production data. Difficult samples can be manually marked by operators or automatically filtered by the three-level confidence assessment module and stored in the difficult sample library for subsequent model iteration training. Model version information may include model file, training dataset version, training parameters, evaluation metrics, deployment time, applicable models, etc., to facilitate model traceability and rollback.
[0033] Please see Figures 1-2 As shown, it further includes a display, which is used to display the captured image, detection box annotations, and defect details in real time.
[0034] In this embodiment, the display can be an industrial touchscreen, LCD, LED display, or production line dashboard, installed on a light-shielding dark box 1. The display can show real-time captured images of the current central electrical distribution box board, overlaying the detection frame, category label, confidence level, and assembly verification results output by the YOLO detection network onto the image. For NG items, a red box, red text, or flashing text can be used to highlight them; for OK items, a green box or green text can be used. Defect details can include missing parts, extra parts, wrong parts, reversed parts, positional offset, category error, quantity error, abnormal code reading, low confidence level, etc., and can display the corresponding component name, expected location, actual location, confidence level, and handling suggestions for each defect. The display can also display the current model, board number, batch number, inspection cycle time, OK rate, NG rate, number of consecutive NGs, equipment status, light source status, camera status, model version, and alarm information. Operators can perform operations such as alarm confirmation, re-inspection application, NG handling, model switching, and parameter viewing via the touchscreen. The display can also be configured with a multi-language interface, hierarchical permission display, and anti-accidental touch confirmation mechanism. For out-of-quality (NG) images, the monitor supports zooming in, zooming out, dragging, comparison viewing, and switching between the original image and the labeled image, facilitating quick judgment by operators. The monitor can also be linked with an audible and visual alarm; when an anomaly is detected, an alarm pop-up window is displayed on the screen and the NG location is highlighted, while the audible and visual alarm emits an audible and visual alert.
[0035] Example 2 Please see Figure 3 and Figure 5 As shown, this invention proposes a visual inspection method for the assembly quality of a central electrical distribution box, comprising the following steps: Step S1, Scan and bind: Scan the barcode of the central electrical distribution box board to obtain the board number, select or automatically identify the board model by the barcode, and automatically load the YOLO detection model and assembly layout definition file corresponding to the model. Step S2, Image Acquisition: The central electrical distribution box board enters the light-shielding dark box 1 along the belt conveyor line, blocking the infrared light path and triggering the industrial camera 2 to capture the image, obtaining a top view image of the central electrical distribution box board. Step S3, Image preprocessing: Normalize the brightness of the top view image of the central electrical distribution box single board, and if necessary, divide the image into slices according to a fixed grid, and merge the results after inference. Step S4, YOLO Inference: Input the preprocessed image into the YOLO detection network, and output the category, confidence score and bounding box of all device targets in the image in one forward inference; Step S5, Assembly Verification: (1) Workstation matching: Under the condition that the Euclidean distance between the center of the detection frame and the coordinates of the desired workstation does not exceed the position tolerance, the detection results are matched with the desired workstations one by one; (2) Type verification: If the actual inspection category is inconsistent with the expected category at the matching station, it is judged as an incorrect part; (3) Counting and verification: If there are no test results within the expected workstation tolerance range, it is determined to be a missing part; if there are test results that cannot be matched with any expected workstation, it is determined to be an extra part; (4) Posture check: If the category is correct but the center of the detection box is offset from the expected coordinates or the box size exceeds the tolerance, it is judged as a suspected posture abnormality such as skew or floating. Step S6, Confidence Level Three Determination: Set high confidence threshold T1 and low confidence threshold T2: (1) If there are no abnormalities in the assembly and the confidence level of the key judgment criteria is not lower than the high confidence threshold T1: the automatic judgment is OK and the vehicle is released directly; (2) If there is an abnormality in the assembly check and the corresponding detection confidence level is not lower than the high confidence threshold T1: NG is automatically determined, and the defect station, defect type and component category are marked on the display with a colored border box. The sound and light alarm is triggered, and the NG product is taken off the line and diverted. (3) If the confidence level of the judgment basis is lower than the high confidence threshold T1: transfer to the manual review channel, and archive it after manual confirmation; Step S7, Data entry: All captured images, annotation results, defect details and judgment conclusions are written into the database by board number, supporting single-unit and batch tracking; Step S8, data closure: The misjudged samples and low-confidence samples that were manually reviewed and corrected are automatically entered into the difficult sample library for incremental model updates.
[0036] Please see Figure 4 As shown, further, it also includes: Step S9, Model Training and Incremental Update: (1) Sample collection: Collect historical snapshots of the production line and normal and defective samples taken manually; (2) Labeling: Use tools to label the bounding boxes and categories of the samples to form a labeled dataset; (3) Data augmentation: Data augmentation is performed on the labeled dataset. Data augmentation includes at least one of HSV color perturbation, brightness / contrast perturbation, random rotation, translation, scaling, Gaussian blur, Mosaic stitching and random occlusion. (4) Training: Transfer learning is used to load pre-trained weights for fine-tuning training to obtain the YOLO detection model; (5) Evaluation: Evaluation was conducted using mAP@0.5 and precision and recall for each category as indicators; (6) Deployment: Export the qualified models to ONNX or TensorRT format and deploy them to the edge computing unit; (7) Incremental update: After the number of difficult samples is accumulated to a set number, they are mixed into the original dataset for incremental fine-tuning. After evaluation and gray-scale verification, they are replaced and put online; the model version and effective time are entered into the database.
[0037] Furthermore, it also includes: Step S10, Multi-model mixed-line detection: When switching to a new model, use the existing category system to label a small number of samples to fine-tune the model or directly reuse the existing model, write the assembly layout definition file for the model, and register it in the model configuration management module; the detection device hardware is reused.
[0038] In the description of this invention, it should be understood that the terms "coaxial," "bottom," "one end," "top," "middle," "other end," "upper," "side," "top," "inner," "front," "center," "both ends," etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are only for the convenience of describing this invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limiting this invention.
[0039] In this invention, unless otherwise explicitly specified and limited, the terms "installation," "setting," "connection," "fixing," "screw connection," etc., should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral part; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; they can refer to the internal connection of two components or the interaction between two components. Unless otherwise explicitly limited, those skilled in the art can understand the specific meaning of the above terms in this invention according to the specific circumstances.
[0040] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.
Claims
1. A visual inspection device for the assembly quality of a central electrical distribution box, characterized in that, It includes a light-shielding dark box (1), the interior of which is provided with a cavity, and openings are provided on both the left and right sides of the light-shielding dark box (1). The interior of the cavity is provided with an image capture module, a light source system, an image digitization module, a digital image processing module, an intelligent judgment and decision module, and a mechanical control execution module. The image capture module includes an industrial camera (2), on which a lens (3) is mounted. The industrial camera (2) is fixedly mounted on the top of the cavity via a rigid bracket (4). The industrial camera (2) is used to image the central electrical distribution box board passing through the light-shielding dark box (1). The light source system includes an LED diffuse reflection light source (5) disposed at the top of the cavity and a constant current driving circuit for driving the LED diffuse reflection light source (5). A diffuse light plate is also disposed on one side of the LED diffuse reflection light source (5). The light source system is used to provide stable lighting conditions for the industrial camera (2). The image digitization module includes an analog-to-digital conversion unit and a digital image interface disposed inside the industrial camera (2). The image digitization module is used to convert the optical image acquired by the industrial camera (2) into a digital image. The digital image processing module includes an edge computing unit, which includes an image preprocessing module and a YOLO inference engine. The edge computing unit has an industrial control computer built in. The digital image processing module is used to preprocess the digital image and output the category, confidence level and bounding box of the device target on the central electrical distribution box board through the YOLO detection network. The intelligent judgment and decision module includes a host computer software system, which includes an assembly verification engine and a three-level confidence judgment module. The intelligent judgment and decision module is used to perform assembly verification by comparing the detection results output by the YOLO inference engine with the pre-stored assembly layout definition file, and to make a judgment based on the confidence threshold. The mechanical control execution module includes a conveying mechanism, an NG product diversion mechanism, and an audible and visual alarm. The audible and visual alarm is used to issue an audible and visual prompt when an abnormality is detected. The control terminal of the mechanical control execution module is connected to the output terminal of the intelligent judgment and decision module. The mechanical control execution module is used to convey the central electrical distribution box board, and to divert the central electrical distribution box board that is determined to be NG and issue an alarm.
2. The visual inspection device for the assembly quality of a central electrical distribution box according to claim 1, characterized in that: The conveying mechanism includes a belt conveyor line, and guide rails are provided on both sides of the belt conveyor line. The guide rails are used to constrain the movement of the central electrical distribution box board.
3. The visual inspection device for the assembly quality of a central electrical distribution box according to claim 1, characterized in that: It also includes an infrared trigger, which includes a transmitter (6) and a receiver (7) respectively disposed on both sides inside the cavity.
4. The visual inspection device for the assembly quality of a central electrical distribution box according to claim 1, characterized in that: It also includes a barcode scanner (8), which is used to read the barcode of the central electrical distribution box board to obtain the board number and to uniquely bind the detection image and detection result with the board number.
5. The visual inspection device for the assembly quality of a central electrical distribution box according to claim 1, characterized in that: The host computer software system also includes at least one of the following: a login and permission management module, a model configuration management module, a data recording and query module, a production process control module, and a production history export module; the login and permission management module is used to write user operations and configuration changes into a log.
6. The visual inspection device for the assembly quality of a central electrical distribution box according to claim 1, characterized in that: It also includes a database server, which stores captured images, detection results, production history, difficult samples and model version information, and supports traceability query and export by board number and batch number.
7. The visual inspection device for the assembly quality of a central electrical distribution box according to claim 1, characterized in that: It also includes a display for displaying captured images, detection box annotations, and defect details in real time.
8. A visual inspection method for the assembly quality of a central electrical distribution box, applied to the visual inspection device for the assembly quality of a central electrical distribution box as described in any one of claims 1 to 7, characterized in that, Includes the following steps: Step S1, Scan and bind: Scan the barcode of the central electrical distribution box board to obtain the board number, select or automatically identify the board model by the barcode, and automatically load the YOLO detection model and assembly layout definition file corresponding to the model. Step S2, Image Acquisition: The central electrical distribution box board enters the light-shielding dark box (1) along the belt conveyor line, blocking the infrared light path and triggering the industrial camera (2) to capture the image, obtaining a top view image of the central electrical distribution box board; Step S3, Image preprocessing: Normalize the brightness of the top view image of the central electrical distribution box single board, and if necessary, slice the image into sections according to a fixed grid, and then merge the results after inference. Step S4, YOLO Inference: Input the preprocessed image into the YOLO detection network, and output the category, confidence score and bounding box of all device targets in the image in one forward inference; Step S5, Assembly Verification: (1) Workstation matching: Under the condition that the Euclidean distance between the center of the detection frame and the coordinates of the desired workstation does not exceed the position tolerance, the detection results are matched with the desired workstations one by one; (2) Type verification: If the actual inspection category is inconsistent with the expected category at the matching station, it is judged as an incorrect part; (3) Counting and verification: If there are no test results within the expected workstation tolerance range, it is determined to be a missing part; if there are test results that cannot be matched with any expected workstation, it is determined to be an extra part; (4) Posture check: If the category is correct but the center of the detection box is offset from the expected coordinates or the box size exceeds the tolerance, it is judged as a suspected posture abnormality such as skew or floating. Step S6, Confidence Level Three Determination: Set high confidence threshold T1 and low confidence threshold T2: (1) If there are no abnormalities in the assembly and the confidence level of the key judgment criteria is not lower than the high confidence threshold T1: the automatic judgment is OK and the vehicle is released directly; (2) If there is an abnormality in the assembly check and the corresponding detection confidence level is not lower than the high confidence threshold T1: NG is automatically determined, and the defect station, defect type and component category are marked on the display with a colored border box. The sound and light alarm is triggered, and the NG product is taken off the line and diverted. (3) If the confidence level of the judgment basis is lower than the high confidence threshold T1: transfer to the manual review channel, and archive it after manual confirmation; Step S7, Data entry: All captured images, annotation results, defect details and judgment conclusions are written into the database by board number, supporting single-unit and batch tracking; Step S8, data closure: The misjudged samples and low-confidence samples that were manually reviewed and corrected are automatically entered into the difficult sample library for incremental model updates.
9. The detection method according to claim 8, characterized in that, Also includes: Step S9, Model Training and Incremental Update: (1) Sample collection: Collect historical snapshots of the production line and normal and defective samples taken manually; (2) Labeling: Use tools to label the bounding boxes and categories of the samples to form a labeled dataset; (3) Data augmentation: Data augmentation is performed on the labeled dataset, including at least one of HSV color perturbation, brightness / contrast perturbation, random rotation, translation, scaling, Gaussian blur, Mosaic stitching and random occlusion; (4) Training: Transfer learning is used to load pre-trained weights for fine-tuning training to obtain the YOLO detection model; (5) Evaluation: Evaluation was conducted using mAP@0.5 and precision and recall for each category as indicators; (6) Deployment: Export the qualified models to ONNX or TensorRT format and deploy them to the edge computing unit; (7) Incremental update: After the number of difficult samples has accumulated to a set number, they are mixed into the original dataset for incremental fine-tuning. After evaluation and gray-scale verification, they are replaced and put online. The model version and effective date are entered into the database.
10. The detection method according to claim 8, characterized in that, Also includes: Step S10, Multi-model mixed line detection: When switching to a new model, use the existing category system to label a small number of samples to fine-tune the model or directly reuse the existing model, write the assembly layout definition file for the model, and register it in the model configuration management module; The hardware of the detection device is reused.
