The RARE Challenge focuses on developing computer-aided detection (CADe) systems for early cancer detection in low-prevalence scenarios. In clinical practice, early-stage cancers are rare and often overshadowed by normal findings, making model training and evaluation particularly challenging. This repository provides a baseline implementation for training and evaluating deep learning models for the detection of neoplasia in Barrett’s Esophagus (BE) using a class-imbalanced dataset.
Detecting early-stage neoplasia in BE is crucial for timely interventions. Missed detections can lead to late-stage cancer progression, significantly lowering survival rates. The challenge lies in effectively handling the severe class imbalance, ensuring models achieve both high sensitivity and specificity in real-world clinical settings.
├── configs/ # YAML configuration files for different model setups
├── dataset.py # Dataset class for loading and preprocessing data
├── evaluate.py # Script for evaluating models and performing bootstrap analysis
├── metrics.py # Custom metrics for model evaluation
├── output/ # Directory for storing experiment outputs (logs, models, results)
├── README.md # Project documentation
├── requirements.txt # Python dependencies for the project
├── run_baselines.sh # Shell script to run all baseline experiments
├── train.py # Script for training models
└── Dockerfile # Dockerfile for containerizing the project
configs/: Contains YAML files specifying model configurations (e.g., model type, batch size, learning rate).dataset.py: Implements theRareTestSetclass for loading and preprocessing the dataset.evaluate.py: Handles model evaluation, including generating predictions and performing bootstrap analysis for metrics.metrics.py: Defines custom metrics such as AUROC, AUPRC, and others for evaluating model performance.run_baselines.sh: Automates the execution of baseline experiments for all configurations.train.py: Main script for training models using the configurations provided in theconfigs/directory.Dockerfile: Used to build a Docker image for running the project in a containerized environment.
To build and run the Docker container for executing all baseline experiments on a Windows device, follow these steps:
- Build the Docker Image:
Run the following command to build the Docker image:
docker build -t rare-challenge . - Run the Docker Container:
This command mounts the current directory to the
docker run --rm --env-file .env -v $(pwd):/app rare-challenge bash run_baselines.sh/appdirectory in the container and runs therun_baselines.shscript. Please use the .env file to set the environment variables for the container (e.g. dataset path).
For any questions or contributions, feel free to open an issue or contact us via e-mail.