Light and simplified monitoring equipment, method and application for rice crab living environment based on environment sensor and image acquisition device

By using rice-crab survival environment monitoring equipment based on environmental sensors and image acquisition devices, combined with the rice-crab target detection network YOLO-RCCS based on complex rice field scene images, the problem of all-weather and accuracy monitoring of rice-crab farming environment in rice fields has been solved, enabling precise feeding and efficient management.

CN121547556APending Publication Date: 2026-02-17SHENYANG AGRI UNIV +1
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202511675539.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-15
Publication Date
2026-02-17

AI Technical Summary

Technical Problem

Traditional rice-crab farming environmental monitoring relies on manual patrols, which cannot achieve continuous monitoring around the clock. It lacks systematic research on rice-crab behavior, and existing monitoring systems cannot effectively combine environmental parameters with biological behavior data, resulting in low accuracy in identifying rice-crabs in complex rice paddy environments.

Method used

Monitoring equipment based on environmental sensors and image acquisition devices, including data acquisition, processing, and user terminal devices, is adopted. Combined with computer vision technology, it realizes rice-crab target recognition and environmental parameter monitoring. The recognition accuracy is improved by using the YOLO-RCCS rice-crab target detection network for complex rice field scene images.

Benefits of technology

It enables all-weather monitoring of the rice-crab farming environment in paddy fields, reduces the cost of manual sampling, increases the monitoring range and frequency, provides precise feeding decision support, and enhances the level of precision management and economic benefits of rice-crab farming.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121547556A_ABST
    Figure CN121547556A_ABST
Patent Text Reader

Abstract

The invention discloses light and simplified monitoring equipment and method for a rice crab living environment based on an environment sensor and an image acquisition device and application, belongs to the field of rice crab living environment monitoring, and aims to solve the problems of monitoring a rice crab breeding environment in a rice field and monitoring rice crab distribution information. The acquisition module is used for acquiring images and at least one environmental parameter of a rice field monitoring area; the processing device is in communication connection with the data acquisition device, receives the images and the environmental parameters, and is configured as follows: a, the environmental parameters are used for interface display processing; b, identifying a rice crab target from the image and generating first information related to the rice crab; and the user terminal device is in communication connection with the processing device and is used for receiving and displaying the environment parameters and the first information. The obtained rice crab distribution information can reflect the ingestion behavior and can be used for achieving accurate feeding, the rice crab distribution information can be used for assisting a sensor in monitoring the environment, and possible environment abnormity or early warning information is prompted.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of rice-crab survival environment monitoring, and relates to a simplified monitoring equipment, method and application for rice-crab survival environment based on environmental sensors and image acquisition devices. Background Technology

[0002] Traditional environmental monitoring in rice-crab farming relies primarily on manual labor. Farmers need to regularly inspect the fields, observe the activity of the rice and crabs, and use portable water quality analyzers to sample and measure water parameters. This method has several drawbacks: it cannot achieve continuous, 24 / 7 monitoring, making it difficult to capture sudden environmental changes; sampling measurements are random and cannot comprehensively reflect the true condition of the entire farming area; and relying on human experience for judgment lacks quantitative basis and is prone to misjudgment due to subjective factors. Furthermore, traditional experience-based feeding methods cannot accurately adjust to the real-time feeding needs of rice and crabs, easily leading to feed waste and reduced farming efficiency. In addition, rice and crabs have specific feeding rhythms, with their feeding activity mainly concentrated from night to morning; manual monitoring is time-consuming, labor-intensive, and inefficient, resulting in a lack of systematic research and clear understanding of rice-crab feeding behavior.

[0003] Furthermore, while the development of IoT technology has led to the emergence of environmental monitoring systems for aquaculture, which collect water quality parameters such as dissolved oxygen, pH, and water temperature through sensors and upload the data to a monitoring center, most existing systems only focus on environmental parameters and lack direct monitoring of the aquaculture organisms themselves. There is a disconnect between environmental data and biological behavior data, making it impossible to establish effective correlation analysis. For example, when a decrease in dissolved oxygen is detected, the system can only issue a water quality anomaly alarm, but it cannot determine whether this change has actually affected the rice-crab farming industry, or to what extent.

[0004] Furthermore, identifying and monitoring rice-crab targets in the complex environment of rice paddies presents unique technical challenges. The turbid water, dense aquatic vegetation, and variable lighting conditions of rice paddies, coupled with the high similarity in color and texture between the rice paddy background and the rice-crab shells, and the low accuracy in identifying extremely small targets such as crab claws, all pose challenges to the application of computer vision technology. Existing general-purpose object detection algorithms often fail to meet the accuracy requirements for identifying rice-crabs in such complex natural settings as rice paddies. Summary of the Invention

[0005] To address the issues of monitoring the rice-crab farming environment and distribution information in paddy fields, this application provides monitoring equipment for the rice-crab living environment, including...

[0006] A data acquisition device for acquiring images of a rice paddy monitoring area and at least one environmental parameter;

[0007] The processing device, communicatively connected to the data acquisition device, receives the images and environmental parameters, and is configured as follows:

[0008] a. Perform the process of using the environmental parameters for interface display;

[0009] b. Perform the task of identifying rice-crab targets from the image and generating first information related to rice-crabs;

[0010] The user terminal device is communicatively connected to the processing device and is used to receive and display environmental parameters and the first information.

[0011] According to the monitoring equipment for the rice-crab survival environment in some embodiments of this application, the processing device is further configured as follows:

[0012] c. Based on predefined analysis rules, output analysis results according to the current environmental parameters and the first information; and

[0013] The user terminal device is used to receive and present the analysis results.

[0014] According to some embodiments of the monitoring equipment for the survival environment of rice and crabs in this application, the data acquisition device includes an image capture unit and a sensing unit.

[0015] The image capture unit is arranged in the aquaculture area;

[0016] The sensing unit includes at least one sensor for detecting the chemical properties of the water.

[0017] According to some embodiments of the monitoring equipment for the survival environment of rice-crab, the image capture unit is configured to cover a predetermined functional area in the aquaculture area with its field of view, the predetermined functional area including at least one of a feeding area, a habitat area, or a water inlet / drainage area.

[0018] According to the monitoring equipment for the rice-crab survival environment in some embodiments of this application, the at least one sensor for detecting the chemical properties of the water body includes any one or more of a water temperature sensor, a pH sensor, a dissolved oxygen sensor, or a light intensity sensor.

[0019] According to the monitoring equipment for the survival environment of rice and crabs in some embodiments of this application, the processing device has a built-in rice and crab target detection network for complex scene images of rice fields.

[0020] According to the monitoring equipment for the living environment of rice and crabs in some embodiments of this application, the first information includes the spatial distribution and number of rice and crabs in the current predetermined functional area.

[0021] According to the monitoring equipment for the survival environment of rice-crab in some embodiments of this application, the step of outputting analysis results based on predefined analysis rules and current environmental parameters and the first information is implemented in the following way:

[0022] Historical data on the correlation between the environmental parameters at different times and the distribution quantity of rice-crabs in the predetermined functional area;

[0023] Based on historical data, determine the distribution quantity of rice-crabs in the predetermined functional area corresponding to the values ​​of the environmental parameters at different times, and obtain the range of the distribution quantity of rice-crabs in the predetermined functional area corresponding to the values ​​of the environmental parameters at different times not exceeding the limit.

[0024] The range of rice-crabs distributed in a predetermined functional area corresponding to the historical time corresponding to the current time, where the values ​​of the environmental parameters do not exceed the limits, is designated as the first range. This range is then compared with the number of rice-crabs distributed in the predetermined functional area at the current time.

