Sheep shed road surface recognition method, device and storage medium for disinfection robot

CN117173402BActive Publication Date: 2026-08-07HEFEI INSTITUTE OF PHYSICAL SCIENCE CHINESE ACADEMY OF SCIENCES +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310745765.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-06-20
Publication Date
2026-08-07
Estimated Expiration
2043-06-20

AI Technical Summary

Technical Problem

该模型在应用于羊舍路面分割任务中虽然交并比和帧率都能达到要求,但是对于其他羊舍的数据集来说,RTFormer的精度较低,即泛化性能较差

Benefits of technology

[0030]As can be seen from the above technical solution, the sheepfold road surface recognition method and system for disinfection robots of the present invention, in view of the problems of poor recognition accuracy and slow recognition speed of existing semantic segmentation models applied to sheep farm road surface recognition, in order to improve the efficiency of automatic disinfection operation of robots, reduce the accident rate, and ensure safety, develops a sheepfold road surface segmentation algorithm model based on dual attention mechanism for disinfection robots.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117173402B_ABST
    Figure CN117173402B_ABST
Patent Text Reader

Abstract

The application discloses a sheep shed road surface recognition method and device for a disinfection robot and a storage medium, and comprises the following steps: generating a binary image by segmenting a sheep shed road image by using a trained recognition model, the binary image being used for visual navigation of a sheep shed disinfection robot; the training steps of the recognition model are as follows: collecting data of a sheep shed internal road image, and performing data enhancement on an original data set; marking and dividing the enhanced image, inputting the processed image into a network model set in advance to train a sheep shed road surface segmentation model; after the training is completed, inputting a test set image to obtain the regression probability of each pixel, and obtaining a binary image by performing binary processing on the prediction result. The application improves the Initial block module, adds SENet, and establishes the mutual dependence relationship between channels in the early stage of the network. Part of the convolution is replaced by a cross attention module, so that the calculation cost is reduced and the performance of network feature extraction is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of identification technology, specifically to a method, system, and equipment for identifying sheepfold pavement surfaces using a disinfection robot. Background Technology

[0002] Livestock and poultry farming is one of the most dynamic economic growth points in rural areas, and sheepfold disinfection is a crucial aspect of facility-based farming. Disinfection of sheepfolds is a vital step in meat sheep farming, preventing many diseases and the spread of viruses. Developing disinfection robots to automate disinfection is an important means of improving the efficiency of disinfection operations, with the autonomous movement of these robots being a key technology. Semantic segmentation is a significant area in computer vision. It enables pixel-level classification of images, dividing an image or video into multiple blocks based on pixel categories. The attention mechanism in deep learning is a resource allocation scheme that, when computational power is limited, allocates computational resources to more important tasks while addressing information overload. By scanning the entire image, it identifies the target region requiring focused attention, then invests more attention resources in this region to acquire more detailed information related to the target, while ignoring other irrelevant information.

