Abstract
Vector mosquito bites can significantly impact quality of life, pose health risks, and even lead to death. Different mosquito species can transmit various diseases, and their blood-sucking behavior varies by sex. Therefore, accurately identifying mosquito species and gender in a given area is crucial for epidemic prevention. This study aimed to develop an image processing and artificial intelligence (AI) system to accurately identify mosquito species and gender using mosquito images. An image dataset consisting of 12,552, 17,152, and 9853 images, captured against white, yellow sticky, and blue sticky paper backgrounds, respectively, and covering eight mosquito species, was employed to develop an advanced identification system. This system integrates image processing methods, YOLO-V3 models for segmenting individual mosquito images, and Inception-V4 models for identifying mosquito species and determining their gender. The proposed models achieved impressive accuracy rates of 0.9806, 0.9888, and 0.9899 for species identification, and 0.8741, 0.9173, and 0.9241 for gender identification, corresponding to the white, yellow sticky, and blue sticky paper backgrounds, respectively. Overall, our system demonstrates a high level of accuracy in identifying both mosquito species and gender.
Keywords
INTRODUCTION
Mosquito bites adversely impact the health and quality of life of both humans and animals, including livestock, and can even result in death (Tsai et al., 2018). In dairy cows, mosquito bites can cause stunted growth, weight loss, and decreased milk production, leading to commercial losses. The diseases transmitted by mosquitoes vary across species. For instance, dengue is a rapidly spreading viral disease carried by Aedes mosquitoes, infecting approximately 390 million people annually (Yuan et al., 2019). Notably, only female mosquitoes feed on blood and transmit diseases. Consequently, data on the density, species, and sex of vector mosquitoes are essential for implementing effective preventive measures against mosquito-borne diseases.
Previous studies have employed various techniques to analyze mosquito characteristics for species identification. These methods include mass spectrometry (Yssouf et al., 2014; Nebbak et al., 2016; Raharimalala et al., 2017; Rakotonirina et al., 2020), DNA barcoding (Chan et al., 2014; Mechai et al., 2021), mosquito structure analysis (Yadav et al., 2014), wing geometric morphometrics (Benalcázar et al., 2018; de Souza et al., 2020), decision tree models using wingbeat sound analysis (Krishnaveni et al., 2022), and techniques for analyzing wingbeat frequency (Potamitis, 2014; De Nadai et al., 2021; Kim et al., 2021; Paim et al., 2023), among others. While some studies have reported high accuracy in species identification, challenges persist, including low time efficiency, high costs, difficulties in automation, reliance on specialized equipment, and complex procedures.
Additionally, a dual-wavelength polarization-sensitive optical system was developed to identify mosquito species and gender through backscattered optical signals and machine learning (ML) models (Genoud et al., 2020). However, challenges such as low mosquito capture efficiency, limited multi-mosquito sensing capability, and a narrow range of identifiable species may affect the system’s performance.
Furthermore, several mosquito surveillance models have been reported to support future decision-making within health organizations in combating mosquito-borne diseases. These include a model utilizing satellite imagery of urban areas, ovitrap data, landscape metrics, and k-means clustering (Gonzalez et al., 2023); an artificial neural network (ANN) model for predicting mosquito abundance in urban environments (Lee et al., 2016); and a mosquito egg counter based on ovitrap images (Hamesse et al., 2023). Additionally, different sticky plates were used to capture pests or insects, with images taken for species identification (Xia et al., 2015; Wang et al., 2022; Kalfas et al., 2023). The mosquito surveillance and ANN models (Lee et al., 2016; Gonzalez et al., 2023) offer mosquito data across large regions, while mosquito egg counters (Hamesse et al., 2023) and pest identification models using sticky plate images (Xia et al., 2015; Wang et al., 2022; Kalfas et al., 2023) provide localized information at specific sites.
Moreover, ML approaches have played a crucial role in mosquito control within urban areas. A review of approximately 120 papers on ML applications for mosquito control across various environmental contexts categorized them into three main types: geospatial, visual-, and audio-based approaches (Joshi and Miller, 2021).
In this study, we developed an AI-based system, integrated with image processing techniques, to accurately determine the number, species, and gender of mosquitoes from images. Unlike other identification systems, ours does not require a microscope, high-resolution camera, or fluorescence imaging. It also avoids the time-consuming process of capturing a single mosquito per image or relying on complex procedures, allowing it to sample images and operate in general environments. These limitations have been noted in previous studies (Goodwin et al., 2021; Kittichai et al., 2021; Ong et al., 2021; Zhao et al., 2022; Lee et al., 2023). The latest advancements in AI-based mosquito species identification (Goodwin et al., 2021; Kittichai et al., 2021; Ong et al., 2021; Siddiqua et al., 2021; Asgari et al., 2022; Khalighifar et al., 2022; Zhao et al., 2022; Lee et al., 2023) are discussed in Section 4 Discussion. Our proposed system offers high accuracy, cost-effectiveness, time efficiency, and paves the way toward automation.
MATERIALS AND METHODS
In this study, we developed an AI-based system to identify the number, species, and gender of mosquitoes from images. The system integrates deep learning models—a key branch of AI—with image processing techniques, such as color space transformations, contrast enhancement, image resizing, and dilation, to enhance identification performance. Two deep learning models, YOLO V3 and Inception V4, were implemented as core AI modules to support accurate mosquito identification.
Image dataset
The following sections provide an overview of the image datasets used in this study.
Raw image dataset
Samples of mosquitoes and fly pests were collected from livestock farms using trapping devices provided by the Department of Entomology at National Chung Hsing University, Taichung, Taiwan. After collection, the specimens were transported to the laboratory for image acquisition.
All images in this study were acquired in a controlled indoor laboratory environment using a commercial digital single-lens reflex (DSLR) camera (Nikon D7000) mounted on a fixed tripod to ensure consistent imaging geometry. The detailed specifications of the Nikon D7000 are available on the Wikipedia website (https://en.wikipedia.org/wiki/Nikon_D7000). The camera is equipped with a 16.2-megapixel CMOS sensor (APS-C format) and an autofocus system with 39 focus points, enabling stable image acquisition with sufficient spatial resolution for mosquito identification and counting. During image acquisition, the camera was equipped with a macro lens (AF-S Micro-Nikkor 60 mm 1:2.8G ED, 60 mm focal length) to obtain clear close-up images of mosquitoes attached to sticky paper sheets. Images were captured at a resolution of 2464 × 1632 pixels, with the approximate distance between the camera lens and the sticky paper containing mosquito specimens maintained at around 20–30 cm. The camera-to-background sheet distance and shooting angle were kept as consistent as possible throughout image acquisition, and images were primarily captured from a top-down orientation to clearly reveal mosquito body structures. The acquisition process focused on ensuring sufficient image clarity and appropriate mosquito size in the captured images, as illustrated in Figures 1, 5,7, 8, and 9 of the article.

Labeling examples:
Images were captured under standard indoor fluorescent laboratory lighting without the use of specialized light sources or flash equipment. Fixed-position light sources were arranged to reduce shadows and maintain relatively uniform illumination across samples. Minor specular reflection artifacts arising from differences in sticky background sheet materials were unavoidable in some images. To ensure image quality, all captured images were visually inspected to confirm sufficient clarity and uniform brightness before being used for subsequent analysis.
Specimens were placed on white paper sheets or sticky trap surfaces before imaging. The raw image dataset includes mosquitoes and fly pests collected using yellow sticky traps, which are commonly employed in greenhouses, flower-growing areas, and food-processing plants, as well as blue sticky traps, typically used for monitoring and controlling thrips in horticultural crops. The dataset comprises four pest categories: Culicidae, Ceratopogonidae, large Muscidae, and small Muscidae.
Based on the raw image dataset, mosquito images were further organized to construct a dedicated mosquito image dataset for species-level analysis. Images were collected against three background types: white paper sheets, yellow sticky traps, and blue sticky traps. A total of 12,552, 17,152, and 9853 images were obtained from 869 white paper sheets, 1081 yellow sticky traps, and 938 blue sticky traps, respectively.
The dataset includes images of mosquitoes from eight species: Anopheles sinensis (An.S), Culex quinquefasciatus (Cu.Q), Culex molestus (Cu.M), Chironomus formosae (Ch.F), Culex tritaeniorhynchus (Cu.T), Armigeres subalbatus (Ar.S), Aedes albopictus (Ae.Al), and Aedes aegypti (Ae.Ae). For each background type, 80% of the images were used for model training with 10-fold cross-validation, while the remaining 20% were reserved for independent testing. The numbers of mosquitoes used for training and testing under the three background colors are summarized in Table 1, while the detailed distributions by species and sex are presented in Table 2.
Numbers of Mosquitoes Used for Training and Testing under Three Background Colors
Numbers of Mosquitoes Used for Training and Testing under Three Background Colors
Detailed Numbers of Female and Male Mosquitoes from Eight Species across Training and Testing Sets under Three Background Colors
Mosquito species in this study were identified using established morphological keys and authoritative taxonomic references commonly used in medical entomology. The identification process followed standard mosquito identification manuals and pictorial keys, including (Rueda, 2004; Snow, 2015; Webb et al., 2016; Becker et al., 2020; WHO, 2020; Wilkerson and Linton, 2021). In addition, classical taxonomic monographs and catalogues were consulted to support genus- and species-level identification, including (Bram, 1967; Delfinado, 1968; Huang, 1972; Knight and Stone, 1977). Regional identification references specific to Taiwan were also used, including (Lian, 2004), the mosquito identification handbook published by the National Health Research Institutes (NHRI, 2016), and educational materials from the National Mosquito-borne Diseases Control Research Center (NHRI, 2020). Taxonomic information and species verification were further cross-checked using the Taiwan Biodiversity Network database maintained by the Taiwan Biodiversity Research Institute (TBRI, 2026).
Species determination was based on diagnostic morphological characters commonly used in Culicidae taxonomy. These included scutal pattern and scaling, leg banding patterns, abdominal tergite scaling, wing venation and scaling characteristics, and the relative length of the proboscis and maxillary palpi. For example, Aedes albopictus was identified by the characteristic single longitudinal white stripe on the scutum and black-and-white banded legs, whereas Aedes aegypti shows the distinctive lyre-shaped white markings on the scutum. Species of the genus Culex (e.g., Culex quinquefasciatus, Culex molestus, and Culex tritaeniorhynchus) were identified based on the absence of prominent scutal ornamentation, the presence of pale basal abdominal bands, and typical Culex wing scaling patterns. Anopheles sinensis was recognized by its spotted wing pattern and maxillary palpi approximately equal in length to the proboscis. Additional diagnostic morphological details are omitted here for brevity and can be found in the cited taxonomic references.
All specimens were examined according to morphological criteria, and species labels were assigned only when diagnostic characters were clearly observable. The identification procedure followed dichotomous and pictorial keys described in the above references to ensure taxonomic consistency and accuracy. The final species annotations were therefore determined through expert-validated morphological identification, which served as the ground truth labels for training and evaluating the ML models in this study.
Image annotation
Multiple mosquito species (family Culicidae) and fly pests (including Ceratopogonidae, large Muscidae, and small Muscidae) may simultaneously appear on the same sticky trap sheet or white background paper. To ensure annotation consistency and labeling accuracy, the three categories of fly pests and the eight target mosquito species were individually annotated using the LabelImg tool with their corresponding species labels.
Species identification of both mosquitoes and fly pests was performed by entomology experts from Professor Tu’s team in the Department of Entomology, National Chung Hsing University, Taichung, Taiwan, in collaboration with specialists from Yao-Chi Pest Control Operation Limited Company, Taichung, Taiwan. Ground-truth labels were established through microscopic examination and detailed morphological assessment, and the verified identifications were subsequently annotated in LabelImg, as illustrated in Figure 1. For presentation convenience, informal abbreviations (e.g., species shorthand shown in black text) are used in Figure 1a and b. In this study, only eight mosquito species belonging to the family Culicidae were included for mosquito identification. As an example, the labeling results for Aedes aegypti (Ae.Ae) are shown in Figure 1a and b. In addition, gender labels were provided for seven of the eight mosquito species for subsequent gender identification.
Prior to YOLO V3 training, mosquito and fly pest targets were manually annotated by specifying their bounding-box coordinates and class labels. During annotation, each object was stored in the standard YOLO V3 format, including the object class index, the normalized x- and y-coordinates of the bounding-box center, and the normalized width and height of the bounding box relative to the full image dimensions, as illustrated in Figure 1c.
System architecture and design methods
Figures 2 and 3 illustrate the system architectures for identifying mosquito species and gender. The system consists of three main components: mosquito image segmentation, species identification, and gender identification. Although the overall architectures are similar, the preprocessing techniques vary depending on the background type (white paper, yellow sticky traps, or blue sticky traps) used for the mosquito images. These components are detailed in the following subsections.

The identification of individual mosquitoes, mosquito species, and mosquito gender on white paper sheets.

The identification of individual mosquitoes, mosquito species, and mosquito gender on yellow or blue sticky paper traps.
The proposed identification system, integrating image processing and AI capabilities, was developed in Python on Windows 10 Pro. It was executed on a machine equipped with an Intel i7-8700K CPU, 24 GB of RAM, and an Nvidia GTX-1080-Ti GPU with 11 GB of memory. The codes relevant to this study are available at: https://github.com/RaxWu/Mosquito-Codes. The dataset will be available upon reasonable request, subject to the confidentiality agreement.
To obtain single mosquito images for species and gender identification (Sections 2.2.2 and 2.2.3), YOLO V3 was employed to segment mosquitoes or pests from RGB images with white paper backgrounds after resizing the images (white blocks, Fig. 2). In addition, a custom Python-based software program was integrated into the post-segmentation stage for automatic mosquito counting in the segmented images.
For images captured on yellow or blue sticky paper (Fig. 3), an HSV r transformation (or led by image dilation) was applied to the RGB images prior to resizing. After this transformation, the remaining steps for single-mosquito detection followed the same procedures described above. The detailed methods for single-mosquito detection are outlined in the following section.
HSVr transformation
The HSV color space (Kang et al., 2021) consists of three components: H (hue), S (saturation), and V (value). The H component represents the color type, with values ranging from 0° to 360°. The S component indicates the purity of the color, ranging from 0% to 100% (or 0 to 1). The V component corresponds to the brightness, also ranging from 0% to 100% (or 0 to 1). Eqs. (1)–(3) are used to convert the red (R), green (G), and blue (B) components from the RGB color space into the H, S, and V components of the HSV space.
In HSV
r
transformation, the
The structural differences between male and female mosquitoes are primarily reflected in the morphological features of the antennae, with additional supportive cues from the mouthparts and abdominal size. To enhance the visibility of these features for sex determination, image dilation was applied. As a widely used morphological operation, 8-bit grayscale dilation enhances image structures by computing a numerical maximum over a local neighborhood of gray-level intensities (Wisaeng, 2023; Wikipedia, 2025). For a grayscale image
To enhance the accuracy of mosquito gender identification (Section 2.2.3) on yellow or blue sticky paper, image dilation followed by HSV r transformation was applied prior to detecting individual mosquitoes from RGB images (Fig. 3). In contrast, these two techniques were employed after individual mosquito detection using the YOLO V3 model (Fig. 2) and before gender identification with the Inception V4 model (Section 2.2.3) for mosquitoes on white paper.
The images were resized to a resolution of 512 × 512 pixels to serve as input for the YOLO V3 model.
Mosquito and pest detection using the YOLO V3 model
Deep learning models for object detection include the region-based convolutional neural network (R-CNN) (Girshick et al., 2014), Fast R-CNN (Girshick, 2015), Faster R-CNN (Ren et al., 2017), Single Shot Detector (Liu et al., 2016), and You Only Look Once (YOLO) (Redmon et al., 2016; Sultana et al., 2020), among others. Notably, YOLO V3 (Redmon and Farhadi, 2018) generates bounding boxes for detected objects, providing both position coordinates and confidence scores (CS). YOLO V3 is particularly effective at detecting small objects, thanks to its use of a Feature Pyramid Network (Lin et al., 2017), which improves detection accuracy for smaller objects. Given that mosquitoes and fly pests are small and challenging to detect, this study utilized YOLO V3 to identify mosquitoes and fly pests in images containing four specific types: Culicidae, Ceratopogonidae, Large Muscidae, and Small Muscidae. The detected mosquitoes were then counted, and individual mosquito images were segmented to serve as input for subsequent identification of species and gender (as detailed in Sections 2.2.2 and 2.2.3).
YOLO V3 divides input images into an
YOLO V3 is a fully connected CNN. In our implementation, the model comprises 107 layers, including 75 convolutional layers, 23 residual block layers, 2 upsampling layers, 3 YOLO layers, and 4 route layers. It begins with a three-channel 512 × 512 input at layer 0 and concludes with a 27-channel YOLO layer at layer 106. The 27 output channels are derived from
Class probabilities were multiplied by their corresponding CSs to obtain class-specific CSs for each box.
Precision and recall are calculated as:
Accuracy (ACC) is defined as the ratio of correctly detected objects to the total number of ground truth objects.
In this study, four types of mosquito and fly pests were identified using YOLO V3, and the quantity of each type was calculated. Subsequently, individual mosquito images were segmented to develop models for species and sex identification.
Mosquito species identification
Models based on Inception V4 were employed to identify mosquito species. As illustrated by the green blocks in Figure 2, the GYS′ transformation of individual mosquito images (extracted using a YOLO V3-based model, as described in Section 2.2.1), image resizing, and the Inception V4 model were sequentially applied to identify mosquito species on white paper backgrounds.
As indicated by the green blocks in Figure 3, the HSV r transformation of mosquito RGB images (captured against yellow or blue sticky paper, prior to YOLO V3-based single mosquito detection), image resizing, and the Inception V4 model were sequentially applied to identify mosquito species on yellow or blue sticky paper.
GYS’ transformation
To highlight the distinct differences in body structure, color texture, and wing scales among various mosquito species on white paper sheets, GYS′ color space transformation was applied to convert RGB images of individual mosquitoes into GYS′ images. The procedure for the GYS′ transformation is shown in Figure 4. Eqs. (13), (2), and (14) were used to compute the Y (luminance), S (saturation), and S′ (scaled saturation) components, respectively.

The GYS’ color space transformation.
Here,
Individual mosquito images were resized to a resolution of 299 × 299 pixels for input into the Inception V4 model.
Mosquito species identification using inception V4
Several deep learning models, such as AlexNet (Krizhevsky et al., 2012; Li et al., 2022), VGGNet (Simonyan and Zisserman, 2014), GoogLeNet (Szegedy et al., 2015; Ali et al., 2022; Yang et al., 2023), and ResNet (He et al., 2016; Showkat and Qureshi, 2022; Wu et al., 2023), have been employed for object image classification. Inception V4 (Szegedy et al., 2017; Chen et al., 2022; Li et al., 2022), regarded as the fourth-generation architecture of the GoogLeNet Inception series, achieves high accuracy with a single prediction. By utilizing a sparsely connected architecture instead of fully connected layers, the Inception network delivers more precise identification results without increasing computational cost, leveraging the efficiency of its inception modules (Szegedy et al., 2017; Chen et al., 2022). In this study, a streamlined Inception V4 model was developed, comprising one stem module, three inception modules, two reduction blocks, an average pooling layer, and a softmax classifier (Szegedy et al., 2017; Chen et al., 2022). The model predicts one of eight mosquito species classes, as described in Section 2.1.2.
Mosquito gender identification
As shown by the pink blocks in Figure 2, image dilation, HSV r transformation, and image resizing were sequentially applied to individual mosquito images (detected using YOLOv3) before utilizing the Inception V4 model to identify mosquito sex on white paper sheets. Similarly, as indicated by the pink blocks in Figure 3, image dilation followed by HSV r transformation on the RGB images of mosquitoes (captured on yellow or blue sticky paper, prior to YOLO V3 detection) and subsequent image resizing were performed before using the Inception V4 model to determine mosquito sex on sticky paper. Section 2.2.1 details the techniques for image dilation and HSV r transformation, while Section 2.2.2 provides an overview of the Inception V4 model.
EXPERIMENTAL RESULTS
Performance of image preprocessing and single mosquito detection models
Figure 5 presents the results of HSV r transformation applied to the RGB images of mosquitoes and fly pests on yellow and blue sticky paper, prior to single-mosquito segmentation using YOLO V3 (Fig. 3). Figure 6 provides examples of image dilation applied to mosquito images on yellow and blue sticky papers. The arrows in Figure 6 indicate the mosquito antennae, the primary sex-related morphological feature, enhanced by image dilation.

Results of HSV
r
transformation with varying r values on RGB images of mosquito and fly pests on

Image dilation results for
Figure 7 presents eight examples of mosquito and pest detection using YOLO V3 on RGB images of white paper sheets. In Figure 7a–d, the pink, red, green, and cyan boxes correspond to Culicidae, Ceratopogonidae, Large Muscidae, and Small Muscidae, respectively. Figure 8 provides four examples of mosquito and pest detection using two YOLO V3 models: one applied to raw RGB images on yellow sticky paper and the other to images after HSV
r
transformation. Similarly, Figure 9 shows detection results for mosquitoes and pests on blue sticky paper. Based on the comparison between the detected pest counts and the ground truth (Figs. 8 and 9), the YOLO V3 model using HSV
r
-transformed images (

Detection examples of single mosquitoes and other pests using the designed YOLO V3 model on white paper. Each color represents one of four categories listed in Table 3. Each image shows the detected pest count relative to the ground truth count.

Detection examples of single mosquitoes and other pests using the designed YOLO V3 model, with and without HSV r transformation, on yellow sticky paper. Each image shows the detected pest count relative to the ground truth count.

Detection examples of single mosquitoes and other pests using the designed YOLO V3 model, with and without HSV r transformation, on blue sticky paper. Each image shows the detected pest count relative to the ground truth count.
Table 3 presents the performance of the proposed YOLO V3 models, as outlined in Section 2.2.1, for detecting the four categories of mosquito and fly pests. Table 4 summarizes the models’ performance in quantifying the number of detected pests.
Performance Metrics, Including Average Precision (AP) and IOU, of YOLO V3 Models in Detecting Four Categories of Mosquito and Fly Pests against Three Different Backgrounds
Counting Performance of YOLO V3 Models for Four Categories of Mosquito and Fly Pests against Three Different Backgrounds after Detection
GYS’ transformation
Figure 10 presents the results of transforming RGB images, taken against white paper backgrounds, into the GYS′ color space. This transformation enhanced the distinctions in image characteristics—such as body structure, color texture, and wing scales—across the eight mosquito classes.

GYS’ images (right) transformed from RGB images (left) for eight mosquito types on white paper sheets. Subplots
Table 5 summarizes the accuracy of the Inception V4 models trained on images in the RGB, GYS′, and HSV0.6 color spaces for identifying eight mosquito species across three paper types. Figure 11 presents the corresponding confusion matrices for the models, illustrating performance across different color spaces and backgrounds.
Identification Accuracies of Inception V4 Models for Eight Mosquito Species on Three Different Backgrounds
Identification Accuracies of Inception V4 Models for Eight Mosquito Species on Three Different Backgrounds
Each bold value indicates the maximum accuracy of a species with an image background.
The bold value in this column indicates the maximum total accuracy of all 8 species of mosquitoes with the same image background.

Confusion matrices of mosquito species identification using Inception V4 models with different color spaces and image backgrounds,
Figures 12 and 13 illustrate the effects of image dilation and HSV r transformation, respectively, on a white paper background. In Figure 12a and b, image dilation makes the morphological features of the mosquito antennae more prominent, while secondary features such as the mouthparts are also visually enhanced. Similarly, Figure 13c demonstrates that the HSV r transformation, with a scaling factor of r = 1.5 (>1), enhanced the contrast between the mosquito and the white paper background. Based on these results, we selected an HSV r transformation with r = 1.4 for processing mosquito images on white paper backgrounds to optimize feature detection.

Image dilation results of

Results of HSV r transformation with different r values for a mosquito on a white paper sheet.
Table 6 summarizes the performance of mosquito gender identification using Inception V4 models (Figs. 2 and 3), comparing results with and without image dilation and HSV r transformation across different backgrounds.
Accuracy Rates of Inception V4 Models in Identifying Mosquito Gender
Each bold value indicates the maximum accuracy of adopted color spaces and image processing methods for each image background.
Table 7 presents the performance results for mosquito species and gender identification using the Inception V4 models. Since Chironomus species rarely engage in blood-sucking behavior, they were excluded from the tests. An identification was considered accurate only if both the mosquito species and gender were correctly classified by the corresponding Inception V4 models. In Table 7, RGB refers to the raw image dataset used for species and gender identification. GYS′ and dilation + HSV1.4 indicate that the GYS′ transformation was applied for species identification, while both image dilation and HSV1.4 transformation were utilized for gender identification.
Accuracy Rates for Mosquito Species and Gender Identification
Accuracy Rates for Mosquito Species and Gender Identification
The GYS’ transformation was used in species identification, as well as the image dilation and HSV1.4 transformation were used in gender identification.
The HSV0.6 transformation was used in species identification, as well as the image dilation and HSV1.4 transformation were used in gender identification.
Each bold value indicates the maximum accuracy of a species for each image background.
Each bold value indicates the maximum total accuracy of seven species for each image background.
Image preprocessing for single mosquito detection
In some instances, incomplete mosquito images (e.g., images missing the entire body or displaying only part of a leg) are captured. These incomplete images were used as labeled data for YOLO V3 training. However, as illustrated by the black dashed circles in Figure 7f and g, an image showing only a mosquito leg was still identified as a mosquito, which impacted the counting accuracy. Specifically, in these figures, the number of detected pests exceeded the actual pest count by one (35 vs. 34 in Fig. 7f, and 77 vs. 76 in Fig. 7g). Furthermore, certain textures or artifacts near the image edges, resembling mosquito legs, were also misclassified as mosquitoes by the YOLO V3 model. These findings suggest that incomplete mosquito images should be excluded from the labeling process during YOLO V3 training to enhance the accuracy of mosquito detection and counting in future research.
As shown by the black dashed circle in Figure 7h, small pests from the Ceratopogonidae family can be misidentified when they are too small, densely clustered, or overlapping. This misidentification accounts for the discrepancy between the number of detected pests (73) and the actual ground truth count (71) in Figure 7h. The results of single mosquito and pest detection, highlighted by yellow dashed circles in Figures 8 and 9, demonstrate that the YOLO V3 model trained with HSV r -transformed images achieved higher precision in detecting individual mosquitoes and pests compared to the model trained with RGB images. This improvement was consistent across all four pest categories on both yellow and blue sticky traps. Consequently, we applied HSV r transformation to the RGB images (as illustrated in Fig. 3) prior to developing the YOLO V3 model for single mosquito detection.
Mosquito species identification
As presented in Table 5, the GYS′ transformation combined with the Inception V4 model (green blocks in Fig. 2) improved the identification accuracy of eight mosquito species on white paper backgrounds, achieving an impressive total accuracy of 0.9814. Similarly, the Inception V4 model using HSV r -transformed images enhanced the identification accuracy of these mosquito species on yellow and blue sticky paper, reaching outstanding total accuracies of 0.9888 and 0.9899, respectively. Table 5 further shows that the Inception V4 models trained with GYS′ or HSV r -transformed images matched or outperformed the RGB-based model for five, six, and five mosquito species on white paper, yellow sticky paper, and blue sticky paper, respectively.
Figure 14 illustrates cases of mosquito species misidentification on blue sticky paper. Factors such as image blurring (Fig. 14a,g, and 14h), glue residues on the sticky paper (Figs. 14d–f), and the occlusion of wing or body textures due to the mosquito’s posture (Fig. 14c and i) likely contributed to these errors. Additionally, misidentifications may have resulted from similar wing or body textures between different mosquito species, as well as from incomplete mosquito images. Similar instances of species misidentification were also observed for mosquitoes captured on white and yellow sticky papers.

Cases of species misidentification.
As demonstrated in Table 6, the integration of Inception V4 models with image dilation and HSV r transformation (preprocessing methods) improved the overall accuracy of mosquito gender identification to 0.8767, 0.9173, and 0.9241 on white paper, yellow sticky paper, and blue sticky paper backgrounds, respectively. A two-stage model, integrating YOLO V3 and Inception V4 with the proposed methods and design procedures (outlined in Section 2.2.3 and depicted by white and pink blocks in Figs. 2 and 3), enhanced gender identification accuracy across these backgrounds. Figure 15 illustrates instances of sex misidentification in dilated and HSV r images. These cases include blurred images (Fig. 15a–c), occlusions of wing or body textures due to mosquito posture (Fig. 15d), and color similarities between the mosquito and background (Fig. 15e), all of which likely contributed to gender misidentification.

Cases of gender misidentification.
As shown in Table 7, the identification performance improved when a GYS′ transformation was applied before using an Inception V4 model for species identification (green blocks in Fig. 2), and when image dilation followed by an HSV1.4 transformation was used before another Inception V4 model for gender identification (pink blocks in Fig. 2). These transformations outperformed the corresponding Inception V4 models using RGB images. The species and gender identification accuracy improved for five out of seven mosquito species on a white paper background using the two Inception V4 models developed with these methods (as detailed in Section 2.2). The average accuracy rose from 0.8492 to 0.8590, as presented in Table 7.
Applying an HSV0.6 transformation before the Inception V4 model for species identification (green blocks in Fig. 3), and using image dilation followed by an HSV0.6 transformation before another Inception V4 model for gender identification (pink blocks in Fig. 3) increased the accuracy of species and gender identification for most mosquito species on yellow and blue sticky paper. The average accuracy improved from 0.8875 to 0.9090 for mosquitoes on yellow sticky paper and from 0.9088 to 0.9154 on blue sticky paper (Table 7). However, for two, one, and three out of seven mosquito species on white paper, yellow sticky paper, and blue sticky paper, respectively, the Inception V4 models utilizing RGB images achieved higher accuracy in species and gender identification than those using the aforementioned transformations. Mosquitoes on blue sticky paper showed the highest accuracy in species identification, gender identification, and combined species and gender identification when tested with the proposed AI system (two-stage models with preprocessing), as shown in Tables 5–7.
Because different colors of sticky traps were used, model identification performance may degrade when the training and testing images are derived from different background colors. In this study, each Inception-V4 model for mosquito species or gender classification was trained exclusively on segmented images obtained from a single sticky-trap color (or a white paper background), together with background-specific image enhancement methods designed to amplify morphological differences. Accordingly, if a model is trained using images from yellow sticky paper and evaluated on images from blue sticky paper, its performance may be reduced, as the learned morphological features can be attenuated or distorted by differences in background color. This effect may be further exacerbated when a model trained on yellow or blue sticky paper is tested on images with a white background, because the image enhancement strategies and parameter settings were optimized separately for each background type. Overall, our results indicate that using a model trained and tested on images with the same background color is preferable for achieving optimal mosquito species and gender identification performance.
To address this issue in future work, two potential strategies may be considered. One approach is to train a unified model using images collected from multiple sticky-trap colors to improve robustness under varying background conditions. Alternatively, foreground-extraction and background-removal techniques may be applied to retain only mosquito morphology, thereby reducing background-related interference during both training and inference. Recent foreground-extraction and background-removal approaches, such as TransUNet (Chen et al., 2021) and the Segment Anything Model (Kirillov et al., 2023), could be incorporated to further enhance model robustness across heterogeneous sticky-trap colors.
Comparison of pest and insect identification models
Recently, a basic AI model, CNN, was employed to recognize vectors of Chagas disease from mobile phone images, achieving an accuracy of 0.8902–0.9043 (Cochero et al., 2022). However, these CNN models are designed for binary classification (triatomine or non-triatomine) and may show reduced accuracy with an increased number of insect identification classes. An advanced AI model, YOLO V5, was used to identify insects in witloof chicory fields via sticky plate images (Kalfas et al., 2023), achieving a mean AP of 0.763 across four classes (aphid wooly, fly chicory, fly grass, and wasp). The CNN and YOLO V5 models are limited to identifying one and four pest types, respectively (Cochero et al., 2022; Kalfas et al., 2023). In contrast, our Inception V4 model identified a broader range of classes (eight mosquito species listed in Table 5), achieving a total accuracy of 0.9899, thus outperforming the CNN and YOLO V5 models. This high identification performance can be attributed to optimized image acquisition settings, preprocessing methods, the feature extraction capabilities of the Inception V4 models, and the complete identification process (Figs. 2 and 3).
The Inception-ResNet-PR-CW model was used to identify various species of wild bees based on wing images, achieving an accuracy of 0.9316 (Buschbacher et al., 2020). However, capturing images of bee wings for identification may be inconvenient. The Inception V4 model has been reported for insect pest image detection on a dataset with 82 classes, achieving an accuracy of 0.482 (Nanni et al., 2022). The SPMEnsemble model, applied to three open datasets with 10, 82, and 102 classes, reached accuracies ranging from 0.662 to 0.984 (Nanni et al., 2022). The SPMEnsemble model, an ensemble AI model, combines Inception-V3, Xception, and MobileNet architectures. A system that combines ensemble models (Nanni et al., 2022) with multistage identification processes (Tsai et al., 2022) may offer an effective solution to improve accuracy in identifying a broad range of pest and insect classes, including mosquitoes.
State of the art of mosquito species identification using AI
Table 8 summarizes studies on mosquito species identification using AI, showcasing various advanced models (e.g., CNN-based, YOLO-based, and Inception-based) developed with different datasets (such as mosquito images or wingbeat sounds) captured by diverse instruments. Generally, acquiring both RGB and fluorescence image datasets of mosquitoes (Lee et al., 2023) or using a microscope image dataset (Goodwin et al., 2021; Kittichai et al., 2021) tends to be more cumbersome than obtaining only an RGB image dataset. In one study (Siddiqua et al., 2021), a model combining Faster R-CNN and Inception V2 performed binary classification to determine if a mosquito was a dengue carrier. However, the model’s testing performance, based on only 36 dengue mosquito images, may lack representativeness. Another study (Zhao et al., 2022) employed a Swin MSI model, achieving high accuracy and F1 scores for species identification; however, this model requires four high-resolution images (4464 × 2976 pixels) of each mosquito from different angles (dorsal, ventral, left, and right). Capturing these four views by repositioning each mosquito is both inconvenient and time-intensive.
State-of-the-Art Mosquito Species Identification Using AI Models
State-of-the-Art Mosquito Species Identification Using AI Models
DCNN = deep convolutional neural network.
CNN = convolutional neural network; RF = random forest; SVM = support vector machine; WDNN = wide and deep neural network; GMM = Gaussian mixture model.
FRCNN = faster region-convolutional neural network.
Swin MSI = Swin Transformer-based mosquito species identification model.
EED-CNN = end-to-end deep convolutional neural network.
ACC, accuracy; F1, F1 score; PRE, precision; REC, recall.
In our system, users do not need to reposition each mosquito from the dorsal to the ventral side (or vice versa) to capture images. Instead, a standard digital camera suffices, with no need for a microscope. However, capturing images from all four views (dorsal, ventral, left, and right) for each mosquito proved challenging since they were adhered to blue or yellow sticky paper traps. We used an average image resolution of 2464 × 1632 pixels for blue sticky paper images, enabling the simultaneous capture of multiple mosquitoes, with an average of approximately 10.5 mosquitoes per image. For each mosquito, this translated to an average resolution of 235 × 155 pixels, considerably lower than the 4464 × 2976 pixels used in a previous study (Zhao et al., 2022). As indicated in (Kittichai et al., 2021), mosquito species identification performance generally improves with higher image resolution. Using a low resolution ratio of 1/364 and capturing certain side views, our system achieved an accuracy (0.9899 vs. 0.9904) comparable to that of the Swin MSI model (Zhao et al., 2022) (Table 8).
Similar to previous studies (Goodwin et al., 2021; Zhao et al., 2022), a dataset of high-resolution (1920 × 1080 pixels) four-sided images (two lateral views, one dorsal view, and one ventral view) of each mosquito, captured with a 600 × microscope, was used to train a two-stage YOLO V3 model, achieving excellent performance in mosquito species identification (Kittichai et al., 2021).
An impressive mosquito species identification performance was achieved with an average of 60 mosquito images per species using a faster R-CNN model designed with a swine transformer, though it may be less representative (Lee et al., 2023). Additionally, the Inception V3 model, developed using wingbeat spectrogram images from live mosquito wingbeat sounds, showed relatively low identification accuracy at 0.85 (Khalighifar et al., 2022). Table 8 highlights the differences in image datasets, mosquito species, and identification models among studies (Goodwin et al., 2021; Kittichai et al., 2021; Ong et al., 2021; Siddiqua et al., 2021; Asgari et al., 2022; Khalighifar et al., 2022; Zhao et al., 2022; Lee et al., 2023), where model comparisons may lack fairness. In this study, the proposed Inception V4 model, employing HSV0.6 transformation and blue sticky paper as a background for mosquitoes, surpassed state-of-the-art AI models (Goodwin et al., 2021; Kittichai et al., 2021; Ong et al., 2021; Siddiqua et al., 2021; Asgari et al., 2022; Khalighifar et al., 2022; Zhao et al., 2022; Lee et al., 2023) (Table 8) in mosquito species identification, with precision and recall scores of 0.9904. Although the proposed Inception V4 model’s accuracy (0.9899) was slightly lower than the Swin MSI model (0.9904) (Zhao et al., 2022), it outperformed all other models listed in Table 8.
Our proposed AI system offers high accuracy, cost-effectiveness, time efficiency, and feasibility for automation. It can provide relevant government or health agencies with crucial mosquito data—such as counts, species, and gender—captured and identified at specified locations. This data serves as decision-support information for developing preventive measures and policies against mosquito-borne diseases. In practice, deploying multiple AI systems (as proposed in this study) across various locations and connecting them via the internet will create a mosquito-information AIoT system with extensive geographic coverage.
Future research could focus on developing a more accurate model or system for identifying mosquito sex. Additional studies may explore identifying both species and sex of free-flying mosquitoes, such as those on walls, indoors, or outdoors. Our proposed techniques could also be adapted or modified to identify species and sex in other small pests. Moreover, an uncertainty model will need to be developed to estimate the actual number of mosquitoes within a circular area of a specified radius, centered on a trap, based on the number of mosquitoes captured using a sticky paper trap. This model could consider factors such as capture time, duration, and other variables. It would also be valuable to investigate whether species, gender, trap color, scent, and type influence this estimation.
This study presents a digital camera–based mosquito species and gender identification system that enables the simultaneous acquisition of multiple mosquitoes from a single image in a cost- and time-effective manner. HSV r transformation is applied as an image pre-processing step for both YOLO V3–based automatic detection and segmentation of four insect categories, including mosquitoes and fly pests, and Inception V4–based mosquito species identification. For mosquito gender identification, image dilation combined with HSV r transformation is employed together with the Inception V4 model. The proposed system achieves an average accuracy of 0.9899 for mosquito species identification across eight species, 0.9241 for gender identification, and 0.9154 for simultaneous species and gender identification. In summary, the proposed system offers accurate and cost-effective identification of mosquito species and gender, moving toward full automation.
AUTHORS’ CONTRIBUTIONS
F.-H.W.: Writing—original draft, investigation, writing—review and editing, visualization, formal analysis, methodology; C.-H.L.: Supervision, writing—original draft, resources, methodology, conceptualization, investigation; X.-Y.Z.: Writing—original draft, formal analysis, validation, software, investigation; C.-T.P.: Data curation, methodology, visualization, software; K.-C.T.: Resources, data curation, validation, software; C.-K.L.: Resources, investigation, software; S.-W.C.: Investigation, data curation, writing—review and editing; Y.-Y.C.: Resources, writing—review & editing, investigation, writing—original draft, visualization, validation; W.-C.T.: Funding acquisition, data curation, validation, formal analysis, writing—review and editing, project administration; and Y.-K.C.: Funding acquisition, project administration, visualization, writing—original draft, resources, methodology, supervision.
Footnotes
ACKNOWLEDGMENT
The authors gratefully acknowledge the support provided by the National Science and Technology Council, Republic of China (Taiwan).
AUTHOR DISCLOSURE STATEMENT
The authors declare that they have no competing interests. One author is the President of Yao-Chi Pest Control Operation Limited Company; however, their contribution to this study was limited to providing assistance with dataset annotation.
FUNDING INFORMATION
This study was partially supported by the National Science and Technology Council, Republic of China (Taiwan) (Grant Nos. 111-2923-E-005-001-MY3 and 111-2222-E-025-002-MY3).