[0025] If the number of rice-crabs distributed in the predetermined functional area at the current time exceeds the first quantity range, and the current environmental parameters do not exceed the limits, then the first analysis result will be output.

[0026] If the number of rice-crabs distributed in the predetermined functional area at the current time exceeds the first quantity range, and the current environmental parameters exceed the limits, then the second analysis result will be output.

[0027] According to the monitoring equipment for the rice-crab survival environment in some embodiments of this application, the first analysis result is an abnormality to be investigated, and the second analysis result is an environment to be dealt with in case of an early warning.

[0028] According to the monitoring method for the survival environment of rice-crab in some embodiments of this application, including

[0029] Acquire images of the rice paddy monitoring area and at least one environmental parameter;

[0030] The processing device receives the image and environmental parameters, and its configuration is as follows:

[0031] a. Perform the process of using the environmental parameters for interface display;

[0032] b. Perform the task of identifying rice-crab targets from the image and generating first information related to rice-crabs;

[0033] The user terminal device receives and displays environmental parameters and the first information.

[0034] Beneficial effects:

[0035] This invention enables the monitoring of the rice-crab farming environment and distribution information in rice paddies by collecting and transmitting images and environmental parameters of the monitored area, and then visualizing this information on a terminal. This environmental monitoring reduces the cost of manual sampling and increases the monitoring range and sampling frequency. Furthermore, it provides 24 / 7 monitoring of rice-crab behavior, and the distribution information reflects feeding behavior, providing decision support for precise, on-demand feeding of rice-crabs. In particular, this invention achieves monitoring of both feeding behavior and the living environment; the information on feeding behavior and the water quality complement each other to ultimately provide a basis for precise feeding.

[0036] Based on the above, and further, for problems such as the large area of ​​paddy fields making it difficult to fully meet the monitoring needs with the number of sensors installed, or the monitoring lag caused by the large distribution of sensor installation intervals, this invention analyzes the correspondence between historical environmental data and rice-crab distribution information, uses the rice-crab distribution information to assist sensors in monitoring the environment, and uses the rice-crab distribution to indicate possible environmental anomalies or early warning information.

[0037] Based on the above, the accuracy of rice-crab distribution data has a certain impact on this invention. Furthermore, this invention provides a device and network based on computer vision target detection technology, enabling more accurate target identification of rice-crabs. This addresses the problems of the high similarity in color and texture between the rice paddy background and the rice-crab shells, coupled with the low accuracy in identifying extremely small targets such as crab claws, thus enabling this invention to obtain more accurate rice-crab distribution information.

[0038] Additional aspects and advantages of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. Attached Figure Description

[0039] Figure 1 It is the data transmission, access, and visualization of IoT devices.

[0040] Figure 2 This is a diagram illustrating data augmentation.

[0041] Figure 3 This is a YOLO-RCCS network diagram.

[0042] Figure 4 This is a diagram of the C3k2_RFAConv component.

[0043] Figure 5 This is the RFAConv flowchart.

[0044] Figure 6 This is a diagram of the C2PSA_CAA component.

[0045] Figure 7 This is a CAA flowchart.

[0046] Figure 8 This is a diagram of CARAFE components.

[0047] Figure 9 This is a graph of the SlideLoss loss function.

[0048] Figure 10 This is a visual comparison of the detection results of different models. In the figure, the red detection box indicates a missed detection, and the yellow detection box indicates a false detection.

[0049] Figure 11 This is a visualization comparison of the heatmaps of the model before and after the improvement. In the figure, the blue-red gradient heatmap represents the attention level; dark red represents the highest attention; and dark blue represents the lowest attention. Detailed Implementation

[0050] The embodiments of this application are described in detail below with reference to the accompanying drawings. This invention relates to a simplified monitoring equipment for the living environment of rice-crab hybrids based on environmental sensors and image acquisition devices, and also to a rice-crab target detection device and method for complex rice paddy scene images that can improve the monitoring effect of the monitoring equipment.

[0051] The rice-crab habitat monitoring equipment of this invention comprises three main parts: a data acquisition device, a processing device, and a user terminal device. The data acquisition device consists of an image capture unit and an environmental sensing unit. The image capture unit can use a high-definition camera, preferably with infrared imaging capability, and is deployed in feeding areas, habitat areas, water intake areas, and drainage areas, with one or more cameras installed in each area. The cameras can be fixed to galvanized steel pipe poles using heavy-duty brackets, preferably with a pole height of 1.5 meters and an installation angle of 35° to fully cover the target functional area.

[0052] The environmental sensing unit includes a water temperature sensor, a pH sensor, a dissolved oxygen sensor, and a light intensity sensor, among others.

[0053] The processing unit is deployed on a cloud server and includes two core processing modules: an environmental parameter processing module and an image analysis module. The environmental parameter processing module performs verification, filtering, and standardization on the sensor data; the image analysis module runs a rice-crab target detection network for complex rice paddy scene images, which is described in detail below.

[0054] The user terminal device is a mobile application based on WeChat Mini Programs. The front end is developed using the Vue.js framework and supports functions such as real-time data display, historical query and alarm management.

[0055] The data acquisition device operates according to a preset cycle. The image capture unit can acquire on-site images at set time intervals or in real time, and the environmental sensing unit can acquire environmental parameters at set time intervals or in real time. The data can be transmitted to the processing device via a wireless network.

[0056] The processing device receives data and executes processing tasks in parallel. The environmental parameter processing module performs quality checks on the sensor data, removes outliers, and standardizes units and formats for data display. It can also process the data into graphical representations for more intuitive data visualization. The image analysis module identifies rice-crab targets in images, such as generating bounding boxes, and obtains information such as their quantity distribution. The detection network output includes the bounding box coordinates and confidence scores for each detected rice-crab. Based on this information, the system generates primary information, including the number of rice-crabs in the currently designated functional area. Taking the feeding area as an example, the system counts the total number of rice-crabs detected in that area and calculates the rice-crab quantity distribution or the distribution density per unit area, which reflects feeding behavior information. This invention further realizes the monitoring of feeding behavior and the living environment. Feeding behavior information and the living water quality environment complement each other to ultimately achieve precise feeding.

[0057] In some embodiments, based on predefined analysis rules, analysis results are output according to the current environmental parameters and the first information: historical data on the correlation between the environmental parameters at different times and the distribution quantity of rice-crabs in the predetermined functional area are obtained; the distribution quantity of rice-crabs in the predetermined functional area corresponding to the values ​​of the environmental parameters at different times is determined according to the historical data, and the range of the distribution quantity of rice-crabs in the predetermined functional area corresponding to the values ​​of the environmental parameters at different times not exceeding the limit is obtained; the range of the distribution quantity of rice-crabs in the predetermined functional area corresponding to the values ​​of the environmental parameters at the current time not exceeding the limit is obtained, which is the first quantity range, and is compared with the distribution quantity of rice-crabs in the predetermined functional area at the current time: if the distribution quantity of rice-crabs in the predetermined functional area at the current time exceeds the first quantity range, and the current environmental parameters do not exceed the limit, then the first analysis result is output; if the distribution quantity of rice-crabs in the predetermined functional area at the current time exceeds the first quantity range, and the current environmental parameters exceed the limit, then the second analysis result is output, wherein the first analysis result is a trigger for anomaly investigation, and the second analysis result is a trigger for an early warning environment to be processed.

[0058] Specifically, historical data records the correlation between environmental parameters and the distribution of rice-crab populations at different times within the past year and at different times within a single day. By obtaining historical data from the same period for the current time, the normal range for rice-crab population distribution within the normal range of environmental parameters for that period is determined. Then, the current measured value is compared with these ranges.

