Thermal battery die-casting die visual cleanliness detection method and device

By combining automated positioning and image processing technologies with deep learning models, high-precision cleanliness inspection of thermal battery die-casting molds has been achieved, solving the problems of low efficiency and insufficient accuracy of manual inspection, and improving production quality and efficiency.

CN121860943APending Publication Date: 2026-04-14SHENYANG INST OF AUTOMATION - CHINESE ACAD OF SCI
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511904625.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-17
Publication Date
2026-04-14

AI Technical Summary

Technical Problem

In the existing technology, the cleanliness detection of concave cylindrical molds for hot cell die casting relies on manual visual inspection or simple optical assistance, which is inefficient, highly subjective, and difficult to meet the requirements of high-precision detection, especially in concave structures where it is easy to miss detection.

Method used

An industrial camera, along with a conveyor belt, cylinder mechanism, and through-beam sensor, is used to achieve automated positioning and image acquisition of the mold. A double-layer concentric ring dome light source provides uniform illumination. Hough circle detection and deep learning models (such as YOLOv8 or YOLOv11) are used to identify cleanliness defects, achieving automated and high-precision inspection.

Benefits of technology

It enables rapid, objective, and high-precision detection of mold cleanliness, reduces missed and false detections, improves production efficiency, and records defect information to support process optimization and equipment maintenance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121860943A_ABST
    Figure CN121860943A_ABST
Patent Text Reader

Abstract

The invention belongs to the field of machine visual defect detection, and particularly relates to a thermal battery die-casting die visual cleanliness detection method and device, and the method comprises the following steps: obtaining the product size information of a to-be-detected die, and configuring the visual field parameters of an industrial camera according to the product size information; moving a tray bearing the mold to the position under the camera; jacking the tray, and adjusting the longitudinal position of the camera to a preset shooting height; turning on a double-layer concentric annular dome light source, and shooting a front image of the mold; carrying out segmentation processing on the image, extracting a key feature region, and obtaining a to-be-detected image; and analyzing the to-be-detected image by adopting a pre-trained deep learning recognition model, and judging the cleanliness state of the mold. According to the invention, the automatic and high-precision visual inspection of the internal cleanliness of the concave cylindrical mold is realized, the low-efficiency and subjective manual visual inspection is effectively replaced, and the detection efficiency and consistency are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of machine vision defect detection, specifically a method and device for visual cleanliness detection of thermal battery die-casting molds. Background Technology

[0002] In the manufacturing industry, concave cylindrical molds for die casting of thermal batteries are widely used in the production of thermal battery electrode sheets and heating elements. After the demolding process of the previous batch, the cleanliness of the mold's interior directly affects the molding quality of the next batch of products. If powder, graphite flakes, or molding residue remain inside the mold, it will cause defects such as scratches, dents, and missing materials on the product surface, reducing the product qualification rate and increasing production costs.

[0003] Currently, the cleanliness inspection of concave cylindrical molds mainly relies on manual visual inspection or simple optical-assisted inspection methods. Manual visual inspection suffers from low efficiency, strong subjectivity, and a high rate of missed detections. In particular, it is difficult for manual inspection to quickly and clearly observe concave structures inside the mold, which cannot meet the requirements of fast-paced and high-precision inspection.

[0004] With the development of industrial automation, there is a need for a technical solution that can automate and achieve high-precision inspection of the cleanliness of concave cylindrical molds to overcome the shortcomings of existing inspection methods. Therefore, this invention provides a visual cleanliness inspection method and equipment for thermal battery die-casting molds. Summary of the Invention

[0005] The purpose of this invention is to provide a method and apparatus for visual cleanliness detection of hot battery die-casting molds. It has high measurement accuracy and fast response, and can be effectively used for visual cleanliness detection of hot battery die-casting molds.

[0006] The technical solution adopted by the present invention to achieve the above objectives is: a method for visual cleanliness inspection of thermal battery die-casting molds, comprising the following steps:

[0007] Step S1: Obtain the product size information of the thermal battery die-casting mold, and configure the field of view of the industrial camera according to the information to ensure that the camera can cover the entire inspection area of ​​the mold;

[0008] Step S2: Move the tray carrying the mold on the production line so that it is precisely positioned directly below the inspection camera, and achieve positioning through the conveyor belt control system;

[0009] Step S3: Use a cylinder mechanism to lift the tray to below the camera, while simultaneously using a through-beam sensor to detect whether the mold is above the tray, and control the camera to move longitudinally to a preset suitable position via a lifting mechanism to accommodate molds of different sizes.

[0010] Step S3-1: The pallet and the mold on it are lifted to a preset height by the lifting mechanism set under the pallet; during the lifting process or after reaching the preset height, the presence of a mold entity above the pallet is detected by the through-beam sensor set next to the pallet's travel path, so as to confirm that the mold has been accurately positioned at the detection station.