[0003] Currently, existing semantic segmentation models, both domestically and internationally, are generally unsuitable for recognizing sheepfold pavement surfaces, exhibiting problems such as poor recognition accuracy, slow recognition speed, and high resource consumption. There is a lack of relevant technologies for semantic segmentation algorithms specifically designed for sheepfold pavement recognition. For example, the Fast-SCNN semantic segmentation model mentioned in [Poudel RPK, Liwicki S, Cipolla R. Fast-scnn: Fast semanticsegmentation network[J]. arXiv preprint arXiv:1902.04502, 2019.] is an encoder-decoder based structure. It extracts features through Learning to Down-sample and Global Feature Extractor, then performs upsampling through a quadratic linear interpolation + DWConv + Conv, and finally adds the Learning to Down-sample output directly, then performs feature fusion again through Conv, and finally classifies pixels. This model only achieves an average intersection-union ratio of 0.7242 in the sheepfold pavement segmentation task, failing to meet the required segmentation accuracy. The DDRNet semantic segmentation model in [Hong Y, Pan H, Sun W, et al. Deep dual-resolution networks for real-time and accurate semantic segmentation of road scenes[J]. arXiv preprint arXiv:2101.06085, 2021] employs a context information extractor called a deep aggregation pyramid merging module to expand the effective receptive field and integrate multi-scale context. However, this model only achieves an FPS of 15.7 frames per second when applied to the sheepfold road segmentation task, which is insufficient for real-time segmentation in videos requiring 25 frames per second. The RTFormer proposed in [Wang J, Gou C, Wu Q, et al. RTFormer: Efficient Design for Real-Time Semantic Segmentation with Transformer[J].arXiv preprint arXiv:2210.07124, 2022] is a dual-resolution model. In the low-resolution branch, the authors use a GPU-friendly attention module to capture high-level global context information, while in the high-resolution branch, they introduce a cross-resolution attention mechanism to propagate and diffuse high-level global context information, that is, to aggregate the features of the two resolutions through the attention module.While the model meets the requirements for intersection-over-union ratio and frame rate when applied to sheepfold road segmentation tasks, RTFormer has lower accuracy for other sheepfold datasets, indicating poor generalization performance.

[0004] Similar semantic segmentation models, both domestic and international, are not well-suited for road surface recognition in sheep farms. Poor accuracy can lead to safety hazards, while slow recognition speed reduces work efficiency. Therefore, there is an urgent need to design a semantic segmentation model that balances accuracy and speed to solve the problem of semantic segmentation for road surface recognition. Summary of the Invention

[0005] The present invention proposes a method, system and device for identifying sheepfold pavement surfaces for disinfection robots, and in particular relates to a deep learning algorithm model that uses semantic segmentation algorithm to identify sheepfold pavement surfaces, which can at least solve one of the technical problems in the background art.

[0006] To achieve the above objectives, the present invention adopts the following technical solution:

[0007] A sheepfold road surface recognition method for a disinfection robot includes the following steps: segmenting a sheepfold road image using a trained recognition model to generate a binarized image, which is then used for visual navigation of the sheepfold disinfection robot.

[0008] The training steps for the recognition model are as follows:

[0009] Data was collected from images of the roads inside the sheepfold, which were used as the original dataset.

[0010] Perform data augmentation on the original dataset;

[0011] The enhanced images are labeled and divided into training set, validation set and test set. The training set is used to train the model weight parameters, the validation set is used to test the model performance during training and adjust the training parameters accordingly, and the test set is used to check the final generalization performance of the model.

[0012] The processed image is input into a pre-set network model suitable for sheep farm road recognition for training to obtain a sheepfold road segmentation model.

[0013] After the sheepfold road segmentation model is trained, the regression probability of each pixel can be obtained by inputting the test set image. After binarizing the prediction results, the binarized image of the sheepfold road segmentation can be obtained.

[0014] Furthermore, the network model suitable for sheep farm road surface recognition includes the lightweight semantic segmentation model SENet, which improves network performance by modeling the relationships between channels and the interdependencies between feature channels. SENet consists of Squeeze and Excitation operations. The Squeeze operation encodes the entire spatial features of a channel into a global feature, solving the problem of a small receptive field. Specifically, it uses global average pooling on the width and height of the feature map to transform the input features into 1. 1 C-size;

[0015] The excitation operation can obtain global descriptive features, and the model uses a sigmoid-based gating mechanism to learn the nonlinear relationship between the channels.

[0016] Furthermore, the network model suitable for sheep farm road surface recognition uses four cascaded CCAs;

[0017] While improving network performance, the number of parameters and computational cost were reduced; H passed through three 1 The first convolutional layer generates the three features Q, K, and V required by the attention network. Next, an Affinity operation is performed on the Q and K features. The purpose of this operation is to obtain features of size W. The relationship between each pixel in the feature map of H and other pixels.

[0018] Furthermore, the Squeeze operation is shown in equation (1):

