1 Introduction
Dengue has become one of the leading arboviruses in terms of morbidity and socioeconomic impact, affecting millions of people annually in tropical and subtropical regions [1]. Factors such as disorderly urbanization, inadequate sanitation, increased population movement and climate change favor the proliferation of Aedes aegypti, the primary vector of dengue, zika and chikungunya [1,2]. In Brazil, the epidemiological situation has become especially critical in recent years, with approximately 6.45 million notified cases in 2024 and sustained high transmission in 2025, reinforcing the need for more agile and sensitive surveillance strategies [3-5].
Among the strategies used for vector monitoring, ovitraps stand out for their sensitivity, low cost and ability to detect the presence of the mosquito even in areas with low population density [6]. These traps use containers with water and suitable surfaces for egg deposition, such as wooden agglomerated paddles (Eucatex®) or filter papers, making it possible to identify areas with the highest infestation rates, guide control strategies and monitor the effectiveness of the measures implemented. In addition, ovitraps are recommended for the entomological monitoring of new technologies for controlling the Ae. aegypti mosquito, such as Larvicide Disseminating Stations (LDS), mosquitoes with Wolbachia and irradiated sterile mosquitoes, as recommended by the Brazilian Ministry of Health [6]. However, although ovitrap collection is an established entomological surveillance tool, the subsequent sample analysis step still represents a substantial operational bottleneck.
Currently, egg counting is frequently performed manually, requiring specialized technicians to use microscopes or magnifying glasses to identify tiny structures with dimensions on the order of hundreds of micrometers and an approximate area of 0.065 mm² [7]. It is estimated that analyzing a single paddle requires approximately 15 minutes of concentrated human effort [7]. In municipal-scale monitoring networks, where hundreds or thousands of traps may be collected periodically, this process becomes time-consuming, costly and susceptible to inter-rater variability. Furthermore, visual fatigue, the presence of debris, fungi and noise in the samples can hinder egg identification and compromise the standardization of counting [7,8].
In recent years, digital technologies have been incorporated into dengue surveillance and control efforts, particularly to improve recording, mapping and response to vector breeding sites. Initiatives such as Conta Ovos/Mosqlimate, AeTrapp and UDI Sem Dengue illustrate this trend by exploring, respectively, georeferenced ovitrap registration, collaborative mapping and reporting of potential breeding sites to support entomological surveillance [9-11]. These tools expand data collection, organization and visualization capabilities, but primarily address information management, without fully resolving the bottleneck of visual analysis and automated egg counting.
In this context, deep learning-based computer vision methods become particularly relevant, as they enable detection, segmentation and counting of small objects in digital images. Convolutional neural networks have been widely applied to object detection and instance segmentation tasks, forming the basis of several advanced image processing models [12]. In the literature, solutions have already been proposed for automated counting of Aedes aegypti eggs using low-cost equipment [13], as well as on filter papers using the Mask R-CNN architecture for automatic segmentation and counting in images digitized with common equipment [14,15]. Recent solutions, such as Col-Ovo, further reinforce this trend by applying artificial intelligence to smartphone-captured images to perform rapid counts under field conditions, with high agreement with expert counts [7].
The present work contributes to this line of innovation by integrating computer vision and artificial intelligence models into the Contador de Ovos web application (https://contaovos.sisvetor.sds.unb.br) aimed at automatic counting of Aedes aegypti eggs in images of filter papers and ovitrap paddles. The proposal combines simplified image acquisition, automatic processing and presentation of results to the user, reducing dependence on specialized manual procedures. Thus, this work aims to present and evaluate an artificial intelligence-based web application to support entomological dengue surveillance through automated egg counting, offering an accessible, fast and potentially scalable alternative to support epidemiological decision-making.
2 Web Application
The development of the Contador de Ovos web application (https://contaovos.sisvetor.sds.unb.br) resulted in a technological solution capable of automating egg counting from filter papers and ovitrap paddles (Figure 1), directly addressing the need to reduce manual counting time and to minimize the user learning curve and reduce operational errors in the field and in the laboratory, allowing the user to capture or upload a photo of the trap and receive the automatic egg count within seconds (Figure 2).
2.1 Operation
The operation of the web application comprises the following steps:
- User submits a photo of the filter paper or paddle containing mosquito eggs and requests the egg count;
- The application verifies whether the format and size are appropriate;
- The photo is pre-processed;
- The artificial intelligence model identifies and counts the eggs;
- The user receives the total count and an annotated version of the image, indicating the detected eggs and the confidence level for each one.
2.1 Solution Architecture and Technologies
The solution architecture integrates computer vision and artificial intelligence modules, a web application and a database for image processing. The solution was built using a client-server model, aiming to facilitate the scalability and maintenance of the system, and includes the following components:
- Frontend: Developed on the Web platform using the React framework to operate as a Single Page Application. The interface prioritizes accessibility, using WAI-ARIA attributes for screen readers and an interactive tutorial for new users.
- Backend: A Node.js Web Service API manages RESTful requests and business logic, while the image processing and inference module runs within the artificial intelligence component.
- Artificial Intelligence: The Hybrid Task Cascade (HTC) model from the MMDetection library, trained on images of filter papers and ovitrap paddles, performs the image analysis.
- Database: Data persistence is handled by a PostgreSQL relational database. The data structure organizes information into entities such as Traps, Counts and Registered Users.
The flow begins when the user submits an image for analysis, which is sent to the API. The backend then executes a processing pipeline comprising pre-processing, inference by the artificial intelligence model and post-processing of detections. The API returns results to the frontend in JSON (JavaScript Object Notation) format, including the total count and annotated images in base64, along with detection coordinates and confidence levels. To save or download the processed image, the analysis must be registered with an associated location, defined manually or obtained automatically through the device’s GPS coordinates.
3 Methods
The method was organized into five main steps: dataset construction, image annotation, tiling-based pre-processing and data augmentation, training of artificial intelligence models and quantitative evaluation of results.
The dataset was built by the authors and comprised annotated images of filter papers and ovitrap paddles. Filter papers were provided by the Sala de Situação de Saúde of Faculdade de Ciências da Saúde at Universidade de Brasília, while ovitrap paddles were supplied by the Secretaria de Estado de Saúde of Distrito Federal. In total, the dataset included 68 filter papers (58 for training, 10 for validation) and 79 wooden paddles (71 for training, 8 for validation). Filter papers were scanned at 1,200 dpi using an EPSON L3250 multifunction printer, while ovitrap paddles were photographed using an iPhone 16 Pro smartphone in the standard automatic mode, with the macro camera automatically activated due to the short shooting distance. For ovitrap paddle image capture, Ulanzi i-Light sources were positioned laterally to provide more uniform illumination during acquisition.
Annotations were performed manually by the authors using LabelMe software [16], by drawing polygons around each visible egg. The annotations were then converted to COCO format, widely used in object detection and instance segmentation tasks. In total, 10,605 annotations were made on ovitrap paddle images and 1,744 on filter paper images. Although the number of annotations was higher for ovitrap paddles, both sets present quite distinct visual characteristics: filter papers presented more uniform illumination and greater contrast between the white background and the dark eggs, whereas ovitrap paddles presented a fibrous background, lower foreground-background contrast, high egg density, focal variations due to smartphone acquisition and greater visual noise.
Given the visual complexity of the ovitrap paddles and the need to segment small objects, the architecture chosen for the task was HTC. This architecture combines elements of Mask R-CNN, used in instance segmentation tasks, with the progressive refinement of Cascade R-CNN, where successive stages make detection increasingly demanding through growing intersection-over-union (IoU) thresholds. In addition, HTC incorporates a parallel semantic branch responsible for providing background contextual information to the refinement stages. This combination makes the architecture suitable for scenarios with small objects, high instance density and visually complex backgrounds.
The implementation was carried out using the MMDetection library, keeping most of the original architecture parameters and modifying only specific hyperparameters for each image type. Both models used a ResNet50 backbone, AdamW optimizer, learning rate of 5×10−5, Cosine Annealing scheduler and 60 training epochs. For ovitrap paddles, anchor sizes of [2, 4, 8], images of 1000×1000 pixels, batch size of 2 and gradient accumulation of 4 were used. For filter papers, anchor sizes of [1, 2, 4], images of 720×720 pixels, batch size of 8 and gradient accumulation of 1 were used. Smaller anchors were necessary due to the reduced size of the eggs, since detection architectures are frequently optimized for medium- and large-sized objects, whereas this work deals with objects of an approximate maximum area of 78 pixels.
To preserve visual information about the eggs and reduce GPU memory consumption, tiling was employed, in which original images were divided into smaller sub-regions. This strategy avoids the detail loss caused by simply downscaling the entire image, particularly given the small size of the eggs and the importance of preserving their spatial definition. After tiling, the dataset expanded to 1,892 sub-images for filter papers and 694 sub-images for ovitrap paddles. In the filter paper set, a balance between sub-images with and without eggs was sought, to prevent the network from being biased by an excess of negative examples, given the sparser nature of this image type.
To increase training set diversity and reduce the risk of overfitting, offline and online data augmentation techniques were applied. Offline augmentations were materialized as new images in the dataset and included horizontal flipping, vertical flipping, rotation, shifting, scaling, brightness and contrast changes, hue, saturation and value modifications, gamma adjustment and contrast-limited adaptive histogram equalization (CLAHE). After this process, the expanded dataset comprised 2,645 images for filter papers and 1,842 images for paddles. Additionally, during training, online augmentations consisting of horizontal and vertical flips, random cropping and multi-scale transformations were applied to continue providing variations to the network at each epoch and reduce memorization of training set patterns.
Model evaluation was performed using precision, recall, F1-score and mean average precision metrics. Precision was defined as Pr = VP/(VP + FP), sensitivity as S = VP/(VP + FN) and F1-score as F1 = 2PrS/(Pr + S), where VP represents true positives, FP the false positives and FN false negatives. Mean average precision was used to evaluate model performance along the precision-recall curve, considering the detection thresholds adopted for the task. The mean IoU of the masks displays the average percentage of intersection between the actual annotations and the machine’s predictions with respect to the masks. In the reported results, metrics were calculated considering matches between predictions and ground truth annotations with IoU greater than 0.5.
Model training was performed on the Google Colab platform, using an L4 Tensor Core GPU with 24 GB of GPU memory and 64 GB of system RAM. Training time ranged from 14 to 16 hours for experiments with resized images and approximately 6 hours for tiling-based experiments.
4 Results And Discussion
The evaluation metric results for the ovitrap paddles are presented in Table 1, where the results show that tiling resolution influenced model performance, especially recall and F1-score. The distinction between micro and macro metrics lies in their calculation method: in micro calculation, all egg instances across the entire validation set are used, whereas in macro calculation, an average of the per-image metrics is computed over the full set. Therefore, the micro calculation reflects the network’s behavior in detecting the object of study, while the macro calculation shows how it performs per image, given that some images may have a more complex inference than others.
In contrast, Table 2 shows the results for filter papers. As expected, ovitrap paddles yielded lower metric results than filter papers. Thus, for comparison purposes, a new Roboflow model called RF-DETR [17] was tested. RF-DETR is a recent DETR-style architecture for real-time object detection, using transformer-based components [18] and pretrained visual backbones. It has been reported to achieve competitive results on COCO-style detection benchmarks. Table 3 compares the best HTC configuration with two RF-DETR models using standard configurations.
As seen in Table 1, tiling consistently maintained performance at levels superior to simple full-image resizing, particularly in recall and F1 metrics. Although the configuration without tiling achieved the highest micro precision (0.8138), its recall was substantially lower (0.5102), resulting in a substantial drop in F1-score (0.6272). Among tiling configurations, the 1000×1000 pixels resolution achieved the best micro F1-score (0.8196), while the 720×720 pixels resolution obtained the highest micro mean average precision (0.8049). In macro calculation, the 840×840 pixels resolution yielded the best mean F1 (0.8225), suggesting greater balance between overall and per-image performance.
Table 2 presents the results for filter papers. In this set, metrics were consistently higher than those obtained for ovitrap paddles, which is consistent with the more favorable visual characteristics of the material: light background, uniform illumination, greater contrast between eggs and background and lower structural complexity. The 720×720 pixels resolution achieved the best overall performance, with micro precision of 0.9302, micro recall of 0.9804, micro F1-score of 0.9547 and micro mean average precision of 0.9717. These results indicate that the model was capable of performing egg segmentation and counting with high robustness on this type of substrate. It was also noted that the HTC semantic stage became saturated and redundant information introduced a slight detriment to the network, contributing to overfitting by memorizing certain patterns instead of others.
In comparison with our previous results [15], an important improvement in performance for filter papers is observed. In that study, the initial evaluation with 70 training images yielded a mean F1 of 0.8011 in pixel-by-pixel analysis, while the subsequent count-based evaluation with spatial accuracy, considering IoU ≥ 0.3, reached an F1 of ≥ 0.8359 [15]. In the present work, the best result for filter papers achieved a micro F1-score of 0.9547 and micro mean average precision of 0.9717, considering matches with IoU > 0.5. Although precision, recall and F1 are common metrics to both studies, the evaluation protocols differ in terms of analysis unit and IoU threshold, so the comparison should be interpreted as indicative of methodological progress rather than direct equivalence.
From Table 3, it can be seen that the model relying solely on object detection outperformed the HTC architecture by 0.0089 in F1-score. Because the largest segmentation-capable RF-DETR configuration exceeded the available GPU memory, only the smaller segmentation model RF-DETR-Seg (Large) was used for comparison. This segmentation model provided a slightly worse result than HTC predictions. This indicates that the HTC architecture achieves equivalent results to even more recent and capable state-of-the-art models for this problem, while being computationally lightweight.
Finally, it is important to point out some limitations of this study. First, the number of original images was limited, especially considering the visual variability expected in field conditions. Second, the evaluation was performed on images acquired under controlled or semi-controlled conditions, and external validation with images collected by different users, devices and lighting conditions is still required. Third, although the system provides automatic counts, its agreement with routine manual counting by multiple experts was not evaluated in an operational setting.
5 Conclusions
In this work, an alternative to manual counting of Ae. aegypti eggs was presented through an artificial intelligence-based web application designed to analyze images of filter papers and ovitrap paddles. The proposed solution integrates computer vision modules, a web application and a database, allowing users to submit an image and automatically receive the estimated egg count, together with an annotated version of the analyzed image. Thus, the system aims to reduce reliance on time-consuming manual procedures and to improve the accessibility of entomological surveillance tools.
The results indicate high performance for filter papers, with a micro F1-score above 95%, demonstrating the robustness of the approach in images with higher contrast, uniform illumination and lower visual complexity. For ovitrap paddles, an F1-score of approximately 82% was observed. Although lower than the performance obtained for filter papers, this result remains promising considering the fibrous background, low contrast, high egg density, focus variations and greater visual noise associated with smartphone acquisition. These findings suggest that automated egg counting may be feasible even under more challenging imaging conditions.
Compared with more recent detection architectures, the RF-DETR model without segmentation showed slightly higher F1 performance than HTC for ovitrap paddles, with a difference of 0.0089. However, HTC maintained competitive performance while also providing instance segmentation, which is relevant for visualizing detected eggs and supporting user interpretation of the results. Therefore, the choice of architecture should consider not only detection metrics, but also the balance among performance, computational cost, segmentation capability and ease of integration into the application.
As future work, the image dataset should be expanded, especially for ovitrap paddles, to increase visual variability and improve model generalization. The replacement or complementation of the HTC-based detector with more recent state-of-the-art detectors available, like RF-DETR, should also be evaluated, particularly models designed for efficient detection of small objects in complex images. In addition, future versions of the application should include field validation with real users, response time analysis in operational environments, direct comparison with expert manual counts, automated integration of egg density indices, egg trap positivity and vector density indicators, as well as interface refinement for use by health agents and epidemiological surveillance teams.