A system and method for detecting the cleanliness of sponge balls
The sponge ball cleanliness detection system uses visual sensors and deep learning models to automatically identify the degree of dirtiness of sponge balls, solving the problems of inconsistent accuracy and low speed of traditional manual detection. It achieves automated sorting, reduces costs and false judgment rates, and improves the efficiency of the cleaning system.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CRRC TANGSHAN CO LTD
- Filing Date
- 2026-03-25
- Publication Date
- 2026-06-30
AI Technical Summary
Traditional manual inspection of cleaning sponge balls is inaccurate and slow, and is prone to misjudgment and reduced efficiency due to human factors.
A sponge ball cleanliness detection system, including a vision sensor and control device, is adopted to automatically identify the degree of dirtiness of sponge balls through image processing and deep learning models, thereby achieving automated sorting of clean and dirty balls.
It eliminates the need for manual visual judgment, enables continuous operation, reduces labor intensity, avoids misjudgment, improves detection accuracy, reduces the purchase of new balls, enhances resource utilization, and ensures the efficiency of the cleaning system.
Smart Images

Figure CN122298696A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of pipeline cleaning technology, specifically to a sponge ball cleanliness detection system and method. Background Technology
[0002] Currently, in the production process of high-speed trains, the brake lines are a crucial component directly related to the train's operational safety. Therefore, the cleaning of the brake lines is extremely important. Traditional brake line cleaning processes use sponge balls, and operators often need to visually inspect the used sponge balls to determine if the lines have been cleaned effectively. Existing technologies rely on human observation of the cleaned cotton balls, judging their cleanliness based on experience. However, human judgment is affected by various objective factors, such as the inspector's fatigue, mood, experience, lighting conditions, and even individual differences in their understanding of cleanliness standards. Different people, or even the same person at different times, may make different judgments about the same cotton ball. Manual inspection has limited speed and is prone to visual fatigue due to prolonged work, thus reducing inspection speed and accuracy.
[0003] Therefore, the inconsistent accuracy and low speed of traditional manual inspection of cleaning sponge balls are technical problems that urgently need to be solved by those skilled in the art.
[0004] The information disclosed in the background section is only intended to enhance the understanding of the background of this application, and therefore may contain information that is not part of the prior art known to those skilled in the art. Summary of the Invention
[0005] This application provides a system and method for detecting the cleanliness of sponge balls, in order to solve the problems of inconsistent accuracy and low speed of traditional manual testing of clean sponge balls.
[0006] A sponge ball cleanliness detection system includes a platform and a control device. The platform is equipped with a sponge ball receiving device, a conveying device, a pushing device, a vision sensor, a first material recovery device, and a second material recovery device. The sponge ball receiving device is connected to the pipeline to be cleaned and is used to collect the sponge balls in the pipeline to be cleaned; the bottom of the sponge ball receiving device has an open structure and is opposite to the conveying device. The visual sensor is located at one end of the conveying device near the sponge ball receiving device and is used to acquire surface images of the sponge ball. The control device calculates the degree of dirtiness according to a preset algorithm. When the degree of dirtiness of the sponge ball is less than the preset degree of dirtiness, the control device is activated. The pushing device is located at the end of the conveying device away from the sponge ball receiving device and corresponds to the first material recycling device; the pushing device pushes the sponge ball to the first material recycling device according to the instruction of the control device. The second material recycling device is located at the tail end of the conveying device and is used to receive sponge balls with a dirtiness level greater than or equal to the preset dirtiness level.
[0007] Optionally, when the visual sensor detects a sponge ball, it sends a position detection signal to the control device; The control device controls the conveying device to stop transmission based on the received arrival detection signal.
[0008] Optionally, the visual sensor acquires image information of the sponge ball and sends it to the control device; When the degree of soiling of the sponge ball is greater than or equal to a preset degree of soiling, the control device controls the conveying device to start, so as to convey the sponge ball to the second material recycling device.
[0009] Optionally, when the degree of soiling of the sponge ball is less than a preset degree of soiling, the control device controls the conveying device to start running for a preset time and then stop, so that the sponge ball corresponds to the pushing device.
[0010] Optionally, the first material recovery device and the pushing device are respectively arranged opposite each other on the lateral sides of the conveying device.
[0011] Optionally, it also includes an audible and visual alarm device connected to the control device; when the degree of soiling of the sponge ball is greater than or equal to a preset degree of soiling, the control device controls the audible and visual alarm device to sound an alarm in a first preset manner.
[0012] Optionally, when the degree of soiling of the sponge ball is less than a preset degree of soiling, the control device controls the audible and visual alarm device to sound an alarm in a second preset manner.
[0013] Optionally, the sponge ball receiving device is a rectangular cavity with an opening at the bottom.
[0014] Optionally, the pushing device is a pushing cylinder.
[0015] Optionally, the conveying device is a conveyor belt.
[0016] This application also provides a method for testing the cleanliness of sponge balls, including: The system receives RGB images of a sponge ball from a vision sensor, and sequentially performs color space conversion, image denoising, and image enhancement to obtain an enhanced image. The enhanced image is segmented using the Otsu algorithm to generate a binary image. Morphological operations are performed on the binary image, and all connected components in the binary image are identified by a contour detection algorithm. The contour corresponding to the sponge ball is selected based on a preset area threshold, and its bounding rectangle is used as the region of interest. After the extracted region of interest image is normalized in size and pixel value, it is input into a trained deep learning classification model. The model outputs the confidence score of whether it belongs to the "clean" or "unclean" category, and generates a binary cleanliness judgment result based on a preset confidence threshold.
[0017] Optionally, the color space conversion, image denoising, and image enhancement include: Convert the RGB image to the HSV color space to obtain three component images: hue (H), saturation (S), and lightness (V). A high-speed filtering algorithm is used to smooth the V component image to obtain a smoothed image; The smoothed image is enhanced using a contrast-limited adaptive histogram equalization algorithm.
[0018] Optionally, the step of normalizing the size and standardizing the pixel values of the extracted region of interest image, inputting it into a trained deep learning classification model, and having the model output the confidence score of whether it belongs to the "clean" or "unclean" category, and generating a binary cleanliness judgment result based on a preset confidence threshold, specifically includes: The extracted region of interest image is scaled to a fixed size and normalized to the [0,1] interval before being input into a pre-trained convolutional neural network model for inference. The model uses ConvNeXt, a depthwise separable convolutional structure, as the backbone network. It is trained on a dedicated dataset for sponge ball cleanliness through transfer learning and outputs a two-dimensional classification vector P = [p_clean, p_dirty], where p_clean + p_dirty = 1. If p_clean ≥ a preset threshold τ, it is judged as "clean"; otherwise, it is judged as "unclean".
[0019] Optionally, the convolutional neural network model is obtained through the following training method: Construct a dataset containing images of "clean" and "unclean" sponge balls, and perform data augmentation on the dataset; The convolutional neural network is initialized using model weights pre-trained on the dataset.
[0020] The embodiments of this application, by adopting the above technical solutions, have the following technical effects: In this application, the sponge balls return from the pipeline to the sponge ball receiving device and fall onto the conveying device. The conveying device sends the balls to a vision sensor, which takes pictures and analyzes the degree of dirtiness. The control device makes a judgment: if the ball is clean, it is pushed out at the pushing station and enters the first recycling device; if the ball is dirty, it is not pushed out and slides directly to the end to enter the second recycling device. The sponge ball cleanliness detection system does not require manual visual judgment, can operate continuously, reduces labor intensity, avoids human error, realizes automated sorting, and reduces manual intervention. Clean balls can be directly reused, significantly reducing the purchase of new balls, improving resource utilization, and reducing costs. It avoids the re-entry of severely contaminated sponge balls into the pipeline, which would affect the cleaning effect or cause secondary pollution, thus ensuring the efficiency of the cleaning system. Attached Figure Description
[0021] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings: Figure 1 This is a schematic diagram of the structure of the sponge ball cleanliness detection system according to an embodiment of this application.
[0022] Figure label: Platform 1, Control device 2, Sponge ball receiving device 3, Conveying device 4, Pushing device 5, Vision sensor 6, First material recovery device 7, Second material recovery device 8, Pipeline to be cleaned 9, Audible and visual alarm device 10. Detailed Implementation
[0023] To make the technical solutions and advantages of the embodiments of this application clearer, the exemplary embodiments of this application will be described in further detail below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not an exhaustive list of all embodiments. It should be noted that, unless otherwise specified, the embodiments and features in the embodiments of this application can be combined with each other.
[0024] like Figure 1 As shown, the sponge ball cleanliness detection system of this application embodiment includes: Platform 1 and control device 2, Platform 1 is equipped with sponge ball receiving device 3, conveying device 4, pushing device 5, vision sensor 6, first material recycling device 7 and second material recycling device 8; The sponge ball receiving device 3 is connected to the pipeline 9 to be cleaned and is used to collect the sponge balls in the pipeline 9 to be cleaned; the bottom of the sponge ball receiving device 3 is an open structure, which is opposite to the conveying device 4. The vision sensor 6 is located at one end of the conveying device 4 near the sponge ball receiving device 3. It is used to detect the degree of dirtiness of the sponge ball. When the degree of dirtiness of the sponge ball is less than the preset degree of dirtiness, the control device 2 controls the pushing device 5 to operate. The pushing device 5 is located at the end of the conveying device 4 away from the sponge ball receiving device 3 and corresponds to the first material recycling device 7; the pushing device 5 pushes the sponge ball to the first material recycling device 7 according to the instructions of the control device 2. The second material recycling device 8 is located at the tail end of the conveying device 4 and is used to receive sponge balls with a dirtiness level greater than or equal to a preset dirtiness level.
[0025] Understandably, platform 1 serves as the supporting foundation of the system, used for the installation of various functional modules to provide structural stability and layout rationality; the sponge ball receiving device 3 receives the sponge balls that have completed the cleaning task from the cleaning pipeline 9, and its bottom is an open structure facing the conveying device 4 below. After the sponge balls enter the receiving device with the airflow, they fall onto the conveying device 4 due to gravity; the conveying device 4 can be set as a belt conveyor, roller conveyor, etc., to transport the falling sponge balls one by one in an orderly manner to the detection and sorting station, ensuring that the sponge balls are arranged in a single row and the spacing is controllable, which is convenient for visual identification and material pushing positioning.
[0026] The vision sensor 6 is located at the end of the conveying device 4 near the receiving device, i.e., at the entrance side of the conveying device 4. It is used to acquire images of the surface of the sponge ball. The control device 2 quantifies the degree of dirtiness according to a preset image processing algorithm. The image processing algorithm, such as grayscale analysis, color recognition, and stain area calculation, can be implemented using an industrial camera, light source, and image processing software, such as OpenCV and deep learning models. The control device 2 compares the calculated degree of dirtiness data with a preset degree of dirtiness threshold. When the degree of dirtiness is less than the preset degree of dirtiness, it is determined to be reusable, and the pushing device 5 is triggered. When the degree of dirtiness is greater than or equal to the preset degree of dirtiness, it is determined to be discarded or deep cleaned, and the pushing device is not triggered, allowing the ball to slide naturally to the end.
[0027] The pushing device 5 is located at the end of the conveying device 4 furthest from the sponge ball receiving device 3. It can be configured as a cylinder pusher, an electric pusher plate, or a swing arm, etc. It operates when the control device 2 issues a command, pushing qualified sponge balls laterally to the first material recovery device 7. The first material recovery device 7 is used to collect sponge balls that meet the cleanliness standards, which can be directly reinjected into the pipeline system for recycling, reducing consumable costs. The second material recovery device 8 is located directly below the tail end of the conveying device 4 and is used to receive dirty balls that have not been pushed out, facilitating subsequent centralized cleaning, regeneration, or disposal.
[0028] The aforementioned sponge ball cleanliness detection system eliminates the need for manual visual judgment, can operate continuously, reduces labor intensity, avoids human error, achieves automated sorting, and reduces manual intervention; clean balls can be directly reused, significantly reducing the amount of new balls purchased, improving resource utilization, and reducing costs; it also prevents severely contaminated sponge balls from being put back into the pipeline, which could affect the cleaning effect or cause secondary pollution, thus ensuring the efficiency of the cleaning system.
[0029] In one embodiment, when the visual sensor 6 detects a sponge ball, it sends a position detection signal to the control device 2. The control device 2 controls the transmission device 4 to stop transmission based on the received arrival detection signal.
[0030] When the vision sensor 6 detects a sponge ball entering its field of view and completing its positioning, it determines that the ball is in position and sends a position detection signal to the control device 2. Upon receiving the position detection signal, the control device 2 immediately issues a command to stop the conveyor device 4, allowing the vision sensor 6 to perform high-precision image acquisition. As the sponge ball moves with the conveyor belt and enters the field of view of the vision sensor 6, the vision sensor 6 identifies it and sends a position detection signal. The control device 2 then commands the conveyor device 4 to stop. The vision sensor 6 completes the dirt detection while stationary. Based on the result, the control device 2 decides whether to start pushing the material and resume conveying.
[0031] Eliminate image blurring, ghosting, and positional shifts caused by conveyor belt movement; ensure that each detection is performed at the same location and under the same lighting conditions, improving repeatability and reliability; reduce reliance on high-speed cameras or complex algorithms; and avoid the impact of conveyor speed fluctuations on detection results.
[0032] In one embodiment, the visual sensor 6 acquires image information of the sponge ball and sends it to the control device 2; When the degree of soiling of the sponge ball is greater than or equal to the preset degree of soiling, the control device 2 controls the start of the conveying device 4 to convey the sponge ball to the second material recycling device 8.
[0033] When the conveyor 4 is stopped, the vision sensor 6 acquires high-quality images of the sponge balls and sends the original images or processed feature data to the control device 2 for subsequent judgment. The control device 2 analyzes the received image information and compares it with a preset dirtiness threshold: if the dirtiness is greater than or equal to the preset dirtiness threshold, it is judged as "unqualified / dirty ball". At this time, the control device 2 starts the conveyor 4, allowing the conveyor belt to continue running. The sponge balls move with the conveyor belt to the end and naturally fall into the second material recycling device 8, realizing a complete dirty ball processing flow of detection, judgment, and recovery conveying, forming a complete closed loop. This achieves fully automatic diversion of dirty balls without manual intervention; avoids dirty balls from accidentally entering the reuse channel, and improves sorting efficiency and cycle control.
[0034] In another embodiment, when the degree of soiling of the sponge ball is less than the preset degree of soiling, the control device 2 controls the conveying device 4 to start running for a preset time and then stop, so that the sponge ball corresponds to the pushing device 5.
[0035] When the control device 2 completes the image analysis and determines that the sponge ball is reusable, the control device 2 starts the conveying device 4 and makes it run for a pre-calibrated time. After the time is up, it stops automatically. The sponge ball is then transported to the front or the action position of the pushing device 5 to achieve precise positioning, so that the pushing device 5 can accurately push it laterally to the first material recycling device 7.
[0036] Understandably, the preset duration is calculated through calibration experiments, under a known conveying speed, to determine the time required from the visual detection position to the push position.
[0037] Specifically, the first material recovery device 7 and the pushing device 5 are respectively arranged opposite each other on the transverse sides of the conveying device 4.
[0038] In one optional embodiment, an audible and visual alarm device 10 is also included, which is connected to the control device 2; when the degree of dirtiness of the sponge ball is greater than or equal to a preset degree of dirtiness, the control device 2 controls the audible and visual alarm device 10 to alarm in a first preset manner.
[0039] When the vision sensor 6 detects that the dirtiness of a sponge ball is greater than or equal to the preset dirtiness level, it is determined to be a "dirty ball". The control device 2 not only performs the sorting action, but also triggers an alarm. The alarm adopts the first preset mode, such as: a solid red light and continuous beeping; flashing at a specific frequency and voice broadcast "Dirty ball found".
[0040] Furthermore, when the degree of soiling of the sponge ball is less than the preset degree of soiling, the control device 2 controls the audible and visual alarm device 10 to alarm in a second preset manner.
[0041] The second preset mode can be green or a short beep. Different colors, sound frequencies, flashing rhythms or durations can be used to distinguish between the two states without the need for additional equipment. Operators do not need to look at the screen or background data; they can determine whether the ball being processed is clean or dirty simply by the color of the light or the type of the sound. This enables full-process status visualization and auditory feedback, facilitating rapid debugging and troubleshooting.
[0042] Optionally, the sponge ball receiving device 3 is a rectangular cavity with an open bottom; the rectangular cavity is a hollow shell with a rectangular cross-section, and the rectangular inner wall can suppress the disorderly rolling or jamming of the ball in the cavity; and guide the ball to concentrate towards the center or the opening direction.
[0043] In one specific embodiment, platform 1 consists of 40 The system is constructed with 40mm aluminum profiles and topped with anti-static wooden boards to protect pipelines, personnel, and cleaning equipment. The main structure of the host computer control system is made of sheet metal, containing electrical components, a computer, mouse, keyboard, etc., for storing software, controlling operational processes, and housing the PLC control system. One end of the pipeline to be cleaned (9) is inserted into a sponge ball receiving box, and the other end is sprayed with a cleaning air gun. The sponge ball receiving box, located at the pipeline outlet, collects the sponge balls ejected at high speed from the pipeline, preventing them from scattering. The conveying device (4) includes a motor, control device (2), sensors, and other input devices to transfer the sponge balls from the receiving box. Simultaneously, camera detection is performed on the conveying device (4). The system classifies and recycles clean and unclean cotton balls; a discharge cylinder pushes detected clean cotton balls to the first material recycling device 7; a camera connects to the control device 2, comparing the captured images of cotton balls with those inside the system, and then controls the audible and visual alarm to issue a prompt; the first material recycling device 7 recycles clean cotton balls detected as "clean"; the second material recycling device 8 recycles clean cotton balls detected as "unclean"; the audible and visual alarm is used to sound and light up when the system detects "clean" or "unclean" cotton balls. When an "unclean" cotton ball is detected, the red light of the audible and visual alarm device 10 illuminates; when a "clean" cotton ball is detected, the green light of the audible and visual alarm device 10 illuminates, and a buzzer sounds an alarm. Control device 2 adopts OpenCV's MOG2 background subtraction algorithm, which can adaptively learn the background, resist shadow interference, and is computationally efficient and parameter controllable. The deep learning model adopts the ConvNeXt architecture, with transfer learning fine-tuning and deployment quantization optimization. When the recognition control result is "no", trigger mode A is activated, the relay port is "1", and a photoelectric prompt is given. When the recognition control result is "yes", trigger mode B is activated, the relay ports are "2, 3", and a photoelectric prompt and an audio prompt are given.
[0044] The aforementioned system reduces inspection and prevention costs and optimizes human resource allocation.
[0045] Based on the above-mentioned sponge ball cleanliness detection system, this application also provides a method for detecting sponge ball cleanliness, which is configured correspondingly to the system; the method includes: S11: Receive the RGB image of the sponge ball acquired by the vision sensor, and sequentially perform color space conversion, image denoising and image enhancement to obtain the enhanced image; Visual sensors, such as industrial cameras and high-definition cameras, are used to acquire color images of the surface of a sponge ball. RGB is typically converted to HSV, Lab, or YUV color spaces to better distinguish stains from the body. For example, in HSV, "S" (saturation) and "V" (brightness) are sensitive to stains. Gaussian filtering and median filtering are used to suppress image noise (such as uneven lighting and sensor noise) to avoid interfering with subsequent segmentation. Histogram equalization and contrast stretching are used to improve the contrast between stains and clean areas, making stains easier to identify.
[0046] S12: The enhanced image is segmented using the Otsu algorithm to generate a binary image. Morphological operations are performed on the binary image, and all connected components in the binary image are identified by the contour detection algorithm. The contour corresponding to the sponge ball is selected based on the preset area threshold, and its bounding rectangle is used as the region of interest. The Otsu algorithm is an adaptive global thresholding segmentation method that divides an image into foreground and background. It repairs the segmented binary image through morphological operations such as opening and closing operations to eliminate burrs and holes. It uses algorithms such as OpenCV's findContours to extract the boundaries of all connected regions. It excludes contours that are too small or too large, retaining contours that conform to the actual size of the sponge ball. It then uses the minimum bounding rectangle to crop the sponge ball region as the region of interest (ROI) for subsequent analysis, avoiding background interference.
[0047] S13: After normalizing the size and standardizing the pixel values of the extracted region of interest image, input it into the trained deep learning classification model. The model outputs the confidence score of whether it belongs to the "clean" or "unclean" category, and generates a binary cleanliness judgment result based on the preset confidence threshold.
[0048] Scale ROIs of different sizes to a fixed size (e.g., 224×224) to meet the input requirements of deep learning models; normalize pixel values to the range of [0,1] or [-1,1] to accelerate model convergence and improve generalization ability.
[0049] The above detection method requires no manual intervention from image acquisition to result output, making it suitable for online inspection in production lines and significantly improving efficiency. Through color space conversion, noise reduction, and enhancement, it effectively addresses complex working conditions such as changes in lighting, reflections, and shadows. It can output confidence scores, avoiding the subjectivity and fatigue errors of manual visual inspection.
[0050] In one specific embodiment, color space conversion, image denoising, and image enhancement include: Convert the RGB image to the HSV color space to obtain three component images: hue (H), saturation (S), and lightness (V). A high-speed filtering algorithm is used to smooth the V component image to obtain a smoothed image; A contrast-limited adaptive histogram equalization algorithm is used to enhance smooth images.
[0051] The system receives RGB images captured by an industrial camera and sequentially performs color space conversion, image denoising, and image enhancement. Color space conversion converts the RGB image to the HSV color space, obtaining three components: hue (H), saturation (S), and lightness (V). Image denoising applies a Gaussian filter to the V component using a two-dimensional Gaussian function.
[0052] The generated and normalized weight matrix K is convolved to obtain a smoothed image V_smooth. Image enhancement applies a contrast-limited adaptive histogram equalization algorithm to V_smooth to improve image contrast. Here, σ is the standard deviation, ranging from 0.8 to 1.5, and the convolution kernel size is 5×5 or 7×7.
[0053] Furthermore, after normalizing the size and standardizing the pixel values of the extracted region of interest image, it is input into a trained deep learning classification model. The model outputs the confidence score of whether it belongs to the "clean" or "unclean" category, and generates a binary cleanliness judgment result based on a preset confidence threshold, specifically including: The extracted region of interest image is scaled to a fixed size and normalized to the [0,1] interval before being input into a pre-trained convolutional neural network model for inference. The model uses ConvNeXt, a deep separable convolutional structure containing 7×7 large convolutional kernels, as the backbone network. It is trained on a dedicated dataset for sponge ball cleanliness through transfer learning and outputs a two-dimensional classification vector P = [p_clean, p_dirty], where p_clean + p_dirty = 1. If p_clean ≥ a preset threshold τ, it is judged as "clean"; otherwise, it is judged as "unclean".
[0054] After scaling the ROI image to a fixed size W×H and normalizing it to the [0,1] interval, it is input into a pre-trained convolutional neural network model for inference. The model uses ConvNeXt, a deep separable convolutional structure containing 7×7 large convolutional kernels, as the backbone network. It is trained on a dedicated dataset for sponge ball cleanliness through transfer learning and outputs a two-dimensional classification vector P = [p_clean, p_dirty], where p_clean + p_dirty = 1. If p_clean ≥ the preset threshold τ, it is judged as "clean"; otherwise, it is judged as "unclean". If the result is "clean", the control device sends a first level signal to the sound and light alarm device to trigger the green indicator light and buzzer, and after a precise delay, sends a second level signal to the pushing device to drive the electromagnetic cylinder and push the sponge ball into the qualified product channel. If the product is determined to be "unclean", a third-level signal is sent to the audible and visual alarm device to trigger the red indicator light. The pushing device does not move, and the sponge ball falls into the defective product channel. The decision threshold τ ranges from 0.6 to 0.9 and can be dynamically adjusted according to the actual production line misjudgment rate requirements. At the same time, the classification results and confidence labels are overlaid on the ROI image, named and stored in the database and file system by category and timestamp, and pushed to the front-end monitoring interface in real time via WebSocket.
[0055] The convolutional neural network model is obtained through the following training method: Construct a dataset containing images of "clean" and "unclean" sponge balls, and perform data augmentation on the dataset; The convolutional neural network is initialized using model weights pre-trained on the dataset.
[0056] Specifically, a dataset containing images of "clean" and "unclean" sponge balls was constructed, and data augmentation was performed by random rotation, scaling, brightness adjustment, and noise addition; ImageNet pre-trained weights were loaded to initialize the model; the backbone network was first frozen to train only the classification head, and then some deep networks were unfrozen for fine-tuning; the cross-entropy loss function and Adam optimizer were used, combined with dynamic learning rate adjustment and early stopping mechanism to prevent overfitting, and the model performance was evaluated on the test set.
[0057] Although preferred embodiments of this application 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 the preferred embodiments as well as all changes and modifications falling within the scope of this application.
[0058] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the spirit and scope of this application. Therefore, if such modifications and variations fall within the scope of the claims of this application and their equivalents, this application also intends to include such modifications and variations.
Claims
1. A sponge ball cleanliness detection system characterized by, The system includes a platform and a control device. The platform is equipped with a sponge ball receiving device, a conveying device, a pushing device, a vision sensor, a first material recovery device, and a second material recovery device. The sponge ball receiving device is connected to the pipeline to be cleaned and is used to collect the sponge balls in the pipeline to be cleaned; the bottom of the sponge ball receiving device has an open structure and is opposite to the conveying device. The visual sensor is located at one end of the conveying device near the sponge ball receiving device and is used to acquire surface images of the sponge ball. The control device calculates the degree of dirtiness according to a preset algorithm. When the degree of dirtiness of the sponge ball is less than the preset degree of dirtiness, the control device is activated. The pushing device is located at the end of the conveying device away from the sponge ball receiving device and corresponds to the first material recycling device; the pushing device pushes the sponge ball to the first material recycling device according to the instruction of the control device. The second material recycling device is located at the tail end of the conveying device and is used to receive sponge balls with a dirtiness level greater than or equal to the preset dirtiness level.
2. The sponge ball cleanliness detection system of claim 1, wherein, When the visual sensor detects a sponge ball, it sends a position detection signal to the control device. The control device controls the conveying device to stop transmission based on the received arrival detection signal.
3. The sponge ball cleanliness detection system of claim 2, wherein, The visual sensor acquires image information of the sponge ball and sends it to the control device; When the degree of soiling of the sponge ball is greater than or equal to a preset degree of soiling, the control device controls the conveying device to start, so as to convey the sponge ball to the second material recycling device.
4. The sponge ball cleanliness detection system of claim 3, wherein, When the degree of soiling of the sponge ball is less than the preset degree of soiling, the control device controls the conveying device to start running for a preset time and then stop, so that the sponge ball corresponds to the pushing device.
5. The sponge ball cleanliness detection system of claim 1, wherein, The first material recovery device and the pushing device are respectively arranged opposite each other on the lateral sides of the conveying device.
6. The sponge ball cleanliness detection system of claim 1, wherein, It also includes an audible and visual alarm device connected to the control device; when the degree of dirtiness of the sponge ball is greater than or equal to a preset degree of dirtiness, the control device controls the audible and visual alarm device to sound an alarm in a first preset manner.
7. The sponge ball cleanliness detection system of claim 6, wherein, When the degree of soiling of the sponge ball is less than the preset degree of soiling, the control device controls the audible and visual alarm device to sound an alarm in a second preset manner.
8. The sponge ball cleanliness detection system according to claim 1, characterized in that, The sponge ball receiving device is a rectangular cavity with an opening at the bottom.
9. The sponge ball cleanliness detection system according to claim 1, characterized in that, The pushing device is a pushing cylinder.
10. The sponge ball cleanliness detection system according to claim 1, characterized in that, The conveying device is a conveyor belt.
11. A method for detecting the cleanliness of sponge balls, characterized in that, include: The system receives RGB images of a sponge ball from a vision sensor, and sequentially performs color space conversion, image denoising, and image enhancement to obtain an enhanced image. The enhanced image is segmented using the Otsu algorithm to generate a binary image. Morphological operations are performed on the binary image, and all connected components in the binary image are identified by a contour detection algorithm. The contour corresponding to the sponge ball is selected based on a preset area threshold, and its bounding rectangle is used as the region of interest. After the extracted region of interest image is normalized in size and pixel value, it is input into a trained deep learning classification model. The model outputs the confidence score of whether it belongs to the "clean" or "unclean" category, and generates a binary cleanliness judgment result based on a preset confidence threshold.
12. The method for detecting the cleanliness of sponge balls according to claim 11, characterized in that, The color space conversion, image denoising, and image enhancement include: Convert the RGB image to the HSV color space to obtain three component images: hue (H), saturation (S), and lightness (V). A high-speed filtering algorithm is used to smooth the V component image to obtain a smoothed image; The smoothed image is enhanced using a contrast-limited adaptive histogram equalization algorithm.
13. The method for detecting the cleanliness of sponge balls according to claim 11, characterized in that, The process involves normalizing the size and standardizing the pixel values of the extracted region of interest image, then inputting it into a trained deep learning classification model. The model outputs a confidence score indicating whether the image belongs to the "clean" or "unclean" category, and generates a binary cleanliness determination result based on a preset confidence threshold. Specifically, this includes: After the extracted region of interest image is scaled to a fixed size and normalized to the [0,1] interval, it is input into a pre-trained convolutional neural network model for inference. The model uses ConvNeXt with a depth-separable convolutional kernel as the backbone network and is trained on a dedicated dataset for sponge ball cleanliness through transfer learning. It outputs a two-dimensional classification vector P = [p_clean, p_dirty], where p_clean + p_dirty = 1. If p_clean ≥ a preset threshold τ, it is judged as "clean"; otherwise, it is judged as "unclean".
14. The method for detecting the cleanliness of sponge balls according to claim 13, characterized in that, The convolutional neural network model was obtained through the following training method: Construct a dataset containing images of "clean" and "unclean" sponge balls, and perform data augmentation on the dataset; The convolutional neural network is initialized using model weights pre-trained on the dataset.