[0019] (1)

[0020] in These are the pooled values ​​of a single feature map, where H and W are the height and width of the feature map. The pixel value in the i-th row and j-th column of the feature map; the feature of each channel is represented by a single numerical value, and it has a global receptive field;

[0021] The excitation operation is shown in equation (2):

[0022] (2)

[0023] in This allows us to reduce or compress dimensionality to fully capture the relationships between different channels. It can restore the dimension; this part contains two fully connected layers, the first FC layer using the ReLU activation function, which... Features compressed into The second fully connected (FC) layer uses the sigmoid activation function to restore the features to their original state. Finally, a scale operation is performed to obtain H. W Output of size C.

[0024] Furthermore, the lightweight semantic segmentation model ENet first performs an initialization operation on the input, then performs convolution and max pooling on the input, then concatenates them, and then performs a compression-stimulated attention operation. The purpose is to change the number of channels to 16 in the early stage of the network and assign weights to each channel, so that the network is more inclined to road surface recognition.

[0025] Stage 1 performs convolution operations on the feature maps, including a cross-attention module; Stage 2 involves further convolutions, including dilated convolutions to increase the receptive field, asymmetric convolutions to reduce the number of model parameters, and a cross-attention module to strengthen the connection between contextual features; Stage 3 simply removes downsampling; Stage 4 is an upsampling process used to restore the original size of the feature maps; finally, Stage 5 performs full convolutions to output the classification result.

[0026] Furthermore, the data augmentation of the original dataset includes flipping 500 images vertically and randomly adjusting their brightness and contrast to 0.2 to 1.8 times that of the original images; randomly cropping another 500 images by 0 to 15 degrees; and randomly erasing and occluding the remaining dataset.

[0027] Furthermore, the input image size is uniformly cropped to 1024. 512, batch size is 2, 4 threads are called to train a total of 20,000 iterations, the optimizer is the Adam adaptive moment estimation, and a linear learning rate warm-up mechanism is used. The first 2,000 iterations start with an initial learning rate of 0.00001 and gradually increase to 0.01.

[0028] In another aspect, the present invention also discloses a computer-readable storage medium storing a computer program, which, when executed by a processor, causes the processor to perform the steps of the method described above.

[0029] In another aspect, the present invention also discloses a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor performs the steps of the method described above.

[0030] As can be seen from the above technical solution, the sheepfold road surface recognition method and system for disinfection robots of the present invention, in view of the problems of poor recognition accuracy and slow recognition speed of existing semantic segmentation models applied to sheep farm road surface recognition, in order to improve the efficiency of automatic disinfection operation of robots, reduce the accident rate, and ensure safety, develops a sheepfold road surface segmentation algorithm model based on dual attention mechanism for disinfection robots.

[0031] This invention improves the Initial Block module by incorporating SENet to establish inter-channel dependencies in the early stages of the network. It also replaces some convolutions with cross-junction attention modules, thereby reducing computational costs while improving network feature extraction performance.

[0032] Experimental results show that in the semantic segmentation task of sheepfold road surface, the model achieves an mIoU value of 0.9239, a pixel accuracy of 0.9893, a Kappa coefficient of 0.9185, and an average frame rate of 25.6 frames / s, demonstrating good detection performance and meeting the requirements for real-time detection. Attached Figure Description

[0033] Figure 1 This is a flowchart of the present invention;

[0034] Figure 2 This is a schematic diagram of the SENet network model according to an embodiment of the present invention;

[0035] Figure 3 This is a schematic diagram of the network structure of repeated cross-attention according to an embodiment of the present invention;

[0036] Figure 4 This is a schematic diagram of the dual-attention ENET network structure according to an embodiment of the present invention;

[0037] Figure 5 This is a schematic diagram of the Initial block module in the ENET network structure;

[0038] Figure 6 This is a schematic diagram of the Stage3 module in the ENET network architecture. Detailed Implementation

