Termite detection and tracking method and system for low-light environment
The method enhances white ant detection and tracking in low-light environments by integrating adaptive image processing and CBAM attention into Faster R-CNN, addressing image quality and real-time performance issues, and providing precise visualization for white ant control.
Patent Information
- Application Number
- CN202510374259.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-27
- Publication Date
- 2025-07-15
AI Technical Summary
The prior art has problems such as poor image quality, low detection accuracy, difficulty in detection of small objects, insufficient real-time and lack of targeted optimization in termite detection and tracking in low-light environments.
Adaptive Gamma correction, Canny edge detection, adaptive threshold segmentation and morphological operation are used to optimize image details, combined with the improved Faster R-CNN model and CBAM attention mechanism, and the detection and tracking of termite targets are achieved through data augmentation and model optimization.
It significantly improves the accuracy and real-time performance of termite detection and tracking in low-light environments, can operate efficiently on devices with limited resources, provides real-time visualization functions, and supports termite control.
Smart Images

Figure CN120318274A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of computer vision and biological intelligent monitoring. Specifically, it relates to a method and system for termite detection and tracking in low-light environments. Background Art
[0002] Termites are a type of pest with serious harm, especially causing significant damage to agricultural crops, buildings, and other wooden materials. Monitoring the activities of termites in low-light environments is a difficult point in current prevention and control work. Traditional methods perform poorly under low-light conditions, and although existing deep learning-based detection methods (such as improved Faster R-CNN or YOLO series) have achieved certain results in some fields, there are still the following problems in low-light environments: 1. Poor image quality: The low-light environment results in low image brightness and insufficient contrast, making it difficult for traditional methods to effectively extract termite features. 2. Difficult detection of small targets: Termites are small in size and move in complex backgrounds, and traditional detection methods are prone to missed detections or false detections. 3. Lack of real-time performance: Existing methods have low operating efficiency on embedded devices and are difficult to meet the requirements of real-time monitoring. 4. Lack of targeted optimization: Although the CBAM mechanism has been mentioned in other fields, it has not been specifically optimized for termite detection in low-light environments. Therefore, there is an urgent need to design a termite detection and tracking technology for low-light environments to solve the deficiencies of existing technologies in low-light environments. Summary of the Invention
[0003] To solve the above problems, the purpose of the present invention is to provide a termite detection and tracking technology for low-light environments, aiming to improve the detection accuracy and tracking performance of small targets such as termites, and is applicable to practical applications such as termite monitoring and prevention.
[0004] To achieve the above technical objectives, the present application provides a method for termite detection and tracking in low-light environments, including the following steps: Collect termite images in low-light environments, and optimize image details using adaptive Gamma correction, Canny edge detection, adaptive threshold segmentation, and morphological operations to construct a dataset; After integrating the CBAM attention mechanism into the Faster R-CNN model, use the dataset for model training to construct a target model for detecting and tracking termites in termite images.
[0005] Preferably, during the process of constructing the dataset, adjust the image brightness and contrast through adaptive Gamma correction to improve the image quality in low-light environments and enhance the detectability of termite targets.
[0006] Preferably, during the process of model training, the Albumentations library is used to augment the dataset, and the augmented dataset is used for model training.
[0007] Preferably, during the process of constructing the target model, the non-maximum suppression algorithm is applied in the inference stage to remove overlapping detection boxes, and the Deep SORT algorithm is used for target tracking.
[0008] Preferably, during the process of constructing the target model, through model quantization and knowledge distillation techniques, combined with mixed-precision training and TensorRT acceleration tools, the model is optimized.
[0009] Preferably, during the process of constructing the target model, in terms of model training, the PyTorch framework is adopted and combined with the SGD optimizer and StepLR learning rate scheduler to optimize the training process to improve detection accuracy.
[0010] Preferably, during the process of constructing the target model, a multi-task loss function is adopted, combined with the classification loss and bounding box regression loss of the target, to simultaneously optimize the classification accuracy and bounding box regression accuracy of the model in low-light environments.
[0011] The present invention discloses a termite detection and tracking system for low-light environments, including: Image acquisition module: used to collect termite images in real time in low-light environments; Image preprocessing module: used to perform adaptive Gamma correction, Canny edge detection, threshold segmentation and morphological operations on the collected images to construct a dataset; Termite target detection module: based on the dataset, the Faster R-CNN model integrated with the CBAM attention mechanism is used for termite target detection; Target tracking module: the Deep SORT algorithm is used to perform real-time tracking on the detected termite targets; Optimization module: by applying model compression and acceleration techniques, the inference speed of the system is optimized.
[0012] The present invention discloses the following technical effects: Through technologies such as image preprocessing, improved Faster R-CNN model, target tracking and model optimization, the present invention significantly improves the accuracy and real-time performance of termite detection and tracking in low-light environments. The combination of these technologies has unique innovation and practical value in the field of termite detection and can provide strong technical support for termite control. The present invention realizes real-time visualization in low-light environments. The real-time image visualization function provided by the present invention can accurately draw the bounding boxes of detected termite targets in low-light environments, and display the positions and quantities of termites. Even under dim or uneven lighting conditions, users can intuitively obtain the detection and tracking information of the targets, providing a real-time decision-making basis for termite control work.
[0013] The present invention effectively reduces the computing and storage requirements of the system, ensuring that the system can operate efficiently on devices with limited resources in low-light environments. This technology is applicable to multiple fields including agricultural and building monitoring, especially termite monitoring in night or low-light environments, providing an efficient and accurate solution for related fields. BRIEF DESCRIPTION OF THE DRAWINGS
[0014] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required to be used in the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.
[0015] Figure 1 It is a schematic flow chart of the method described in the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0016] To make the objectives, technical solutions, and advantages of the embodiments of the present application clearer, the following will clearly and completely describe the technical solutions in the embodiments of the present application with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, rather than all of them. Usually, the components of the embodiments of the present application described and illustrated in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the present application to be protected, but only represents the selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts belong to the scope of protection of the present application.
[0017] As Figure 1As shown, the present invention provides a termite detection and tracking technology applicable to low-light environments. First, through image preprocessing, technologies such as adaptive Gamma correction and Canny edge detection are used to enhance the image quality and highlight termite features. Secondly, an improved Faster R-CNN model combined with the CBAM attention mechanism is adopted to accurately detect termite targets, especially performing well in complex backgrounds. Data augmentation is utilized to enhance the diversity of training data and the generalization ability of the model by means of rotation, flipping, and brightness adjustment. In terms of model training, the PyTorch framework is adopted in combination with the SGD optimizer and the StepLR learning rate scheduler to optimize the training process to improve the detection accuracy. In the inference stage, redundant boxes are removed through the non-maximum suppression (NMS) algorithm, and the Deep SORT algorithm is combined to achieve the target tracking of termites to ensure accurate counting. The model compression and acceleration module improves the inference speed and deployment efficiency through quantization, knowledge distillation, and TensorRT acceleration technologies. Finally, real-time image display is provided, clearly marking the positions and quantities of termites to support decision-making. The present invention realizes efficient, accurate, and real-time termite detection and quantity statistics, overcomes the deficiencies in traditional technologies, and provides strong data support for termite control. The specific processes are as follows: Step S1: Image preprocessing: In low-light environments, the quality of images is often poor. Therefore, image preprocessing is required to improve the image quality and highlight the features of termites. The specific operations are as follows: 1.1: Adaptive Gamma correction: To address the brightness and contrast issues of low-light images, an adaptive Gamma correction method is adopted. By dynamically adjusting the Gamma value of the image, the brightness distribution of the image becomes more uniform, enhancing the visibility of termite targets. The adjustment of the Gamma value is performed adaptively according to the local brightness characteristics of the image, so as to maintain good image quality under different lighting conditions.
[0018] 1.2: Canny edge detection: After enhancing the contrast, the Canny edge detection algorithm is applied to extract the edge information of the image. This algorithm effectively captures the contours of termite targets in the image by calculating the gradient magnitude and direction of the image. Especially in low-light environments, it can accurately identify fuzzy or unclear edges.
[0019] 1.3: Adaptive threshold segmentation: To achieve accurate target area segmentation, an adaptive threshold segmentation algorithm is adopted. This algorithm dynamically sets the segmentation threshold according to the brightness and contrast of the local area, thus effectively separating termite targets from the background and avoiding over-segmentation or under-segmentation problems caused by improper threshold setting in low-light situations.
[0020] 1.4: Morphological operations: To further remove noise in the image and enhance target features, morphological operations are adopted. Through opening operations, dilation operations, etc., small noises are removed and the contours of termite targets are smoothed, making the target area clearer and facilitating subsequent target detection and analysis.
[0021] Step S2: Improved Faster R-CNN model (integrating the CBAM attention module): In order to improve the detection accuracy of termite targets in low-light environments, the present invention adopts the Faster R-CNN model and combines the CBAM (Convolutional Block Attention Module) attention mechanism to enhance the model's attention ability. The specific implementation process is as follows: 2.1: Faster R-CNN model: As a current mainstream target detection framework, Faster R-CNN has efficient region proposal generation and target detection capabilities. This model consists of two parts, the Region Proposal Network (RPN) and the Fast R-CNN classifier, and can quickly and accurately detect termite targets in images. In low-light environments, this model can effectively identify images with blur or more noise and accurately locate termite targets.
[0022] 2.2: CBAM attention mechanism: To further improve the detection effect in low-light environments, the present invention integrates the CBAM module into the convolutional layer of Faster R-CNN. CBAM enhances the expressive ability of image features by introducing channel attention and spatial attention mechanisms: 2.3: Channel attention: This mechanism adjusts the weights of each feature channel through the calculation of global information, enhancing the feature channels related to termite targets. This enables the model to more prominently highlight target features and suppress the interference of irrelevant backgrounds in low-light environments.
[0023] 2.4: Spatial attention: By performing pooling operations in the spatial dimension, the spatial features of important regions in the image are learned, enhancing the attention to the termite target area. This can help the model better focus on termite targets and avoid the interference of background noise in complex backgrounds or low-light conditions.
[0024] 2.5 Model training: During the model training process, a multi-task loss function is combined to optimize the classification accuracy and bounding box regression accuracy to ensure that Faster R-CNN can accurately detect targets in low-light environments. Among them, the model adopts the unique multi-task loss function of Faster R-CNN, combining the classification loss and bounding box regression loss of the target.
[0025] Step S3: Dataset definition and data augmentation: To enhance the robustness and generalization ability of the model, the present invention has carefully defined and enhanced the dataset to ensure that the model can perform efficient detection in various low-light environments. The specific implementation process is as follows: 3.1: Dataset Definition: Select a standard termite image dataset and cooperate with accurate annotation information to ensure the quality of the training data. In low-light environments, ensure that the dataset contains images under various lighting conditions to increase the model's adaptability to different environments.
[0026] 3.2: Data Augmentation: Use the Albumentations library for image augmentation to increase the diversity of the training data and prevent the model from overfitting. The augmentation operations include: 3.4: Brightness and Contrast Adjustment: Simulate the brightness and contrast changes in low-light environments to improve the model's robustness to uneven lighting problems.
[0027] 3.5: Rotation and Flipping: Enhance the diversity of training samples by randomly rotating and flipping images, and improve the model's generalization ability, especially the detection ability of termite targets at different angles.
[0028] Step S4: Model Inference and Target Tracking: When the trained model performs inference, the non-maximum suppression (NMS) algorithm and target tracking technology are adopted to ensure the accuracy of the detection results and be able to track the activity trajectories of termites in real time. The specific implementation process is as follows: 4.1: Inference Process: After the input image to be detected is preprocessed, it is sent to the trained Faster R-CNN model for forward inference, and the model will output the positions and categories of termite targets in the image. For low-light images, the inference process can automatically adapt to the brightness and contrast of the image and accurately identify the targets.
[0029] 4.2: Non-Maximum Suppression (NMS): To avoid duplicate detection boxes, the non-maximum suppression algorithm is adopted to retain the detection box with the highest confidence and eliminate duplicate target detection results, further improving the detection accuracy.
[0030] 4.3: Target Tracking: In the application of multi-frame images or video streams, the Deep SORT algorithm is used to track the detected termite targets. Deep SORT can combine depth features and spatial positions to accurately track the targets in real time, avoid duplicate counting, and provide data support for termite control.
[0031] Step S5: Result Visualization and Statistics: Finally, to facilitate users to intuitively understand the detection results, the present invention provides an image visualization function and counts the number of detected termite targets. The specific implementation process is as follows: 5.1: Bounding Box Drawing: In the inference results, draw bounding boxes for each detected termite target and label its confidence value. This operation enables users to visually view the distribution and size of termite targets, facilitating subsequent processing and analysis.
[0032] 5.2: Quantity Counting: Count the number of detected termite targets, and filter out detection boxes with low confidence through a threshold to ensure the accuracy of the final statistical results. By analyzing each frame of the image, the system can update the number of termites in real time and generate a report.
[0033] 5.3: Real-time Display: The system can display the detection results in real time, providing users with real-time monitoring information. Show the statistical information and target detection results to users through images or video streams, facilitating monitoring personnel to take control measures in a timely manner.
[0034] The present invention also discloses a termite detection and tracking system based on computer vision and deep learning, aiming to improve the accuracy of termite detection and achieve real-time monitoring of termite activities. The system includes the following modules: Image Preprocessing Module: This module processes the input image to improve the image quality and enhance the features of termites. In low-light environments, poor image quality is one of the main reasons for the low accuracy of termite detection. The present invention significantly improves the image quality and the visibility of termite features through the following technical means. Preferably, the present invention adopts adaptive Gamma correction, Canny edge detection, adaptive threshold segmentation, and morphological operations to remove noise and strengthen the contour features of the target.
[0035] (a) Adaptive Gamma Correction: To address the brightness and contrast issues of low-light images, an adaptive Gamma correction algorithm is adopted. This algorithm dynamically adjusts the Gamma value according to the local brightness characteristics of the image, making the brightness distribution of the image more uniform and enhancing the visibility of termite targets. Compared with the traditional fixed Gamma value correction method, adaptive Gamma correction can better adapt to different lighting conditions and avoid overexposure or underexposure problems.
[0036] (b) Optimization of Canny Edge Detection: After enhancing the contrast, the Canny edge detection algorithm is applied to extract the edge information of the image. The present invention optimizes the Canny algorithm. By introducing multi-scale gradient calculation and adaptive thresholds, it can more accurately capture the contours of termites. Especially in low-light environments, it can effectively identify fuzzy or unclear edges.
[0037] (c) Adaptive threshold segmentation and morphological operations: To achieve accurate segmentation of the target area, an adaptive threshold segmentation algorithm based on local area statistics is adopted. This algorithm dynamically sets the segmentation threshold according to the brightness and contrast of the local area, avoiding the mis-segmentation problem that easily occurs in the traditional fixed threshold method in low-light environments. In addition, combined with morphological operations (such as opening operation and dilation operation), it further removes the noise in the image and smooths the contour of the termite target, making the target area clearer and facilitating subsequent target detection and analysis.
[0038] The image preprocessing module of the present invention is specifically optimized for low-light environments. Through technologies such as adaptive Gamma correction, optimized Canny edge detection, and adaptive threshold segmentation, the visibility of termite features in low-light environments is significantly improved. The combination of these technologies has not been reported in the field of termite detection and has high innovation and technical thresholds.
[0039] Termite detection module. To improve the accuracy of termite target detection, preferably, the present invention adopts an improved Faster R-CNN model and combines the CBAM (Convolutional Block Attention Module) attention mechanism, significantly improving the detection accuracy of termite targets in low-light environments. The specific innovation points are as follows: (a) Targeted optimization of the CBAM mechanism: The CBAM mechanism enhances the model's ability to focus on termite features through channel attention and spatial attention modules. The present invention specifically optimizes the CBAM mechanism for the termite detection task in low-light environments. The channel attention module can dynamically adjust the weights of feature channels, emphasizing the feature channels related to termite targets; the spatial attention module enhances the expression ability of important spatial positions through pooling operations. This optimization enables the model to more accurately focus on termite targets in low-light environments and suppress the interference of background noise.
[0040] (b) Multi-scale feature extraction and fusion: To meet the detection requirements of termites of different sizes, the present invention introduces multi-scale feature extraction and fusion technology into the Faster R-CNN model. By constructing a Feature Pyramid Network (FPN), the model can extract termite features at different scales and fuse these features, significantly improving the detection accuracy of small targets.
[0041] (c) Model training optimization: During the model training process, the present invention adopts the PyTorch framework combined with the SGD optimizer and the StepLR learning rate scheduler to optimize the training process. By introducing the weight decay strategy and data augmentation technology, the generalization ability and robustness of the model are further improved. In addition, the present invention also combines a multi-task loss function to ensure that the model can optimize both the classification accuracy and the bounding box regression accuracy in low-light environments.
[0042] Although the CBAM mechanism has been mentioned in other fields (such as underwater target detection, YOLOv7, etc.), the present invention is specifically optimized for termite detection tasks in low-light environments. By combining adaptive Gamma correction with the CBAM mechanism, the present invention can significantly improve the detection accuracy of termite targets in low-light environments. This technical solution is unique and innovative in the field of termite detection.
[0043] Data augmentation module. To enhance the generalization ability of the model, preferably, the present invention uses the Albumentations library to diversify the training data, including rotation, horizontal flipping, brightness and contrast adjustment, etc. Through these data augmentation means, the diversity of the training data is improved, which can effectively prevent the overfitting of the model and improve the robustness of the model under different environments, illuminations, and shooting angles, thereby enhancing the adaptability and stability of termite detection.
[0044] Inference and statistics module. In the inference stage, preferably, the present invention uses the non-maximum suppression (NMS) algorithm to remove duplicate detection boxes and only retains the box with the highest confidence, thereby improving the detection accuracy. In addition, a threshold is used to filter out low-confidence detection boxes to ensure the accuracy of the final statistical results. This module not only improves the detection accuracy but also optimizes the inference speed to ensure efficiency in real-time monitoring scenarios.
[0045] Object tracking module. In the application of multi-frame images or video streams, in order to achieve real-time tracking and monitoring of termite targets, preferably, the present invention uses the Deep SORT algorithm for object tracking to ensure that each termite target is only counted once and its behavior and path are monitored in real-time. And it has been specifically optimized: (a) Depth feature fusion: The Deep SORT algorithm combines features extracted by deep learning to perform real-time tracking on the detected termite targets. The present invention further enhances the accuracy and robustness of object tracking by introducing depth feature fusion technology. By fusing the features output by the detection module with the features of the tracking module, the model can more accurately match termite targets and avoid mis-tracking problems that occur in low-light environments.
[0046] (b) Real-time optimization: To meet the requirements of real-time monitoring, the present invention optimizes the Deep SORT algorithm. By introducing fast feature matching technology and a dynamic update mechanism, the model can update the position and trajectory of termite targets in real-time in multi-frame images or video streams to ensure that each termite target is only counted once. In addition, combined with the non-maximum suppression (NMS) algorithm, the present invention can effectively remove duplicate detection boxes and further improve the detection accuracy.
[0047] (c) Target trajectory visualization: The present invention provides a real-time image visualization function, which displays the positions, quantities, and activity trajectories of termites through a graphical user interface (GUI). Users can intuitively understand the activity dynamics of termites, providing decision-making support for prevention and control work.
[0048] The target tracking module of the present invention not only realizes the real-time tracking and monitoring of termite targets, but also significantly improves the accuracy and robustness of tracking through deep feature fusion and real-time optimization. This technical solution is unique and innovative in the task of termite detection and tracking in low-light environments, and can provide strong technical support for termite prevention and control.
[0049] Model compression and acceleration module. To improve the inference speed and deployment efficiency, preferably, the present invention adopts model quantization and knowledge distillation technologies, and at the same time uses TensorRT for acceleration: (a) Model quantization: By adopting model quantization technology, the model parameters with floating-point precision are converted into a low-precision format (such as INT8), significantly reducing the model size and accelerating the inference process. By introducing the mixed-precision training technology, the present invention can further optimize the inference performance on the premise of ensuring the model accuracy.
[0050] (b) Knowledge distillation: Using knowledge distillation technology, by training a smaller "student model" to simulate the behavior of a large model (teacher model), the computational complexity is reduced. The present invention ensures that the "student model" can inherit the detection accuracy of the "teacher model" in low-light environments while significantly improving the inference speed by optimizing the knowledge distillation process.
[0051] (c) TensorRT acceleration: Combining NVIDIA's TensorRT acceleration tool, the present invention further optimizes the inference performance of the model. By introducing efficient computational graph optimization and hardware acceleration technologies, the model can run efficiently on resource-constrained embedded devices, meeting the requirements of real-time monitoring.
[0052] Through technologies such as image preprocessing, improved Faster R-CNN model, target tracking, and model optimization, the present invention significantly improves the accuracy and real-time performance of termite detection and tracking in low-light environments. The combination of these technologies is uniquely innovative and practically valuable in the field of termite detection, and can provide strong technical support for termite prevention and control.
[0053] The present invention improves the termite detection accuracy in low-light environments. In terms of image preprocessing technology in low-light environments, the present invention proposes a comprehensive preprocessing method, including adaptive Gamma correction, optimized Canny edge detection, adaptive threshold segmentation, and morphological operations. The combination of these technologies can significantly improve the image quality and the visibility of termite features, providing high-quality input for subsequent detection tasks. Compared with traditional image preprocessing methods, the preprocessing module of the present invention can dynamically adapt to different lighting conditions. Especially in low-light environments, it can effectively enhance the feature representation of termite targets and reduce the interference of background noise. This improvement significantly enhances the image quality in low-light environments and provides a clearer image basis for termite detection.
[0054] The present invention enhances the model's detection ability for small targets in low-light environments. For the core model of termite detection, the present invention integrates the CBAM attention mechanism into the Faster R-CNN model. Through the channel attention and spatial attention modules, it strengthens the model's ability to focus on termite features. In addition, the introduction of multi-scale feature extraction and fusion technology further improves the detection accuracy for small targets. Although the CBAM mechanism has been applied in other fields, the present invention is specifically optimized for the termite detection task in low-light environments. Through experimental verification, the improved model can significantly improve the detection accuracy in low-light environments. Especially in complex backgrounds or low-light environments, it can effectively suppress the interference of background noise. This optimization significantly improves the detection performance of the model in low-light environments.
[0055] The present invention improves the robustness in low-light environments. The present invention adopts a rich data augmentation method. Especially in low-light environments, it performs brightness adjustment, contrast enhancement, etc., effectively simulating scenes under different lighting conditions. This data augmentation can prevent the performance degradation of the model in low-light environments, thereby improving the generalization ability of the model and ensuring that it can maintain a high detection accuracy in various environments.
[0056] The present invention optimizes the inference efficiency in low-light environments and makes a breakthrough in model compression and acceleration processing. In terms of model compression and acceleration, the present invention significantly improves the inference speed and deployment efficiency of the model through model quantization, knowledge distillation, and TensorRT acceleration technology. The combination of these technologies enables the model to operate efficiently on resource-constrained embedded devices, meeting the requirements of real-time monitoring. Compared with traditional model optimization methods, the model compression and acceleration module of the present invention can significantly improve the inference speed and deployment efficiency while maintaining the detection accuracy. Through experimental verification, the optimized model can operate efficiently in low-light environments, providing strong technical support for practical applications.
[0057] In the aspect of target tracking and real-time monitoring, the present invention adopts the Deep SORT algorithm combined with the depth feature fusion technology to achieve the real-time tracking and monitoring of termite targets. By optimizing the feature matching and dynamic update mechanism, the uniqueness and continuity of each termite target are ensured. Compared with traditional target tracking algorithms, the target tracking module of the present invention exhibits higher accuracy and robustness in low-light environments. Through the real-time image visualization function, users can intuitively understand the activity dynamics of termites, providing decision-making support for prevention and control work. The integrated Deep SORT algorithm can effectively track termite targets in multiple frames of images or video streams. Even in low-light environments, the system can avoid duplicate counting and monitor termites in real time. This technology is particularly suitable for scenarios that require long-term monitoring, such as tracking termite activities at night, and can provide accurate statistical data. This technical improvement significantly enhances the accuracy and real-time performance of termite tracking in low-light environments.
[0058] The present invention is described with reference to the flowcharts and / or block diagrams of methods, apparatuses (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowcharts and / or block diagrams, and the combination of processes and / or blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to generate a machine, such that the instructions executed by the processor of the computer or other programmable data processing devices generate a means for realizing the functions specified in Figure 1 one process or multiple processes and / or blocks Figure 1 one block or multiple blocks.
[0059] In the description of the present invention, it should be understood that the terms "first" and "second" are only used for descriptive purposes and cannot be construed as indicating or implying relative importance or implicitly specifying the quantity of the indicated technical features. Thus, the features defined with "first" and "second" may explicitly or implicitly include one or more of these features. In the description of the present invention, "a plurality of" means two or more unless otherwise specifically defined.
[0060] Obviously, those skilled in the art can make various modifications and variations to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalent technologies, the present invention is also intended to include these modifications and variations.
Claims
1. A method for termite detection and tracking in low-light environments, characterized in that, Including the following steps: Collect termite images in low-light environments, optimize image details using adaptive Gamma correction, Canny edge detection, adaptive threshold segmentation, and morphological operations, and construct a dataset; After integrating the CBAM attention mechanism into the Faster R-CNN model, use the dataset for model training to construct a target model for detecting and tracking termites in the termite images.
2. The method for detecting and tracking termites in low-light environments according to claim 1, wherein: During the process of constructing the dataset, adjust the image brightness and contrast through adaptive Gamma correction to improve the image quality in low-light environments and enhance the detectability of termite targets.
3. The method for detecting and tracking termites in low-light environments according to claim 2, wherein: During the process of model training, enhance the dataset through the Albumentations library and use the enhanced dataset for model training.
4. The method for detecting and tracking termites in low-light environments according to claim 3, wherein: During the process of constructing the target model, apply the non-maximum suppression algorithm to remove overlapping detection boxes in the inference stage and use the Deep SORT algorithm for target tracking.
5. The method for detecting and tracking termites in low-light environments according to claim 4, wherein: During the process of constructing the target model, optimize the model through model quantization and knowledge distillation techniques, combined with mixed-precision training and TensorRT acceleration tools.
6. The method for detecting and tracking termites in low-light environments according to claim 5, wherein: During the process of constructing the target model, in terms of model training, adopt the PyTorch framework and combine it with the SGD optimizer and StepLR learning rate scheduler to optimize the training process to improve the detection accuracy.
7. The method for detecting and tracking termites in low-light environments according to claim 6, wherein: During the process of constructing the target model, adopt a multi-task loss function, combine the classification loss and bounding box regression loss of the target, and simultaneously optimize the classification accuracy and bounding box regression accuracy of the model in low-light environments.
8. A termite detection and tracking system for low-light environments, characterized in that, Including: Image acquisition module: used to collect termite images in real time in low-light environments; Image preprocessing module: used to perform adaptive Gamma correction, Canny edge detection, threshold segmentation, and morphological operations on the collected images to construct a dataset; Termite target detection module: based on the dataset, use the Faster R-CNN model integrated with the CBAM attention mechanism to detect termite targets; Target tracking module: use the Deep SORT algorithm to perform real-time tracking on the detected termite targets; Optimization module: optimize the inference speed of the system by applying model compression and acceleration techniques.