[0059] If the number of rice-crabs in the feeding area is currently below the normal range, while the environmental parameters are all within the normal range, the system will output the first analysis result triggering an anomaly to be investigated. This will indicate that the detection data of the sensor set at the current location may be lagging due to reasons such as sensor setting interval, or that the sensor may be damaged, leading to incorrect detection values. Alternatively, there may be factors other than environmental factors causing the abnormal appearance of rice-crabs. If there is interference from water birds, manual investigation can be arranged.

[0060] If the current number of rice-crabs is also below the normal range, and the dissolved oxygen concentration is detected to be above the normal range, the second analysis result will be output to trigger an early warning for the environment to be treated, clearly indicating that the dissolved oxygen problem in the water needs to be addressed first.

[0061] The user terminal device receives and displays this information in real time. The interface is divided into three areas: the top displays real-time environmental parameter values ​​and the number of rice-crabs; the middle displays analyzed field images, with identified rice-crabs marked with bounding boxes; and the bottom displays analysis results and warning information. Users can view historical data trends via a timeline, and the system supports data export and report generation.

[0062] The present invention, through the acquisition and transmission of images and environmental parameters of the rice paddy monitoring area and the visualization of this information on a terminal, enables the monitoring of the rice-crab farming environment and the distribution information of rice-crabs. This environmental information monitoring reduces the cost of manual sampling and increases the monitoring range and sampling frequency. Furthermore, it provides 24 / 7 monitoring of rice-crab behavior, and the distribution information reflects feeding behavior, providing decision support for precise, on-demand feeding of rice-crabs. In particular, the present invention achieves monitoring of both feeding behavior and the living environment; feeding behavior information and the water quality environment complement each other to ultimately provide a basis for precise feeding. For example, if it is found that rice-crabs have a high feeding desire under specific water temperature conditions, they can be fed as needed, reducing feed waste.

[0063] As described above, this equipment, through continuous monitoring of functional areas, can automatically collect environmental parameters and the distribution of rice-crab populations. Furthermore, it can promptly detect abnormal changes in rice-crab aggregation behavior. In another case, by analyzing historical data patterns, it was found that dissolved oxygen changes are significantly affected by light intensity under different lighting conditions. Based on this finding, the system can establish a predictive early warning mechanism, prompting the implementation of oxygenation measures the night before potential oxygen deficiency, thus achieving a shift from passive response to proactive prevention. By organically combining environmental monitoring with biological behavior analysis, this equipment provides comprehensive decision support for rice-crab co-culture, effectively improving the precision of aquaculture management and economic benefits.

[0064] This invention also relates to the application of a rice-crab target detection network based on complex rice paddy scene images in the aforementioned rice-crab habitat monitoring method, in order to improve the accuracy of rice-crab target distribution monitoring and simultaneously achieve the aforementioned habitat monitoring effect.

[0065] Based on the above, accurately identifying rice-crab targets in images can provide accurate quantity distribution information for this invention. Therefore, this invention further proposes a rice-crab target detection device for complex rice paddy scene images, comprising a target detection network model based on the YOLO network. This method can acquire images and construct a dataset using a simplified monitoring equipment based on environmental sensors and image acquisition devices for the rice-crab habitat. It includes the following steps:

[0066] Data acquisition: Rice-crab image samples were collected at the Panjin National Modern Agricultural Science and Technology Demonstration Base. The data acquisition method designed in this invention employs a non-invasive design to preserve the original ecological environment of the rice paddies to the greatest extent possible. The IoT data acquisition device mainly consists of two parts: an environmental sensor module and an image acquisition module. The environmental sensor is used to collect key environmental parameters such as light intensity, dissolved oxygen, pH value, and water temperature in real time; the image acquisition module is used to acquire images of the rice paddies, including image data of rice-crab feeding behavior. The two work together to achieve synchronous acquisition of environmental information and behavioral data. In addition, the device uses a dual power supply system of solar energy and mains power, allowing for long-term deployment in rice paddies. Even in the limited power and network conditions of rice paddies, it can still achieve all-weather, unattended data acquisition, demonstrating good environmental adaptability and system stability. IoT devices such as... Figure 1 As shown, it illustrates how environmental sensors and image acquisition modules acquire real-time data. After the data is aggregated by a gateway, it is uploaded to a cloud server for storage and management. Users can access and visualize the data in real time through a WeChat mini-program terminal.

[0067] The dataset construction involved selecting video clips representing typical environmental scenarios, including sunny days, rainy days, windy days, and nighttime, to improve the model's generalization ability. Frame-by-frame extraction was performed on the videos, and after removing duplicates and highly similar frames, random selection was conducted, ultimately yielding 5223 valid image samples.

[0068] Data augmentation involves augmenting the data after acquiring the original samples. This is achieved through operations such as image rotation, translation, blurring, and brightness adjustment. Figure 2As shown, this further enriched the sample diversity, ultimately expanding the dataset to 8980 images. This invention used Labelimg software to annotate the dataset, with all targets uniformly labeled "crab". The dataset was divided into training, validation, and test sets in an 8:1:1 ratio, with 7184, 898, and 898 samples respectively. Furthermore, to further enhance the model's ability to focus on and learn features related to the rice-crab target, 1100 additional background images were introduced into the training set to improve the model's ability to identify target features.

[0069] Current research on related methods mainly focuses on crab pond and indoor laboratory scenarios, with little systematic research conducted in rice paddy farming scenarios. In outdoor rice paddy farming scenarios, rice and crabs are easily confused with complex background textures, and factors such as rice flower attachment, light variations, and inclement weather make feature extraction insufficiently considered, failing to fully meet the actual needs of complex farming environments such as natural rice paddies. This invention proposes an improved rice-crab detection model, YOLO-RCCS, which significantly enhances feature extraction and representation capabilities while maintaining a lightweight structure, thereby effectively improving detection accuracy and robustness in complex rice paddy environments.

[0070] like Figure 3 As shown, the rice-crab target detection device for complex rice paddy scene images of the present invention involves a YOLO-RCCS network model, which is a rice-crab detection model for rice paddy farming scenarios. It is based on YOLO11n and optimized to meet the detection challenges in complex rice paddy environments. This invention improves the C3k2 component to the C3k2_RFAConv component, introducing a dynamic receptive field and a feature-adaptive convolution mechanism to enhance the model's feature extraction capabilities in complex backgrounds and solve the problem of feature confusion caused by the similarity of textures between rice crabs and the background. It also improves the C2PSA component to the C2PSA_CAA component, addressing the issues of occlusion of crab texture features and scale variations and appearance differences in rice paddy scenes due to shooting angles and rice flower attachments. By using a channel and spatial collaborative attention fusion mechanism, it enhances the model's feature separation and focusing capabilities, thereby improving the detection accuracy of rice crab targets. Furthermore, this invention uses the CARAFE component, an upsampling module, which solves the spatial structure blurring and detail loss problems caused by traditional interpolation upsampling through a content-aware reconstruction mechanism, ensuring spatial consistency and detail fidelity of the feature map. Finally, it uses the SlideLoss loss function to dynamically adjust sample weights to balance gradient distribution, optimizing the model's training stability and convergence speed. Overall, YOLO-RCCS significantly enhances the model's detection robustness and generalization ability in the rice-crab farming environment through synergistic improvements in feature adaptation, attention collaboration, content-aware resampling, and loss optimization.

[0071] like Figure 3As shown, in some embodiments of the present invention, the network includes a backbone network, a neck network, and a detection head. The backbone network is used to input a rice paddy scene image and obtains a first feature map of the backbone network using a C3K2 component. Based on the first feature map, the backbone network obtains a second feature map using a C2PSA component. Based on the second feature map, the neck network obtains a third feature map using a CARAFE component. Based on the third feature map, the neck network obtains a first feature map using a C3K2 component. The detection head outputs the rice-crab target in the rice paddy scene image based on the first feature map of the neck network.