[0039] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are some embodiments of the present invention, but not all embodiments.

[0040] Given that existing semantic segmentation models suffer from poor accuracy and slow speed when applied to sheep farm road surface recognition, this invention develops a sheep farm road surface segmentation algorithm model based on a dual attention mechanism for disinfection robots to improve efficiency, reduce accident rates, and ensure safety. The specific details are as follows:

[0041] This invention proposes a new network for sheepfold road segmentation based on a dual-attention mechanism and a lightweight semantic segmentation model, ENet, suitable for sheepfold road recognition. An SENet module is added to the initial block, performing an SENet operation on the combined main and side branches to improve the relevance of the first few convolutional layers of the input image. The convolutional operations after downsampling are replaced with two RCCA modules, and a regular convolution and a dilated convolution are replaced with a cascaded CCA module to capture contextual information, improving performance without changing network complexity. To simplify the network model and improve real-time performance, some regular convolutions are replaced with asymmetric convolutions to reduce the number of parameters.

[0042] 1. Compressed Excitation Network Channel Attention (SENet)

[0043] Convolution operations acquire features with a number of channels, and each channel's features have different levels of importance. In this embodiment of the invention, channel weights, i.e. the importance of each feature channel, are learned through a squeeze and excitation network (SENet), so that important channels are assigned greater weights and channel features that are not very useful for the current task are suppressed.

[0044] Its technical principle is as follows:

[0045] SENet improves network performance by modeling the relationships between channels and the interdependencies between feature channels. SENet consists of two operations: Squeeze and Excitation. The Squeeze operation encodes the entire spatial features of a single channel into a global feature, addressing the problem of a small receptive field. Specifically, it uses global average pooling on the width and height of the feature map to transform the input features into 1. 1 C-size. The excitation operation obtains global descriptive features, and the model uses a sigmoid-based gating mechanism to learn the non-linear relationships between channels.

[0046] The technical process is as follows:

[0047] Based on the original ENet Initial block, a new method is proposed that adds an SENet initialization module after the main branch and side branches are combined to extract more focused features from the first few convolutional layers of the network.

[0048] 2. Repeated cross-shaped attention

[0049] Long-range dependencies can capture useful contextual information, from which semantic segmentation tasks can benefit. Criss-Cross networks can use more efficient methods to obtain this contextual information.

[0050] Its technical principle is as follows:

[0051] For each pixel in the image, the Criss-Cross Attention (CCA) module can obtain contextual information about pixels on and around the cross path. This process is repeated, and each pixel can eventually capture the long-range dependencies of each pixel. Therefore, in this paper, some convolutions in the ENet network are replaced with RecurrentCriss Cross Attention Module (RCCA), which is to cascade two cross attention modules together.

[0052] The technical process is as follows:

[0053] This algorithm uses four cascaded CCAs. This reduces the number of parameters and computational cost while improving network performance. H passes through three 1... The first convolutional layer generates the three features Q, K, and V required by the attention network. Next, an Affinity operation is performed on the Q and K features. The purpose of this operation is to obtain features of size (W). The relationship between each pixel and other pixels in the feature map of H).

[0054] Among them, compressed incentive network channel attention, such as Figure 2 As shown,

[0055] The Squeeze operation is shown in equation (1):

[0056] (1)

[0057] in These are the pooled values ​​of a single feature map, where H and W are the height and width of the feature map. Let be the pixel value in the i-th row and j-th column of the feature map. The feature of each channel is represented by a single numerical value and has a global receptive field.

[0058] The excitation operation is shown in equation (2):

[0059] (2)

[0060] in This allows us to reduce or compress dimensionality to fully capture the relationships between different channels. This allows for the restoration of dimensions. This part contains two fully connected layers; the first FC layer uses the ReLU activation function to... Features compressed into The second fully connected (FC) layer uses the sigmoid activation function to restore the features to their original state. Finally, a scale operation is performed to obtain H. W Output of size C.

