Cervical Cancer Screening- Improving Pap Smear Cell Classification with Data Augmentation and Preprocessing
Charlize Sow
Lay Summary:
I trained an artificial intelligence model to recognize abnormal cells in Pap smear images, which are used to screen for cervical cancer. By teaching the model with image adjustments that mimic real-world slide variability, I improved the model's ability to catch precancerous cells early, contributing to making screening more accurate and accessible in places where medical specialists are scarce.
Abstract:
Cervical cancer is the fourth most common cancer in women worldwide and is responsible for more than 350,000 deaths annually, with nearly 90% occurring in low-resource regions where access to regular Pap smear screening is limited. Early detection is critical, as cervical cancer is highly preventable and treatable when caught at precancerous stages. Artificial intelligence (AI), and particularly convolutional neural networks (CNNs), hold promise for automating Pap smear image classification and expanding access to screening in underserved settings. However, existing models often fail to generalize due to variability in staining, brightness, and morphology across real-world slides. This project investigated whether data augmentation and preprocessing could improve the performance and robustness of a CNN in Pap smear classification. A dataset of 3,127 labeled cell images (Normal vs Precancer) was preprocessed and used to train a ResNet-18 model in PyTorch. Three augmentation pipelines were compared- the original baseline (flips, 90 degree rotations, cropping), a light strategy (flips, 10 degree rotations), and an enhanced strategy (light + mild color jitter, 15 degree rotations). Models were evaluated using accuracy, macro-F1, per-class F1, ROC-AUC, and confusion matrices. Results showed that enhanced augmentation outperformed the baseline, raising macro-F1 from 0.867 to 0.905 and improving Precancer F1 from 0.779 to 0.840. The enhanced model also achieved an ROC-AUC of 0.978, indicating strong separation between classes. Captum interpretability analysis revealed that the model focused on nuclei and nuclear–cytoplasmic boundaries, consistent with clinical practice. These findings suggest that data augmentation is an effective strategy to improve the reliability of AI-based cervical cancer screening, bringing such tools closer to real-world clinical deployment in resource-limited environments.
Q&A:
Bios: Charlize Sow
Program Track: Skills Development
GitHub Username:
csow-codes -Charlize Sow
What was your favorite seminar? Why?
I thoroughly enjoyed Dr. Vaickus’s talk on pathology. It provided an excellent introduction to clinical pathology and highlighted the potential of AI and machine learning in this field. His in-depth seminar on the many ways machine learning can be applied, along with his personal experiences, was both eye-opening and inspiring. -Charlize Sow
If you were to summarize your summer internship experience in one sentence, what would it be?
Through the EDIT AI internship, I gained hands-on experience in machine learning for healthcare by learning how to build and improve a cervical cancer screening model, while exploring the intersection between data, algorithms, and research. -Charlize Sow
Blog Post
Cervical Cancer Screening: Improving Pap Smear Cell Classification with Data Augmentation and Preprocessing
{width=”6.113888888888889in” height=”1.7016196412948381in”}
Charlize Sow - EDIT AI ‘25 (Skills Track)
Every year, over 350,000 women pass away from cervical cancer, and nearly 90% of these deaths occur in places with limited access to healthcare. However, cervical cancer is preventable and treatable if detected early. Pap smears can catch abnormal cells before they turn cancerous, but they require trained cytopathologists, who are scarce in underserved regions. This is where AI comes in. By training algorithms to recognize abnormal cells, we can help make screening more consistent and available in communities where specialists are not always accessible. My project focused on training and improving an AI model to classify Pap smear cell images with the goal of making screening more reliable and accessible worldwide.
During this internship, I worked with a dataset of 3,127 Pap smear images, each labeled as either “Normal” or “Precancerous”. Using Python and PyTorch, I trained a convolutional neural network (CNN), which is a type of deep learning model especially good at recognizing patterns in images. However, training a model isn’t enough. In the real world, Pap smear slides vary a lot: staining, lighting, and cell morphology can all look different depending on the lab. Models often fail when they’re too sensitive to these differences.
Subsequently, my project posed the question: “Could data augmentation and preprocessing strategies help the model generalize better?” To address this, I tested three augmentation pipelines: an original baseline with flips, 90 degree rotations, random crops; a lighter version with smaller 10 degree rotations; and an enhanced version that added mild color jitter (adjusting brightness, contrast, and saturation) and 15 degree rotations.
The results showed clear improvements. Table 1 shows how the enhanced augmentation strategy outperformed the original baseline model, raising the Precancer F1 score from 0.779 to 0.840. This means the model became more accurate at catching precancerous cells, which is the most important goal for early detection.
Table 1: Classification performance of three augmentation strategies on Pap smear cell images.
Figure 2 illustrates this improvement visually. The confusion matrices compare the baseline and enhanced models. In the baseline model, more precancerous cells were misclassified (false negatives). With enhanced augmentation, those errors decreased, meaning fewer missed cases.
{width=”4.676388888888889in” height=”7.127413604549432in”}
Figure 2: Confusion matrices for Original vs. Enhanced runs.
I also evaluated the model using ROC-AUC, a measure of how well the model separates classes across different thresholds. The enhanced model achieved an AUC of 0.978, which is considered excellent. In simple words, this means the model consistently ranked precancerous cells above normal cells.
Figure 3: ROC curve for the Enhanced model (AUC = 0.978).
Finally, I wanted to understand what the model was focusing on. Using Captum interpretability, I generated attribution maps. Figure 4 shows that the model concentrated on the nucleus and the
nuclear–cytoplasmic boundary. This was exciting because those are the exact regions human cytologists examine when diagnosing Pap smears.Figure 4. Attribution map shows the model focusing on nuclei and cell boundaries.
{width=”4.947222222222222in” height=”3.062831364829396in”}
This internship was my first experience working hands-on with deep learning and medical imaging data. At first, I struggled with debugging code and understanding how to train models properly, but through trial and error I learned how to split data, apply preprocessing, implement augmentations, and evaluate results with metrics like accuracy, F1, and ROC-AUC. What stood out to me most, however, was the potential impact, in finding ways to make life-saving screening more accessible to women who need it most.
Through this work, I learned that even small technical changes can have significant effects on model performance. Data augmentation turned out to be a powerful tool for improving robustness, especially in detecting precancerous cells. Looking forward, I would love to expand this project to include larger, multi-class datasets (Normal, Precancer, Malignant) and explore advanced methods such as stain normalization and transfer learning. Ultimately, the vision is a web-based tool that could be deployed in clinics to support healthcare providers in low-resource settings.
I am grateful to the EDIT AI 2025 program, my mentors, and the community of students I worked alongside this summer. This experience gave me new technical skills and a deeper appreciation for how AI can be used to address and reduce health disparities.
{width=”6.113888888888889in”
height=”1.7016196412948381in”}
{width=”4.676388888888889in”
height=”7.127413604549432in”}
{width=”4.947222222222222in”
height=”3.062831364829396in”}