A method for estimating the number of field pests based on the operation of driving away moths
By using cameras to collect video data in the field and performing image recognition, the number of pests can be automatically calculated, solving the problem of large estimation errors caused by manual moth removal and achieving more accurate pest quantity estimation.
Patent Information
- Application Number
- CN202411904468.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2024-11-25
- Filing Date
- 2024-12-23
- Publication Date
- 2026-02-13
- Estimated Expiration
- 2044-12-23
AI Technical Summary
In existing technologies, the manual moth-driving method for estimating pest numbers suffers from inaccurate swaying area, inconsistent angles, and large errors in manual visual estimation, resulting in significant errors in the estimation of pest numbers in the field and affecting the control effect.
The method uses a moth-repelling device to collect video data through a camera, identify the moth area, the level area, and the compass area, verify the validity of the data using image recognition technology, calculate the swept area and the number of moths, and automatically estimate the number of pests in the field.
This improved the accuracy of pest population forecasting, reduced errors from human experience-based judgment, and ensured the reliability and precision of the forecast results.
Smart Images

Figure CN119693394B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] One or more embodiments of the present specification relate to image recognition technology, and in particular to a method for estimating the number of field pests based on a chasing moth operation. BACKGROUND
[0002] Pests such as rice leaf roller moths that harm rice have long-distance migratory habits and migrate into domestic rice planting areas from Southeast Asia and other places with seasonal changes. Investigating the occurrence of pests in the field is the basis for prediction, field prevention and control. The current investigation of the occurrence of pests in the field still uses a pure manual chasing moth estimation method, that is, a person manually holds a bamboo pole and slowly stirs the upper part of the rice clump along the ridge, and uses a counter to record the number of flying moths during the stirring process. The number of moths in the field is estimated by combining the stirring area. However, in this process, the person manually stirs the rice clump, and the chasing rod is not easy to keep completely horizontal, and the turning angle may be different each time when using fixed-point chasing, resulting in a large difference between the actual stirring area and the visually estimated area. The motion state of the chasing rod is usually not recorded. The number of moths flying during the stirring process is also visually estimated by a person, so that the final estimated number of flying moths has a large error, which affects the judgment of the actual occurrence of pests in the field. SUMMARY
[0003] To solve the above problems, one or more embodiments of the present specification describe a method for estimating the number of field pests based on a chasing moth operation.
[0004] According to a first aspect, a method for estimating the number of field pests based on a chasing moth operation is provided, applied to a chasing moth device, the device comprising a camera component and a chasing rod component, the camera component comprising a camera support rod and a camera for shooting from a top view, the chasing rod component comprising a chasing rod, a clamping module for clamping the chasing rod, a compass and a level respectively arranged on the chasing rod, the method comprising:
[0005] After detecting a number estimation instruction, video data corresponding to a complete chasing moth operation collected by the camera is obtained, a moth area, a level area and a compass area in the video data are determined;
[0006] The bubble position of the level in the level area is identified, and the validity of the video data is verified based on the bubble position;
[0007] After the video data is verified as valid, the number of regional moths in the moth area is identified, and the sweeping area corresponding to the complete chasing moth operation is determined according to the change in the angle between the compass in the compass area and the chasing rod. The estimated number of field pests is determined according to the number of regional moths and the sweeping area.
[0008] Preferably, after detecting the quantity estimation instruction, video data corresponding to a complete driving-off operation of the camera is acquired, including:
[0009] After detecting the survey information published by the target organization, the areas of the to-be-surveyed fields are determined based on the growth stage of the rice, the variety of the rice, and the growth of the rice, and the area coordinates and the survey time of each of the to-be-surveyed field areas are determined, the survey time including a survey date and a survey time period;
[0010] When any of the area coordinates meeting the survey time is reached and the quantity estimation instruction is detected, video data corresponding to a complete driving-off operation of the camera is acquired.
[0011] Preferably, the video data corresponding to a complete driving-off operation of the camera is acquired, including:
[0012] In the real-time image of the camera, a driving-off rod is recognized, and when the driving-off rod does not move within a preset time period, the camera is controlled to start collecting video data;
[0013] When the driving-off rod does not move again within a preset time period after moving, the camera is controlled to end collecting the video data.
[0014] Preferably, the determination of the moth area, the level meter area, and the compass area in the video data includes:
[0015] The video data is divided into frames in time sequence to obtain each frame image;
[0016] The moth area, the level meter area, and the compass area in each frame image are respectively determined and labeled based on image recognition.
[0017] Preferably, the recognition of the bubble position of the level meter in the level meter area and the verification of the validity of the video data based on the bubble position include:
[0018] The level meter area of each frame image is respectively recognized based on a preset first image recognition model to obtain each first recognition result, the first image recognition model being used to recognize the bubble position of the level meter in an image, and the first recognition result including a bubble centered, a bubble deviated toward a palm direction, or a bubble deviated away from the palm direction;
[0019] The result proportion of a target first recognition result in all the first recognition results is calculated, and a validity verification result of the video data is obtained based on the result proportion, the target first recognition result being a first recognition result representing a centered bubble, and the validity verification result representing validity when the result proportion is higher than a preset proportion.
[0020] Preferably, the identifying the number of moths in the moth region comprises:
[0021] The moth region of each of the divided frame images is identified based on a preset second image recognition model, to obtain a second recognition result, and the second image recognition model is used for identifying moths in an image.
[0022] The second recognition results are matched based on a multi-target tracking algorithm, and the number of moths in the moth region is determined according to the number of matched moth trajectories.
[0023] Preferably, the matching the second recognition results based on the multi-target tracking algorithm and determining the number of moths in the moth region according to the number of matched moth trajectories comprises:
[0024] After the target box of each of the second recognition results is enlarged based on a preset magnification, at least one predicted box of each target box in the next second recognition result is generated based on a Kalman filter.
[0025] The predicted box and the target box in the next second recognition result are matched based on a Hungarian algorithm to determine an optimal matching result.
[0026] The step of generating at least one predicted box of each target box in the next second recognition result based on the Kalman filter is repeated until all optimal matching results are obtained, the moth trajectories of each moth object are generated according to the optimal matching results, and the number of moths in the moth region is determined according to the number of moth trajectories.
[0027] Preferably, the determining the sweeping area corresponding to the complete swatting operation according to the angle change between the compass and the swatting rod in the compass region comprises:
[0028] The compass region of each of the divided frame images is identified based on a preset third image recognition model to obtain a third recognition result, and the parameters of a straight line of the compass and the parameters of a straight line of the swatting rod in each of the third recognition results are determined according to a Hough transform.
[0029] The direction vector of the compass and the direction vector of the swatting rod are determined according to the parameters of the straight line of the compass and the parameters of the straight line of the swatting rod, respectively, the swatting angle is calculated according to the direction vector of the compass and the direction vector of the swatting rod, and the sweeping area corresponding to the complete swatting operation is calculated according to the swatting angle and the rod length.
[0030] Preferably, the determining the estimated number of field pests according to the number of moths in the moth region and the sweeping area comprises:
[0031] The moth quantity and the sweeping area of the region of each of the video data of the same classification are summarized, the estimated quantity per unit area of the field pest of the classification is calculated, the estimated quantity of the field pest of the classification is calculated according to the estimated quantity per unit area and the total area of the field of the classification, and the classification is divided based on at least one of a shooting time period, a rice variety, and a moth driving place.
[0032] Preferably, the method further comprises:
[0033] A moth occurrence level is set for each of the fields of the classification based on the estimated quantity per unit area.
[0034] The method provided by the embodiments of the present specification can collect video data of complete moth driving operation of a moth driving device, verify the validity of the video data according to a spirit level region, determine the moth quantity and the sweeping area according to a moth region and a compass region respectively, and further determine the estimated quantity of the field pest. In the above process, only the video data that pass the validity verification can be used for quantity estimation, and the moth quantity and the sweeping area are determined through image recognition without relying on manual experience, so that the finally estimated pest quantity is more accurate. BRIEF DESCRIPTION OF DRAWINGS
[0035] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required to be used in the embodiments will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor on the basis of these drawings.
[0036] Figure 1 is a flowchart of a moth driving operation-based field pest quantity estimation method in an embodiment of the present specification.
[0037] Figure 2 is a working principle schematic diagram of a moth driving device in an embodiment of the present specification. DETAILED DESCRIPTION
[0038] The technical solutions in the embodiments of the present application will be described clearly and completely in combination with the drawings in the embodiments of the present application.
[0039] In the following description, the terms "first", "second", etc. are used only for the purpose of description, and should not be interpreted as indicating or implying relative importance. The following description provides a plurality of embodiments of the present application, and different embodiments can be replaced or combined, so the present application can also be considered to include all possible combinations of the same and / or different embodiments described. Thus, if one embodiment includes features A, B, C, and another embodiment includes features B, D, the present application should also be considered to include embodiments containing one or more of all other possible combinations of A, B, C, and D, even if the embodiment is not explicitly described in the following.
[0040] The following description provides examples and does not limit the scope, applicability, or examples set forth in the claims. Changes can be made in the function and arrangement of elements described without departing from the scope of the application. Various examples can omit, substitute, or add various procedures or components as appropriate. For instance, the methods described can be performed in an order different than described, and various steps can be added, omitted, or combined. Also, features described with respect to some examples can be combined in other examples.
[0041] Referring to Figure 1 , Figure 1 is a flowchart of a method for estimating the number of field pests based on a chasing moth operation provided by an embodiment of the present application. In the embodiment of the present application, the method is applied to a chasing moth device, the device includes a camera component and a chasing moth rod component, the camera component includes a camera support rod and a camera for shooting from a top view, the chasing moth rod component includes a chasing moth rod, a clamping module for clamping the chasing moth rod, a compass and a level respectively arranged on the chasing moth rod, and the method includes:
[0042] S101, after detecting the number estimation instruction, acquiring video data corresponding to a complete chasing moth operation collected by the camera, determining a moth flying area, a level area and a compass area in the video data.
[0043] The execution subject of the present application can be a controller arranged in the chasing moth device, and the controller can be in communication connection with the camera.
[0044] In the embodiment of the present application, the chasing moth device of the present application will be introduced first, such as Figure 2As shown, the moth chasing device is composed of two parts, a camera component and a moth chasing rod component. The camera component and the moth chasing rod component can be connected together through a clamping module and a camera support rod, or can be separately installed on the worker's body. The moth chasing rod can be a common bamboo pole or a pp, pvc plastic tube. The clamping module can include a fixed clamp and a holding arm for assisting the proper combination of the moth chasing rod and the operator's arm during the moth chasing process, and the length of the fixed clamp can be adjusted in length as needed, thereby adjusting the height between the moth chasing rod and the ground. With the assistance of the clamping module, the worker does not need to bend over to keep the moth chasing rod horizontal by holding the clamping module, so that the moth chasing rod can be kept as horizontal as possible during the subsequent sweeping of the moth chasing rod. The shooting angle of the camera is a top view, so that the shooting picture is just facing the rice clumps, and the moth chasing rod, the compass and the level installed on the moth chasing rod can be shot, which is convenient for subsequent image recognition. In addition, the moth chasing device can also include an indication module. The indication module can be a display in communication connection with the controller for displaying the image shot by the camera, or can be directly integrated with the controller, and the corresponding instructions are sent to the controller through the touch operation of the display. In addition, Figure 2 The example shown is the case of operating the moth chasing in the field ridge. In other embodiments, the moth chasing can also be operated in the field.
[0045] In the embodiment of the present application, after the controller detects the quantity estimation instruction sent by the worker, it will control the camera to start shooting and shoot the video data corresponding to a complete moth chasing operation process performed by the worker, and send the video data to the controller. The controller will identify the video data through a pre-trained image recognition model to determine the moth area, the level area and the compass area. The level area and the compass area can be the target box area of the level and the compass after identifying the level and the compass. The moth area can be the target box area corresponding to each moth identified, or it can be the area other than the level area and the compass area, and the positions of each identified moth in the area are marked separately.
[0046] The quantity estimation instruction can be a button on the moth catching device that is electrically connected to the controller, and when the staff presses the button, a quantity estimation instruction is generated to indicate that image capture needs to start. The quantity estimation instruction can also be generated by the staff selecting through a touch screen, or the user can directly send an instruction to the controller using a mobile terminal or directly use voice control. The camera can also be set according to specific needs to determine a complete moth catching operation, for example, by image recognition to detect the position of the moth catching rod. When the moth catching rod is stationary for 5-10 seconds, it is considered that the staff will start to scan the rod, and video data collection starts. When the moth catching rod moves to a certain position and stops again, it is considered that the scanning is complete, and video collection stops. For example, after detecting the quantity estimation instruction or the video capture instruction, the camera starts to collect data for a predetermined time as video data.
[0047] In an embodiment, after detecting the quantity estimation instruction, the video data corresponding to a complete moth catching operation collected by the camera is obtained, including:
[0048] After detecting the survey information published by the target organization, the areas to be surveyed are determined based on the growth stage of the rice, the variety of the rice, and the growth of the rice, and the area coordinates and the survey time of each of the areas to be surveyed are determined. The survey time includes the survey date and the survey time period.
[0049] When any of the area coordinates that meet the survey time is reached and the quantity estimation instruction is detected, the video data corresponding to a complete moth catching operation collected by the camera is obtained.
[0050] In the embodiments of the present application, the target institutions such as plant protection stations, planting promotion centers, etc. can publish pest investigation information in coordination, and the controller will start to determine the area of the field to be investigated after detecting the investigation information. In order to ensure that the estimated number of pests is more real and effective, different rice growth stages, rice varieties and rice growth conditions of the field are required to be selected for the moth rod sweeping test, so the controller will determine a number of field areas to be investigated according to the rice growth stage, rice variety and rice growth condition, and determine the coordinates of the field area to be investigated. The moth device can also be provided with a GPS, and the controller can determine the current coordinates of the moth device according to the GPS. Only when the current coordinates reach the area coordinates, the arrival time meets the investigation event, and the number estimation instruction is detected, the controller will obtain the video data. The specific way to determine the area of the field to be investigated can be to divide the field into a plurality of field areas in advance, and to mark the corresponding rice growth stage, rice variety and rice growth condition for each field area according to the actual situation. Then, the total number of field areas to be investigated is determined according to the total area to be investigated, and the selected number is evenly distributed according to the total number for each combination of rice growth stage, rice variety and rice growth condition, and a corresponding number of field areas to be investigated is randomly selected in each field area meeting the combination condition.
[0051] In an implementation manner, the video data corresponding to a complete moth driving operation collected by the camera includes:
[0052] In the real-time image of the camera, the moth rod is recognized, and when the moth rod does not move within a preset time length, the camera is controlled to start collecting video data;
[0053] When the moth rod does not move again within a preset time length after moving, the camera is controlled to stop collecting the video data.
[0054] In the embodiments of the present application, the controller first acquires the real-time image collected by the camera, and determines the position of the moth rod in the image through image recognition of the real-time image. Then, the controller monitors the change of the position of the moth rod, and if it does not move within a preset time length, the controller controls to start collecting video data. When the moth rod stops moving again after moving and does not move within a preset time length, the controller controls to stop collecting video data, so as to obtain the video data corresponding to a complete moth driving operation. This way can also take into account the influence of the magnetic needle damping time.
[0055] In an implementation manner, the determination of the moth flying area, the level meter area and the compass area in the video data includes:
[0056] The video data is divided into frames in time sequence to obtain each frame image;
[0057] The moth region, the level meter region, and the compass needle region in each of the frame images are determined and labeled based on image recognition.
[0058] In the embodiments of the present disclosure, the video data is essentially a continuous image data, and the image data is identified respectively in the identification process. Therefore, the video data is first divided into frame images in time sequence. Then, each frame image is processed according to a pre-trained image recognition model to determine the moth region, the level meter region, and the compass needle region in each frame image, and the regions are labeled.
[0059] In S102, the bubble position of the level meter in the level meter region is identified, and the validity of the video data is verified based on the bubble position.
[0060] In the embodiments of the present disclosure, when the camera is used to capture images from a top view, only when the moth catching rod is swept horizontally while keeping horizontal, the horizontal sweeping area detected in the image can match the actual sweeping area of the rod, thereby ensuring the accuracy of the estimated number. Therefore, the controller first determines whether the moth catching rod is kept horizontal according to the bubble position of the level meter in the level meter region. When the moth catching rod is kept horizontal, the bubble should be at the central position of the level meter. Only when the bubbles in the video data are all substantially at the central position, the video data is considered valid. The video data that is determined to be invalid will not be subjected to the subsequent identification process.
[0061] In an implementation manner, the identification of the bubble position of the level meter in the level meter region and the verification of the validity of the video data based on the bubble position include:
[0062] The level meter regions of the frame images are identified based on a preset first image recognition model to obtain first identification results, the first image recognition model is used to identify the bubble position of the level meter in an image, and the first identification result includes bubble centering, bubble deviating toward the palm direction, or bubble deviating away from the palm direction.
[0063] The result proportion of a target first identification result in all the first identification results is calculated, the validity verification result of the video data is obtained based on the result proportion, the target first identification result is a first identification result representing bubble centering, and the validity verification result represents validity when the result proportion is higher than a preset proportion.
[0064] In the embodiments of the present application, a first image recognition model for identifying bubble positions is pre-trained. The model can use an improved YOLOv5 model, and the model structure is composed of multiple important components, including a backbone network, a feature fusion network, and a detection head. The backbone network is responsible for extracting low-level features of the input image. A commonly used structure is CSPNet, which introduces more information during feature extraction and improves the expression ability of the model. The feature fusion network integrates features from different levels, which can better capture multi-scale target information. The detection head is responsible for the final output of the bounding box and class probability, ensuring accurate target judgment. In order to enhance the detection performance, the CBAM (Convolutional Block Attention Module) attention mechanism is introduced. The work of CBAM is divided into two stages: channel attention and spatial attention. Channel attention extracts global information of the feature map through global average pooling and global maximum pooling, thereby generating importance weights for each channel. These weights will affect the network's sensitivity to different channel information, allowing important features to receive more attention during training. Spatial attention processes the channel-weighted feature map to generate a weight map that focuses on specific regions. The combination of these two modules effectively improves the overall detection performance of the network, making the identification of the fly target more accurate. In addition, during model training, NMS is used to eliminate overlapping boxes and retain the most accurate detection results for each target box in the training results. Training images should be taken under different environmental lighting, angles, and backgrounds to enhance the robustness of the model.
[0065] After obtaining the first image recognition model, each sub-frame image is processed to obtain a first recognition result. Each recognition result can represent whether the bubble in the image is centered, biased towards the palm direction, or away from the palm direction. Finally, the proportion of target first recognition results representing the bubble centered in all first recognition results is calculated. If the result proportion is higher than the preset proportion, the video data is considered valid, otherwise it is considered invalid.
[0066] S103, after the video data is verified as valid, the number of regional flies in the fly area is identified, and the horizontal sweeping area corresponding to the complete fly catching operation is determined according to the angle change between the compass in the compass area and the fly catching rod. The estimated number of field pests is determined according to the number of regional flies and the horizontal sweeping area.
[0067] In the embodiments of the present application, after the video data is verified to be valid, the number of moths in the region and the sweeping area in the video data are identified according to another image recognition model. The number of moths per unit area can be determined according to the number of moths and the sweeping area, and the estimated number of pests in the field can be estimated by combining the total area of the field. The number of moths in the region can be the number of moths in each frame of the video data identified directly, and then the average value is obtained, or the number of moths in the region can be determined by determining the moving track of each moth through multi-target matching of consecutive images. The sweeping area is determined by identifying the compass and the moth chasing rod through the image recognition model, determining the angle change between the two, and then determining the actual sweeping angle, and calculating the sweeping angle combined with the length of the moth chasing rod.
[0068] In an implementation manner, the identifying the number of moths in the region includes:
[0069] Based on a preset second image recognition model, the moth region of each of the frame images is identified to obtain a second identification result, and the second image recognition model is used to identify moths in the image.
[0070] Based on a multi-target tracking algorithm, the second identification results of adjacent frames are matched, and the number of moths in the region is determined according to the number of matched moth tracks.
[0071] In the embodiments of the present application, the second image recognition model is also pre-trained, and the second image recognition model is used to identify moths in the image. The second image recognition model can also be trained by the improved YOLOv5 model mentioned above. Since the moths will be disturbed and fly up during the sweeping process, the position of the same moth in different frame images will change. In order to ensure the accuracy of the moth count, the controller will match the second identification results of adjacent frame images according to the multi-target tracking algorithm to determine the position of the same identification object in different images, and then build the moth track of the identification object. Finally, the number of moth tracks can be used as the number of moths in the region. The multi-target tracking algorithm can be SORT (Simple Online and Realtime Tracking), FairMOT (Fair Multi-Object Tracking), JDE (Joint Detection and Embedding), etc.
[0072] In an implementation manner, the matching the second identification results of adjacent frames based on the multi-target tracking algorithm and determining the number of moths in the region according to the number of matched moth tracks includes:
[0073] After the target frame of each second recognition result is enlarged based on the preset magnification, at least one predicted frame of each target frame in the next second recognition result is generated based on a Kalman filter;
[0074] The predicted frame and the target frame in the next second recognition result are matched based on a Hungarian algorithm to determine an optimal matching result.
[0075] The step of generating at least one predicted frame of each target frame in the next second recognition result based on the Kalman filter is repeated until all optimal matching results are obtained, the moth trajectory of each moth object is generated according to the optimal matching results, and the number of moths in the moth region is determined according to the number of moth trajectories.
[0076] In the embodiments of the present disclosure, since the moth target is small and has a high flight speed, the interval distance between adjacent frames is large. Therefore, the target frame in the second recognition result is first enlarged according to a preset magnification (for example, 3 times) to greatly improve the trajectory matching success rate in the subsequent Kalman filter prediction and matching process. Then, the motion of each moth object is predicted using a Kalman filter. The Kalman filter is a recursive algorithm that can predict the target position at the next time point through the current measurement data and the previous state estimation. Therefore, the possible position (i.e., the predicted frame) of each target frame in the next frame image can be predicted through the Kalman filter, and then the target frame detected in the next frame image is matched with the predicted frame. In the matching process, the Hungarian algorithm is used. This algorithm finds the optimal matching result by calculating the intersection-over-union of each pair of target frames. The set intersection-over-union threshold is 0.5. Only in the case of successful matching, the same target is considered. If no matching is found, it is identified as a new target, and a new Kalman filter is initialized for it. After repeating the above process, each moth object in each second recognition result can be matched to generate the moth trajectory of each moth object. One moth trajectory corresponds to one moth, and finally the number of moths in the region is determined.
[0077] In an implementable manner, the horizontal sweeping area corresponding to the complete swatting operation is determined according to the angle change between the compass and the swatting rod in the compass region, comprising:
[0078] Each third recognition result is obtained by identifying the compass region of each frame image based on a preset third image recognition model, and the parameters of the compass straight line and the swatting rod straight line in each third recognition result are determined according to the Hough transform.
[0079] The north pole direction vector and the moth catching rod direction vector are determined according to the north pole straight line parameters and the moth catching rod straight line parameters respectively, and the moth catching angle is calculated according to the north pole direction vector and the moth catching rod direction vector, and the horizontal sweeping area corresponding to the complete moth catching operation is calculated according to the moth catching angle and the rod length.
[0080] In the embodiments of the present application, the north pole and the moth catching rod are first identified according to the pre-trained third image recognition model, which can also be obtained by training the improved YOLOv5 model. For each third identification result, the straight lines of the north pole and the moth catching rod are identified according to the Hough transform, and the corresponding straight line parameters are extracted, and the end point coordinates of the straight lines are obtained. Assuming that the starting point of the north pole pointer is , the end point of the pointer is , the starting point of the moth catching rod is , and the end point of the rod is , the north pole direction vector is: , and the moth catching rod direction vector is: .
[0081] The final moth catching angle of the moth catching rod can be calculated by the dot product formula of the two vectors:
[0082]
[0083] According to the moth catching angle and the known length of the moth catching rod, the corresponding horizontal sweeping area can be calculated.
[0084] In one implementation manner, the method further comprises:
[0085] The area moth quantity and the horizontal sweeping area of each of the video data of the same classification are summarized, the unit area estimated quantity of the field pests under the classification is calculated, and the estimated quantity of the field pests under the classification is calculated according to the unit area estimated quantity and the total area of the field under the classification, the classification being divided based on at least one of the shooting time period, the rice variety and the moth catching location.
[0086] In the embodiments of the present application, in order to more accurately reflect the situation of the field pests, the field needs to be classified according to different situations to respectively evaluate the occurrence amount of the pests under different classifications. Therefore, the controller will summarize the moth quantity and the horizontal sweeping area of the video data of the same classification to calculate the unit area estimated quantity, and calculate the total estimated quantity of the field pests according to the total area of the field under the classification.
[0087] In one implementation manner, the method further comprises:
[0088] The moth occurrence level is set for each of the classified fields based on the estimated number per unit area.
[0089] In the embodiments of the present application, different moth occurrence levels can be divided for different estimated number per unit area intervals in advance. In this way, after the estimated number per unit area of each classification is determined, the corresponding moth occurrence level can be determined according to the interval to which it belongs, so that the corresponding personnel can intuitively understand the moth occurrence severity of the field according to the moth occurrence level.
[0090] The present application also provides a computer readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the above method. The computer readable storage medium can include, but is not limited to, any type of disk, including floppy disks, optical disks, DVDs, CD-ROMs, micro-drives, and magneto-optical disks, ROM, RAM, EPROM, EEPROM, DRAM, VRAM, flash memory devices, magnetic or optical cards, nanosystems (including molecular memory ICs), or any type of medium or device suitable for storing instructions and / or data.
[0091] It should be noted that, for the foregoing method embodiments, in order to simply describe, they are all expressed as a series of action combinations, but those skilled in the art should know that the present application is not limited by the action sequence described, because according to the present application, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should know that the embodiments described in the specification all belong to preferred embodiments, and the actions and modules involved are not necessarily necessary for the present application.
[0092] In the above embodiments, the description of each embodiment has its own focus, and the parts not described in detail in a certain embodiment can be referred to the related description of other embodiments.
[0093] Those of ordinary skill in the art can understand that all or part of the steps of the various methods of the above embodiments can be completed by a program instructing relevant hardware, and the program can be stored in a computer readable memory, which can include a flash disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0094] The above descriptions are merely some example embodiments of the present disclosure, and cannot limit the scope of the present disclosure. That is, equivalent changes and modifications made according to the teachings of the present disclosure are still within the scope of the present disclosure. Those skilled in the art will easily derive other embodiments of the present disclosure upon considering the specification and practicing the disclosure herein. The present application is intended to cover any variations, uses, or adaptive changes of the present disclosure following the general principles of the present disclosure and including common knowledge or conventional technical means in the art not described in the present disclosure. The specification and examples are merely considered as exemplary, and the scope and spirit of the present disclosure are defined by the claims.
Claims
1. A method for estimating the number of field pests based on moth-driving operations, characterized in that, An application is made to a moth-repelling device, the device comprising a camera component and a moth-repelling pole component. The camera component includes a camera support rod and a camera for shooting from a top-down perspective. The moth-repelling pole component includes a moth-repelling pole, a clamping module for holding the moth-repelling pole, a compass and a level respectively disposed on the moth-repelling pole. The method includes: After detecting the quantity estimation command, acquire video data corresponding to a complete moth-driving operation captured by the camera, and determine the moth area, level area, and compass area in the video data; Identify the bubble position of the level in the level area, and verify the validity of the video data based on the bubble position; After the video data is verified as valid, the number of moths in the area is identified, and the sweeping area corresponding to the complete moth-driving operation is determined based on the angle change between the compass and the moth-driving stick in the compass area. The estimated number of field pests is determined based on the number of moths in the area and the sweeping area. The sweeping area is calculated by combining the moth-driving angle determined by the angle change with the length of the moth-driving stick. The step of determining the moth region, the level region, and the compass region in the video data includes: The video data is divided into frames according to time sequence to obtain each frame image; Based on image recognition, the moth region, the level region, and the compass region in each of the framed images are determined and labeled respectively. The step of identifying the bubble position of the level in the level area and verifying the validity of the video data based on the bubble position includes: Based on a preset first image recognition model, the level area of each frame image is identified to obtain each first recognition result. The first image recognition model is used to identify the position of the bubble in the level in the image. The first recognition result includes the bubble being centered, the bubble being biased towards the palm, or the bubble being far away from the palm. Calculate the percentage of the target first recognition result among all the first recognition results, and obtain the validity verification result of the video data based on the percentage of the result. The target first recognition result is the first recognition result that represents the bubble in the center. The validity verification result is represented as valid when the percentage of the result is higher than the preset percentage.
2. The method according to claim 1, characterized in that, After detecting the quantity estimation command, the system acquires video data corresponding to a complete moth-driving operation captured by the camera, including: After detecting the survey information released by the target organization, the field area to be investigated is determined based on the rice growth stage, rice variety and rice growth status, and the regional coordinates and survey time of each field area to be investigated are determined, including the survey date and survey period; Once the area coordinates that meet the survey time are reached and a quantity estimation command is detected, video data corresponding to a complete moth-driving operation captured by the camera is obtained.
3. The method according to claim 1, characterized in that, The acquisition of video data corresponding to a complete moth-chasing operation captured by the camera includes: The camera identifies the moth-driving rod in the real-time image and controls the camera to start collecting video data when the moth-driving rod does not move within a preset time period. When the moth-driving rod has been moved and then remains still for a preset period of time, the camera is controlled to stop collecting video data.
4. The method according to claim 1, characterized in that, The identification of the number of moths within the designated area includes: Based on a preset second image recognition model, the moth region of each frame image is identified to obtain each second recognition result. The second image recognition model is used to identify moths in the image. The number of moths in the area is determined by matching adjacent second identification results based on the multi-target tracking algorithm and the number of matching moth trajectories.
5. The method according to claim 4, characterized in that, The step of matching adjacent second identification results based on a multi-target tracking algorithm and determining the number of moths in the area based on the number of matched moth trajectories includes: After magnifying the target boxes of each of the second recognition results by a preset magnification, at least one predicted box of each target box in the next adjacent second recognition result is generated based on a Kalman filter. The optimal matching result is determined by matching the predicted bounding box and the target bounding box in the next second recognition result using the Hungarian algorithm. Repeat the step of generating at least one predicted box of each target box in the next adjacent second recognition result based on the Kalman filter until all optimal matching results are obtained. Then, generate the moth trajectory of each moth object according to the optimal matching results, and determine the number of moths in the region based on the number of moth trajectories.
6. The method according to claim 1, characterized in that, The step of determining the sweeping area corresponding to the complete moth-driving operation based on the angle change between the compass and the moth-driving stick in the compass area includes: Based on the preset third image recognition model, the compass region of each frame image is identified to obtain each third recognition result, and the compass line parameters and moth-driving rod line parameters in each third recognition result are determined according to the Hough transform. The direction vectors of the compass and moth-driving stick are determined based on the straight line parameters of the compass and the moth-driving stick, respectively. The moth-driving angle is calculated based on the direction vectors of the compass and the moth-driving stick. The sweeping area corresponding to the complete moth-driving operation is calculated based on the moth-driving angle and the stick length.
7. The method according to claim 1, characterized in that, The method of determining the estimated number of field pests based on the number of moths in the area and the area swept includes: The number of moths and the area swept by each video data of the same category are summarized. The estimated number of field pests per unit area under the category is calculated. The estimated number of field pests in the category is calculated based on the estimated number per unit area and the total area of the field in the category. The category is obtained based on at least one of the following: shooting time period, rice species and moth-driving location.
8. The method according to claim 7, characterized in that, The method further includes: Based on the estimated number per unit area, a moth occurrence level is set for each of the aforementioned field categories.
Citation Information
Patent Citations
Image processing-based automatic reading identification method for bar level meter
CN113902894A
KR20240050755A