[0061] Repeated cross-attention Figure 3 As shown;

[0062] The Affinity operation method is as shown in equation (3):

[0063] (3)

[0064] in , is the feature vector at position u in the spatial dimension of the feature map Q. , is a feature map The eigenvectors at positions i and u in the middle, for and Multiplying the vectors separately yields a result with dimension 1. The vector is used to perform this operation at each position in Q, resulting in a new feature map, which is... .

[0065] right After performing the Softmax operation, the feature map A and feature map V are subjected to an aggregation operation.

[0066] Attention-based ENet semantic segmentation model, such as Figure 4 As shown. In this model, the input is first initialized, as follows: Figure 5 As shown, the input undergoes convolution and max pooling, then concatenates the data, followed by a compression-enhanced attention operation. The goal is to increase the number of channels to 16 in the early stages of the network and assign weights to each channel, making the network more focused on road surface recognition. Stage 1 performs convolution on the feature maps, incorporating a cross-junction attention module. Stage 2 involves further convolution, including dilated convolution to increase the receptive field, asymmetric convolution to reduce the number of model parameters, and a cross-junction attention module to strengthen the connection between contextual features. Stage 3 is as follows... Figure 6As shown, Stage 2 is similar to Stage 3, except that downsampling is removed. Stage 4 is an upsampling process used to restore the original size of the feature map. Finally, Stage 5 performs full convolution and outputs the classification result.

[0067] Specifically, such as Figure 1 As shown in this embodiment, the sheepfold pavement surface recognition method for disinfection robots includes the following steps:

[0068] I. Image Data Acquisition:

[0069] This method involves collecting video footage of the sheepfold's internal roads and extracting frames. The collection process is concentrated across three time periods throughout the day: morning, noon, and evening, resulting in a total of 17 video clips with a total video duration of 15 minutes. The video acquisition equipment consists of Hikvision cameras mounted on an automated navigation robot. The camera's position and angle are continuously adjusted to capture images of speed bumps at various possible angles and heights. The original video files are in MP4 format with a resolution of 1280p. The video resolution was 720, with a frame rate of 30 frames per second. Frames were captured from the recorded video, and an image was saved every second, resulting in a total of 1697 images, all in JPEG format.

[0070] II. Image Data Augmentation:

[0071] To enhance the richness of the original image dataset and the generalization performance of the model, data augmentation was performed on the original dataset. 500 images were flipped vertically and their brightness and contrast were randomly adjusted to 0.2–1.8 times the original values. Another 500 images were randomly cropped by 0–15°. The remaining images underwent random erasure and occlusion.

[0072] III. Image Annotation and Classification:

[0073] Image annotations were performed using LabelMethods, with different colors corresponding to different labels. The collected images were divided into a training set, a validation set, and a test set in a 7:2:1 ratio. The training set was used to train the model's weight parameters, the validation set was used to test the model's performance during training and, in turn, to adjust the training parameters, and the test set was used to verify the model's final generalization performance.

[0074] IV. Training of a sheepfold pavement segmentation model based on a dual attention mechanism:

[0075] This solution designs a novel network model suitable for sheepfold road surface recognition based on the lightweight semantic segmentation model ENet, specifically a sheepfold road surface segmentation model based on a dual attention mechanism. An SENet module is added to the initial block, performing an SENet operation on the combined main and side branches to improve the relevance of the first few convolutional layers of the input image. The convolutional operations after downsampling are replaced with two RCCA modules, and a regular convolution and a dilated convolution are replaced with a cascaded CCA module to capture contextual information, improving performance without changing network complexity. To simplify the network model and improve real-time performance, some regular convolutions are replaced with asymmetric convolutions to reduce the number of parameters.