[0072] In the above embodiments, the backbone network includes a first Conv component, into which a rice paddy scene image is input; a second Conv component, into which the output of the first Conv component is input; a first C3K2 component, into which the output of the second Conv component is input and outputs a first feature map of the first C3K2 component; a third Conv component, into which the output of the first C3K2 component is input; a second C3K2 component, into which the output of the third Conv component is input and outputs a first feature map of the second C3K2 component; and a fourth Conv component, into which the second... The output of the C3K2 component is input to the fourth Conv component; the output of the third C3K2 component and the fourth Conv component are input to the third C3K2 component, and the first feature map of the third C3K2 component is output; the output of the fifth Conv component and the third C3K2 component are input to the fifth Conv component; the output of the fourth C3K2 component and the fifth Conv component are input to the fourth C3K2 component, and the first feature map of the fourth C3K2 component is output; the output of the SPPF component and the fourth C3K2 component are input to the SPPF component; and the output of the C2PSA component and the SPPF component are input to the C2PSA component, to obtain the second feature map.

[0073] In the above embodiments, the neck network includes a first CARAFE component, the second feature map being input to the first CARAFE component, and the output being a third feature map of the first CARAFE component; a first Concat component, the first feature map output by the third C3K2 component of the backbone network and the third feature map being input to the first Concat component; a fifth C3K2 component, the output of the first Concat component being input to the fifth C3K2 component, and the output being a first feature map of the fifth C3K2 component; a second CARAFE component, the output of the fifth C3K2 component being input to the CARAFE component, and the output being a third feature map of the second CARAFE component; a second Concat component, the first feature map output by the second C3K2 component of the backbone network and the output of the second CARAFE component being input to the second Concat component; and a sixth C3K2 component, the second Concat component... The output of the sixth C3K2 component is input to the sixth C3K2 component, and the output of the sixth C3K2 component is the first feature map of the sixth C3K2 component; the output of the sixth C3K2 component is input to the sixth Conv component; the output of the fifth C3K2 component and the output of the sixth Conv component are input to the third Concat component; the output of the third Concat component is input to the seventh C3K2 component, and the output of the seventh C3K2 component is the first feature map of the seventh C3K2 component; the output of the seventh C3K2 component is input to the seventh Conv component; the output of the fourth Concat component is input to the second feature map of the C2PSA component of the backbone network and the output of the seventh Conv component are input to the fourth Concat component; the output of the eighth C3K2 component is input to the eighth C3K2 component, and the output of the eighth C3K2 component is the first feature map of the eighth C3K2 component.

[0074] In the above embodiments, the detection head includes a first detection head, a second detection head, and a third detection head; the first detection head outputs the rice-crab bounding box in the rice paddy scene image based on the first feature map output by the sixth C3K2 component; the second detection head outputs the rice-crab bounding box in the rice paddy scene image based on the first feature map output by the seventh C3K2 component; and the third detection head outputs the rice-crab bounding box in the rice paddy scene image based on the first feature map output by the eighth C3K2 component.

[0075] It is understood that the C3k2 component referred to in the embodiments is the C3k2_RFAConv component optimized by the present invention; and C2PSA is the C2PSA_CAA component optimized by the present invention.

[0076] In the above embodiments, the C3K2 component includes a C3K2 input interface for receiving an input feature map; a first convolutional layer connected to the C3K2 input interface, configured to perform a convolution operation on the input feature map and output a first intermediate feature map; a first feature segmentation layer connected to the output of the first convolutional layer, configured to segment the first intermediate feature map, including a first feature subset and a second feature subset; a Bottleneck layer configured to receive the first feature subset and output a first output feature subset, the Bottleneck layer including a Bottleneck input interface connected to the output of the first feature subset of the first feature segmentation layer for receiving the first feature subset; and a second convolutional layer connected to the Bottleneck input interface, configured to perform a convolution operation on the first feature subset and output a second intermediate feature map. The C3K2 component includes a first feature convolutional layer connected to the output of the second convolutional layer. This convolutional layer generates a receptive field spatial attention map and receptive field attention weights from the second intermediate feature map, outputting a third intermediate feature map. A first residual connection layer, connected to the output of the first feature subset of the first feature segmentation layer and the output of the receptive field attention convolutional layer, is configured to add the first feature subset to the third intermediate feature map element-wise, outputting a first output feature subset. The C3K2 component also includes a first feature concatenation layer, connected to the output of the first residual connection layer and the output of the second feature subset of the first feature segmentation layer. This layer concatenates the first output feature subset with the second feature subset, outputting a fourth intermediate feature map. A third convolutional layer, connected to the output of the first feature concatenation layer, is configured to perform a convolution operation on the fourth intermediate feature map, outputting a first feature map.

[0077] In the above embodiments, the receptive field attention convolutional layer of the C3K2 component includes a receptive field attention convolutional layer input interface for receiving a second intermediate feature map; a fourth convolutional layer connected to the receptive field attention convolutional layer input interface, configured to perform a convolution operation on the second intermediate feature map and output a fourth intermediate feature map; a normalization layer connected to the output of the fourth convolutional layer, configured to perform a normalization operation on the fourth intermediate feature map and output a fifth intermediate feature map; a linear rectified layer connected to the output of the normalized layer, configured to perform a nonlinear transformation operation on the fifth intermediate feature map and output a receptive field spatial attention map; and a first average pooling layer connected to the receptive field attention convolutional layer. The input interface of the receptive field attention convolutional layer is configured to perform pooling operations on the second intermediate feature map and output the first pooled feature representation; the fifth convolutional layer, connected to the output of the first average pooling layer, is configured to perform convolution operations on the first pooled feature representation and output the attention score; the first attention normalization layer, connected to the output of the fifth convolutional layer, is configured to perform normalization processing on the attention score and output the receptive field attention weight; the first feature fusion layer, connected to the output of the linear rectified layer and the output of the first attention normalization layer, is configured to multiply the receptive field spatial attention map with the receptive field attention weight and output the third intermediate feature map.

[0078] In the above embodiments, the C2PSA component includes a C2PSA input interface for receiving an input feature map; a sixth convolutional layer connected to the C2PSA input interface, configured to perform a convolution operation on the input feature map and output a seventh intermediate feature map; a second feature segmentation layer connected to the output of the sixth convolutional layer, configured to segment the seventh intermediate feature map, including a third feature subset and a fourth feature subset; a PSABlock layer configured to receive the third feature subset and output a third output feature subset, the PSABlock layer including a PSABlock input interface connected to the output of the third feature subset of the second feature segmentation layer for receiving the third feature subset; a first attention mechanism layer connected to the PSABlock input interface, configured to perform capture of local context information, long-range dependencies in the horizontal and vertical directions on the third feature subset, and output an adaptive attention weight map; and a second residual connection layer connected to the first of the second feature segmentation layer. The output of the first attention mechanism layer is configured to add the third feature subset to the adaptive attention weight map element-wise to output the second output feature subset. The feedforward neural network layer, connected to the first output of the second residual connection layer, is configured to perform feature extraction on the second output feature subset to output the eighth intermediate feature map. The third residual connection layer, connected to the second output of the second residual connection layer and the output of the feedforward neural network layer, is configured to add the second output feature subset to the eighth intermediate feature map element-wise to output the third output feature subset. The C2PSA component also includes a second feature concatenation layer, connected to the output of the third residual connection layer and the output of the fourth feature subset of the second feature segmentation layer, configured to concatenate the third output feature subset with the second feature subset to output the ninth intermediate feature map. The seventh convolutional layer, connected to the output of the second feature concatenation layer, is configured to perform convolution on the ninth intermediate feature map to output the second feature map.

