Source-linked AI summary

Automated Pest Detection with DNN on the Edge for Precision Agriculture

Andrea Albanese, Matteo Nardello, Davide Brunelli

arXiv:2108.00421v1cs.LGcs.CV

TL;DR

Manual analysis of pheromone-trap images is labor-intensive and slow. This paper deploys ML in an energy-harvesting edge smart trap, with test precision reaching 99.5% for VGG16.

  • Problem

    Human analysis of pheromone-trap images is labor-intensive, slow, expensive, and error-prone.

    Source: §II · p. 2
  • Method

    The paper develops an energy-harvesting smart trap that runs pest-detection deep learning on edge hardware and evaluates three CNN architectures.

    Source: §I · p. 1, §IV · p. 4
  • Results

    Test precision was 99% for LeNet, 99.5% for VGG16, and 98.5% for MobileNet.

    Source: A. Training session · p. 6
  • Takeaways & Limitations

    The authors conclude that edge inference and energy harvesting support unattended, perpetual pest monitoring in orchards.

    Source: §VI · p. 8

Abstract

from arXiv · show

Artificial intelligence has smoothly penetrated several economic activities, especially monitoring and control applications, including the agriculture sector. However, research efforts toward low-power sensing devices with fully functional machine learning (ML) on-board are still fragmented and limited in smart farming. Biotic stress is one of the primary causes of crop yield reduction. With the development of deep learning in computer vision technology, autonomous detection of pest infestation through images has become an important research direction for timely crop disease diagnosis. This paper presents an embedded system enhanced with ML functionalities, ensuring continuous detection of pest infestation inside fruit orchards. The embedded solution is based on a low-power embedded sensing system along with a Neural Accelerator able to capture and process images inside common pheromone-based traps. Three different ML algorithms have been trained and deployed, highlighting the capabilities of the platform. Moreover, the proposed approach guarantees an extended battery life thanks to the integration of energy harvesting functionalities. Results show how it is possible to automate the task of pest infestation for unlimited time without the farmer's intervention.

I. INTRODUCTION

Manual pheromone-trap monitoring requires image transmission and human review, while this work proposes an edge-ML smart trap for pest detection and unattended operation.

I. INTRODUCTION

  • The paper motivates improved resource use by noting agriculture’s environmental footprint and interest in optimizing pesticide treatments.In Europe, agriculture is reported to account for more than 10% of greenhouse gas emissions and 44% of water consumption.Source: §I · p. 1
  • Conventional pheromone traps send captured images for expert review, requiring substantial long-range data transmission and regular human intervention.The process is described as inefficient and time-expensive.Source: §I · p. 1
  • The smart trap runs pest-detection inference on-node, transmitting only a brief notification when threats are detected.Its camera and Intel Neural Compute Stick support image capture and inference, while a solar panel and battery power operations indefinitely.Source: §I · p. 1
  • Three ML models are trained and compared for the resource-constrained platform, with their performance comparison determining the final deployment model.The candidates include modified LeNet-5, VGG16, and MobileNetV2.Source: §I · p. 2
  • The work assesses whether solar energy harvesting can sustain smart traps deployed unattended for prolonged periods.The contribution list identifies both unattended operation and a sustainability assessment using a solar harvester.Source: §I · p. 2

II. RELATED WORK

Pest monitoring in pheromone traps remains labor-intensive, while earlier insect-classification research often relied on specimens or methods not tested in deployed orchard traps. The paper adopts a region-based CNN pipeline for images captured in apple orchards.

II. RELATED WORK

  • Human experts analyze images from pheromone traps, making pest recognition labor-intensive, slow, expensive, and error-prone.Monitoring is described as crucial to pheromone-based pest control [18],.Source: §II · p. 2
  • Many insect-classification studies use specimens, but models trained on laboratory images may not suit images collected in the wild.Researchers have extended datasets with real-trap images,,.Source: §II · p. 2
  • Earlier classifiers used features such as wing structure, morphometrics, or global image features, but were often not tested on real-time images from orchard traps.Examples include SVM, ANN, and KNN classifiers.Source: §II · p. 2
  • The paper applies a region-based CNN pipeline to in-situ images from pheromone traps in apple orchards.Color-corrected images are sampled into regions of interest, filtered by non-maximum suppression, and thresholded to propose detections.Source: §II · pp. 2–3
  • The authors describe their orchard system as providing state-of-the-art detection results with computation performed autonomously at the edge.The conclusion also notes that the system can exploit energy harvesting to extend installation lifetime.Source: §II · p. 3

