  Pest counting, which predicts the number of pests in the early stage, is very
important because it enables rapid pest control, reduces damage to crops, and
improves productivity. In recent years, light traps have been increasingly used
to lure and photograph pests for pest counting. However, pest images have a
wide range of variability in pest appearance owing to severe occlusion, wide
pose variation, and even scale variation. This makes pest counting more
challenging. To address these issues, this study proposes a new pest counting
model referred to as multiscale and deformable attention CenterNet
(Mada-CenterNet) for internal low-resolution (LR) and high-resolution (HR)
joint feature learning. Compared with the conventional CenterNet, the proposed
Mada-CenterNet adopts a multiscale heatmap generation approach in a two-step
fashion to predict LR and HR heatmaps adaptively learned to scale variations,
that is, changes in the number of pests. In addition, to overcome the pose and
occlusion problems, a new between-hourglass skip connection based on deformable
and multiscale attention is designed to ensure internal LR and HR joint feature
learning and incorporate geometric deformation, thereby resulting in an
improved pest counting accuracy. Through experiments, the proposed
Mada-CenterNet is verified to generate the HR heatmap more accurately and
improve pest counting accuracy owing to multiscale heatmap generation, joint
internal feature learning, and deformable and multiscale attention. In
addition, the proposed model is confirmed to be effective in overcoming severe
occlusions and variations in pose and scale. The experimental results show that
the proposed model outperforms state-of-the-art crowd counting and object
detection models.