[0076] The processed images were input into the model for training. The training machine was equipped with an Intel Xeon(R) CPU E5-2687W v2 3.40GHz, a GTX 1080Ti graphics card with 11GB of video memory, Ubuntu 16.04 operating system, Anaconda + PyCharm2021 + Python3.8 + Xftp7 software platform, and PaddlePaddle-gpu2.4.2 training framework.

[0077] Input images are uniformly cropped to 1024. The dataset is 512, with a batch size of 2. It uses 4 threads to train for a total of 20,000 iterations. The optimizer is the Adaptive Moment Estimator (Adam). A linear learning rate warm-up mechanism is used, with the learning rate starting at 0.00001 and gradually increasing to 0.01 in the first 2,000 iterations.

[0078] V. Generation of Sheepfold Road Segmentation Images

[0079] After the sheepfold pavement segmentation model is trained, inputting test set images yields the regression probability of each pixel. Binarizing the prediction results produces a binarized image of the sheepfold pavement segmentation. This binarized image can be used for visual navigation of sheepfold disinfection robots.

[0080] In summary, the embodiments of this invention improve the Initial block module by incorporating SENet to establish inter-channel dependencies in the early stages of the network. Replacing some convolutions with cross-junction attention modules reduces computational costs while improving network feature extraction performance.

[0081] Experimental results show that in the semantic segmentation task of sheepfold road surface, the model achieves an mIoU value of 0.9239, a pixel accuracy of 0.9893, a Kappa coefficient of 0.9185, and an average frame rate of 25.6 frames / s, demonstrating good detection performance and meeting the requirements for real-time detection.

[0082] In another aspect, the present invention also discloses a computer-readable storage medium storing a computer program, which, when executed by a processor, causes the processor to perform the steps of the method described above.

[0083] In another aspect, the present invention also discloses a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor performs the steps of the method described above.

[0084] In another embodiment provided in this application, a computer program product containing instructions is also provided, which, when run on a computer, causes the computer to execute any of the sheepfold pavement recognition methods for disinfection robots described above.

[0085] It is understood that the system provided in the embodiments of the present invention corresponds to the method provided in the embodiments of the present invention, and the explanation, examples and beneficial effects of the relevant content can be referred to the corresponding parts of the above methods.

[0086] This application also provides an electronic device, including a processor, a communication interface, a memory, and a communication bus, wherein the processor, communication interface, and memory communicate with each other via the communication bus.

[0087] Memory, used to store computer programs;

[0088] When the processor executes the program stored in the memory, it implements the above-mentioned sheepfold pavement recognition method for the disinfection robot.

[0089] The communication bus mentioned in the aforementioned electronic devices can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This communication bus can be divided into address bus, data bus, control bus, etc.

[0090] The communication interface is used for communication between the aforementioned electronic devices and other devices.

[0091] The memory may include random access memory (RAM) or non-volatile memory (NVM), such as at least one disk storage device. Optionally, the memory may also be at least one storage device located remotely from the aforementioned processor.

[0092] The processors mentioned above can be general-purpose processors, including central processing units (CPUs), network processors (NPs), etc.; they can also be digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.

[0093] In the above embodiments, implementation can be achieved entirely or partially through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented entirely or partially as a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid state disk (SSD)).

[0094] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0095] The various embodiments in this specification are described in a related manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the system embodiments are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions of the method embodiments.