[0011] Step S3-2: After confirming that the mold is in place, control the lifting mechanism connected to the industrial camera to move. Based on the mold product size information obtained in step S1, calculate and drive the industrial camera to move vertically to an optimized shooting position.

[0012] Step S4: Light up the double-layer concentric ring dome light source to provide uniform illumination for the mold, and take a front image of the mold to ensure image clarity and contrast;

[0013] Step S5: Segment the captured image according to different thresholds, extract the image region to be detected, and identify key features through image processing algorithms to obtain the image to be detected;

[0014] Step S6: Use the trained recognition model to describe and determine the cleanliness of the image to be detected, that is, perform defect detection and classification, and finally output the cleanliness status result.

[0015] Step S3 includes the following steps:

[0016] Step S3-1: The pallet and the mold on it are lifted to a preset height by the lifting mechanism set under the pallet; during the lifting process or after reaching the preset height, the presence of a mold entity above the pallet is detected by the through-beam sensor set next to the pallet's travel path, so as to confirm that the mold has been accurately positioned at the detection station.

[0017] Step S3-2: After confirming that the mold is in place, control the lifting mechanism connected to the industrial camera to move. Based on the mold product size information obtained in step S1, calculate and drive the industrial camera to move vertically to an optimized shooting position.

[0018] Before capturing the mold image in step S4, dynamic adjustment of the exposure parameters, gain parameters, and white balance parameters of the industrial camera is performed.

[0019] Dynamic adjustment is calculated by the PC based on the acquired product size information, mold material characteristics, and real-time brightness feedback from the camera light source, so that the central pillar area of ​​the mold, the inner corner area of ​​the mold cavity, and the upper edge area of ​​the mold cavity all obtain clear images with appropriate contrast under the same exposure conditions during the imaging process.

[0020] Step S5 includes the following steps:

[0021] Step S5-1: Based on the product radius information, using the image center as a reference and a cutting radius of 1.02 times the radius, cut out the ROI region from the original image;

[0022] Step S5-2: Perform Hough circle detection on the binarized image to identify circular features of the central pillar, the inner corner of the mold cavity, and the upper edge of the mold cavity; detect the center position of the circular features, calculate the radius, and filter out circles that match the actual size based on the product size information, and eliminate false features;

[0023] Step S5-3: Based on the selected center and radius information, take the center of the central column circle as the reference and 1.02 times the radius as the cutting radius, cut to the point where the center of the inner corner circle of the mold cavity is the reference and 0.98 times the radius, and obtain the ROI image from the central column to the inner corner of the mold cavity, and the ROI image from the inner corner of the mold cavity to the upper edge of the mold cavity.

[0024] Step S5-4: Perform preliminary extraction of defective pixels for each of the cut annular sub-region images: set a high threshold and a low threshold for each sub-region image; scan the image pixels, classify pixels with gray values ​​higher than the high threshold as a set of bright suspicious pixels, and classify pixels with gray values ​​lower than the low threshold as a set of low suspicious pixels.

[0025] Step S5-5: Perform morphological opening or closing operations on the set of high-brightness suspicious pixels and the set of low-brightness suspicious pixels respectively to filter out noise interference; merge the processed high-brightness and low-brightness regions to generate a binarized mask image representing the location of potential defects.

[0026] The trained recognition model is a Yolov8 or Yolov11 deep learning model; the training of this model is based on a dataset containing a large number of labeled images of hot battery die-casting molds with various cleanliness defects.

[0027] In step S6, the trained recognition model is used to describe and determine the cleanliness of the image to be detected, including the following steps:

[0028] Step S6-1: By sequentially inputting the images to be detected into the deep learning model and then performing forward propagation calculations, the cleanliness information present in the images is obtained, namely: the size of the cleanliness defects and the confidence level of each type of cleanliness defect.

[0029] Step S6-2: Compare the confidence level with a manually set fixed confidence threshold to segment the defect information. If a cleanliness defect information with a confidence level greater than the confidence threshold is found, it is determined that a defect exists. Then compare it with the set defect size threshold. If it is greater than the defect size threshold, it is determined that an unacceptable cleanliness defect exists.

[0030] Step S6-3: Record the type, size, and number of cleanliness defects; if the defect size is less than the defect size threshold, it is considered an acceptable defect, and the pass information is recorded.

[0031] When a defect message with a confidence level lower than the threshold is detected, it is determined to be an acceptable defect or no defect, and the qualified information is recorded.

[0032] After the cleanliness determination of the identification model is performed in step S6, the following steps are executed, including result output and traceability management:

[0033] The defect type, size, number, confidence level, image number, and corresponding production batch information output by the identification model are uniformly stored in the PC database and bound to the pallet number conveyed in real time on the conveyor belt. When the judgment result is an unacceptable defect, an alarm signal is automatically sent to the host computer production management system. At the same time, the corresponding ROI area image is associated with the exported defect location as a basis for quality traceability. All data records are used for subsequent production process optimization, mold cleaning process improvement, and equipment maintenance strategy adjustment.