[0079] In the above embodiments, the first attention mechanism layer of the C2PSA component includes a first attention mechanism layer input interface for receiving a third feature subset; a second average pooling layer connected to the first attention mechanism layer input interface, configured to perform pooling operations on the third feature subset and output a feature representation with local context information; an eighth convolutional layer connected to the output of the second average pooling layer, configured to perform convolution operations on the feature representation with local context information and output a tenth intermediate feature map; a first depthwise convolutional layer connected to the output of the eighth convolutional layer, configured to perform long-range dependencies in the horizontal direction on the tenth intermediate feature map and output an eleventh intermediate feature map; a second depthwise convolutional layer connected to the output of the first depthwise convolutional layer, configured to perform long-range dependencies in the vertical direction on the eleventh intermediate feature map and output a twelfth intermediate feature map; a ninth convolutional layer connected to the output of the second depthwise convolutional layer, configured to perform convolution operations on the twelfth intermediate feature map and output an attention score; and a second attention normalization layer connected to the output of the ninth convolutional layer, configured to perform normalization processing on the attention score and output an adaptive attention weight map.

[0080] In the above embodiments, the CARAFE component includes a kernel prediction module interface for receiving an input feature map; a first convolutional layer connected to the kernel prediction module interface, configured to perform channel compression on the input feature map and output a thirteenth intermediate feature map; a content encoder connected to the output of the first convolutional layer, configured to output an initial reconstruction kernel based on the thirteenth intermediate feature map; a normalization layer connected to the output of the content encoder, configured to normalize each reconstruction kernel and output a reconstruction kernel; a content-aware feature reconstruction module input interface for receiving an input feature map; and a content-aware feature reconstruction module connected to both the output of the normalization layer and the content-aware feature reconstruction module input interface, configured to perform weighted reconstruction of the corresponding neighborhood of the input feature map based on the reconstruction kernel and output a third feature map.

[0081] This invention relates to a rice-crab target detection device for complex rice paddy scene images, based on the improved YOLO11n model YOLO-RCCS. The C3k2_RFAConv component dynamically adjusts the receptive field to adaptively adjust the receptive range of the convolutional kernel, and utilizes its attention weighting mechanism to balance local detail capture and global context modeling, enhancing the model's feature extraction capabilities. The C2PSA component strengthens feature fusion and spatial localization capabilities by fusing spatial and coordinate attention mechanisms, enhancing the distinguishability of rice-crab targets from complex backgrounds. The CARAFE component effectively alleviates the detail loss problem caused by traditional interpolation methods, better preserving local texture and edge information. Finally, to alleviate the sample imbalance problem in complex scenes, the SlideLoss loss function is used. Experimental results show that YOLO-RCCS, while maintaining similar computational complexity to the original YOLO11n, improves precision by 2.1%, recall by 4.3%, and mAP@0.5 by 3.5%, demonstrating excellent real-time detection performance potential and providing reliable technical support for all-weather monitoring and precise feeding in rice-crab farming.

[0082] The C3k2_RFAConv component in this invention is described in detail below, such as... Figure 4-5 As shown. In rice-crab target detection, due to the high similarity in color and texture between the rice paddy background and the crab shell, the C3k2 component is prone to feature confusion, leading to a decrease in the model's ability to distinguish between the target and the background. This invention uses RFAConv, a convolutional mechanism based on receptive field attention. RFAConv is embedded in the Bottleneck of the original C3K2 component, achieving dynamic weighting of spatial feature importance through adaptive modeling of local receptive field features. RFAConv can effectively suppress background noise interference while maintaining lightweight computation, achieving adaptive emphasis and dynamic adjustment of key features, thereby alleviating the feature confusion problem. In this invention, it is mainly used to solve the problem of high similarity in color and texture between the rice paddy background and the crab shell. The C3k2_RFAConv component can enhance the adaptive modeling capability of the local receptive field to solve the above problem. Figure 4 As shown, the C3k2_RFAConv component first performs channel mapping on the input features through a 1×1 convolution, and then divides them into two branches on an average scale along the channel dimension: the upper branch is directly retained for subsequent concatenation, and the lower branch sequentially extracts deep features through n Bottlenecks. Each Bottleneck consists of a Conv3×3 and an RFAConv3×3, and residual connections are used to add the block input to the output of RFAConv to ensure gradient propagation and feature reuse. The outputs of each Bottleneck are concatenated along the channel dimension, and finally fused and output through a 1×1 convolution, thus achieving lightweight and effective multi-level feature representation. The RFAConv calculation process is as follows: Figure 5As shown.

[0083] The C2PSA_CAA component is described in detail below, such as... Figure 6-7 As shown, in rice paddy scenes, due to changes in shooting angle and texture occlusion and appearance differences caused by rice flowers, the C2PSA component fails to pay sufficient attention to local details and struggles to capture directional and long-distance dependent features, especially reducing the accuracy of recognizing extremely small targets such as crab claws. Figure 6 The C2PSA_CAA component shown is composed of a CAA component and a cross-stage connection C2PSA with parallel spatial attention, fully leveraging the advantages of CAA in spatial feature extraction and the capabilities of C2PSA in multi-level feature fusion. This design maintains multi-scale feature integration performance while enhancing local spatial detail modeling, making the model more focused on key features of the rice-crab, and solving the problem that extremely small targets such as crab claws are easily confused with the background in the rice paddy.

[0084] like Figure 7 As shown, the C2PSA_CAA component models the dependencies between the three dimensions of channel, spatial height, and width through low-rank tensor decomposition, avoiding the high computational overhead of 3D attention mechanisms. In this process, it utilizes... Average pooling (AvgPool) is used to capture local contextual information. Convolution achieves the fusion of channel information, as shown in the following formula:

[0085] (1)

[0086] in Indicates the first Feature maps of the layer input; Indicates global average pooling; This represents the feature map after pooling; express convolution.

[0087] Then adopt them in sequence. Conv and DWConv is used to capture long-range dependencies in the horizontal and vertical directions, respectively. Finally, a... DWConv and the Sigmoid activation function generate adaptive weights, achieving dynamic fusion of cross-dimensional features and highlighting of key regions. This can be expressed by formulas (2)-(4) as follows:

[0088] (2)

[0089] (3)

[0090] (4)

[0091] in Represents the horizontal convolutional feature map; This indicates a depthwise separable convolution in the horizontal direction; Represents the convolutional feature map in the vertical direction; This indicates a depth-separable convolution in the vertical direction; Represents the attention weights graph; This represents the activation function.

[0092] The CARAFE components are described in detail below, such as Figure 8 As shown, in the complex environment of rice paddies, upsampling modules typically employ fixed methods such as nearest-neighbor interpolation or bilinear interpolation. These methods are prone to information loss and noise accumulation in low-resolution feature maps, leading to blurred edges and lost details, thus affecting the accurate detection of rice-crab targets. This invention uses the CARAFE component to achieve content-aware reconstruction of high-resolution features, thereby effectively preserving the integrity of target boundaries and local spatial details.

[0093] like Figure 8 As shown, the core idea of ​​CARAFE is to achieve adaptive feature reorganization through content-aware kernels. The overall process includes two parts: kernel prediction stage and content-aware feature reorganization stage. Specifically, in the first step, the kernel prediction module predicts the reorganization kernel for each target position based on the local context information of the input features. Its calculation form can be expressed by formula (5).

[0094] (5)

[0095] in Represented as a feature map; Indicated as the target location; Represented as a kernel prediction function; Indicates kernel size as Convolutional layers; It is represented as a local region.

