Toilet water ring and stain area distinguishing and targeted cleaning path planning method and system
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SHENGHUI CLEANNESS GRP HLDG LTD
- Filing Date
- 2026-03-18
- Publication Date
- 2026-06-26
AI Technical Summary
Existing toilet cleaning robots cannot accurately distinguish between water rings and solid stains, resulting in a single cleaning path, which easily leads to sewage splashing and poor cleaning effect.
The toilet cleaning robot acquires real-time RGB and depth images through its image acquisition module, performs pixel-level segmentation using an improved lightweight semantic segmentation model, constructs a three-dimensional feature map of the toilet's interior, generates differentiated cleaning paths, and adjusts trajectory parameters in real time to suppress sewage splashing.
It achieves precise differentiation between water rings and stains and differentiated path planning, effectively suppressing wastewater splashing and improving cleaning efficiency and effectiveness.
Smart Images

Figure CN122289646A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of toilet cleaning robot technology, and in particular to a method and system for distinguishing and identifying toilet rims and stains and planning targeted cleaning paths. Background Technology
[0002] With the development of smart home and smart manufacturing technologies, toilet cleaning robots are gradually replacing manual cleaning and becoming an important piece of equipment for cleaning household and public restrooms. Existing toilet cleaning robots mostly use fixed cleaning paths (such as a bow shape or spiral), which can only achieve full coverage cleaning of the toilet bowl cavity and cannot accurately distinguish between the water rim area and solid stain areas inside the toilet.
[0003] In actual cleaning processes, the fixed paths of traditional robots easily cross the water rim area, causing the cleaning brush head to agitate wastewater and splash, contaminating both the toilet's exterior and the robot's body. Furthermore, applying the same cleaning strategy to solid stains as to the water rim area results in either incomplete cleaning or over-cleaning, leading to damage to the glaze. Some improved technologies attempt to differentiate stains through visual recognition, but this only achieves rough stain location and cannot accurately define the boundary between the water rim and solid stains. Moreover, the path planning lacks differentiated design for different areas, failing to address the core issues of wastewater splashing and poor cleaning effectiveness.
[0004] Furthermore, existing semantic segmentation algorithms are mostly applied to general scenarios. When directly applied to toilet cleaning scenarios, they suffer from problems such as large model parameters, slow inference speed, and insufficient edge segmentation accuracy, failing to meet the real-time processing requirements of the robot. Therefore, there is an urgent need for a toilet cleaning robot technology solution that can accurately distinguish between water ripples and solid stains, achieve differentiated targeted path planning, and suppress sewage splashing. Summary of the Invention
[0005] The purpose of this invention is to propose a method for distinguishing and identifying toilet rims and stains and for targeted cleaning path planning, in order to solve the technical problems of existing toilet cleaning robots that cannot accurately distinguish between rims and solid stains, have a single cleaning path leading to wastewater splashing, and have poor cleaning effect.
[0006] This invention is implemented as follows: a method for distinguishing and identifying toilet seat sills and stains, and for planning a targeted cleaning path, the method comprising the following steps: The toilet cleaning robot uses an image acquisition module to collect real-time RGB and depth images of the toilet's internal cavity. The collected images are then preprocessed to obtain standardized image data. Standardized image data is input into an improved lightweight semantic segmentation model. The model performs pixel-level semantic segmentation on the image through its encoder-decoder structure and outputs the segmentation results of the toilet's interior region. The segmentation results include pixel-level masks of the water rim region, solid stain region, and background region. Based on the segmentation results and depth image data, a three-dimensional feature map of the toilet interior is constructed, and the edge contour of the water rim area, the location coordinates and area of the solid stain area, and the structural feature parameters of the background area are extracted. Based on the 3D regional feature map, an edge bypass path is generated for the water sphere area; a targeted cleaning path is generated for the solid stain area. By integrating the curved surface features of the toilet cavity, the trajectory parameters of the generated path are optimized, and the parameters of the robot cleaning brush head are adjusted to obtain the final cleaning path; The cleaning operation is performed according to the final cleaning path, and the images and pressure data of the operation process are collected in real time and fed back. The cleaning path and brush head parameters are dynamically adjusted based on the feedback.
[0007] Another objective of this invention is to provide a system for distinguishing and identifying toilet seat sills and stains, and for planning targeted cleaning paths. The system includes: The image acquisition module is used to acquire real-time RGB and depth images of the toilet's internal cavity; The preprocessing module is used to preprocess the acquired images to obtain standardized image data; The semantic segmentation processing module is used to input standardized image data into an improved lightweight semantic segmentation model, perform pixel-level semantic segmentation on the image through the model's encoder-decoder structure, and output the segmentation results of the toilet's internal region. The segmentation results include pixel-level masks of the water rim region, solid stain region, and background region. The 3D region feature map construction and region feature extraction module is used to construct a 3D region feature map of the toilet interior based on the segmentation results and depth image data, and extract the edge contour of the water rim area, the location coordinates and area of the solid stain area, and the structural feature parameters of the background area. The path planning module is used to generate edge bypass paths for water sphere areas and targeted cleaning paths for solid stain areas based on 3D regional feature maps. The trajectory parameter optimization module is used to integrate the curved surface features of the toilet cavity, optimize the trajectory parameters of the generated path, adjust the parameters of the robot cleaning brush head, and obtain the final cleaning path. The cleaning execution module is used to perform cleaning operations according to the final cleaning path, and synchronously collect images and pressure data of the operation process in real time and provide feedback. The feedback correction module is used to dynamically correct the cleaning path and brush head parameters based on the feedback images and pressure data of the operation process.
[0008] Beneficial effects of the present invention This invention proposes a method and system for distinguishing and identifying toilet rims and stains, and for targeted cleaning path planning, relating to the field of toilet cleaning robot technology. The method includes: acquiring real-time images of the toilet's interior using an image acquisition module mounted on the robot; performing pixel-level segmentation of the image using an improved lightweight semantic segmentation model to accurately distinguish the rim area, solid stain area, and background area; constructing a feature map of the toilet's interior area based on the segmentation results; generating edge-bypass paths for the rim area and targeted cleaning paths for the solid stain area; dynamically adjusting trajectory parameters by incorporating toilet surface features during path planning; and controlling the cleaning execution module to operate according to the planned path, simultaneously correcting path deviations in real time through visual feedback. This invention achieves accurate distinction between the rim and stains and differentiated path planning, effectively suppressing wastewater splashing and improving cleaning efficiency and effectiveness. Attached Figure Description
[0009] Figure 1 This is a flowchart of a preferred embodiment of the present invention for distinguishing and identifying toilet seat rims and stains and planning targeted cleaning paths; Figure 2 This is a structural diagram of a toilet seat water ring and stain differentiation and targeted cleaning path planning system according to a preferred embodiment of the present invention. Detailed Implementation
[0010] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. For ease of explanation, only the parts related to the embodiments of this invention are shown. It should be understood that the specific embodiments described herein are merely for explaining this invention and are not intended to limit this invention.
[0011] This invention proposes a method and system for distinguishing and identifying toilet rims and stains, and for targeted cleaning path planning, relating to the field of toilet cleaning robot technology. The method includes: acquiring real-time images of the toilet's interior using an image acquisition module mounted on the robot; performing pixel-level segmentation of the image using an improved lightweight semantic segmentation model to accurately distinguish the rim area, solid stain area, and background area; constructing a feature map of the toilet's interior area based on the segmentation results; generating edge-bypass paths for the rim area and targeted cleaning paths for the solid stain area; dynamically adjusting trajectory parameters by incorporating toilet surface features during path planning; and controlling the cleaning execution module to operate according to the planned path, simultaneously correcting path deviations in real time through visual feedback. This invention achieves accurate distinction between the rim and stains and differentiated path planning, effectively suppressing wastewater splashing and improving cleaning efficiency and effectiveness.
[0012] Figure 1This is a flowchart of a preferred embodiment of the present invention for distinguishing and identifying toilet seat rims and stains, and for planning targeted cleaning paths; the method includes the following steps: S1. The image acquisition module mounted on the toilet cleaning robot acquires real-time RGB and depth images of the toilet's internal cavity, and preprocesses the acquired images to obtain standardized image data. In this embodiment of the invention, the preprocessing includes image denoising, size normalization, color gamut calibration, and data augmentation. The data augmentation employs random flipping, brightness adjustment, and Gaussian blurring to improve the model's generalization ability.
[0013] Specifically, after the toilet cleaning robot (equipped with an image acquisition module) moves to the target toilet position, it adjusts the angle of the image acquisition module so that the RGB camera and depth camera are aimed at the inside of the toilet cavity, capturing multiple frames of RGB images and corresponding depth images. The acquired images are preprocessed: first, a Gaussian filtering algorithm is used to remove image noise; then, the image size is normalized to the target pixel size (e.g., 640×480 pixels); color gamut calibration is performed to eliminate the influence of light; finally, data enhancement is performed through random flipping, brightness adjustment, and Gaussian blurring to obtain standardized image data, improving the generalization ability of subsequent semantic segmentation.
[0014] For example, in one embodiment of the present invention, an RGB camera with a resolution of 1920×1080 and a frame rate of 30fps, a TOF depth camera (measurement range 0.1-1.0m, accuracy ±2mm) is selected, and an SG90 servo motor is used to adjust the camera angle, with an adjustment range of -30° to 60°. The camera communicates with the semantic segmentation processing module via a USB 3.0 interface. The toilet cleaning robot is placed next to the target toilet (a common ceramic toilet, 6L capacity, water level 80mm, with two solid stains at the bottom, with areas of 5cm² and 8cm² respectively). The robot autonomously moves to the working position, adjusts the servo motor angle of the image acquisition module, and aligns the camera with the inside of the toilet cavity to acquire 10 frames of RGB images and corresponding depth images. The images are preprocessed: noise is removed using a 5×5 Gaussian filter kernel, the image size is normalized to 640×480 pixels, color gamut calibration is performed using a grayscale world algorithm, and data enhancement is performed using random horizontal flipping, ±10% brightness adjustment, and Gaussian blur with a standard deviation of 0.1 to obtain standardized image data.
[0015] S2. Input the standardized image data into the improved lightweight semantic segmentation model, and perform pixel-level semantic segmentation on the image through the model's encoder-decoder structure, and output the segmentation result of the toilet's internal region. The segmentation result includes pixel-level masks of the water rim region, solid stain region and background region. Specifically, standardized image data is input into an improved lightweight semantic segmentation model. This model uses a MobileNetV3 backbone network to extract image features and replaces traditional convolutional layers with depthwise separable convolutions, reducing the number of model parameters while maintaining feature extraction capabilities. A channel attention mechanism module is introduced at the decoding end to strengthen the edge feature weights of the rim and solid stains, achieving accurate segmentation of these two types of regions. The model outputs a pixel-level mask of the toilet's internal area. This pixel-level mask is a pixel-level classification label map used to distinguish between the background area, the rim area, and the solid stain area. Mask value 0 represents the background area (the toilet glaze without stains or the rim), mask value 1 represents the rim area, and mask value 2 represents the solid stain area (scale, urine stains, feces stains, etc.).
[0016] For example, in one embodiment of the present invention, the semantic segmentation processing model uses an NVIDIA Jetson Nano embedded processor, equipped with an improved lightweight semantic segmentation model. The model is trained based on the PyTorch framework, and the training dataset consists of 5000 images of the inside of a toilet under different conditions (different water levels, different stain types, and different lighting), labeled as three types of regions: water rim, solid stains, and background. After the model is trained, hardware acceleration is performed using TensorRT to improve inference speed.
[0017] S3. Based on the segmentation results and depth image data, construct a three-dimensional feature map of the toilet interior, and extract the edge contour of the water rim area, the location coordinates and area of the solid stain area, and the structural feature parameters of the background area. The depth image data mentioned in this embodiment of the invention refers to the depth image acquired by the depth camera in the image acquisition module, which contains spatial distance information of each pixel inside the toilet. It is used to fuse with the RGB image and semantic segmentation results to construct a three-dimensional region feature map, i.e., the depth image in step S1.
[0018] In this embodiment of the invention, the construction process of the three-dimensional region feature map is as follows: the depth image is converted into point cloud data, and point cloud clustering is performed on the regions corresponding to different masks in combination with semantic segmentation masks to remove discrete noise points; spatial feature parameters of each region are extracted, including the edge contour coordinates, curvature change, and area size of the water rim region, the center point coordinates, area, and distribution density of the solid stain region, and the surface curvature and distance information of the background region, to construct a three-dimensional region feature map of the toilet interior that integrates semantic information and spatial information.
[0019] For example, in one embodiment of the present invention, the three-dimensional region feature map is constructed as follows: the depth image is converted into point cloud data with a point cloud density of 100 points / cm², and point cloud clustering is performed on the three types of regions using a semantic segmentation mask to remove discrete noise points (the clustering threshold is set to 3mm). Feature parameters are extracted: the edge contour coordinates of the water ring region (accuracy ±1mm), curvature variation range 0.02-0.05mm⁻¹, and area 120cm²; the center point coordinates of solid stain region 1 (X: 150mm, Y: 200mm, Z: 50mm), area 5.2cm²; the center point coordinates of stain region 2 (X: 250mm, Y: 180mm, Z: 45mm), area 8.1cm²; the curvature range of the background region is 0.01-0.03mm⁻¹, and a three-dimensional region feature map is constructed.
[0020] S4. Based on the 3D regional feature map, generate an edge bypass path for the water sphere area; generate a targeted cleaning path for the solid stain area. In this embodiment of the invention, the edge bypass path extends at a preset safe distance (e.g., 5-10mm) along the outer edge of the water ring, and the path curvature matches the change in the water ring contour in real time (to avoid the brush head contacting the water ring and causing sewage to splash). The targeted cleaning path adopts a "center point coverage + peripheral sweeping" mode, and the path density is positively correlated with the stain area; The background area can retain only the necessary transition paths, reducing unnecessary cleaning actions.
[0021] For example, in one embodiment of the present invention, the differentiated path is generated as follows: an initial path is generated based on a three-dimensional feature map. The path around the edge of the water ring region extends 8mm outside the edge of the water ring, the path curvature matches the contour of the water ring, and the path length is 350mm; the targeted path for stain region 1 adopts a 3-turn spiral sweep pattern, the path density is 2mm / turn, and the path length is 80mm; the targeted path for stain region 2 adopts a 4-turn spiral sweep pattern, the path density is 2mm / turn, and the path length is 120mm; the background region transition path uses a straight line connection, the path length is 150mm, and the total initial path length is 700mm.
[0022] In this embodiment of the invention, the general formula for generating the cleaning path is: Ptotal=Pedge∪Ptarget∪Ptrans; Wherein, Ptotal represents the complete set of cleaning paths for the toilet cleaning robot (including all area paths); Pedge represents the set of paths around the edge of the water rim area; Ptarget represents the set of targeted cleaning paths for solid stain areas; Ptrans represents the set of transition paths for the background area; ∪ represents the union operation of the path sets; In this embodiment of the invention, the formula for the water rim edge bypass path is: Pedge(x,y,z)={(x′,y′,z′)∣(x′−x0)2+(y′−y0)2=(R0+ds)2,z′∈Zwater,k(Pedge)=kcontour}; Wherein, Pedge(x,y,z) is the set of spatial coordinates of the water ring edge path, representing the complete trajectory of the cleaning brush head along the water ring; (x′,y′,z′) are the three-dimensional coordinates of a single point on the path, corresponding to the positions of the toilet in the left-right, front-back, and depth directions, respectively; (x0,y0) represents the two-dimensional coordinates of the center point of the water ring area; R0 represents the reference radius of the water ring edge contour; ds represents the preset safety distance outside the water ring edge (value 5-10mm); Zwater represents the depth coordinate range of the water ring area (matching the Z-axis dimension of the toilet cavity surface); k(Pedge) represents the curvature value of the edge path; kcontour represents the real-time curvature value of the water ring contour (ensuring that the path curvature matches the changes in the water ring contour).
[0023] In this embodiment of the invention, the formula for the targeted cleaning path is: Ptarget(i)={(xi+r⋅cosθ,yi+r⋅sinθ,zi)∣0≤r≤rstain(i),0≤θ≤2π,ρ(Ptarget)∝Sstain(i)}; Wherein, Ptarget(i) is the set of targeted cleaning paths for the i-th solid stain area; i represents the number of the i-th solid stain area; (xi,yi,zi) represents the three-dimensional coordinates of the center point of the i-th solid stain area; r represents the polar radius with the stain center point as the origin; rstain(i) represents the maximum coverage radius of the i-th solid stain area (calculated from the stain area); θ represents the polar angle (0~2π covering the entire circumference, achieving "center point coverage + surrounding sweep"); ρ(Ptarget) represents the density of targeted paths (number of path points per unit length); Sstain(i) represents the area of the i-th solid stain area (path density is positively correlated with area); ∝ represents the positive correlation.
[0024] In this embodiment of the invention, the background region transition path formula is: Ptrans={(xstart,ystart,zstart)→(xend,yend,zend)∣dist(Ptrans)=min,Strans≤Sthreshold} Wherein, Ptrans is the set of spatial coordinates of the transition path in the background area; (xstart, ystart, zstart) represents the coordinates of the starting point of the transition path (the end point of the previous area path); (xend, yend, zend) represents the coordinates of the ending point of the transition path (the starting point of the next area path); "→" indicates that the starting point of the spatial path points to the ending point; dist(Ptrans) represents the length of the transition path (taking the minimum value to reduce invalid actions); Strans represents the area of the background area covered by the transition path; Sthreshold represents the threshold for invalid cleaning area of the background area (only necessary transition paths are retained).
[0025] S5. Integrate the curved surface features of the toilet cavity, optimize the trajectory parameters of the generated path (the path generated in step S4, including the edge bypass path generated for the water rim area and the targeted fixed-point cleaning path generated for the solid stain area), adjust the robot cleaning brush head parameters, and obtain the final cleaning path. In this embodiment of the invention, the brush head parameters include the movement speed, posture angle, rotation speed, and contact pressure of the cleaning brush head; Specifically, in this embodiment of the invention, the trajectory parameters are optimized as follows: The initial path is optimized using an adaptive genetic algorithm, incorporating the curved surface features of the toilet cavity. The optimal combination of motion parameters is obtained by using path length (minimizing energy consumption), cleaning coverage (maximizing coverage of soiled areas), and the risk of wastewater splashing (quantified as a distance threshold between the water ring and the path) as objective functions. The risk of wastewater splashing is quantified and evaluated using the distance threshold between the water ring area and the cleaning path. The robot cleaning brush head's movement speed, posture angle, rotation speed, and contact pressure are optimized, specifically: a speed of 10-15 mm / s and a rotation speed of 180-220 rpm in the solid soiled area, and a speed of 20-25 mm / s and a rotation speed of 150-180 rpm in the water ring area; the posture angle conforms to the toilet's curved surface with a deviation of no more than 3°; the brush head contact pressure is 0.3-0.5 MPa in the solid soiled area and 0.1-0.2 MPa in the background area, resulting in the final cleaning path.
[0026] For example, in one embodiment of the present invention, the trajectory parameters are optimized as follows: an adaptive genetic algorithm is used to optimize the initial path, and the optimal parameters are obtained after 50 iterations: the brush head movement speed in the water ring area is 22 mm / s, the posture angle conforms to the toilet surface (deviation ≤ 2°), the rotation speed is 160 rpm, and the brush head contact pressure is 0.15 MPa; the movement speed in the soiled area 1 is 12 mm / s, the posture angle deviation is ≤ 1°, the rotation speed is 200 rpm, and the brush head contact pressure is 0.4 MPa; the movement speed in the soiled area 2 is 13 mm / s, the posture angle deviation is ≤ 1°, the rotation speed is 200 rpm, and the brush head contact pressure is 0.45 MPa; the movement speed in the transition path is 25 mm / s, and the pressure is 0.1 MPa.
[0027] S6. Perform cleaning operations according to the final cleaning path, synchronously collect images and pressure data of the operation process in real time and provide feedback, and dynamically adjust the cleaning path and brush head parameters based on the feedback.
[0028] Specifically, the cleaning process is performed according to the final cleaning path. During the operation, images of the inside of the toilet are collected in real time, and contact pressure data between the cleaning brush head and the toilet glaze are collected in real time. The image information and pressure data are fed back in real time. Based on the feedback information, it is determined whether there is any deviation in the cleaning path and whether the cleaning intensity is appropriate. The edge bypass path of the water rim area and the targeted cleaning path of the solid stain area are dynamically corrected. The brush head parameters such as movement speed, posture angle, rotation speed, and contact pressure are adjusted simultaneously to achieve closed-loop control and adaptive correction of the cleaning process, ensuring cleaning effect and operation safety.
[0029] For example, in another embodiment of the present invention, the cleaning operation and dynamic correction are as follows: the cleaning execution module is controlled to operate along an optimized path, the brush head rotation speed is set to 200 rpm, and the body (toilet cleaning robot body) moves slowly along the path. Simultaneously, the image acquisition module acquires images of the operation process in real time (10fps), and the pressure sensor acquires pressure data every 100ms. When the operation reaches the soiled area 1, the pressure sensor detects that the pressure value has risen to 0.42MPa (exceeding the set threshold of 0.4MPa), and the feedback correction module generates a correction command to adjust the brush head contact pressure to 0.38MPa, while simultaneously fine-tuning the path deviation (correction amount 0.8mm). After the operation is completed, a post-cleaning image is acquired. Analysis shows that the residual soil area accounts for 2.1%, there is no wastewater splashing, the cleaning effect meets the standard, and the operation ends.
[0030] Corresponding to the toilet seat and stain differentiation and targeted cleaning path planning method described in the above embodiments, Figure 2This diagram illustrates a structural block diagram of a toilet seat and stain differentiation and targeted cleaning path planning system according to an embodiment of this application. For ease of explanation, only the parts relevant to this embodiment are shown. The system includes: The image acquisition module is used to acquire real-time RGB and depth images of the toilet's internal cavity; The preprocessing module is used to preprocess the acquired images to obtain standardized image data; The semantic segmentation processing module is used to input standardized image data into an improved lightweight semantic segmentation model, perform pixel-level semantic segmentation on the image through the model's encoder-decoder structure, and output the segmentation results of the toilet's internal region. The segmentation results include pixel-level masks of the water rim region, solid stain region, and background region. The 3D region feature map construction and region feature extraction module is used to construct a 3D region feature map of the toilet interior based on the segmentation results and depth image data, and extract the edge contour of the water rim area, the location coordinates and area of the solid stain area, and the structural feature parameters of the background area. The path planning module is used to generate edge bypass paths for water sphere areas and targeted cleaning paths for solid stain areas based on 3D regional feature maps. The trajectory parameter optimization module is used to integrate the curved surface features of the toilet cavity, optimize the trajectory parameters of the generated path, adjust the parameters of the robot cleaning brush head, and obtain the final cleaning path. The cleaning execution module is used to perform cleaning operations according to the final cleaning path, and synchronously collect images and pressure data of the operation process in real time and provide feedback. The feedback correction module is used to dynamically correct the cleaning path and brush head parameters based on the feedback images and pressure data of the operation process.
[0031] In one specific embodiment of the present invention, the cleaning execution module includes a cleaning brush head, a drive motor, and a pressure sensor. The specific process of the cleaning execution module performing cleaning operations according to the planned path is as follows: based on the trajectory coordinates, movement speed, posture angle, rotation speed, and contact pressure parameters in the final cleaning path, the drive motor drives the toilet cleaning robot body to move and the cleaning brush head to move, so that the cleaning brush head performs non-contact avoidance cleaning along the edge of the water rim area and performs precise contact cleaning along the targeted fixed-point cleaning path of the solid stain area; during the operation, the cleaning brush head maintains adaptive contact with the curved surface of the toilet cavity, and adjusts the body movement speed, brush head posture, rotation speed, and contact pressure in real time according to preset parameters to ensure that the cleaning brush head always runs stably along the planned trajectory and completes the full-coverage cleaning operation.
[0032] In one specific embodiment of the present invention, the image acquisition module can be mounted on the front end of the robot body, including at least one RGB camera and one TOF depth camera. The camera installation angle can be adjusted by a servo motor (e.g., adjustment range -30° to 60°) to ensure that the acquisition range covers the inner wall, bottom and water ring area of the toilet cavity.
[0033] In this embodiment of the invention, the improved lightweight semantic segmentation model extracts image features using a MobileNetV3 backbone network and replaces traditional convolutional layers with depthwise separable convolutions, reducing the number of model parameters while maintaining feature extraction capabilities. A channel attention mechanism module is introduced at the decoding end to strengthen the edge feature weights of the water ring and solid stains, achieving accurate segmentation of the two types of regions. The model outputs a pixel-level mask of the toilet's internal region. This pixel-level mask is a pixel-level classification label map used to distinguish between the background region, the water ring region, and the solid stain region. Mask value 0 represents the background region (the toilet glaze without stains or the water ring), mask value 1 represents the water ring region, and mask value 2 represents the solid stain region (scale, urine stains, feces stains, etc.).
[0034] In one specific embodiment of the present invention, the feedback correction module dynamically adjusts the cleaning path and brush head parameters by comparing the residual stain area and brightness difference of the images before and after the operation, and combining the pressure data to calculate the path deviation and cleaning effect.
[0035] Those skilled in the art will understand that all or part of the steps in the methods of the above embodiments can be implemented by program instructions and related hardware. The program can be stored in a computer-readable storage medium, such as ROM, RAM, disk, optical disk, etc.
[0036] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A method for distinguishing and identifying toilet seat sills and planning targeted cleaning paths, characterized in that, The method includes: The toilet cleaning robot uses an image acquisition module to collect real-time RGB and depth images of the toilet's internal cavity. The collected images are then preprocessed to obtain standardized image data. Standardized image data is input into an improved lightweight semantic segmentation model. The model performs pixel-level semantic segmentation on the image through its encoder-decoder structure and outputs the segmentation results of the toilet's interior region. The segmentation results include pixel-level masks of the water rim region, solid stain region, and background region. Based on the segmentation results and depth image data, a three-dimensional feature map of the toilet interior is constructed, and the edge contour of the water rim area, the location coordinates and area of the solid stain area, and the structural feature parameters of the background area are extracted. Based on the 3D regional feature map, an edge bypass path is generated for the water sphere area; a targeted cleaning path is generated for the solid stain area. By integrating the curved surface features of the toilet cavity, the trajectory parameters of the generated path are optimized, and the parameters of the robot cleaning brush head are adjusted to obtain the final cleaning path; The cleaning operation is performed according to the final cleaning path, and the images and pressure data of the operation process are collected in real time and fed back. The cleaning path and brush head parameters are dynamically adjusted based on the feedback.
2. The method for distinguishing and identifying toilet seat rims and stains and planning targeted cleaning paths as described in claim 1, characterized in that, The preprocessing includes image denoising, size normalization, color gamut calibration, and data augmentation. The data augmentation employs random flipping, brightness adjustment, and Gaussian blurring to improve the model's generalization ability.
3. The method for distinguishing and identifying toilet seat rims and stains and planning targeted cleaning paths as described in claim 1, characterized in that, The improved lightweight semantic segmentation model extracts image features using the MobileNetV3 backbone network and replaces traditional convolutional layers with depthwise separable convolutions, reducing the number of model parameters while maintaining feature extraction capabilities. A channel attention mechanism module is introduced at the decoding end to strengthen the edge feature weights of the water rim and solid stains, achieving accurate segmentation of the two types of regions. The model outputs a pixel-level mask of the toilet's internal region, which serves as a pixel-level classification label map to distinguish between the background region, the water rim region, and the solid stain region.
4. The method for distinguishing and identifying toilet seat rims and stains and planning targeted cleaning paths as described in claim 1, characterized in that, The construction process of the three-dimensional region feature map is as follows: the depth image is converted into point cloud data, and point cloud clustering is performed on the regions corresponding to different masks in combination with semantic segmentation masks to remove discrete noise points; spatial feature parameters of each region are extracted to construct a three-dimensional region feature map of the toilet interior that integrates semantic information and spatial information.
5. The method for distinguishing and identifying toilet seat rims and stains and planning targeted cleaning paths as described in claim 4, characterized in that, The spatial feature parameters include the edge contour coordinates, curvature changes, and area size of the water ring region; the center point coordinates, area, and distribution density of the solid stain region; and the surface curvature and distance information of the background region.
6. The method for distinguishing and identifying toilet seat rims and stains and planning targeted cleaning paths as described in claim 1, characterized in that, The edge bypass path extends at a preset safe distance outside the edge of the water ring, and the path curvature matches the changes in the water ring contour in real time. The targeted cleaning path adopts a "center point coverage + surrounding sweep" mode, and the path density is positively correlated with the stain area.
7. The method for distinguishing and identifying toilet seat rims and stains and planning targeted cleaning paths as described in claim 1, characterized in that, The trajectory parameters are optimized as follows: by integrating the curved surface features of the toilet cavity, an adaptive genetic algorithm is used to optimize the initial path, with path length, cleaning coverage and sewage splash risk as objective functions, to obtain the optimal combination of motion parameters. The sewage splash risk is quantitatively evaluated by the distance threshold between the water rim area and the cleaning path.
8. The method for distinguishing and identifying toilet seat rims and stains and planning targeted cleaning paths as described in claim 1, characterized in that, The brush head parameters include the cleaning brush head's movement speed, posture angle, rotation speed, and contact pressure.
9. A toilet seat and stain differentiation and targeted cleaning path planning system, characterized in that, The system includes: The image acquisition module is used to acquire real-time RGB and depth images of the toilet's internal cavity; The preprocessing module is used to preprocess the acquired images to obtain standardized image data; The semantic segmentation processing module is used to input standardized image data into an improved lightweight semantic segmentation model, perform pixel-level semantic segmentation on the image through the model's encoder-decoder structure, and output the segmentation results of the toilet's internal region. The segmentation results include pixel-level masks of the water rim region, solid stain region, and background region. The 3D region feature map construction and region feature extraction module is used to construct a 3D region feature map of the toilet interior based on the segmentation results and depth image data, and extract the edge contour of the water rim area, the location coordinates and area of the solid stain area, and the structural feature parameters of the background area. The path planning module is used to generate edge bypass paths for water sphere areas and targeted cleaning paths for solid stain areas based on 3D regional feature maps. The trajectory parameter optimization module is used to integrate the curved surface features of the toilet cavity, optimize the trajectory parameters of the generated path, adjust the parameters of the robot cleaning brush head, and obtain the final cleaning path. The cleaning execution module is used to perform cleaning operations according to the final cleaning path, and synchronously collect images and pressure data of the operation process in real time and provide feedback. The feedback correction module is used to dynamically correct the cleaning path and brush head parameters based on the feedback images and pressure data of the operation process.
10. The toilet seat and stain differentiation and targeted cleaning path planning system as described in claim 9, characterized in that, The improved lightweight semantic segmentation model extracts image features using the MobileNetV3 backbone network and replaces traditional convolutional layers with depthwise separable convolutions, reducing the number of model parameters while maintaining feature extraction capabilities. A channel attention mechanism module is introduced at the decoding end to strengthen the edge feature weights of the water rim and solid stains, achieving accurate segmentation of the two types of regions. The model outputs a pixel-level mask of the toilet's internal region, which serves as a pixel-level classification label map to distinguish between the background region, the water rim region, and the solid stain region.