Variational Autoencoder-Based Synthetic Data Generation for Augmenting Mosquito Larvae Image Datasets
Abstract
We propose a convolutional Variational Autoencoder (VAE) to synthesize mosquito-larvae images for dataset augmentation. The dataset comprises 1,300 grayscale microscope images (640×480) resized to 224×224 and split 1,200/100 for train/test. The encoder uses four Conv2D blocks (32, 64, 128, 256) that project to a 100-dimensional latent space; the decoder mirrors this with Conv2DTranspose layers. Training uses Adam with an MSE+KL objective, batch size 64, over 100–400 epochs. Image realism is assessed via Fréchet Inception Distance (Inception-v3 features) across latent sizes {50, 100} and epoch counts. The best configuration (latent = 100, 400 epochs) achieves FID = 0.4668 with total loss in the 29,206–33,806 range, representing a 59.7% reduction relative to a 50-D/100-epoch baseline (FID = 1.1588). Among variants, the standard VAE yields the lowest FID overall, outperforming VQ-VAE and VAE-S, while β-VAE is competitive in lower-capacity settings. These results indicate that the learned generator produces samples statistically close to the real distribution and provide a practical training recipe for generating synthetic larvae imagery to support downstream recognition tasks.
Full Text:
PDFReferences
Akter, M., Hossain, M.S., Ahmed, T.U., Andersson, K. (2021). Mosquito Classification Using Convolutional Neural Network with Data Augmentation. In: Vasant, P., Zelinka, I., Weber, GW. (eds) Intelligent Computing and Optimization. ICO 2020. Advances in Intelligent Systems and Computing, vol 1324. Springer, Cham. https://doi.org/10.1007/978-3-030-68154-8_74 15
Asperti et al. 2022. Enhancing Variational Generation Through Self-Decomposition. Digital Object Identifier, 10.1109/ACCESS.2022.3185654. IEEE. https://doi.org/10.1109/ACCESS.2022.3185654
Borji, A. (2022). "Pros and Cons of GAN Evaluation Measures: New Developments". Computer Vision and Image Understanding, 215, 103329. https://doi.org/10.1016/j.cviu.2022.103329
Dai, B., & Wipf, D. (2019). Diagnosing and Enhancing VAE Models: A Sparse Coding Perspective. International Conference on Learning Representations (ICLR). https://doi.org/10.48550/arXiv.1906.02691
Ewing, D. A., Cobbold, C. A., Purse, B. V., Nunn, M. A., & White, S. M. (2016). Modelling the effect of temperature on the seasonal population dynamics of temperate mosquitoes. Journal of theoretical biology, 400, 65-79. https://doi.org/10.1016/j.jtbi.2016.04.008
Hinggis et al. 2017. β -VAE: LEARNING BASIC VISUAL CONCEPTS WITH A CONSTRAINED VARIATIONAL FRAMEWORK. Under review as a Conference Paper at ICLR. https://doi.org/10.48550/arXiv.1804.03599
Huang, T., Ding, Z., Zhang, J., Tai, Y., Zhang, Z., Chen, M., Wang, C., & Liu, Y. (2023). Learning to Measure the Point Cloud Reconstruction Loss in a Representation Space. 2023 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), 12208–12217. https://doi.org/10.1109/CVPR52729.2023.01175
Kim, Kyukwang, Myung, Hyun. (2018). Autoencoder-Combined Generative Adversarial Networks for Synthetic Image Data Generation and Detection of Jellyfish Swarm. Journal Article, 6, 54207-54214. IEEE. https://doi.org/10.1109/ACCESS.2018.2869250
Kingma, D. P., & Welling, M. (2014). Auto-Encoding Variational Bayes. Proceedings of the 2nd International Conference on Learning Representations (ICLR). arXiv:1312.6114. https://doi.org/10.1609/aaai.v33i01.3301492
Li, X., et al. (2019). Sparse Variational Autoencoder for Unsupervised Feature Learning. Proceedings of the AAAI Conference on Artificial Intelligence. https://doi.org/10.1109/CVPR52729.2023.01175
Locatello, F., et al. (2019). Challenging Common Assumptions in the Unsupervised Learning of Disentangled Representations. ICML. https://doi.org/10.48550/arXiv.1811.12359
Luo et al. 2024. Quaternion Vector Quantized Variational Autoencoder. IEEE SIGNAL PROCESSING LETTERS, Vol. 32, 1070-9908. IEEE. https://doi.org/0.1109/LSP.2024.3385109
Mescheder, L., Nowozin, S., & Geiger, A. (2017). "Adversarial Variational Bayes: Unifying Variational Autoencoders and Generative Adversarial Networks". Proceedings of the 34th International Conference on Machine Learning (ICML), 70, 2391-2400. https://doi.org/10.5555/3305890.3306030
Naderi, H., B. H. Soleimani, dan S. Matwin. 2020. Generating High-Fidelity Images with Disentangled Adversarial VAEs and Structure-Aware Loss. 2020 International Joint Conference on Neural Networks (IJCNN), 978-1-7281-6926-2, 20. IEEE. https://doi.org/10.1109/IJCNN48605.2020.9206846
Ndione, R. D., O. Faye, M. Ndiaye, A. Dieye, dan J. M. Afoutou. 2007. Toxic effects of neem products (Azadirachta indica A. Juss) on Aedes aegypti Linnaeus 1762 larvae. In African Journal of Biotechnology. 6(24): 2846- 2854. https://doi.org/10.5897/AJB2007.000-2348
Nguyen, T., et al. (2023). Adaptive Sparse Variational Autoencoder with L0 Regularization. IEEE Transactions on Pattern Analysis and Machine Intelligence. https://doi.org/10.1109/TPAMI.2022.3220765
Ramesh et al. 2021. Zero-Shot Text-to-Image Generation. International Conference on Machine Learning (ICML). https://doi.org/10.48550/arXiv.2102.12092
Rosca, M., Lakshminarayanan, B., & Mohamed, S. (2019). "Improving Generalization in Generative Adversarial Networks via Hierarchical Variational Inference". International Conference on Learning Representations (ICLR). https://doi.org/10.48550/arXiv.1807.03653
Sajjadi, M. S., Bachem, O., Lucic, M., Bousquet, O., & Gelly, S. (2018). Assessing generative models via precision and recall. Advances in Neural Information Processing Systems, 31. https://doi.org/10.48550/arXiv.1806.00035
Tai, X.-C., Liu, H., & Chan, R. (2023). PottsMGNet: A Mathematical Explanation of Encoder-Decoder Based Neural Networks (arXiv:2307.09039). https://doi.org/10.48550/arXiv.2307.09039
Wang, R., et al. (2022). Comparative Study of VAE and GAN for Mosquito Larvae Image Synthesis. Computers in Biology and Medicine. https://doi.org/10.1016/j.compbiomed.2022.105440
Wang, Y., Zhang, L., Chen, X., & Liu, Q. (2023). Adaptive sparse variational autoencoders: Balancing sparsity and reconstruction accuracy. IEEE Transactions on Pattern Analysis and Machine Intelligence, 45(4), 1895-1909. https://doi.org/10.1109/TPAMI.2022.3189841
Pauzi et al., (2023). Classification Of Aedes Mosquito Larva Using Convolutional Neural Networks And Extreme Learning Mechine. 2023 7th International Conference on Electrical, Telecommunication and Computer Engineer (ELTICOM).
Pauzi et al. (2025). Detection and Classification of Mosquito Larvae Based on Deep Learning Approach. Engineering Letters.
Ihsan. (2023). Initial Study of Batik Generation using Variational Autoencoder. 8th International Conference on Computer Science and Computational Intelligence (ICCSCI 2023).
Azis. (2023). Comparative Analysis of Variational Autoencoder (VAE) and Generative Adversarial Network (GAN) Algorithms for image classification. Journal Eletronik Sistem InformasI (JESII).
M. Sami and I. Mobin, “A Comparative Study on Variational Autoencoders and Generative Adversarial Networks,” in 2019 International Conference of Artificial Intelligence and Information Technology (ICAIIT), IEEE, Mar. 2019, pp. 1–5. https://doi.org/10.1109/ICAIIT.2019.8834544
L. Pinheiro Cinelli, M. Araújo Marins, E. A. Barros da Silva, and S. Lima Netto, “Variational Autoencoder,” in Variational Methods for Machine Learning with Applications to Deep Networks, Cham: Springer International Publishing, 2021, pp. 111–149. https://doi.org/10.1007/978-3-030-70679-1_5
Q. Xu, Z. Wu, Y. Yang, and L. Zhang, “The difference learning of hidden layer between autoencoder and variational autoencoder,” in 2017 29th Chinese Control And Decision Conference (CCDC), IEEE, May 2017, pp. 4801–4804. https://doi.org/10.1109/CCDC.2017.7979344
Mansour, R. F., Escorcia-Gutierrez, J., Gamarra, M., Gupta, D., Castillo, O., & Kumar, S. (2021). Unsupervised deep learning based variational autoencoder model for COVID-19 diagnosis and classification. Pattern Recognition Letters, 151, 267–274. https://doi.org/10.1016/j.patrec.2021.08.020
Xie, Q., Dai, Z., Hovy, E., Luong, T., & Le, Q. (2020). Unsupervised data augmentation for consistency training. Advances in Neural Information Processing Systems, 33, 6256–6268.
M. Sami and I. Mobin, “A Comparative Study on Variational Autoencoders and Generative Adversarial Networks,” in 2019 International Conference of Artificial Intelligence and Information Technology (ICAIIT), IEEE, Mar. 2019, pp. 1–5. doi: 10.1109/ICAIIT.2019.8834544.
Yu. (2024). CS-Intro VAE: Cauchy-Schwarz Divergence-Based Introspective Variational Autoencoder. IEEE TRANSACTIONS ON MULTIMEDIA, VOL. 26. https://doi.org/10.1109/TMM.2024.3365439
Nash, C., Menick, J., Dieleman, S., Battaglia, P.W., 2021. Generating images with sparse representations. arXiv preprint arXiv:2103.03841.
Razavi, A., Oord, A.v.d., Vinyals, O., 2019. Generating diverse high-fidelity images with vq-vae-2. arXiv preprint arXiv:1906.0044.
DOI: https://doi.org/10.31449/inf.v49i19.9821
This work is licensed under a Creative Commons Attribution 3.0 License.