[0034] A detection device for visual cleanliness detection of thermal battery die-casting molds includes: a frame, an industrial camera, a camera light source, a mold tray, a through-beam sensor, a PC, a light source controller, a cylinder mechanism, and a lifting mechanism.

[0035] The frame serves as the supporting structure for the testing device, bearing all components to ensure stability and rigidity;

[0036] The industrial camera is mounted on the top of the frame and connected to the PC. The field of view of the industrial camera covers the conveyor belt on the frame for high-resolution image acquisition. A camera light source is located on the frame below the industrial camera.

[0037] The mold tray is set on the conveyor belt and moves with the conveyor belt; through-beam sensors are installed on both sides of the outside of the conveyor belt to detect the presence of the mold; the through-beam sensors adopt the principle of infrared through-beam and feed back signals to the PC in real time to trigger subsequent actions;

[0038] The PC is connected to the light source controller and the industrial camera respectively, and is used to process image data, run the recognition model, and control the entire detection process.

[0039] The light source controller receives commands from the PC and connects to the camera light source to adjust the brightness and mode of the camera light source, ensuring consistent lighting.

[0040] The cylinder mechanism is located inside the conveyor belt below the tray and is used to lift the tray according to the control command of the PC to ensure that the mold is raised to the inspection position;

[0041] The lifting mechanism is mounted on the vertical rod of the frame and connected to the industrial camera. The lifting mechanism is driven by a motor to enable the vertical movement of the industrial camera to adapt to different mold sizes.

[0042] The camera light source is a double-layer concentric ring dome light source, and the camera light source adopts an LED array to provide uniform illumination, reduce the shadow of the concave structure of the mold, and enhance image quality.

[0043] The inner and outer ring light sources of the camera light source are combinations of LEDs with different color temperatures or different wavelengths. The light source controller can independently adjust the brightness ratio of the inner and outer ring light sources according to the instructions of the PC.

[0044] The PC communicates with the programmable logic controller via an industrial Ethernet bus to coordinate the start and stop of the conveyor belt, the lifting and lowering of the cylinder mechanism, the displacement of the lifting mechanism, and the reading of the status signals of the through-beam sensor.

[0045] The PC performs the following steps:

[0046] After receiving the signal from the through-beam sensor confirming that the mold is in place, the cylinder mechanism is sequentially triggered to lift, the lifting mechanism is controlled to move the industrial camera to the preset shooting height, the camera light source is turned on by the light source controller, the industrial camera is controlled to acquire images, and after completing image processing and judgment, the cylinder mechanism is controlled to descend and reset, and the conveyor belt is allowed to transport the pallet to the next station.

[0047] The present invention has the following beneficial effects and advantages:

[0048] 1. This invention achieves full automation of the entire process from feeding, positioning, shooting to judgment through the collaboration of conveyor belt, cylinder mechanism, sensor and control system, which significantly improves the detection cycle and avoids missed detection and false detection caused by the subjectivity and fatigue of manual detection.

[0049] 2. This invention employs a double-layer concentric annular dome light source to provide uniform and shadowless illumination for the concave cavity of the mold, effectively overcoming the problem of insufficient illumination in deep holes and side walls, enhancing the contrast between residues and the mold substrate, and providing high-quality input for subsequent image processing.

[0050] 3. This invention first uses algorithms such as Hough circle detection to accurately locate the key feature areas of the mold, and then uses trained deep learning models such as YOLO to identify and classify defects. It combines the stability of traditional algorithms with the powerful ability of deep learning models to identify complex defects, resulting in high detection accuracy and good adaptability.

[0051] 4. This invention can automatically adjust the camera height and field of view according to different mold sizes, offering high flexibility. Simultaneously, it completely records defect information and links it to production batches, enabling precise traceability of quality issues and providing data support for process optimization and equipment maintenance. Attached Figure Description

[0052] Figure 1 This is a schematic diagram of the structure of one embodiment of the visual cleanliness detection device of the present invention;

[0053] Figure 2 This is a schematic diagram of the main inspection surfaces of a thermal battery die-casting mold.

[0054] Figure 3 This is a flowchart illustrating the visual cleanliness detection method for thermal battery die-casting molds of the present invention.

[0055] Among them, 1 is an industrial camera, 2 is a camera light source, 3 is a mold tray, 4 is a through-beam sensor, 5 is a PC, 6 is a light source controller, 7 is a cylinder mechanism, and 8 is a lifting mechanism. Detailed Implementation

[0056] The present invention will now be described in further detail with reference to the accompanying drawings and embodiments.

[0057] like Figure 3 The diagram shown is a flowchart of the monitoring method of the present invention. The present invention provides a method for visually inspecting the cleanliness of a thermal battery die-casting mold, comprising the following steps:

[0058] Step S1: Obtain the product size information of the thermal battery die-casting mold, and configure the field of view of the industrial camera 1 according to the information to ensure that the camera can cover the entire inspection area of ​​the mold;