[0096] The above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for identifying sheepfold surfaces for use in disinfection robots, characterized in that, The process includes the following steps: using a trained recognition model to segment the sheepfold road image and generate a binarized image, which is then used for the visual navigation of the sheepfold disinfection robot. The training steps for the recognition model are as follows: Data was collected from images of the roads inside the sheepfold, which were used as the original dataset. Perform data augmentation on the original dataset; The enhanced images are labeled and divided into training set, validation set and test set. The training set is used to train the model weight parameters, the validation set is used to test the model performance during training and adjust the training parameters accordingly, and the test set is used to check the final generalization performance of the model. The processed image is input into a pre-set network model suitable for sheep farm road recognition for training to obtain a sheepfold road segmentation model. After the sheepfold road segmentation model is trained, the regression probability of each pixel can be obtained by inputting the test set image. After binarizing the prediction results, the binarized image of the sheepfold road segmentation can be obtained. The network model suitable for sheep farm road surface recognition includes a compressed excitation network SENet module added to the Initialblock based on the lightweight semantic segmentation model ENet. The SENet compressed excitation network module improves network performance by modeling the relationships between channels and the interdependencies between feature channels. The SENet module consists of Squeeze and Excitation operations. The Squeeze operation encodes the entire spatial features of a single channel into a global feature, solving the problem of a small receptive field. Specifically, it uses global average pooling on the width and height of the feature map to transform the input features into 1. 1 C-size; The excitation operation can obtain global descriptive features, and the model uses a Sigmoid-style gating mechanism to learn the nonlinear relationship between each channel; The network model for sheep farm road surface recognition uses four CCA cascades; While improving network performance, the number of parameters and computational cost were reduced; H passed through three 1 The first convolutional layer generates the three features Q, K, and V required by the attention network. Next, an Affinity operation is performed on the Q and K features. The purpose of this operation is to obtain features of size W. The relationship between each pixel in the feature map of H and other pixels.

2. The sheepfold pavement surface recognition method for a disinfection robot according to claim 1, characterized in that: The Squeeze operation is shown in equation (1): (1) in These are the pooled values ​​of a single feature map, where H and W are the height and width of the feature map. The pixel value in the i-th row and j-th column of the feature map; the feature of each channel is represented by a single numerical value, and it has a global receptive field; The excitation operation is shown in equation (2): (2) in This allows us to reduce or compress dimensionality to fully capture the relationships between different channels. It can restore the dimension; this part contains two fully connected layers, the first FC layer using the ReLU activation function, which... Features compressed into The second fully connected (FC) layer uses the sigmoid activation function to restore the features to their original state. Finally, a scale operation is performed to obtain H. W Output of size C.

3. The sheepfold pavement surface recognition method for a disinfection robot according to claim 2, characterized in that: The lightweight semantic segmentation model ENet first performs an initialization operation on the input, then performs convolution and max pooling on the input, then concatenates them, and then performs a compression-stimulated attention operation. The purpose is to increase the number of channels to 16 in the early stage of the network and assign weights to each channel, so that the network is more inclined to recognize road surfaces. Stage 1 performs convolution operations on the feature maps, with the addition of a cross-attention module; Stage 2 involves further convolutions, including dilated convolutions to increase the receptive field, asymmetric convolutions to reduce the number of model parameters, and a cross-attention module to strengthen the connection between contextual features. Stage 3 simply removes downsampling; Stage 4 is an upsampling process used to restore the original size of the feature map; finally, Stage 5 performs full convolution to output the classification result.

4. The sheepfold pavement surface recognition method for a disinfection robot according to claim 1, characterized in that: The data augmentation of the original dataset includes flipping 500 images vertically and randomly adjusting their brightness and contrast to 0.2 to 1.8 times that of the original images; and randomly cropping another 500 images by 0 to 15 degrees. The remaining datasets are subjected to random erasure and occlusion.

5. The sheepfold pavement surface recognition method for a disinfection robot according to claim 1, characterized in that: Input images are uniformly cropped to 1024. 512, batch size is 2, 4 threads are called to train a total of 20,000 iterations, the optimizer is the Adam adaptive moment estimation, and a linear learning rate warm-up mechanism is used. The first 2,000 iterations start with an initial learning rate of 0.00001 and gradually increase to 0.

01.

6. A computer-readable storage medium storing a computer program that, when executed by a processor, causes the processor to perform the steps of the method as claimed in any one of claims 1 to 5.

7. A computer device comprising a memory and a processor, the memory storing a computer program that, when executed by the processor, causes the processor to perform the steps of the method as claimed in any one of claims 1 to 5.