[0096] The second step is to use the predicted content-aware weights to weight and recombine the corresponding neighborhood features to generate high-resolution output features. The process can be represented by formula (6).

[0097] (6)

[0098] in Represented as a recombination function; This represents the size of the recombinant nucleus. Represented as the recombinant nucleus at the target location.

[0099] in, To define the kernel prediction function, the following steps are performed:

[0100] Channel compression: using a 1×1 convolutional layer to reduce the dimensionality Input feature map The number of channels from Compress to The compressed feature map is obtained. ;

[0101] formula In the formula, The dimension is .

[0102] Step 2: Content Encoding: Based on the compressed feature map Encode to generate the initial recombination kernel Use a core size of Convolutional layer processing compresses feature maps For downsampling, the stride of the convolutional layer The output size is The recombination kernel; for upsampling, the number of output channels of the convolutional layer is Then, the spatial dimensions are reorganized through the PixelShuffle operation to obtain a size of initial recombination kernel .

[0103] formula:

[0104] Step 3: Kernel Normalization: Normalize the weights of each initial recombination kernel at each target location. ,Will initial recombination kernel Flatten the vector and apply the Softmax function to normalize the spatial dimensions to obtain the recombination kernel.

[0105] formula:

[0106] Among them, the kernel prediction module The complete formula is:

[0107] In the formula, It is a recombination core at all locations A set of.

[0108] in, The recombination function performs the following steps: based on the recombination kernel... For input features The corresponding neighborhood feature blocks are weighted and recombined to output the third feature map. :

[0109] For the third feature map Each target location in In the input feature map The source location is located above. ;

[0110] Source location Extract a size of centered at the center. Local region feature blocks ;

[0111] Recombining the core With local region feature blocks The third feature map is obtained by multiplying each element point by point and then summing the results. .

[0112] Through the two stages described above, CARAFE can adaptively allocate reorganization weights based on local content, enabling the model to retain more boundary and texture details in high-resolution space under complex backgrounds. This significantly improves the spatial consistency and structural fidelity of feature representation, thereby enhancing the detection accuracy of rice-crab targets in complex rice paddy backgrounds.

[0113] This invention uses the SlideLoss loss function in model training: In a rice paddy environment, the rice-crab detection task faces the challenge of easily confusing the target with the background. On the one hand, the number of negative samples (such as background areas like water, vegetation, and soil) far exceeds the number of positive samples, leading to a severe skew in gradient contributions during model training; traditional loss functions often cannot take into account the dynamic balance between positive and negative samples when dealing with such problems, limiting the detection accuracy and generalization performance of the model.

[0114] Because loss functions typically fail to adequately highlight these challenging samples during training, they often result in poor background and crab identification. To address this issue, this invention employs the SlideLoss loss function to enhance the model's robustness and fine-grained discriminative ability. Figure 9 As shown, SlideLoss uses the global average IoU as a dynamic threshold. The training samples are divided into positive and negative groups. Iou is less than... The samples are considered negative and assigned a constant weight of 1. IoU less than and A smooth transition should be applied between them to avoid discontinuity in weights.

[0115] like Figure 9 As shown, the SlideLoss loss function aims to increase attention to difficult samples, ensuring that the model learns fewer key samples more effectively, thereby improving detection accuracy. The calculation process can be represented by formula (7).

[0116] (7)

[0117] in The threshold representing the Intersection over Union (IoU); Used to assign weights to positive and negative samples that are far from the boundary; This is a weighting function within the boundary region, used to achieve a smooth transition within the boundary and enhance the importance of boundary samples. Through this adaptive gradient allocation strategy, the optimization bias caused by positive-negative sample imbalance and target confusion can be significantly mitigated while maintaining training stability.

[0118] Experimental Methods: To meet the real-time rice-crab detection requirements in the complex environment of paddy fields, the model needs to maintain high accuracy and real-time performance under multiple interference conditions, including weather changes, lighting changes, rice flower shading, and multi-scale targets. YOLO11n, as a lightweight version of the YOLO11 series, has significant advantages in terms of small parameter size and fast inference speed, enabling efficient operation on embedded devices or edge computing platforms, thus meeting the low-latency, all-weather monitoring requirements. Simultaneously, its optimized multi-scale feature fusion structure and small target detection capability allow it to accurately distinguish individual rice-crabs in complex backgrounds, effectively improving detection recall. Compared to two-stage detectors (Faster-R-CNN), YOLO11n offers a higher speed advantage when processing video streams and is more suitable for computationally limited paddy field scenarios compared to large-scale models.

[0119] Experimental Environment: The experimental environment for this invention uses Windows 10, an Intel Core i9-14900KF (3.20GHz) processor, 32GB of RAM, and an NVIDIA GeForce RTX 4090 (24GB VRAM) graphics card. The deep learning framework used is PyTorch 2.0.0, the runtime environment is Python 3.8.20, and GPU parallel computing is implemented based on CUDA 11.8.

[0120] Table 1 Experimental Environment

[0121]

[0122] The model was trained for 200 epochs with a batch size of 16 and stochastic gradient descent (SGD) as the optimizer. Both the initial and final learning rates were set to 0.01, and the momentum parameter was 0.937 to ensure gradient update stability and accelerate model convergence. The weight decay coefficient was set to 0.0005 to introduce L2 regularization and effectively prevent overfitting. The input image size was set to a specific value, and eight parallel data loading threads (workers) were used to improve training efficiency. Mosaic data augmentation was disabled in the last 10 epochs to avoid excessive random perturbations affecting model convergence, allowing the model to focus more on learning stable features. Key parameter settings during model training are detailed in Table 2.

[0123] Table 2 Training Parameters

[0124]

[0125] Evaluation metrics: To objectively evaluate the performance of the proposed detection model, the computational complexity and running efficiency of the model are measured using precision (P), recall (R), F1 score (F1-measure), mean average precision (mAP@0.5), number of parameters (Million), model weight (Weight, MB), and floating-point operations (FLOPs, G).

[0126] Accuracy is used to evaluate the reliability of the model's prediction of positive samples, that is, the proportion of actual positive samples among all instances predicted as positive. It is calculated by dividing the number of true positive samples (TP) by the sum of the number of true positive samples and the number of false positive samples (FP). Correspondingly, recall is used to measure the model's ability to detect true positive samples, representing the proportion of correct identification among all true positive samples. It is calculated by dividing the number of true positive samples (TP) by the sum of the number of true positive samples and the number of false negative samples (FN). The specific calculation formulas are shown in equations (8)-(10).

[0127] (8)

[0128] (9)

[0129] (10)

[0130] in Represented as the number of target categories; Represented as the first Average precision for all categories. The arithmetic mean of the values ​​is taken to obtain mAP@0.5, which can reflect the overall detection capability.

[0131] (11)

[0132] The F1 score ranges from 0 to 1, with values ​​closer to 1 indicating better detection performance. This metric comprehensively reflects the model's detection capability through the harmonic mean of precision and recall, effectively avoiding the potential bias of a single evaluation indicator.

[0133] Experimental Results and Analysis

[0134] Comparative Experiments: To verify the performance advantages of the proposed model, comparative experiments were conducted with several leading and high-performance object detection models under the same data and experimental conditions. The models compared included the traditional two-stage model Faster-RCNN, the advanced single-stage model SSD, the Transformer-based RT-DETR, and a series of classic YOLO models.

[0135] Table 3 shows the comprehensive performance comparison results of different detection models on the rice-crab target detection dataset. The results in the table show that the improved model proposed in this invention exhibits significant advantages in multiple key indicators such as accuracy, recall, and detection precision.