[0059] Step S2: Move the tray carrying the mold on the production line so that it is precisely positioned directly below the inspection camera, and achieve positioning through the conveyor belt control system;

[0060] Step S3: Use cylinder mechanism 7 to lift the tray to below the camera, and at the same time use through-beam sensor 4 to detect whether the mold is above the tray, and control the camera to move longitudinally to a preset appropriate position through lifting mechanism to adapt to molds of different sizes.

[0061] Before performing step S4, the exposure parameters, gain parameters, and white balance parameters of the industrial camera 1 are dynamically adjusted.

[0062] The dynamic adjustment is calculated by PC 5 based on the acquired product size information, mold material characteristics, and real-time brightness feedback from camera light source 2, so that the central pillar area of ​​the mold, the inner corner area of ​​the mold cavity, and the upper edge area of ​​the mold cavity all obtain clear images with appropriate contrast under the same exposure conditions during the imaging process.

[0063] Step S4: Light up the double-layer concentric ring dome light source to provide uniform illumination for the mold, and take a front image of the mold to ensure image clarity and contrast;

[0064] Step S5: Segment the captured image according to different thresholds, extract the image region to be detected, and identify key features through image processing algorithms to obtain the image to be detected;

[0065] Step S5-1: Based on the product radius information, using the image center as a reference and a cutting radius of 1.02 times the radius, cut out the ROI region from the original image;

[0066] Step S5-2: Perform Hough circle detection on the binarized image to identify circular features of the central pillar, the inner corner of the mold cavity, and the upper edge of the mold cavity; detect the center position of the circular features, calculate the radius, and filter out circles that match the actual size based on the product size information, and eliminate false features;

[0067] Step S5-3: Cut the Region of Interest (ROI) image based on the center position and radius information.

[0068] In step 5-3, the cutting of the region of interest (ROI) image specifically involves:

[0069] (1) Using the center of the selected central column circle as the reference, and 1.02 times the radius as the cutting radius, start cutting the original drawing, and cut to the center of the inner corner circle of the mold cavity as the reference, and 0.98 times the radius.

[0070] (2) Using the center of the inner corner circle of the selected mold cavity as the reference, and 1.02 times the radius as the cutting radius, start cutting the original image, and cut to the center of the upper edge circle of the mold cavity as the reference, and 0.98 times the radius.

[0071] (3) Obtain the ROI image from the center post to the inner corner of the mold cavity after cutting, and the ROI image from the inner corner of the mold cavity to the upper edge of the mold cavity.

[0072] Step S5-4: Perform preliminary extraction of defective pixels for each of the cut annular sub-region images: set a high threshold and a low threshold for each sub-region image; scan the image pixels, classify pixels with gray values ​​higher than the high threshold as a set of bright suspicious pixels, and classify pixels with gray values ​​lower than the low threshold as a set of low suspicious pixels.

[0073] Step S5-5: Perform morphological opening or closing operations on the set of high-brightness suspicious pixels and the set of low-brightness suspicious pixels respectively to filter out noise interference; merge the processed high-brightness and low-brightness regions to generate a binarized mask image representing the location of potential defects.

[0074] Step S6: Use the trained recognition model to describe and determine the cleanliness of the image to be detected, that is, perform defect detection and classification, and finally output the cleanliness status result.

[0075] The trained recognition model is a Yolov8 or Yolov11 deep learning model; the training of this model is based on a dataset containing a large number of labeled images of hot battery die-casting molds with various cleanliness defects.

[0076] Step S6-1: By sequentially inputting the images to be detected into the deep learning model and then performing forward propagation calculations, the cleanliness information present in the images is obtained, namely: the size of the cleanliness defects and the confidence level of each type of cleanliness defect.

[0077] Step S6-2: Compare the confidence level with a manually set fixed confidence threshold to segment the defect information. If a cleanliness defect information with a confidence level greater than the confidence threshold is found, it is determined that a defect exists. Then compare it with the set defect size threshold. If it is greater than the defect size threshold, it is determined that an unacceptable cleanliness defect exists.

[0078] Step S6-3: Record the type, size, and number of cleanliness defects; if the defect size is less than the defect size threshold, it is considered an acceptable defect, and the pass information is recorded.

[0079] When a defect message with a confidence level lower than the threshold is detected, it is determined to be an acceptable defect or no defect, and the qualified information is recorded.

[0080] After the cleanliness determination of the identification model is performed in step S6, the following steps are executed, including result output and traceability management:

[0081] The defect type, size, number, confidence level, image number, and corresponding production batch information output by the identification model are uniformly stored in the PC5 database and bound to the pallet number conveyed in real time. When the judgment result is an unacceptable defect, an alarm signal is automatically sent to the host computer production management system. At the same time, the corresponding ROI area image is associated with the exported defect location as a basis for quality traceability. All data records are used for subsequent production process optimization, mold cleaning process improvement, and equipment maintenance strategy adjustment.