III. SYSTEM ARCHITECTURE

The system is designed for orchard monitoring where long-range communication and scalability across multiple devices matter.

III. SYSTEM ARCHITECTURE

  • Onboard recognition limits routine transmission to a few bytes containing inference results, making the trap suitable for low-bitrate communication.A few captured images per day can still be sent when visual confirmation is needed.Source: §III · p. 3
  • The system is intended for data collection across vast areas, with long-range communication and scalability across multiple devices as design considerations.Source: §III · p. 3
  • The paper presents a prototype of the system, and the cited figure shows it assembled for indoor testing.Source: §III · p. 3

A. Hardware Implementation

The smart trap combines low-power sensing, on-node processing, and energy-harvesting power management with a multistage pipeline for detecting Codling Moths in trap images.

A. Hardware Implementation

  • The custom trap combines an image sensor, Raspberry Pi, Intel Neural Compute module, long-range radio, and solar energy-harvesting system.The Sony IMX219 sensor collects images; the Pi3 manages acquisition, processing, and transmission, while the neural accelerator reduces inference time.Source: A. Hardware Implementation · p. 3, 1) Sensing · p. 3, 2) Processing · p. 3
  • An STM32L0 MCU manages battery status and harvesting, controlling power-up and shutdown of the Raspberry Pi.A solar panel recharges a 1820mAh Li-Po battery; the power policy enables a stabilized 5V supply to the Raspberry Pi.Source: 3) Transmission · p. 3

B. Detection pipeline

  • Sliding windows apply a trained classifier across image locations to extract and classify regions of interest containing individual insects.The classifier outputs a scalar probability that each region contains a Codling Moth.Source: 4) Power unit · p. 3
  • Gaussian smoothing and Canny edge extraction select regions whose insect probabilities are locally maximal.The regions are regularly and densely arranged, so they overlap substantially.Source: 4) Power unit · pp. 3–4
  • The pipeline outputs captured images marked with positive detections, then sends a report to the farmer over LoRa.The highlighted squares indicate detected positive regions.Source: 4) Power unit · p. 4

C. Edge Accelerator

The paper compares three edge accelerators and selects Intel NCS2, prioritizing energy consumption while weighing performance, software compatibility, and availability.

C. Edge Accelerator

  • Jetson Nano requires up to 10W during GPU inference, while Google TPU and Intel NCS2 with its carrier board each consume around 5W.The NCS2 and carrier-board figure comprises 2W for the accelerator and 3W for the Raspberry Pi.Source: C. Edge Accelerator · p. 4
  • Intel NCS2 was selected as the best trade-off in performance, energy consumption, and model compatibility.The authors focused on energy reduction; NCS2’s lower computational capability was sufficient because the application did not require hard-real-time inference.Source: C. Edge Accelerator · p. 4
  • Google TPU supports only TensorFlow and quantized INT8 models, whereas Intel NCS2 also supports FP16/32 and framework conversion through OpenVINO.Jetson Nano’s TensorRT supports most ML frameworks, including MATLAB.Source: C. Edge Accelerator · p. 4
  • At project kickoff, only Intel NCS2 and Google TPU were available and adequately documented.The authors’ accelerator exploration led them to continue with Intel NCS2.Source: C. Edge Accelerator · p. 4

IV. DEEP NEURAL NETWORKS

The paper examines modified LeNet-5, VGG16, and MobileNetV2 for pest-image classification, with architectures chosen to explore trade-offs among complexity, accuracy, and power.

