A method and system for obstacle recognition of a robot sweeper
Patent Information
- Application Number
- CN202611129462.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-28
- Publication Date
- 2026-10-27
AI Technical Summary
[0004]为了解决现有方法障碍物识别的准确率、稳定性以及泛化能力仍无法满足实际需求的技术问题,本发明提供了一种扫地机器人障碍物识别方法、系统
[0022]本发明通过卷积运算与空间插值技术完成教师特征图谱与学生特征图谱的维度对齐,从而构建起高性能教师模型向轻量化学生模型进行知识迁移的有效路径。通过执行全局平均池化以及多尺度空间池化操作提取通道重要性向量与空间注意力图谱,能够准确捕捉教师特征图谱中的核心判别性信息。结合任务预测损失相对于学生特征图谱的梯度反馈生成学生注意力图谱,并配合自校准网络对原始学生特征图谱执行深层仿射变换与重校准处理,显著强化了学生模型对于目标障碍物关键特征的语义表达能力。将教师空间注意力图谱与学生注意力图谱之间的结构相似性指数映射为动态关联权重系数,并以此为基准融合二阶协方差黎曼距离以及基于最大均值差异的分布对齐损失以构建特征蒸馏损失,实现了跨模型特征通道间的统计关联结构与再生核空间分布特征的精细化拟合。在维持扫地机器人边缘侧推理算力需求基本恒定的前提下,本发明有效地将预训练教师模型中的复杂特征表达能力赋予轻量化学生模型,提升了模型在实际家庭环境下的障碍物识别精确度与系统运行的可靠性。
Smart Images

