Aedes Science Gateway: A Machine-learning Based Mosquito Egg Counting System Lawrence Miao Department of Computer Science Rensselaer Polytechnic Institute Troy, NY USA miaol2@rpi.edu Adam Frederiksen Department of Computer Science University of South Carolina Columbia, SC USA apf1@email.sc.edu David Reddy Research Computing University of South Carolina Columbia, SC USA reddydp@mailbox.sc.edu Bob Doran Research Computing University of South Carolina Columbia, SC USA rdoran@mailbox.sc.edu Sarah Gunter Pediatrics-Tropical Medicine Baylor College of Medicine Houston, TX USA Sarah.Gunter@bcm.edu Melissa Nolan Public Health University of South Carolina Columbia, SC USA msnolan@mailbox.sc.edu Abstract Each year, approximately 400 million people are infected with an arboviral disease from the bite of an Aedes mosquito. Scientists have been using mosquito traps that allow for high throughput identification and counting of Aedes mosquito eggs for decision-making on insecticide spraying and abatement. Aedes project is an effort to automatically count the eggs in the trap paper images by computer vision and machine learning techniques. Such a task can be very challenging due to debris on paper, congested egg clusters, etc. To address these challenges, we developed a new method that can automatically and efficiently run in a light environment, e.g., a mobile phone. Specifically, given an egg paper image, we first apply adaptive thresholding to convert it to a binary image. Then egg contours are extracted, followed by patch cropping over each closed contour. These patches serve as the inputs to a new convolutional neural network (CNN) [1] based classifier. The CNN consists of a series of convolutional layers, ReLU layers, and max-pooling layers, followed by two fully connected layers. We classify the patches as single eggs, egg clusters, and debris. The final count is determined by the number of single egg patches and the number of eggs in each cluster. The number of eggs in a cluster is estimated by the area of the egg cluster dividing by that of the average single egg. We divide the patch set into 1440 in training and 160 in testing with augmentation. The classifier is trained using CrossEntropyLoss, Adam optimizer with the base learning rate as 15-4, and 20 epochs. We achieve 92% accuracy in testing, 1% lower than ResNet50 [2]. However, our model takes < 1 second to process one image on CPU, 100 times faster than ResNet50. Building as a science gateway, Aedes mainly consists of a web portal that allows scientists to study the eggs collaboratively online and a backend process that uses the developed DL model to batch process the egg counting. The web portal is implemented in React.js, Java Spring Boot, Postgre SQL, OpenCV.js, and ONNX.js. The backend service is implemented in Pytorch. The science gateway is supported by Jetstream 2 cluster. REFERENCES [1] A. Krizhevsky, I. Sutskever, and G. E. Hinton. Imagenet classification with deep convolutional neural networks. NIPS, pg1097–1105, 2012. [2] K. He, X. Zhang, S. Ren, and J. Sun. Deep residual learning for image recognition. arXiv preprint arXiv:1512.03385,2015. Presented at Gateways 2022, San Diego, USA, October 18–20, 2022. https://zenodo.org/communities/gateways2022/?page=1size=20