[0082] like Figure 1 The diagram shown is a structural schematic of the visual cleanliness detection device of the present invention. The detection method of the present invention is based on this device. The detection device includes: a frame, an industrial camera 1, a camera light source 2, a mold tray 3, a through-beam sensor 4, a PC 5, a light source controller 6, a cylinder mechanism 7, and a lifting mechanism 8.

[0083] The frame serves as the supporting structure for the testing device, bearing all components to ensure stability and rigidity;

[0084] An industrial camera 1 is mounted on the top of the frame and connected to a PC 5. The field of view of the industrial camera 1 covers the conveyor belt on the frame for high-resolution image acquisition. A camera light source 2 is mounted on the frame below the industrial camera 1.

[0085] Camera light source 2 is a double-layer concentric ring dome light source, and camera light source 2 uses an LED array to provide uniform illumination, reduce the shadows of the concave structure of the mold, and enhance image quality;

[0086] The inner and outer ring light sources of the camera light source 2 use LEDs with different color temperatures or different wavelengths. The light source controller 6 can independently adjust the brightness ratio of the inner and outer ring light sources according to the instructions of the PC 5.

[0087] The mold tray 3 is set on the conveyor belt and moves with the conveyor belt; through-beam sensors 4 are installed on both sides of the outside of the conveyor belt to detect the presence of the mold; the through-beam sensors 4 adopt the principle of infrared through-beam and feed back signals to the PC 5 in real time to trigger subsequent actions.

[0088] PC 5 ​​is connected to the light source controller 6 and the industrial camera 1 respectively, and is used to process image data, run the recognition model, and control the entire detection process;

[0089] The PC 5 communicates with the programmable logic controller via an industrial Ethernet bus to coordinate the start and stop of the conveyor belt, the lifting and lowering of the cylinder mechanism 7, the displacement of the lifting mechanism 8, and the reading of the status signal of the through-beam sensor 4.

[0090] PC 5 ​​performs the following steps:

[0091] After receiving the signal from the through-beam sensor 4 confirming that the mold is in place, the cylinder mechanism 7 is triggered to lift, the lifting mechanism 8 is controlled to move the industrial camera 1 to the preset shooting height, the camera light source 2 is lit through the light source controller 6, the industrial camera 1 is controlled to acquire images, and after completing image processing and judgment, the cylinder mechanism 7 is controlled to descend and reset, and the conveyor belt is allowed to transport the pallet to the next station.

[0092] The light source controller 6 is used to receive commands from the PC 5 and is connected to the camera light source 2 to adjust the brightness and mode of the camera light source 2 to ensure lighting consistency.

[0093] The cylinder mechanism 7 is located inside the conveyor belt below the tray and is used to lift the tray according to the control command of the PC 5 to ensure that the mold is raised to the inspection position;

[0094] The lifting mechanism 8 is mounted on the vertical rod of the frame and connected to the industrial camera 1. The lifting mechanism 8 is driven by a motor to enable the industrial camera 1 to move longitudinally to accommodate different mold sizes.

[0095] To make the above-mentioned objectives, features, and advantages of the present invention more readily understood, the visual cleanliness detection method and apparatus for thermal battery die-casting molds proposed in this invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. The embodiments described are only for explaining the present invention and are not intended to limit the invention.

[0096] Example:

[0097] like Figure 1 The diagram shown is a structural schematic of one embodiment of the visual cleanliness inspection device of the present invention. This embodiment provides a complete visual cleanliness inspection system for thermal battery die-casting molds, the structure of which is as follows: Figure 1 As shown. The system mainly includes: frame, industrial camera 1, camera light source 2, mold tray 3, through-beam sensor 4, PC 5, light source controller 6, cylinder mechanism 7, and lifting mechanism 8.

[0098] The frame, constructed from structural profiles, possesses sufficient structural strength and stability, spanning above the production line conveyor belt. Industrial camera 1, a high-resolution industrial digital camera, is fixed to the center of the top beam of the frame via an adjustable mounting plate, with its lens pointing vertically downwards and connected to PC 5 via a data cable. Camera light source 2 is a custom-designed double-layer concentric ring dome light source using an LED array, mounted below the lens of industrial camera 1 via a bracket, with its power supply and control lines connected to light source controller 6. Mold tray 3 has a positioning groove on its upper part that fits the bottom of the mold, and is placed on the conveyor belt. Through-beam sensors 4 consist of a pair of photoelectric sensors, respectively mounted on brackets on both sides of the conveyor belt, with their optical axes horizontal and their height aligned with the center of the mold after lifting. PC 5 is an industrial control computer, equipped with an operating system and self-developed detection software. Light source controller 6 is a programmable LED driver, allowing independent adjustment of the brightness of the inner and outer ring light sources via commands from PC 5. Cylinder mechanism 7 is vertically mounted below the conveyor belt frame. Lifting mechanism 8 is an electric slide, vertically mounted on the side of the frame column, fixed to industrial camera 1 via a connecting plate, enabling precise lifting.