IV. DEEP NEURAL NETWORKS

  • Modified LeNet-5 uses seven layers and reduces computation by omitting some average-pooled features from the second convolutional block.Replacing tanh with ReLU adapts it to recognizing pest-specific patterns.Source: §IV · pp. 4–5, Figure 4 · p. 5
  • VGG16 [10], uses 3×3 stride-1 convolutions and 2×2 stride-2 max-pooling, with fully connected layers classifying by shape position.The paper describes VGG16 as more complex than LeNet and as having higher potential classification accuracy.Source: §IV · p. 5, Figure 5 · p. 5
  • MobileNetV2 uses inverted residual blocks with thin bottlenecks and depthwise convolutions to build efficient mobile models.Its blocks use stride 1 or 2; shortcuts are described as enabling faster training and better accuracy.Source: §IV · p. 5, Figure 6 · p. 5
  • The three architectures were tested to select a trade-off among complexity, accuracy, and power.Source: §IV · p. 5

A. Training session

The three classifiers were trained on augmented insect-image data and evaluated on held-out images. All three generalized, with reported test precision from 98.5% to 99.5%, and the paper considers their accuracy suitable for the twice-daily detection task.

A. Training session

  • The 4,400-image dataset contained codling moth and general-insect classes, with 3,500 training images and 900 test images.The dataset was built from extracted image tiles and expanded using augmentation; the initial dataset comprised 1,100 images, 30% reserved for validation.Source: A. Training session · p. 5
  • Figure 7 shows a trap image and extracted single-insect regions used during preprocessing.Source: Figure 7 · p. 6
  • 99.5% test precision for VGG16, 99% for LeNet, and 98.5% for MobileNetV2 were reported after training.VGG16 reached the desired validation accuracy after 8 epochs; all three architectures converged near 0.99 without overfitting.Source: A. Training session · pp. 5–6

B. Validation

  • VGG16 had high precision but lower recall, meaning it missed some pests despite accurate positive predictions and a good F-measure.The authors state that a larger, more consistent training dataset might allow VGG16 and MobileNet to outperform LeNet.Source: B. Validation · p. 6
  • All three architectures generalized to new images and were considered suitable for codling-moth detection, with checks twice daily rather than weekly.The paper relates this frequency to the usual treatment threshold of two moths per week.Source: B. Validation · p. 6

C. Network Optimization and Data augmentation

The models are optimized through training-time pruning and post-training transformations intended to reduce size and speed inference while limiting accuracy loss. The evaluation describes the application cycle and shows an example of codling-moth and general-insect detections.

C. Network Optimization and Data augmentation

  • Optimization reduces model size while minimizing accuracy loss, with the aim of speeding evaluation.Training uses geometric data augmentation and iterative weight pruning; post-training optimization includes node merging, fusion, batch normalization, and dropping unused layers.Source: C. Network Optimization and Data… · pp. 6–7

V. RESULTS AND EVALUATION

  • The application checks for codling moth twice daily and cycles through image capture, preprocessing, classification, radio transmission, and shutdown.Source: §V · p. 7
  • Figure 9 marks detected codling moths with red boxes and general insects with blue boxes.Source: Figure 9 · p. 7

A. Power consumption

Power measurements across twelve configurations were used to identify energy-intensive tasks and compare platform trade-offs. Neural inference was the most energy-demanding task, while Raspberry Pi3 running LeNet was reported as the best overall trade-off.

A. Power consumption

  • The comparison considered current consumption across twelve configurations to identify software bottlenecks and select an overall system trade-off.Source: A. Power consumption · p. 7
  • The evaluated configurations paired Raspberry Pi3 or Pi4 with LeNet, MobileNet, or VGG16, with and without an NCS.Source: A. Power consumption · p. 7
  • Raspberry Pi3 running LeNet provided the best overall trade-off, while Task 3, neural inference, required the most energy.Configurations involving Raspberry Pi4 used more energy than others, attributed to its oversized CPU performance despite faster execution.Source: A. Power consumption · p. 7

B. Expected Battery Lifetime

Battery-life estimates vary with the selected platform and classifier. The reported best configuration extends operation from about two months to about three months on the single-cell battery.

B. Expected Battery Lifetime

C. Energy Harvesting and Platform Sustainability

Solar harvesting was evaluated as a means of sustaining the orchard pest-detection platform. Under the reported tests, battery level did not drop over three emulated days, and the conclusion describes unattended perpetual operation.

C. Energy Harvesting and Platform Sustainability

VI. CONCLUSIONS

  • The conclusion presents the edge-based platform, which evaluates trap images onboard, as supporting unattended perpetual operation through an integrated energy harvester.Source: §VI · p. 8
Loading 2108.00421v1…