Figure CN122990378A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image recognition technology. More specifically, this invention relates to a method and system for obstacle recognition in a robotic vacuum cleaner. Background Technology
[0002] With the continuous development of artificial intelligence and smart home technologies, robotic vacuum cleaners have become widely used smart terminal devices in modern homes. In the complex and ever-changing home environment, obstacle recognition is a crucial foundation for robotic vacuum cleaners to achieve autonomous navigation, path planning, and safe obstacle avoidance. Currently, deep learning-based visual perception technology has achieved good results in the fields of object detection and image recognition, with some high-performance neural network models achieving high recognition accuracy. However, robotic vacuum cleaners are typical edge devices, with significant limitations in internal hardware computing power, storage space, and battery power consumption, making it difficult to directly deploy and run heavy-duty deep learning models with large parameter sets and high computational complexity. To achieve obstacle recognition under limited hardware resources, knowledge distillation technology is widely used to transfer feature representations and discriminative knowledge from high-performance teacher models to lightweight student models suitable for edge operation, thereby improving the recognition accuracy of lightweight models while balancing inference speed and low power consumption requirements.
[0003] Home environments are typically complex, characterized by significant variations in lighting, diverse obstacle types, large differences in target size, and frequent occlusion. These factors lead to a substantial gap in feature extraction and representation capabilities between teacher and student models. Existing distillation methods often employ feature map constraints or single-distribution alignment, failing to adequately bridge the inherent differences in cross-level feature representation between teacher and student models. Furthermore, due to the lack of effective localization of key channels and spatial regions, student models are susceptible to interference from background noise and redundant features during learning, making it difficult to focus on the spatial and channel information crucial for obstacle recognition. Moreover, existing methods often lack mechanisms to adaptively adjust distillation intensity based on feature structural similarity and feature importance, hindering the effective fusion and transfer of multi-level features across scenarios of varying complexity. Therefore, lightweight models still need improvement in obstacle recognition accuracy, stability, and generalization ability when facing occlusion, small targets, and complex backgrounds in real-world home environments, making it difficult to fully meet the practical needs of low computational consumption and high-precision perception. Summary of the Invention
[0004] To address the technical problem that the accuracy, stability, and generalization ability of existing obstacle recognition methods still cannot meet practical needs, this invention provides an obstacle recognition method and system for a sweeping robot.
[0005] In a first aspect, the present invention provides a method for obstacle recognition in a robotic vacuum cleaner, comprising: S1: acquiring an image of a scene to be recognized collected by the robotic vacuum cleaner's sensors, inputting it into a teacher model and a student model to be trained, extracting teacher feature maps and student feature maps, and aligning them through channel transformation and spatial resampling; generating a channel importance vector and a spatial attention map based on the teacher feature map through pooling and nonlinear mapping, and weighting the teacher feature map to obtain key teacher features; S2: calculating the task prediction loss based on the output of the student model to be trained and the ground truth label, generating a student attention map based on the gradient of the task prediction loss relative to the student feature map; and utilizing the learning... The student attention map is weighted and then input into the self-calibration network to generate affine calibration parameters. The student feature map is then recalibrated using these parameters to obtain a recalibrated student feature map. S3: Similarity weight coefficients are generated based on the structural similarity index between the spatial attention map and the student attention map. The second-order covariance Riemann distance and distribution alignment loss between the key teacher features and the recalibrated student feature map are fused based on these similarity weight coefficients to obtain the feature distillation loss. The task prediction loss and the feature distillation loss are then fused into a total loss function to update the parameters of the student model to be trained, resulting in a trained student model. This trained student model is then used for obstacle recognition.
[0006] By employing the above technical solution, this invention improves the perception accuracy of lightweight student models for multi-scale and occluded targets in complex environments through gradient-guided student attention extraction and a self-calibrating network, combined with second-order covariance manifold distillation based on dynamic weighting of structural similarity. This solution utilizes a dual-attention mechanism from the teacher to lock key regions and filter interference, dynamically captures the prediction weaknesses of the student model through task loss gradients, and leverages self-calibrating affine transformation and manifold space alignment techniques to achieve efficient fitting and transfer of high-quality teacher knowledge with limited computing power, fully balancing the operational efficiency and obstacle avoidance stability of edge devices.
[0007] Preferably, the step of generating channel importance vectors and spatial attention maps based on teacher feature maps through pooling and nonlinear mapping, and weighting the teacher feature maps to obtain key teacher features, includes: performing global average pooling on the teacher feature maps in the spatial dimension to generate channel importance vectors; performing max pooling and average pooling operations on the teacher feature maps along the channel dimension, concatenating the generated single-channel feature maps and performing sliding convolution calculations to generate spatial attention maps; broadcasting the channel importance vectors in the spatial dimension, broadcasting the spatial attention maps in the channel dimension, and multiplying both by the teacher feature maps element-wise to obtain key teacher features.
[0008] Preferably, the step of generating a student attention map based on the gradient of the task prediction loss relative to the student feature map includes: calculating the partial derivative of the task prediction loss with respect to the student feature map to obtain a multi-channel gradient feature matrix; taking the absolute value of the elements of the multi-channel gradient feature matrix to extract the absolute gradient map; summing the values of the spatial positions corresponding to the absolute gradient map along the channel dimension, performing a truncated gradient propagation operation and performing maximum and minimum value normalization processing to generate the student attention map.
[0009] By adopting the above technical solution, this invention utilizes the gradient feedback of task prediction loss on feature maps to accurately identify the degree of dependence of the student model's current prediction error on spatial location. By generating a student attention map, the model is forced to prioritize the recognition sensitive area and the positioning deviation area during training, thereby achieving precise compensation for specific weak links of the student model and avoiding feature learning redundancy caused by indiscriminate alignment.
[0010] Preferably, the step of weighting the student feature map using the student attention map and inputting it into a self-calibration network to generate affine calibration parameters, and then recalibrating the student feature map using the affine calibration parameters to obtain a recalibrated student feature map, includes: multiplying the student attention map and the student feature map element-wise to obtain a weighted feature matrix; inputting the weighted feature matrix into the self-calibration network to output a scaling factor tensor and a translation bias tensor whose dimensions match the student feature map, as the affine calibration parameters; and multiplying the scaling factor tensor and the student feature map element-wise and adding the translation bias tensor to generate the recalibrated student feature map.
[0011] By adopting the above technical solution, this invention performs element-level linear affine transformation on student features through the scaling factor and translation bias output by the self-calibration network, realizing the dynamic reshaping of the original features of the lightweight model. This can effectively correct the semantic shift of the student model in the feature extraction process, making the recalibrated features more closely approximate the high-performance teacher model in terms of response intensity and spatial distribution.
[0012] Preferably, the step of inputting the weighted feature matrix into a self-calibrating network and outputting a scaling factor tensor and a translation bias tensor whose dimensions match the student feature map, as the affine calibration parameters, includes: extracting spatial features from the weighted feature matrix through depthwise separable convolutional layers in the self-calibrating network to obtain local features; inputting the local features into a local spatial branch and a global context branch respectively, wherein the local spatial branch outputs local scaling features and local bias features, and the global context branch outputs a global scaling tensor and a global bias tensor; fusing the local scaling features and the global scaling tensor through element-wise addition to obtain the scaling factor tensor, and fusing the local bias features and the global bias tensor through element-wise addition to obtain the translation bias tensor.
[0013] Preferably, the step of generating similarity weight coefficients based on the structural similarity index between the spatial attention map and the student attention map includes: calculating the structural similarity index between the spatial attention map and the student attention map; performing truncated gradient propagation on the structural similarity index and performing truncated normalization processing to obtain the similarity weight coefficients.
[0014] Preferably, the step of fusing the second-order covariance Riemann distance and distribution alignment loss between key teacher features and recalibrated student feature maps based on similarity weight coefficients to obtain feature distillation loss includes: calculating the covariance matrix of key teacher features and recalibrated student feature maps; calculating the Riemann geometric distance of the covariance matrix after adding a regularization term based on the positive definite matrix manifold space, as the second-order covariance Riemann distance; mapping the key teacher features and recalibrated student feature maps to the regenerating kernel Hilbert space, calculating the norm distance between empirical kernel mean embeddings, as the distribution alignment loss based on the maximum mean difference; multiplying the second-order covariance Riemann distance by the similarity weight coefficient to obtain the covariance alignment term; multiplying the distribution alignment loss based on the maximum mean difference by the difference between 1 and the similarity weight coefficient to obtain the distribution alignment term; and adding the covariance alignment term and the distribution alignment term to obtain the feature distillation loss.
[0015] By adopting the above technical solution, this invention balances the second-order covariance Riemann distance and distribution alignment loss based on similarity weights, realizing a dynamic optimization process from macroscopic fitting of global distribution to microscopic manifold topological alignment. This enables the model to automatically select the optimal knowledge transfer path according to the feature fitting stage and deeply mine the nonlinear related information between feature channels.
[0016] Preferably, the calculation of the covariance matrix of the key teacher features and the recalibrated student feature map, and the calculation of the Riemann geometric distance of the covariance matrix after regularization term addition based on the positive definite matrix manifold space as the second-order covariance Riemann distance, includes: calculating the channel covariance matrix of the key teacher features and the recalibrated student feature map respectively; adding a regularization term multiplied by a positive minimum value and the identity matrix to the channel covariance matrix to obtain the covariance matrix after regularization term addition; and calculating the Riemann geometric distance between the two covariance matrices after regularization term addition using a log-Euclidean metric as the second-order covariance Riemann distance.
[0017] Preferably, the obstacle recognition using the trained student model includes: converting the current environmental image data collected in real time by the robot vacuum cleaner's sensors into a feature tensor; inputting the feature tensor into the trained student model, generating the classification confidence and two-dimensional bounding box coordinates of candidate regions at the output layer; filtering redundant two-dimensional bounding box coordinates based on a non-maximum suppression algorithm, extracting the corresponding category labels and bounding box coordinates from the retained candidate targets, and outputting the obstacle's category and two-dimensional location information for obstacle recognition.
[0018] By adopting the above technical solution, this invention solidifies the simplified knowledge obtained from distillation into the student model. Combined with efficient preprocessing and nonmaximum suppression algorithms, it achieves real-time parsing of image sequences in a low-power environment, and can output high-confidence category labels and accurate bounding box coordinates, providing real-time and stable data support for the autonomous obstacle avoidance decision of the sweeping robot.
[0019] Secondly, the present invention provides a robot vacuum cleaner obstacle recognition system, including a processor and a memory, wherein the memory stores computer program instructions, and when the computer program instructions are executed by the processor, the above-mentioned robot vacuum cleaner obstacle recognition method is implemented.
[0020] By adopting the above technical solution, a computer program is generated from the above-mentioned obstacle recognition method for a sweeping robot and stored in a memory so that it can be loaded and executed by a processor. A terminal device can then be made based on the memory and the processor for convenient use.
[0021] The technical solution of the present invention has the following beneficial technical effects:
[0022] This invention achieves dimensional alignment between teacher and student feature maps through convolution operations and spatial interpolation, thus constructing an effective path for knowledge transfer from a high-performance teacher model to a lightweight student model. By performing global average pooling and multi-scale spatial pooling operations to extract channel importance vectors and spatial attention maps, the core discriminative information in the teacher feature map can be accurately captured. A student attention map is generated by combining the gradient feedback of the task prediction loss with the student feature map, and a self-calibration network is used to perform deep affine transformation and recalibration on the original student feature map, significantly enhancing the student model's semantic representation ability of key features of target obstacles. The structural similarity index between the teacher's spatial attention map and the student's attention map is mapped to a dynamic association weight coefficient, and based on this, the second-order covariance Riemann distance and the distribution alignment loss based on the maximum mean difference are fused to construct a feature distillation loss, achieving a refined fitting of the statistical association structure and spatial distribution features of the regeneration kernel between cross-model feature channels. While maintaining a relatively constant edge-side inference computing power requirement for the robotic vacuum cleaner, this invention effectively endows the lightweight student model with the complex feature representation capabilities of the pre-trained teacher model, thereby improving the model's obstacle recognition accuracy and system reliability in real-world home environments. Attached Figure Description
[0023] Figure 1 This is a flowchart of an obstacle recognition method for a sweeping robot according to the present invention; Figure 2 This is a schematic diagram of the preheating strategy with distillation loss weighting; Figure 3 This is a line graph showing the convergence of the total loss function value during the student model training process; Figure 4 This is a bar chart comparing the mean accuracy of different model variants. Detailed Implementation
[0024] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are some embodiments of the present invention, but not all embodiments.
[0025] This invention discloses an obstacle recognition method for a robotic vacuum cleaner, referring to... Figure 1 This includes steps S1-S3: S1: Feature extraction alignment and key teacher feature generation.
[0026] In an optional embodiment, the scene image to be identified is acquired by the robot vacuum cleaner's sensor and input into the teacher model and the student model to be trained. The teacher feature map and the student feature map are extracted and aligned by channel transformation and spatial resampling. Based on the teacher feature map, channel importance vector and spatial attention map are generated by pooling and nonlinear mapping, and the teacher feature map is weighted to obtain key teacher features.
[0027] In the specific execution process, the system first reads the image data of the scene to be identified collected by the color camera sensor of the robotic vacuum cleaner, converts the image data into tensor form, and inputs it into the teacher model and the student model to be trained. The teacher model uses ResNet101 as the backbone network, with parameters frozen and in an evaluation state, belonging to the pre-trained object detection model; the student model is built based on MobileNetV3 and is in a training state. It should be understood that the above-mentioned ResNet101 and MobileNetV3 are only illustrative examples of specific embodiments. The teacher model in this invention is not limited to ResNet101 and can be any heavyweight network model with high-precision object detection capabilities; the student model in this invention is also not limited to MobileNetV3 and can be any lightweight network model suitable for edge deployment. The system extracts the multi-level feature distribution matrix of the image through the forward propagation algorithm of these two models, obtaining the teacher feature map and the unaligned student feature map, respectively. Subsequently, the system performs a 1×1 convolution operation on the unaligned student feature map to achieve channel transformation and align the channel dimensions. Then, it uses a bilinear interpolation algorithm to resample the student feature map in terms of spatial resolution, for example, by calling the `interpolate` function. This aligns the student feature map to the shape and size of the teacher feature map in both channel and spatial dimensions, resulting in an aligned student feature map. It should be noted that in this embodiment, the aligned student feature map refers to the student feature map that has been aligned through 1×1 convolution and spatial interpolation but has not yet undergone a self-calibrating affine transformation; the feature map directly output by the student model backbone network that has not yet been aligned in channel and spatial dimensions is called the unaligned student feature map. The student feature map used in subsequent steps for attention calculation, self-calibrating network processing, and distillation loss calculation is this aligned student feature map.
[0028] Next, the system processes the teacher feature map to generate attention information. Specifically, the system performs global average pooling on the teacher feature map in the spatial dimension. For example, it calls the `AdaptiveAvgPool2d` function to compress the two-dimensional spatial features of each channel into a single real value, maps it through a fully connected layer network, and outputs a channel importance vector using the Sigmoid activation function. Simultaneously, the system calculates the average and maximum values along the channel dimension of the teacher feature map to aggregate channel features. The two generated single-channel feature maps are then concatenated and subjected to a 7×7 convolution operation, generating a two-dimensional spatial attention map using the Sigmoid activation function. Subsequently, the system uses matrix element-wise multiplication to multiply the channel importance vector and the weight coefficients corresponding to the spatial attention map element-wise with the original teacher feature map, extracting high-response feature regions to obtain key teacher features.
[0029] In an optional embodiment, the specific process of generating channel importance vectors and spatial attention maps based on teacher feature maps through pooling and nonlinear mapping, and weighting the teacher feature maps to obtain key teacher features includes: performing global average pooling on the teacher feature maps in the spatial dimension, and generating a one-dimensional channel importance vector representing the channel weight allocation through a nonlinear mapping network; performing max pooling and average pooling operations on the teacher feature maps along the channel dimension, concatenating the generated single-channel feature maps and performing sliding convolution calculation to generate a two-dimensional spatial attention map representing the spatial location weights; broadcasting the channel importance vector in the spatial dimension, broadcasting the spatial attention map in the channel dimension, and multiplying both with the original teacher feature maps element-wise to obtain key teacher features with extracted key channel and spatial location information.
[0030] More specifically, let the dimensions of the teacher feature map be... The number of channels ,high ,width In terms of spatial dimension Global average pooling is performed to calculate the average value of all pixels in each channel. Then, a non-linear mapping is applied through a multilayer perceptron consisting of two fully connected layers. The first fully connected layer reduces the dimension to 16 and uses ReLU activation, while the second fully connected layer restores the dimension to 256 and uses Sigmoid activation. The output is a one-dimensional channel importance vector representing the weight allocation of each channel. For example, if a channel primarily responds to the edge features of a target in front, its corresponding channel weight value can approach 0.85, while the channel weight responding to a flat background can be reduced to 0.12. The original... Perform max pooling and average pooling respectively to extract the maximum and average values of the 256 channels at each spatial location, resulting in two dimensions. The two feature maps are concatenated along the channel dimension to obtain a single-channel feature map. The feature matrix is obtained by using a kernel size of . A standard 2D convolutional layer with stride 1 and padding of 3 is used for sliding convolution calculation, and then the matrix is mapped to a continuous interval between 0 and 1 by the Sigmoid function, generating a dimension of 1. A two-dimensional spatial attention map. The one-dimensional channel importance vector is copied and broadcast to [the relevant region / location] in the spatial dimension through a dimensionality expansion operation. The two-dimensional spatial attention map is replicated and broadcast to the same dimension size along the channel dimension. These two maps are then compared with the original teacher feature map. Performing the Hadamard product is an element-wise multiplication operation, for example, for spatial coordinates... The features at a given point are first multiplied by the corresponding channel weight of 0.85, and then multiplied by the spatial map weight of 0.91 at that point. Irrelevant textures and other background noise are filtered out, and a high-quality key teacher feature matrix focusing on the target contour and semantic information is output.
[0031] S2: Gradient student attention generation and feature recalibration.
[0032] In an optional embodiment, the task prediction loss is calculated based on the output of the student model to be trained and the ground truth label, and a student attention map is generated based on the gradient of the task prediction loss relative to the student feature map. The student feature map is then weighted using the student attention map and input into a self-calibration network to generate affine calibration parameters. The student feature map is then recalibrated using the affine calibration parameters to obtain a recalibrated student feature map.
[0033] In the specific execution process, the system takes the target detection output of the student model and the corresponding manually labeled ground truth labels as input. The manually labeled ground truth labels are based on a pre-built obstacle avoidance training dataset for a home cleaning robot. This dataset contains several image samples, such as 50,000 images, collected from real home environments, covering common obstacle categories such as wires, slippers, table and chair legs, and pet feces. The target detection output includes the classification confidence of the candidate region, the target confidence, and the coordinates of the two-dimensional bounding box. The manually labeled ground truth labels include the obstacle category label and the coordinates of the ground truth bounding box. The system constructs the task prediction loss based on classification loss, target confidence loss, and bounding box regression loss. The classification loss and target confidence loss can use cross-entropy loss or binary cross-entropy loss; in this embodiment, preferably, the classification loss and target confidence loss use binary cross-entropy loss, and the bounding box regression loss uses CIoU loss. Subsequently, the system calls the automatic differentiation interface to calculate the gradient matrix of the task prediction loss relative to the aligned student feature map tensor, while retaining the computational graph used for subsequent backpropagation of the total loss, and takes the absolute value of the obtained gradient matrix. Next, the system performs summation and aggregation operations along the channel dimension of the feature map to obtain a preliminary attention distribution map representing the importance of spatial locations. It then performs a truncated gradient propagation operation, for example, by calling the detach function to cut off the gradient backpropagation link of the map to ensure stability. Subsequently, the system uses a minimax normalization algorithm to linearly map the tensor values to the 0-1 interval, generating a student attention map. This student attention map is then subjected to pixel-wise spatial weighted multiplication with the aligned student feature map to enhance the features of important spatial regions before being input into the self-calibration network. This self-calibration network consists of lightweight convolutional layers, local spatial branches, global context branches, and a fusion output branch. Based on local spatial features and global context features, it generates a scaling factor matrix representing the scaling ratio and a translation bias matrix representing the bias. Finally, the system uses a broadcast mechanism based on a matrix multiplication-addition algorithm to perform element-wise multiplication of the aligned student feature map and the scaling factor, followed by adding the translation bias matrix, to complete an element-wise affine transformation operation, reshaping the feature distribution of the student model and obtaining the recalibrated student feature map.
[0034] In an optional embodiment, the specific process of generating a student attention map based on the gradient of the task prediction loss relative to the student feature map includes: using the chain rule to calculate the partial derivative of the task prediction loss with respect to each element of the student feature map to obtain a multi-channel gradient feature matrix; taking the absolute value of each element of the multi-channel gradient feature matrix to remove the influence of the positive and negative signs of the gradient and extracting an absolute gradient map representing the feature sensitivity; summing the values of the spatial positions corresponding to the absolute gradient map along the channel dimension to compress the multi-channel matrix into a single-channel two-dimensional spatial map, performing a truncated gradient propagation operation, and normalizing based on the maximum and minimum values of the added minimum positive stable terms to generate a student attention map representing the degree of dependence of the student model's current prediction error on spatial features.
[0035] More specifically, suppose the number of channels in the aligned student feature map to be processed is 256, and the resolution is... If the unaligned student feature map output directly from the student model backbone network has 128 channels, it is first mapped to 256 channels using a 1×1 convolution, and then unified to 256 channels using spatial interpolation. After resolution, it is used as the student feature map in this step. During model training, based on the total task prediction loss, which includes the sum of obstacle category classification loss, target confidence loss, and bounding box regression loss, the system uses the automatic differentiation interface in the chain rule to calculate the partial derivative of this loss function with respect to the activation value of each neuron in the aligned student feature map, obtaining a value of the same dimension as the aligned map. Multi-channel gradient feature matrix. To remove the phenomenon of mutual cancellation between positive and negative gradient directions, the system performs an absolute value operation on all elements of the gradient feature matrix, uniformly converting positive and negative fluctuations into absolute magnitudes that are sensitive to error, resulting in an absolute gradient map. For example, if the partial derivatives of a spatial point on different channels are -0.05 and 0.03 respectively, after taking the absolute value, they are both converted to positive scales, indicating that the point has high sensitivity to the detection task loss. Based on the absolute gradient map, a tensor summation operation is performed along the channel dimension, superimposing and compressing the original 256-channel three-dimensional feature tensor in spatial position to obtain a size of... The single-channel two-dimensional spatial map is used. To reduce computation graph loops and memory overflows caused by continuing to calculate gradients on this feature map, the system calls a truncation function to perform a gradient propagation truncation operation, separating the feature map from the computation graph and converting it into a constant tensor. Max-min normalization is then performed on this constant tensor: the minimum and maximum values are extracted. The maximum value, for example 15.4, and the minimum value, for example 0.2, within the matrix can be determined using the formula:
[0036] in, This represents the normalized gradient weight values. This represents the accumulated original gradient value at the corresponding spatial location in the absolute gradient map. The maximum value in the absolute gradient map. This is the minimum value in the absolute gradient map. This is a minimal positive stable term used to ensure the stability of division operations. In this embodiment, Values .
[0037] The gradient accumulation values of all pixels are mapped to a continuous interval from 0 to 1 to generate a student attention map that depicts the region where the current network prediction error is highly dependent. The weight of the highlighted response area such as the target edge can reach 0.98, while the weight of the background area is only 0.05.
[0038] In an optional embodiment, the process of weighting the student feature map using the student attention map and then inputting it into a self-calibration network to generate affine calibration parameters, and then recalibrating the student feature map using the affine calibration parameters to obtain the recalibrated student feature map, includes: multiplying the student attention map and the student feature map element-wise to extract a highly sensitive spatially weighted feature matrix; inputting the spatially weighted feature matrix into a self-calibration network constructed by lightweight convolution and a global context module, and outputting a scaling factor tensor and a translation bias tensor whose dimensions match the student feature map through feature extraction and nonlinear mapping, as affine calibration parameters; multiplying the scaling factor tensor and the aligned student feature map element-wise, and adding the translation bias tensor to complete the element-wise linear affine transformation of the aligned student feature map, generating a recalibrated student feature map with irrelevant background interference removed.
[0039] More specifically, let the size of the aligned student feature map, which has been aligned with the spatial dimensions but has not yet undergone self-calibrating affine transformation, be . The size of the student attention map obtained from gradient normalization is The system utilizes a tensor broadcasting mechanism to replicate the student attention map 256 times along the channel dimension. It then performs element-wise Hadamard multiplication with the aligned student feature map, forcing the activation responses, originally scattered across the entire image, to converge and focus on high-sensitivity target regions with weights greater than 0.6 within the attention map. This suppresses interfering regions such as blank backgrounds with weights as low as 0.1, generating a high-sensitivity spatially weighted feature matrix. This matrix is then input into a pre-constructed self-calibrating network, whose input is the high-sensitivity spatially weighted feature matrix, denoted as a tensor. The number of channels Equals 256, height Equals 64, width It equals 64.
[0040] In an optional embodiment, the specific process of inputting the spatially weighted feature matrix into the self-calibration network and outputting a scaling factor tensor and a translation bias tensor whose dimensions match the student feature map as affine calibration parameters includes: extracting spatial features from the weighted feature matrix through a depthwise separable convolutional layer in the self-calibration network to obtain local features; inputting the local features into the local spatial branch and the global context branch respectively, with the local spatial branch outputting local scaling features and local bias features, and the global context branch outputting a global scaling tensor and a global bias tensor; fusing the local scaling features and the global scaling tensor through element-wise addition to obtain the scaling factor tensor, and fusing the local bias features and the global bias tensor through element-wise addition to obtain the translation bias tensor.
[0041] More specifically, in the network structure, the input tensor Through a kernel size of The depthwise separable convolutional layers and SiLU activation function extract spatial features and perform nonlinear mapping, resulting in a solution that still retains... Local features of size Local features On the one hand, the input is a local spatial branch, which generates locally scaled features that preserve spatial resolution through 1×1 convolution. With local bias features On the other hand, the input global context branch is used to compress the global feature vector in the spatial dimension through average pooling, and then outputs channel-level scaled vectors through two fully connected layers. and channel-level bias vector Subsequently, the channel-level scaling vector is... and channel-level bias vector Transformed through dimension expansion operation into and broadcast to in the height and width directions , obtain the global scaling tensor and global bias tensor Finally, the local scaling features will be applied. With global scaling tensor The scaling factor tensor is obtained by fusing elements-by-element addition. Local bias features With global bias tensor The translation bias tensor is obtained by fusing elements-by-element addition. This ensures that the scaling factor tensor output by the self-calibrating network is accurate. Translation bias tensor The size is completely consistent with the aligned student feature map. For high-frequency feature channels identified as specific targets, the output scaling factor is mapped to 1.5 to achieve feature enhancement, while the translation bias is assigned a value of 0.2 as baseline compensation. Using an element-wise linear affine transformation logic similar to conditional batch normalization, the system performs element-wise multiplication of the scaling factor tensor and the aligned student feature map, and then accumulates it with the translation bias tensor. The entire process locally reshapes the coarsely aligned student features with high element-wise precision, outputting a recalibrated student feature map that is highly fitted in semantics and spatial structure and removes irrelevant background interference. It should be noted that the self-calibration network of this invention is not limited to the specific two-branch structure described above. Those skilled in the art can use any other lightweight network module that can output scaling factor tensors and translation bias tensors based on feature maps, all of which fall within the protection scope of this invention. It should be noted that the self-calibration network serves as an auxiliary feature calibration branch during the training phase, used to construct the feature distillation loss and guide the student model backbone network to learn the key representations of the teacher model. After training, the teacher model, the teacher attention calculation branch, the student gradient attention calculation branch, and the self-calibration network do not participate in the edge inference of the robot vacuum cleaner; only the trained student model is retained to perform obstacle recognition.
[0042] S3: Calculation of loss during mixed distillation and identification during model training.
[0043] In an optional embodiment, a similarity weight coefficient is generated based on the structural similarity index between the spatial attention map and the student attention map. Based on the similarity weight coefficient, the second-order covariance Riemann distance and distribution alignment loss between the key teacher features and the recalibrated student feature map are fused to obtain the feature distillation loss. The task prediction loss and the feature distillation loss are fused into a total loss function to update the parameters of the student model to be trained, resulting in a trained student model. The trained student model is then used for obstacle recognition.
[0044] In the actual execution process, the system first evaluates the pixel-level spatial structural similarity between the spatial attention map and the student's attention map. For example, it calls the `structural_similarity` algorithm under the `metrics` module to obtain a single structural similarity index value. Since the original value range of the structural similarity index is... The system does not directly use its absolute value as the weight, but instead, after truncating gradient propagation, it uses it according to... Structural similarity index Convert to similarity weight coefficients between 0 and 1 ,make It increases with the degree of similarity of spatial structures; when When it is negative, the corresponding A similarity value less than 0.5 will not be misjudged as high similarity.
[0045] Subsequently, the system calculates the second-order covariance Riemann distance between key teacher features and recalibrated student feature maps, and the distribution alignment loss based on the maximum mean difference. For the second-order covariance Riemann distance, the system calculates the covariance matrix of the key teacher features and the recalibrated student feature maps, and performs matrix logarithmic operations on the covariance matrix after adding the regularization term using eigenvalue decomposition to calculate the Frobenius norm between the two matrix logarithms, obtaining the log-Euclidean Riemann distance. For the distribution alignment loss based on the maximum mean difference, the system uses the Gaussian radial basis function (RBF) kernel function to calculate the kernel mean embedding distribution difference of the two types of features in the reproducing kernel Hilbert space. Then, the system uses multiplication and addition operations to adjust the similarity weight coefficients... Multiply by the second-order covariance Riemann distance, and then... The characteristic distillation loss is obtained by multiplying it by the distribution alignment loss based on the maximum mean difference and then adding them together.
[0046] After constructing the feature distillation loss, the system uses a linear summation method with hyperparameter weights to fuse the previously calculated task prediction loss with the feature distillation loss, constructing the network's total loss function. The system calls the backpropagation function to calculate the gradient of the total loss with respect to the weights of each layer of the network according to the backpropagation algorithm. Using the AdamW optimizer combined with the set learning rate and other hyperparameters, it updates all learnable parameters of the student model based on the gradient, repeating the entire iterative process from image acquisition to backpropagation until the change in the total loss function within 10 consecutive cycles is lower than a set threshold. Alternatively, if the mean precision index of the verification set fluctuates by less than 0.1% for 15 consecutive epochs, the model training is considered converged. After training convergence, the system inputs the front view of the robot vacuum cleaner to be tested into the saved lightweight student model, analyzes the feature distribution through the forward inference algorithm, and outputs the classification confidence, target confidence, and two-dimensional bounding box coordinates of the candidate region by the target detection head. After confidence filtering and non-maximum suppression, the obstacle recognition process is completed.
[0047] In an optional embodiment, the specific process of generating similarity weight coefficients based on the structural similarity index of the spatial attention map and the student attention map includes: calculating the mean, variance, and covariance of the spatial attention map and the student attention map within a specified sliding window, substituting them into the structural similarity index formula to calculate the structural similarity index of the two in spatial distribution; performing truncated gradient propagation on the structural similarity index, and performing truncated normalization processing on the structural similarity index after truncated gradient propagation to obtain similarity weight coefficients with values ranging from 0 to 1, wherein the similarity weight coefficients increase as the structural similarity between the spatial attention map and the student attention map increases.
[0048] More specifically, the sliding window for calculating the structural similarity index is set to a size of [size missing]. A two-dimensional Gaussian filter kernel with a standard deviation of 1.5 is used. This window is slid across the extracted teacher and student spatial attention maps to calculate the mean, variance, and covariance of local regions. These values are then substituted into the SSIM mathematical model to calculate the average similarity index of the entire image. The SSIM mathematical model is an evaluation model that measures the overall structural similarity of two images or feature maps by comparing their brightness, contrast, and structural relevance. Its values typically range from -1 to 1, with higher values indicating greater structural similarity. If the teacher's feature map and the student's feature map show a high degree of overlap in recognizing the target contour, then... The value can reach 0.85. (Regarding...) After performing truncated gradient propagation, use After truncation and normalization, the similarity weight coefficients are obtained. ;For example hour The covariance manifold alignment weights are relatively large, while the distribution alignment weights are... It is 0.075; if ,but The covariance manifold alignment weights are relatively small, which avoids the problem of erroneously amplifying the covariance structure alignment loss due to taking the absolute value in the case of negative correlation.
[0049] In an optional embodiment, the specific process of obtaining the feature distillation loss by fusing the second-order covariance Riemann distance and distribution alignment loss between key teacher features and recalibrated student feature maps based on similarity weight coefficients includes: calculating the covariance matrix of key teacher features and recalibrated student feature maps; calculating the Riemann geometric distance of the covariance matrix after adding a regularization term based on the positive definite matrix manifold space, as the second-order covariance Riemann distance; mapping the key teacher features and recalibrated student feature maps to the regenerating kernel Hilbert space, calculating the norm distance between their empirical kernel mean embeddings, as the distribution alignment loss based on the maximum mean difference; multiplying the second-order covariance Riemann distance by the similarity weight coefficient to obtain the covariance alignment term; multiplying the distribution alignment loss based on the maximum mean difference by the difference between 1 and the similarity weight coefficient to obtain the distribution alignment term; and adding the covariance alignment term and the distribution alignment term to obtain the feature distillation loss.
[0050] More specifically, the dimensions of the flattened key teacher feature matrix and the recalibrated student feature matrix are calculated separately. The channel covariance matrix. Using bandwidth parameters. The radial basis function (RBF) implicitly maps key teacher features and recalibrated student features to an infinite-dimensional regenerating kernel Hilbert space. The maximum mean difference distance between the empirical kernel mean embeddings of the two samples in this space is calculated through double summation. This distance is then extracted as a distribution alignment loss based on the maximum mean difference, used to measure the overall distribution difference between the two samples in the kernel mean embedding space. A weight balancing mechanism is then initiated, adjusting the similarity weight coefficients... As a weighting factor for the covariance alignment term, the similarity weighting coefficient The supplementary weight is As a weighting factor for the distribution alignment term, the two are weighted and summed to obtain the final feature distillation loss. This mechanism ensures that when the spatial attention of the teacher and student models is highly overlapping, the model will tilt the gradient penalty center toward the alignment of the high-dimensional spatial topology at the covariance level; when the spatial attention of the teacher and student models has not yet formed a consistent structure, the model relies more on the distribution alignment based on the maximum mean difference to stabilize training.
[0051] In an optional embodiment, the specific process of calculating the covariance matrix of the key teacher features and the recalibrated student feature map, and calculating the Riemann geometric distance of the covariance matrix after regularization term addition based on the positive definite matrix manifold space as the second-order covariance Riemann distance, includes: calculating the channel covariance matrix of the key teacher features and the recalibrated student feature map respectively; adding a regularization term multiplied by the identity matrix to the channel covariance matrix to obtain the covariance matrix after regularization term addition; and calculating the Riemann geometric distance between the two covariance matrices after regularization term addition using the log-Euclidean metric as the second-order covariance Riemann distance.
[0052] More specifically, the dimensions of the flattened key teacher feature matrix and the recalibrated student feature matrix are calculated separately. The channel covariance matrix. To ensure the positive definiteness of the matrix, a regularization term is added to the covariance matrix. ,in , The covariance matrix is the identity matrix. This regularization term is introduced to prevent singularities in the covariance matrix under certain special conditions, such as when the sensor is stationary and the eigenvariance approaches zero, making matrix logarithmic operations impossible. After adding the regularization term, the Riemann geometric distance in the manifold space is calculated using the log-Euclidean metric. This involves performing eigenvalue decomposition and matrix logarithmic operations on the two covariance matrices after adding the regularization term, and then calculating the Frobenius norm of the difference between the two matrix logarithms, which is used as the second-order covariance Riemann distance. This distance focuses on characterizing the nonlinear statistical correlation structure between channels.
[0053] Furthermore, during the end-to-end training phase of the visual perception model, the system sets balanced hyperparameters. Used for task prediction loss, and set For feature distillation loss, a linear warm-up strategy is used to gradually increase the distillation weights from 0 to 0.1 over the first 5 epochs to reduce early gradient oscillations. It should be noted that the similarity weight coefficients in the feature distillation loss are constant weight coefficients obtained after truncated gradient propagation and do not participate in gradient calculation during the backpropagation of the total loss. Figure 2 The diagram illustrates the changes in the distillation loss weight preheating strategy. The total loss function value is generated through linear scalar superposition. For example, when the task loss is 2.34 and the distillation loss is 4.12, a scalar loss value of 2.752 is obtained. Immediately after this scalar calculation, the backpropagation function of the automatic differentiation engine is triggered. Using the chain rule, the backpropagation is performed layer by layer from the target detection output to the input, calculating the partial derivative matrix of the total loss function with respect to all two-dimensional convolutional kernel matrices, bias term vectors, and the learnable weights of the self-calibration module, thus constructing the global gradient flow. The system uses the AdamW optimizer, which has variance adjustment capabilities, as the preset optimizer, with an initial learning rate set to... The weight decay coefficient is After each batch processing iteration (e.g., batch size set to 32), the optimizer calculates the first-order momentum and second-order variance of the gradient tensor. It then reduces the step size using a cosine annealing learning rate scheduling algorithm and iteratively updates the weight parameters of the student network according to the update rule. After a total of 300 epochs of forward and backward propagation iterations, once the above convergence condition is met, the training process is interrupted, and the model's floating-point weight tensor is converted to an FP16 format static dictionary for storage. This decouples the gradient computation graph from the training phase, enabling the student model parameters to be permanently stored on the hardware platform's computing chip. Figure 3 As shown, this is a line graph illustrating the convergence of the training loss of the complete student model of this invention.
[0054] In an optional embodiment, the specific process of obstacle recognition using the trained student model includes: acquiring real-time environmental image data collected by the robot vacuum cleaner's sensors and preprocessing it into a digital feature tensor; inputting the digital feature tensor into the trained student model with fixed parameters, and generating classification confidence data and two-dimensional bounding box coordinate data of candidate regions at the output layer through forward inference; filtering redundant bounding box coordinate data based on a non-maximum suppression algorithm, extracting the corresponding category label, classification confidence, and bounding box coordinates for each retained candidate target, and outputting the category and two-dimensional position information of one or more obstacles in the current scene on the image plane.
[0055] More specifically, when the target detection device is in operation, the system uses an RGB color camera to acquire data at a sampling rate of 30fps with a resolution of [resolution value missing]. The environmental image. A deterministic data preprocessing pipeline is performed before input to the network: the original image is scaled proportionally using bilinear interpolation and zero-padding is applied to the edges. The standard input size converts pixels from integers to floating-point numbers between 0 and 1. The statistical mean (0.485, 0.456, and 0.406) is subtracted, and then divided by the standard deviation for channel-level normalization, converting the original image into a tensor shape. The input feature tensor is used. This tensor data is input into the parameter-fixed student model, and only forward inference is performed in FP16 half-precision acceleration mode. The data is extracted through the inverse residual backbone network and multi-scale feature pyramid, and the target class probability distribution, target confidence, and two-dimensional bounding box prediction matrix relative to the anchor center coordinates and width and height offsets are output in parallel on the three scale detection heads. In the post-detection processing stage, if the network predicts that the scene contains candidate targets, low-scoring boxes will be removed from all predicted boxes output by the detection head first according to the set confidence threshold of 0.45. Non-maximum suppression algorithm is run on the remaining anchor box data to calculate the cross-union ratio (CUI) between bounding boxes of the same category, such as both being a specific obstacle. Multiple overlapping predictions with an CUI exceeding 0.5 are judged as repeated responses of the same target and suppressed. High-confidence bounding boxes that meet the non-maximum suppression condition are retained for each type of candidate target. For multiple overlapping predicted boxes of the same target, only the core bounding box with the highest confidence, such as 0.92, is retained. The detection node decodes the coordinates of the core box and calculates back to the target. In the original coordinate system, the system outputs the category string of each target object and the data packet containing the two-dimensional pixel bounding box from the upper left to the lower right corner (i.e., the extreme values of the horizontal and vertical coordinates) to the lower-level communication bus for subsequent path planning or obstacle avoidance processing.
[0056] The technical effectiveness of this invention is verified through specific experimental data. The experimental hardware platform uniformly uses four high-performance graphics processing cards, and the deep learning computing framework adopts a standard mainstream framework. The teacher model uses a deep residual network structure with high parameter count and computational complexity, while the student model uses a lightweight object detection network structure suitable for edge deployment. This lightweight object detection network includes a MobileNetV3 backbone network, a multi-scale feature pyramid, and an object detection head. A variance adjustment optimizer is used during the training phase, and the initial learning rate is set to [value missing]. The weight decay coefficient is The batch size was set to 32, and the model was trained for a total of 300 iterations. The evaluation metric was the mean accuracy calculated on the test set. All comparative variants maintained the same preprocessing pipeline and hardware scheduling strategy to ensure the fairness of the comparative experimental results.
[0057] The experiment included four progressively improved network variants. The first variant was the baseline student network trained solely on task prediction loss, achieving an average precision (AP) of 35.2% on the test set. The second variant added a global feature alignment distillation strategy that did not distinguish between key regions, slightly improving the AP to 36.8%. The third variant, building upon the second, incorporated a teacher spatial channel attention extraction module and a student self-calibration network based on gradient graph analysis. It employed a fixed-ratio combination of second-order covariance manifold alignment loss and distribution alignment loss based on maximum mean difference, increasing the AP to 38.5%. The fourth variant represented the complete architecture of the invention, incorporating innovative solutions from all embodiments. It added a weighted loss evaluation mechanism based on structural similarity index to the third variant, achieving the best AP of 40.1%.
[0058] Compared to the baseline model, the basic distillation strategy brought a 1.6% gain, but its ability to suppress background noise was relatively limited. The additional 1.7% performance leap from the third group demonstrates that extracting key channels from the teacher feature map and generating the student attention map using truncated gradients, combined with scaling and translation coefficients generated during the training phase to perform affine transformations, can guide the student model's backbone network to learn more focused semantic representations of sensitive target regions. The complete scheme achieved a 1.6% improvement compared to the third group, indicating that the weight allocation mechanism dynamically allocates alignment strength between the second-order covariance manifold metric and the kernel mean embedding distribution difference by calculating the local structural similarity of the teacher and student attention maps. This enables the teacher and student models to achieve more stable feature fitting in the multidimensional statistical space, enhancing the network's stability in dealing with occlusion and small-scale targets. Figure 4 As shown, the bar heights represent the obstacle recognition accuracy of each model variant. The complete model achieves the highest average accuracy of 40.1%, and the performance gains of each innovative module are verified layer by layer.
[0059] Figure 2 This diagram illustrates the weight preheating strategy for the distillation loss problem. The dashed line represents the dynamically adjusted weight preheating curve during training. The slope of the dashed line at the beginning represents the rate of weight increase, and the horizontal segment at the end of the curve represents the target weight value after it stabilizes. The image shows that the dashed line starts from the origin and rapidly rises to the preset height within a very short training cycle, then remains stable. This demonstrates that the algorithm effectively smooths out initial gradient oscillations by linearly adjusting the weights in the early stages of training, avoiding learning instability caused by excessive differences in cross-model features in the student model. This corresponds to the weight preheating feature described in the specific implementation where the distillation weights are progressively increased from 0 to 0.1 in the first 5 cycles.
[0060] Figure 3The graph shows the convergence of the total loss function value during student model training. The solid line with slight fluctuations represents the evolution of the loss function as the training progresses. The height of the solid line on the vertical axis represents the magnitude of the model's current prediction error, and the slope of the curve represents the rate at which the model learns knowledge from the teacher model. The graph shows that the solid line exhibits a steep downward trend in the first half of the training, gradually flattening out into a narrow range of fluctuations in the second half. This demonstrates that the student model successfully achieved parameter optimization under the combined guidance of feature distillation loss and task prediction loss, and the overall training process exhibits good convergence. This corresponds to the training characteristic described in the specific implementation where the model is considered convergent if the change in the total loss function value within a continuous period is below a set threshold.
[0061] Figure 4 A bar chart comparing the average accuracy of different model variants is presented, with the height of the rectangular bars representing the performance differences between the variants. The image shows a stepped increase in the height of the four rectangular bars from left to right, with the rightmost bar representing the complete model being the tallest. This demonstrates that the teacher key feature extraction module, gradient-guided student attention mechanism, and self-calibrating feature reconstruction network introduced in this invention all make significant positive contributions to recognition performance, and the combination of these modules exhibits a good synergistic gain effect. This corresponds to the experimental results showing that the complete architecture of this invention, as described in the specific implementation, achieves better recognition accuracy compared to the baseline network and basic module variants.
[0062] This invention also discloses a robot vacuum cleaner obstacle recognition system, including a processor and a memory. The memory stores computer program instructions, which, when executed by the processor, implement a robot vacuum cleaner obstacle recognition method according to the present invention.
[0063] The system also includes other components well known to those skilled in the art, such as communication buses and communication interfaces, the settings and functions of which are known in the art and will not be described in detail here.
[0064] It should be noted that those skilled in the art can make various modifications and improvements without departing from the inventive concept, and these all fall within the scope of protection of this invention. Therefore, the scope of protection of this patent should be determined by the appended claims.
Claims
1. A method for obstacle recognition in a robotic vacuum cleaner, characterized in that, include: S1: Acquire the scene image to be identified collected by the robot vacuum cleaner's sensor, input it into the teacher model and the student model to be trained, extract the teacher feature map and student feature map, and align the two through channel transformation and spatial resampling; based on the teacher feature map, generate channel importance vector and spatial attention map through pooling and nonlinear mapping, and weight the teacher feature map to obtain key teacher features; S2: Calculate the task prediction loss based on the output of the student model to be trained and the ground truth label. Generate a student attention map based on the gradient of the task prediction loss relative to the student feature map. Weight the student feature map using the student attention map and input it into the self-calibration network to generate affine calibration parameters. Recalibrate the student feature map using the affine calibration parameters to obtain a recalibrated student feature map. S3: Generate similarity weight coefficients based on the structural similarity index between the spatial attention map and the student attention map. Based on the similarity weight coefficients, fuse the second-order covariance Riemann distance and distribution alignment loss between the key teacher features and the recalibrated student feature map to obtain the feature distillation loss. Fuse the task prediction loss and the feature distillation loss into a total loss function to update the parameters of the student model to be trained to obtain the trained student model. Use the trained student model to perform obstacle recognition.
2. The obstacle recognition method for a sweeping robot according to claim 1, characterized in that, The process of generating channel importance vectors and spatial attention maps based on teacher feature maps through pooling and nonlinear mapping, and then weighting the teacher feature maps to obtain key teacher features, includes: performing global average pooling on the teacher feature maps in the spatial dimension to generate channel importance vectors; performing max pooling and average pooling operations on the teacher feature maps along the channel dimension, concatenating the generated single-channel feature maps and performing sliding convolution calculations to generate spatial attention maps; broadcasting the channel importance vectors in the spatial dimension and the spatial attention maps in the channel dimension, and multiplying both by the teacher feature maps element-wise to obtain key teacher features.
3. The obstacle recognition method for a sweeping robot according to claim 1, characterized in that, The method of generating a student attention map based on the gradient of the task prediction loss relative to the student feature map includes: calculating the partial derivative of the task prediction loss with respect to the student feature map to obtain a multi-channel gradient feature matrix; taking the absolute value of the elements of the multi-channel gradient feature matrix to extract the absolute gradient map; summing the values of the spatial positions corresponding to the absolute gradient map along the channel dimension, performing a truncated gradient propagation operation and performing maximum and minimum value normalization processing to generate the student attention map.
4. The obstacle recognition method for a sweeping robot according to claim 1, characterized in that, The process of weighting the student feature map using the student attention map and inputting it into a self-calibration network to generate affine calibration parameters, and then recalibrating the student feature map using these parameters to obtain a recalibrated student feature map, includes: multiplying the student attention map and the student feature map element-wise to obtain a weighted feature matrix; inputting the weighted feature matrix into the self-calibration network to output a scaling factor tensor and a translation bias tensor whose dimensions match the student feature map, as the affine calibration parameters; and multiplying the scaling factor tensor and the student feature map element-wise and adding the translation bias tensor to generate the recalibrated student feature map.
5. The obstacle recognition method for a sweeping robot according to claim 4, characterized in that, The step of inputting the weighted feature matrix into a self-calibrating network and outputting a scaling factor tensor and a translation bias tensor whose dimensions match the student feature map, as the affine calibration parameters, includes: extracting spatial features from the weighted feature matrix through depthwise separable convolutional layers in the self-calibrating network to obtain local features; inputting the local features into a local spatial branch and a global context branch respectively, with the local spatial branch outputting local scaling features and local bias features, and the global context branch outputting a global scaling tensor and a global bias tensor; fusing the local scaling features and the global scaling tensor through element-wise addition to obtain the scaling factor tensor, and fusing the local bias features and the global bias tensor through element-wise addition to obtain the translation bias tensor.
6. The obstacle recognition method for a sweeping robot according to claim 1, characterized in that, The step of generating similarity weight coefficients based on the structural similarity index between the spatial attention map and the student attention map includes: calculating the structural similarity index between the spatial attention map and the student attention map; performing truncated gradient propagation on the structural similarity index and performing truncated normalization processing to obtain the similarity weight coefficients.
7. The obstacle recognition method for a sweeping robot according to claim 1, characterized in that, The feature distillation loss is obtained by fusing the second-order covariance Riemann distance and distribution alignment loss between key teacher features and recalibrated student feature maps based on similarity weight coefficients. This includes: calculating the covariance matrix of the key teacher features and the recalibrated student feature maps; calculating the Riemann geometric distance of the covariance matrix after adding a regularization term based on a positive definite matrix manifold space, as the second-order covariance Riemann distance; mapping the key teacher features and the recalibrated student feature maps to a regenerating kernel Hilbert space; calculating the norm distance between empirical kernel mean embeddings, as the distribution alignment loss based on the maximum mean difference; multiplying the second-order covariance Riemann distance by the similarity weight coefficient to obtain the covariance alignment term; multiplying the distribution alignment loss based on the maximum mean difference by the difference between 1 and the similarity weight coefficient to obtain the distribution alignment term; and adding the covariance alignment term and the distribution alignment term to obtain the feature distillation loss.
8. The obstacle recognition method for a sweeping robot according to claim 7, characterized in that, The calculation of the covariance matrix of the key teacher features and the recalibrated student feature map, and the calculation of the Riemann geometric distance of the covariance matrix after regularization term addition based on the positive definite matrix manifold space, as the second-order covariance Riemann distance, includes: calculating the channel covariance matrix of the key teacher features and the recalibrated student feature map respectively; adding a regularization term multiplied by a positive minimum value and the identity matrix to the channel covariance matrix to obtain the covariance matrix after regularization term addition; and calculating the Riemann geometric distance between the two covariance matrices after regularization term addition using the log-Euclidean metric, as the second-order covariance Riemann distance.
9. The obstacle recognition method for a sweeping robot according to claim 1, characterized in that, The obstacle recognition using the trained student model includes: converting real-time environmental image data collected by the robot vacuum cleaner's sensors into feature tensors; inputting the feature tensors into the trained student model, generating classification confidence scores and two-dimensional bounding box coordinates for candidate regions at the output layer; filtering redundant two-dimensional bounding box coordinates based on a non-maximum suppression algorithm, extracting corresponding category labels and bounding box coordinates from the retained candidate targets, and outputting the obstacle's category and two-dimensional location information for obstacle recognition.
10. An obstacle recognition system for a sweeping robot, characterized in that, include: A processor and a memory, wherein the memory stores computer program instructions that, when executed by the processor, implement a method for obstacle recognition in a sweeping robot according to any one of claims 1-9.