[0099] like Figure 2 The diagram shown illustrates the main inspection surfaces of the thermal battery die-casting mold of this invention. In this embodiment, the thermal battery die-casting mold is a concave mold with a central pillar in the middle. The defects to be inspected include: powder residue, graphite flake residue, molding residue, etc.

[0100] like Figure 3 The diagram shown is a flowchart illustrating a method for detecting the cleanliness of a thermal battery die-casting mold according to the present invention. The detection process in this embodiment is as follows:

[0101] 1) Initialization and parameter configuration: After the system starts, the operator inputs the product model of the mold to be inspected through the detection software interface of PC 5. The system automatically retrieves the size parameters of the mold model (such as the diameter of the central column, the depth of the mold cavity, the opening diameter, etc.) from the built-in database, and calculates the appropriate field of view of industrial camera 1, the target height of lifting mechanism 8, and the initial value of camera exposure parameters accordingly.

[0102] 2) Mold loading and positioning: The operator places the demolded mold on the mold tray 3, and the conveyor belt moves the tray forward. When the tray moves to the optical path position of the through-beam sensor 4, the sensor detects the tray signal, the conveyor belt decelerates, and through positioning control, the tray finally stops directly below the industrial camera 1.

[0103] 3) Lifting and Camera Focusing: PC 5 controls the cylinder mechanism 7 to smoothly lift the tray and mold, detaching them from the conveyor belt and reaching a stable detection height. Simultaneously, the through-beam sensor 4 continuously monitors and confirms the existence of the mold. Subsequently, PC 5, based on the mold's dimensions, controls the lifting mechanism 8 to move the industrial camera 1 to the preset optimal shooting height, ensuring that the mold's concave cavity fills the camera's field of view and produces a clear image.

[0104] 4) Illumination and Image Acquisition: PC 5 illuminates camera light source 2 via light source controller 6 and adjusts the brightness ratio of inner and outer ring light sources according to a preset illumination strategy to form a uniform and soft dome light. Then, industrial camera 1 is triggered to capture a high-resolution grayscale image of the mold front.

[0105] 5) Image Processing and Feature Extraction: The image processing module in PC 5 performs the following processing steps on the acquired images:

[0106] Preliminary ROI extraction: Using the image center as the origin, crop the image with a radius equal to a certain magnification (e.g., 1.2 times) of the known mold outer diameter, and remove irrelevant background.

[0107] Hough Circle Detection and Selection: Edge detection and binarization are performed on the ROI image, followed by circle detection. Based on the size information in the database, a reasonable radius range is set, and the corresponding three feature circles—the central pillar, the inner corner of the mold cavity, and the upper edge of the mold cavity—are selected from the detection results, and their precise centers and radii are obtained.

[0108] Key area cutting: Based on the center and radius of the selected feature circles, cut out the annular image area covering the surface of the mold most prone to residual dirt according to the preset scaling factor (such as 1.02 times, 0.98 times).

[0109] Defect candidate region extraction: Threshold segmentation is performed on the cut-out annular region image to obtain binary images highlighting bright and dark defects. Morphological operations are performed on each binary image to remove noise and connect neighboring defect pixels. Finally, they are merged to obtain the defect mask image to be detected.

[0110] 6) Deep Learning Model Judgment: The defect mask image obtained in step 5) is input into the deep learning detection model deployed on PC 5. This model is trained using a large number of mold images labeled with defect types. The model performs inference and outputs the bounding box coordinates, class confidence, and class label for each suspected defect in the image.

[0111] 7) Result Judgment and Output: The detection software judges the model output based on preset confidence thresholds and defect size thresholds. Defects judged as unacceptable are recorded and alarms are triggered. All detection results are linked to mold information and production batches and saved.

[0112] 8) Reset and Unloading: After the inspection is completed, PC 5 controls cylinder mechanism 7 to descend, placing the mold and pallet back onto the conveyor belt. The conveyor belt starts, transporting the mold to the next station, while simultaneously preparing to receive the next mold to be inspected.

[0113] In the specific implementation process, after demolding, the thermal battery mold is placed on a tray and moved by the conveyor belt to a position below the detection camera. The tray is then lifted by a cylinder mechanism 7, and the presence of the mold is determined by a through-beam sensor 4. The camera is then moved to a suitable position, the light source is turned on, and an image of the mold is captured. Finally, a trained recognition model is used to describe and determine the defects.

[0114] Furthermore, to ensure clear and easily identifiable defect images, image quality must be guaranteed. To obtain high-quality images, a double-layer concentric annular dome light source is used for illumination during the cleanliness inspection of thermal battery molds.

[0115] Through the above embodiments, the present invention achieves rapid, objective, and high-precision automated detection of the cleanliness of the inner cavity of the hot battery die-casting mold, effectively improving production quality and efficiency.

