--- license: mit --- # Gatekeeper Cervix Detector This model serves as a **binary gatekeeper** for cervical cancer screening systems. It quickly determines whether an input image is a valid cervical image before passing it to a downstream diagnostic model (MedSigLip). ## Model Details - **Model Name**: Gatekeeper Cervix Detector - **Base Architecture**: MobileNetV3-Small - **Task**: Binary classification (cervix vs not-cervix) - **Input Size**: 224×224×3 (RGB) - **Input Normalization**: [-1, 1] (mean = [0.5, 0.5, 0.5], std = [0.5, 0.5, 0.5]) - **Output**: Probability that the image contains a cervix (sigmoid output) - **Threshold**: 0.70 (images below this confidence are rejected) - **License**: CC BY 4.0 - **Repository**: [Link to this repo] ## Intended Use This model is designed to be used as the **first stage** in a two-stage pipeline: 1. **Gatekeeper** (this model): Filters out non-cervix images (random photos, other medical images, poor quality, etc.). 2. **MedSigLip** (downstream model): Only runs if the gatekeeper accepts the image. It performs cancer stage classification or similarity scoring. **Use Case**: Maternal health screening in low-resource settings where non-experts may capture images using blind sweeps. ## Performance **Test Set Results (threshold = 0.70)** - Accuracy: 99.94% - Precision: 100.00% - Recall/Sensitivity: 99.88% - Specificity: 100.00% - AUC: 1.0000 - Rejection Rate: ~52.0% The model shows excellent generalization and very strong rejection of non-cervix images while maintaining high sensitivity on true cervix images. **Class Distribution** - Cervix: 48.0% - Not-cervix: 52.0% - The split is stratified across train/validation/test sets. ## How to Use ### Loading the Model ```python from transformers import AutoModel model = AutoModel.from_pretrained("your-username/gatekeeper-cervix-detector")