Deep neural networks offer morphologic classification and diagnosis of bacterial vaginosis

Zhongxiao Wang, Lei Zhang, Min Zhao, Ying Wang, Huihui Bai, Yufeng Wang, Can Rui, Chong Fan, Jiao Li, Na Li, Xinhuan Liu, Zitao Wang, Yanyan Si, Andrea Feng, Mingxuan Li, Qiongqiong Zhang, Zhe Yang, Mengdi Wang, Wei Wu, Yang CaoLin Qi, Xin Zeng, Li Geng, Ruifang An, Ping Li, Zhaohui Liu, Qiao Qiao, Weipei Zhu, Weike Mo, Qinping Liao, Wei Xu

Research output: Contribution to journalArticlepeer-review

21 Scopus citations


Bacterial vaginosis (BV) is caused by the excessive and imbalanced growth of bacteria in vagina, affecting 30 to 50% of women. Gram staining followed by Nugent scoring based on bacterial morphotypes under the microscope is considered the gold standard for BV diagnosis; this method is often labor-intensive and time-consuming, and results vary from person to person. We developed and optimized a convolutional neural network (CNN) model and evaluated its ability to automatically identify and classify three categories of Nugent scores from microscope images. The CNN model was first established with a panel of microscopic images with Nugent scores determined by experts. The model was trained by minimizing the cross-entropy loss function and optimized by using a momentum optimizer. The separate test sets of images collected from three hospitals were evaluated by the CNN model. The CNN model consisted of 25 convolutional layers, 2 pooling layers, and a fully connected layer. The model obtained 82.4% sensitivity and 96.6% specificity with the 5,815 validation images when altered vaginal flora and BV were considered the positive samples, which was better than the rates achieved by top-level technologists and obstetricians in China. The capability of our model for generalization was so strong that it exhibited 75.1% accuracy in three categories of Nugent scores on the independent test set of 1,082 images, which was 6.6% higher than the average of three technologists, who are hold bachelor's degrees in medicine and are qualified to make diagnostic decisions. When three technologists ran one specimen in triplicate, the precision of three categories of Nugent scores was 54.0%. One hundred three samples diagnosed by two technologists on different days showed a repeatability of 90.3%. The CNN model outperformed human health care practitioners in terms of accuracy and stability for three categories of Nugent score diagnosis. The deep learning model may offer translational applications in automating diagnosis of bacterial vaginosis with proper supporting hardware.

Original languageEnglish (US)
Article numbere02236-20
JournalJournal of Clinical Microbiology
Issue number2
StatePublished - Feb 2021

All Science Journal Classification (ASJC) codes

  • Microbiology (medical)


  • Application of AI to diagnostic microbiology
  • Automation in clinical microbiology
  • Bacterial vaginosis


Dive into the research topics of 'Deep neural networks offer morphologic classification and diagnosis of bacterial vaginosis'. Together they form a unique fingerprint.

Cite this