[0116] The above description is merely a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the technical scope disclosed in the present invention, based on the technical solution and inventive concept of the present invention, should be covered within the scope of protection of the present invention. The visual cleanliness inspection method and device for thermal battery die-casting molds provided by the present invention effectively solves the industry pain points of difficult, inefficient, and inaccurate manual inspection of concave molds, and provides a reliable technical solution for realizing the intelligent and high-quality operation of die-casting production lines.

[0117] Those skilled in the art will understand that the above description is merely a preferred embodiment of the present invention, and the features described in the various embodiments and / or claims of this disclosure can be combined or combined in various ways, even if such combinations or combinations are not explicitly described in this disclosure. This is not intended to limit the present invention. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing embodiments or make equivalent substitutions for some of the technical features. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

[0118] Although preferred embodiments of the invention have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including both the preferred embodiments and all changes and modifications falling within the scope of the invention. Clearly, those skilled in the art can make various alterations and modifications to the invention without departing from its spirit and scope. Thus, if these modifications and modifications of the invention fall within the scope of the claims and their equivalents, the invention is also intended to include these modifications and modifications.

Claims

1. A method for visually inspecting the cleanliness of a thermal battery die-casting mold, characterized in that, Includes the following steps: Step S1: Obtain the product size information of the thermal battery die-casting mold, and configure the field of view of the industrial camera (1) according to the information to ensure that the camera can cover the entire inspection area of ​​the mold; Step S2: Move the tray carrying the mold on the production line so that it is precisely positioned directly below the inspection camera, and achieve positioning through the conveyor belt control system; Step S3: Use the cylinder mechanism (7) to lift the tray to below the camera, and at the same time use the through-beam sensor (4) to detect whether the mold is above the tray, and control the camera to move longitudinally to the preset appropriate position through the lifting mechanism to adapt to molds of different sizes; Step S4: Light up the double-layer concentric ring dome light source to provide uniform illumination for the mold, and take a front image of the mold to ensure image clarity and contrast; Step S5: Segment the captured image according to different thresholds, extract the image region to be detected, and identify key features through image processing algorithms to obtain the image to be detected; Step S6: Use the trained recognition model to describe and determine the cleanliness of the image to be detected, that is, perform defect detection and classification, and finally output the cleanliness status result.

2. The method for visual cleanliness inspection of a thermal battery die-casting mold according to claim 1, characterized in that, Step S3 includes the following steps: Step S3-1: The pallet and the mold on it are lifted to a preset height by the lifting mechanism set under the pallet; during the lifting process or after reaching the preset height, the through-beam sensor (4) set next to the pallet travel path is used to detect whether there is a mold entity above the pallet, so as to confirm that the mold has been accurately positioned at the detection station. Step S3-2: After confirming that the mold is in place, control the lifting mechanism connected to the industrial camera (1) to move. Based on the mold product size information obtained in step S1, calculate and drive the industrial camera (1) to move vertically to an optimized shooting position.

3. The method for visual cleanliness inspection of a thermal battery die-casting mold according to claim 1, characterized in that, Before capturing the mold image in step S4, dynamic adjustment of the exposure parameters, gain parameters, and white balance parameters of the industrial camera (1) is performed. The dynamic adjustment is calculated by the PC (5) based on the acquired product size information, mold material characteristics and real-time brightness feedback of the camera light source (2) so that the central column area of ​​the mold, the inner corner area of ​​the mold cavity and the upper edge area of ​​the mold cavity can all obtain clear and suitable images under the same exposure conditions during the imaging process.

4. The method for visual cleanliness inspection of a thermal battery die-casting mold according to claim 1, characterized in that, Step S5 includes the following steps: Step S5-1: Based on the product radius information, using the image center as a reference and a cutting radius of 1.02 times the radius, cut out the ROI region from the original image; Step S5-2: Perform Hough circle detection on the binarized image to identify circular features of the central pillar, the inner corner of the mold cavity, and the upper edge of the mold cavity; detect the center position of the circular features, calculate the radius, and filter out circles that match the actual size based on the product size information, and eliminate false features; Step S5-3: Based on the selected center and radius information, take the center of the central column circle as the reference and 1.02 times the radius as the cutting radius, cut to the point where the center of the inner corner circle of the mold cavity is the reference and 0.98 times the radius, and obtain the ROI image from the central column to the inner corner of the mold cavity, and the ROI image from the inner corner of the mold cavity to the upper edge of the mold cavity. Step S5-4: Perform preliminary extraction of defective pixels for each of the cut annular sub-region images: set a high threshold and a low threshold for each sub-region image; scan the image pixels, classify pixels with gray values ​​higher than the high threshold as a set of bright suspicious pixels, and classify pixels with gray values ​​lower than the low threshold as a set of low suspicious pixels. Step S5-5: Perform morphological opening or closing operations on the set of high-brightness suspicious pixels and the set of low-brightness suspicious pixels respectively to filter out noise interference; merge the processed high-brightness and low-brightness regions to generate a binarized mask image representing the location of potential defects.