[0136] In terms of precision, the proposed model achieves 89.3%, a 2.1 percentage point improvement over the best-performing original model, YOLO-11n (87.2%), indicating that the proposed method can more accurately distinguish targets from background in complex rice paddy environments, effectively reducing the false detection rate. Regarding recall, the proposed model achieves 77.5%, a significant improvement over both YOLO-v8n (73.9%) and YOLO-v12n (71.1%), demonstrating that the proposed method maintains high accuracy while possessing stronger target detection capabilities. In terms of mAP@0.5, the improved model proposed in this invention performs best, reaching 87.3%, a 5.9% and 2.8% improvement over RT-DETR (81.4%) and YOLO-v8n (84.5%), respectively, fully validating the effectiveness of the proposed method in multi-scale target detection and feature representation. Meanwhile, the F1 score reached 83.0%, which is an improvement over YOLO-v5n (79.3%) and YOLO-v12n (77.7%), indicating that the model achieves a better balance between precision and recall, thus obtaining more stable detection performance.

[0137] It is worth noting that, in terms of model complexity, the model of this invention has only 2.7M computational parameters, similar to the lightweight YOLO-v5n (2.5M), but far smaller than the traditional detection frameworks Faster R-CNN (28.4M) and SSD (23.7M). Meanwhile, its weight file size is only 5.7MB, significantly smaller than SSD (90.6MB) and RT-DETR (40.5MB), demonstrating good model compressibility and edge deployment potential. Furthermore, in terms of computational complexity (FLOPs), the method of this invention has a computational complexity of 6.8G, proving that it achieves better inference efficiency while maintaining high accuracy.

[0138] In summary, the YOLO-RCCS model proposed in this invention achieves a good balance between detection accuracy, feature extraction capability, and computational efficiency. These results demonstrate that the introduced multi-scale feature fusion and attention optimization strategies can effectively improve the model's target recognition capability in complex backgrounds while maintaining low computational overhead, providing a more accurate and efficient optimization scheme for all-weather rice-crab detection in complex scenarios.

[0139] Table 3 Comparison and Analysis of Different Algorithms

[0140]

[0141] Ablation Experiments: To verify the impact of each module in the YOLO-RCCS model on the overall detection performance, this invention uses YOLO11n as the base model for ablation experiments to evaluate the contribution of the proposed improved modules to the model performance. In Table 4, "A" represents the C3k2_RFAConv module, "B" represents the C2PSA_CAA module, "C" represents the CARAFE upsampling module, and "D" represents the SlideLoss loss function. The symbol "√" indicates that the model includes the corresponding module, while "-" indicates that the module is not used.

[0142] In the base model without any modules, Precision, Recall, mAP@0.5, and F1 were 87.2%, 73.2%, 83.8%, and 79.6%, respectively, serving as the benchmark for subsequent comparisons. When only the C3k2_RFAConv module (A) was introduced (A), mAP@0.5 increased to 84.2%, and F1 improved to 80.4%, indicating that the introduction of a dynamic receptive field and feature-adaptive convolution mechanism effectively enhanced the model's feature representation capability. After introducing the C2PSA_CAA module (B), Recall and mAP@0.5 increased to 75.5% and 84.8%, respectively, demonstrating the role of the channel and spatial collaborative attention mechanism in enhancing semantic separability and feature focusing. When the CARAFE module (C) was introduced (C), Precision reached 87.9%, mAP@0.5 rose to 85.6%, and F1 improved to 81.1%, verifying the significant advantages of content-aware recombinant upsampling in maintaining spatial consistency and detailed structure. After adding the SlideLoss module (D), the recall increased to 75.9%, mAP@0.5 reached 84.7%, and F1 was 80.6%, indicating that the improved loss function can effectively improve training stability and convergence speed in terms of optimizing sample distribution and gradient dynamic balance.

[0143] When A+B is used together, mAP@0.5 reaches 85.4% and F1 is 81.0%, indicating that the feature enhancement module and the attention mechanism complement each other at the low-level and high-level feature levels, helping the model achieve stronger feature discrimination ability in complex backgrounds. The A+C combination improves mAP@0.5 to 86.0%, indicating that the combination of variable convolution and content-aware upsampling can balance spatial detail reconstruction and global information preservation. In the A+D combination, Recall increases to 77.7%, mAP@0.5 reaches 87.5%, and F1 improves to 81.9%, reflecting the coupling gain effect of convolution structure optimization and loss constraints in the direction of feature extraction and optimization. When only B+C is used, mAP@0.5 is 85.0% and F1 is 80.1%, indicating that there is a complementary relationship of information enhancement between the attention mechanism and the upsampling module, which can effectively improve the feature consistency of spatial reconstruction. When combining A+B+C, Precision increases to 88.0%, mAP@0.5 reaches 86.4%, and F1 score reaches 81.8%, further demonstrating the synergistic improvement of feature representation and detail restoration through multi-level structure fusion. With the A+B+D combination, Recall increases to 77.9%, mAP@0.5 reaches 87.2%, and F1 score reaches 81.6%, verifying the coordinated complementarity between multimodal feature enhancement and optimization objective constraints.

[0144] When using four modules A+B+C+D, the model achieves optimal performance: Precision 89.3%, Recall 77.5%, mAP@0.587.3%, and F1 83.0%. These results indicate that C3k2_RFAConv provides stronger structure awareness in low-level feature extraction; C2PSA_CAA enhances global attention and feature focusing; CARAFE implements adaptive spatial reorganization to maintain edge integrity; and SlideLoss optimizes training dynamics and convergence characteristics.

[0145] In summary, the ablation experiments fully validated the effectiveness of the proposed modules in improving the overall performance of the model. Significant synergistic gains among the modules enabled YOLO-RCCS to exhibit higher detection accuracy, stability, and generalization ability in the complex context of rice paddies, while achieving a balance between performance and efficiency under controllable parameter count and computational complexity.

[0146] Table 4 Ablation Experiment Results

[0147]

[0148] Based on the above ablation experiment results, it was found that "A" represents the C3k2_RFAConv module, "B" represents the C2PSA_CAA module, and "C" represents the CARAFE upsampling module. When only C is used, the important parameter Precision is 87.9%. Combinations of A+C or B+C also decrease its value. Only the combination of A+B+C increases its value, reaching the highest among any single or combined module of A, B, and C. This indicates that the C3k2_RFAConv component focuses more on solving the problem of high similarity in color and texture between the rice paddy background and the crab shell, while the C2PSA component focuses less on local details and struggles to capture directional and long-distance dependent features, especially reducing the accuracy of extremely small targets such as crab claws. Only by simultaneously addressing these two problems, and in conjunction with solving the problem of information loss and noise accumulation in low-resolution feature maps addressed by CARAFE, can the best target recognition effect be achieved.

[0149] Data Visualization Analysis: To comprehensively evaluate the effectiveness and robustness of YOLO-RCCS in rice-crab detection, this invention performs visualization analysis on rice-crab datasets. These datasets include real rice paddy scenes with different weather and lighting conditions. Detection results are as follows: Figure 10 As shown. By Figure 10It is evident that the traditional detection algorithm Faster R-CNN exhibits significant false negatives and false positives in nighttime and rainy scenes, reflecting its limited feature extraction capabilities under low light and visual noise conditions. The SSD model shows numerous false negatives in various scenarios, including daytime, windy, nighttime, and rainy weather, indicating insufficient generalization ability under changing target appearances and complex weather conditions. While RT-DETR demonstrates overall stability, it still experiences false negatives in rainy conditions, suggesting that its feature representation is insufficient when processing high-noise visual information.