5. The method for visual cleanliness inspection of a thermal battery die-casting mold according to claim 1, characterized in that, The trained recognition model is a Yolov8 or Yolov11 deep learning model; the training of this model is based on a dataset containing a large number of labeled images of hot battery die-casting molds with various cleanliness defects.

6. The method for visual cleanliness inspection of a thermal battery die-casting mold according to claim 1, characterized in that, In step S6, the trained recognition model is used to describe and determine the cleanliness of the image to be detected, including the following steps: Step S6-1: By sequentially inputting the images to be detected into the deep learning model and then performing forward propagation calculations, the cleanliness information present in the images is obtained, namely: the size of the cleanliness defects and the confidence level of each type of cleanliness defect. Step S6-2: Compare the confidence level with a manually set fixed confidence threshold to segment the defect information. If a cleanliness defect information with a confidence level greater than the confidence threshold is found, it is determined that a defect exists. Then compare it with the set defect size threshold. If it is greater than the defect size threshold, it is determined that an unacceptable cleanliness defect exists. Step S6-3: Record the type, size, and number of cleanliness defects; if the defect size is less than the defect size threshold, it is considered an acceptable defect, and the pass information is recorded. When a defect message with a confidence level lower than the threshold is detected, it is determined to be an acceptable defect or no defect, and the qualified information is recorded.

7. The method for visual cleanliness inspection of a thermal battery die-casting mold according to claim 1, characterized in that, After the cleanliness determination of the identification model is performed in step S6, the following steps are executed, including result output and traceability management: The defect type, defect size, defect quantity, defect confidence level, image number, and corresponding production batch information output by the identification model are uniformly stored in the PC (5) database and bound to the pallet number conveyed by the conveyor belt in real time. When the judgment result is an unacceptable defect, an alarm signal is automatically sent to the host computer production management system. At the same time, the corresponding ROI area image is associated with the exported defect location as a basis for quality traceability. All data records are used for subsequent production process optimization, mold cleaning process improvement, and equipment maintenance strategy adjustment.

8. The detection device for the visual cleanliness detection method of a thermal battery die-casting mold according to claim 1, characterized in that, include: The frame, industrial camera (1), camera light source (2), mold tray (3), through-beam sensor (4), PC (5), light source controller (6), cylinder mechanism (7), and lifting mechanism (8); The frame serves as the supporting structure for the testing device, bearing all components to ensure stability and rigidity; An industrial camera (1) is located on the top of the frame and connected to a PC (5). The field of view of the industrial camera (1) covers the conveyor belt on the frame for high-resolution image acquisition. A camera light source (2) is located on the frame below the industrial camera (1). The mold tray (3) is set on the conveyor belt and moves with the conveyor belt; through-beam sensors (4) are installed on both sides of the outside of the conveyor belt to detect whether the mold exists; the through-beam sensors (4) adopt the principle of infrared through-beam and feed back signals to the PC (5) in real time to trigger subsequent actions; The PC (5) is connected to the light source controller (6) and the industrial camera (1) respectively, and is used to process image data, run the recognition model, and control the entire detection process; The light source controller (6) is used to receive instructions from the PC (5) and is connected to the camera light source (2) to adjust the brightness and mode of the camera light source (2) to ensure lighting consistency. The cylinder mechanism (7) is located on the inner side of the conveyor belt below the tray. It is used to perform the action of lifting the tray according to the control command of the PC (5) to ensure that the mold is raised to the inspection position. The lifting mechanism (8) is set on the vertical rod of the frame and connected to the industrial camera (1). The lifting mechanism (8) is driven by a motor to realize the longitudinal movement of the industrial camera (1) to adapt to different mold sizes.

9. The detection device for a visual cleanliness detection method of a thermal battery die-casting mold according to claim 8, characterized in that, The camera light source (2) is a double-layer concentric ring dome light source, and the camera light source (2) adopts an LED array to provide uniform illumination, reduce the shadow of the concave structure of the mold, and enhance image quality; The inner and outer ring light sources of the camera light source (2) are LEDs with different color temperatures or different wavelengths. The light source controller (6) can independently adjust the brightness ratio of the inner and outer ring light sources according to the instructions of the PC (5).

10. The detection device for a visual cleanliness detection method of a thermal battery die-casting mold according to claim 8, characterized in that, The PC (5) communicates with the programmable logic controller via an industrial Ethernet bus to coordinate the start and stop of the conveyor belt, the lifting and lowering of the cylinder mechanism (7), the displacement of the lifting mechanism (8), and the reading of the status signal of the through-beam sensor (4). The PC (5) performs the following steps: After receiving the signal from the through-beam sensor (4) confirming that the mold is in place, the cylinder mechanism (7) is triggered to lift, the lifting mechanism (8) is controlled to move the industrial camera (1) to the preset shooting height, the camera light source (2) is lit through the light source controller (6), the industrial camera (1) is controlled to acquire images, and after completing image processing and judgment, the cylinder mechanism (7) is controlled to descend and reset and the conveyor belt is allowed to transport the pallet to the next station.