[0150] Among the YOLO series models, YOLOv5n has missed detections in windy and rainy scenes, mainly due to motion blur and target occlusion; YOLOv8n has missed detections in windy, rainy, and nighttime scenes, indicating that there is still room for improvement in its multimodal feature fusion; YOLOv11n also shows missed detections in windy and rainy conditions, indicating that its adaptability to dynamic backgrounds is not yet perfect; YOLOv12n has many missed detections in daytime, nighttime, and rainy scenes, and its robustness is insufficient when lighting changes and environmental complexity increases.

[0151] In contrast, the improved YOLO-RCCS framework demonstrated superior detection performance in all complex scenarios, accurately identifying various targets without any false negatives or missed detections. This is attributed to the systematic improvements in feature representation enhancement, attention optimization, spatial reconstruction, and loss constraints within the YOLO-RCCS framework, which endow the model with stronger feature extraction capabilities and environmental adaptability. The improved structure expands the receptive field and strengthens multi-level feature interactions, effectively enhancing robustness to low light, occlusion, and complex weather conditions. Overall, the YOLO-RCCS framework achieves significant improvements in detection accuracy, stability, and generalization, fully demonstrating its superior detection performance in the complex environment of rice paddies.

[0152] Figure 10 The visualization compares the detection results of different models. In the figure, the red detection box represents a missed detection, and the yellow detection box represents a false detection. Figure 11 The heatmap visualization results show that the original model exhibits a scattered distribution of feature responses under different environments, with indistinct activation of target regions. Furthermore, it suffers from feature loss and background interference in complex scenarios such as strong winds, nighttime, and rainy days. In contrast, the improved YOLO-RCCS framework demonstrates a more concentrated target focus region across various scenarios. The model effectively suppresses background noise and enhances the expression of key target features. Especially under low light and severe weather conditions, YOLO-RCCS maintains stable feature aggregation and significant target perception capabilities. These results clearly demonstrate that the proposed improved framework achieves superior feature extraction efficiency and spatial focus accuracy in complex environments, thereby improving the overall accuracy and robustness of target detection.

[0153] This invention addresses the problems of insufficient feature representation, large target scale variations, and interference from complex backgrounds in rice-crab target detection in paddy field scenarios. It proposes an intelligent rice-crab detection model based on an improved YOLO architecture. This model systematically improves the network in three aspects: feature extraction, semantic aggregation, and optimized training, building upon the basic model. The improved model significantly outperforms the unimproved basic model in both detection accuracy and stability. Detection accuracy is improved by approximately 2.1%, recall by approximately 4.3%, mean precision (mAP@0.5) by approximately 3.5%, and the overall performance index F1 is improved by approximately 3.4%. The results show that the proposed module collaborative optimization effectively enhances the model's ability to capture fine-grained features such as rice-crab edges and textures, and significantly reduces the impact of complex backgrounds. This invention proposes the YOLO-RCCS framework to achieve continuous and efficient monitoring of rice-crab feeding behavior throughout the day, providing solid data support for precise feeding in rice-crab farming.

[0154] Based on the above embodiments, this application also provides a computer program that, when run on a computer, causes the computer to execute the methods provided in the above embodiments.

[0155] Based on the above embodiments, this application also provides a computer storage medium storing a computer program, which, when executed by a computer, causes the computer to perform the methods provided in the above embodiments.

[0156] The storage medium can be any available medium that a computer can access. For example, but not limited to, a computer-readable medium can include RAM, ROM, EEPROM, CD-ROM or other optical disk storage, magnetic disk storage media or other magnetic storage devices, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer.

[0157] Based on the above embodiments, this application also provides a chip for reading a computer program stored in a memory to implement the method provided in the above embodiments.

[0158] Based on the above embodiments, this application provides a computer program product that implements the methods provided in the above embodiments when the computer program product is run on an electronic device.

[0159] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0160] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to this application. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0161] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0162] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0163] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the spirit and scope of this application. Therefore, if such modifications and variations fall within the scope of the claims of this application and their equivalents, this application also intends to include such modifications and variations.

Claims

1. A monitoring device for the living environment of rice-crab hybrids, characterized in that, include A data acquisition device for acquiring images of a rice paddy monitoring area and at least one environmental parameter; The processing device, communicatively connected to the data acquisition device, receives the images and environmental parameters, and is configured as follows: a. Perform the process of using the environmental parameters for interface display; b. Perform the task of identifying rice-crab targets from the image and generating first information related to rice-crabs; The user terminal device is communicatively connected to the processing device and is used to receive and display environmental parameters and the first information.

2. The equipment according to claim 1, characterized in that, The processing device is further configured to: c. Based on predefined analysis rules, output analysis results according to the current environmental parameters and the first information; and The user terminal device is used to receive and present the analysis results.

3. The equipment according to claim 1, characterized in that, The data acquisition device includes an image capture unit and a sensing unit; The image capture unit is arranged in the aquaculture area; The sensing unit includes at least one sensor for detecting the chemical properties of the water.

4. The system according to claim 3, characterized in that, The image capture unit is configured to have its field of view cover a predetermined functional area in the aquaculture area, the predetermined functional area including at least one of a feeding area, a habitat area, or a water inlet / drainage area.

5. The system according to claim 3, characterized in that, The at least one sensor used to detect the chemical properties of water includes any one or more of a water temperature sensor, a pH sensor, a dissolved oxygen sensor, or a light intensity sensor.

6. The system according to claim 1, characterized in that, The processing device incorporates a rice-crab target detection network for complex rice paddy scene images.

7. The system according to claim 3, characterized in that, The first piece of information includes the spatial distribution and quantity of rice-crabs in the currently designated functional area.

8. The system according to claim 7, characterized in that, The analysis results, based on predefined analysis rules and the current environmental parameters and the first information, are output in the following manner: Historical data on the correlation between the environmental parameters at different times and the distribution quantity of rice-crabs in the predetermined functional area; Based on historical data, determine the distribution quantity of rice-crabs in the predetermined functional area corresponding to the values ​​of the environmental parameters at different times, and obtain the range of the distribution quantity of rice-crabs in the predetermined functional area corresponding to the values ​​of the environmental parameters at different times not exceeding the limit. The range of rice-crabs distributed in a predetermined functional area corresponding to the historical time corresponding to the current time, where the values ​​of the environmental parameters do not exceed the limits, is designated as the first range. This range is then compared with the number of rice-crabs distributed in the predetermined functional area at the current time. If the number of rice-crabs distributed in the predetermined functional area at the current time exceeds the first quantity range, and the current environmental parameters do not exceed the limits, then the first analysis result will be output. If the number of rice-crabs distributed in the predetermined functional area at the current time exceeds the first quantity range, and the current environmental parameters exceed the limits, then the second analysis result will be output.

9. The system according to claim 8, characterized in that, The first analysis result indicates an anomaly to be investigated, while the second analysis result indicates an environment requiring early warning to be addressed.

10. A method for monitoring the living environment of rice-crab farms, characterized in that, include Acquire images of the rice paddy monitoring area and at least one environmental parameter; The processing device receives the image and environmental parameters, and its configuration is as follows: a. Perform the process of using the environmental parameters for interface display; b. Perform the task of identifying rice-crab targets from the image and generating first information related to rice-crabs; The user terminal device receives and displays environmental parameters and the first information.

Citation Information

Patent Citations

  • Crab pond breeding health management system and method based on underwater video monitoring and cloud computing platform

    CN107743142A

  • Intelligent rice and crab symbiosis environment monitoring and precise irrigation system and control method

    CN118936552A

  • Three-dimensional monitoring and early warning device and method for river crab culture environment

    CN119360564A

  • Paddy field environment monitoring system and method based on intelligent sensor network

    CN120274824A

  • Method and apparatus using threshold techniques for generating an alarm in a bio-sensor

    US5469144A