Epitech projectApplied AIWeb applicationShipped

Zoidberg 2.0

Epitech ML project: comparing classification models on chest X-rays.

A 3-person academic Machine Learning project: compare several approaches (logistic regression, MLP, CNN, hierarchical classifier) on the Chest X-Ray Pneumonia dataset, with a web app to train, evaluate, and predict.

Context

Compare several classification methods to tell normal chest X-rays apart from pneumonia cases, with an extension toward the viral/bacterial distinction. An Epitech academic project with a tightly scoped ML brief, but freedom on models and optimizations.

Team

Team of 3 students.

Role

Data processing and cleaning, classic models (notably logistic regression), data-augmentation tuning, added data presets (including the virus/bacteria distinction), integrated the baseline and MLP into the training dashboard.

What was built

The final system: a dataset pipeline → preprocessing/augmentation → several models (baseline, MLP, CNN, hierarchical classifier) → stratified cross-validation → metrics → checkpoints, exposed through a FastAPI API and a React dashboard that can start/pause training, follow live loss and accuracy, evaluate checkpoints, and predict on an image.

Architecture

Dataset → preprocessing/augmentation → models → metrics/validation → checkpoints, with a FastAPI layer exposing the ML engine and a React dashboard on top (SSE for live training updates).

Media gallery

ArchitectureArchitecture

Technical decisions

  • Choosing metrics that fit the data imbalance

    About 74% of the training X-rays are pneumonia cases. A high accuracy score can therefore hide a model that handles the minority class poorly. Evaluation also relies on recall, macro-F1, ROC-AUC, and Average Precision.

  • Weighing missed pneumonia cases more heavily

    In this academic setting, missing an X-ray that shows pneumonia is treated as more costly than a false alarm. Model selection therefore gives particular weight to recall on those cases.

  • From-scratch, pedagogical implementations

    The project cleanly separates the ML engine, the API, and the dashboard, with from-scratch implementations rather than leaning fully on high-level libraries.

Stack

PythonPyTorchNumPy / scikit-learn-style MLFastAPIReactTypeScript

Skill → evidence

  • Compares several model families with a fit-for-purpose evaluation protocol

    Logistic regression, MLP, CNN, and a hierarchical classifier, stratified cross-validation, metrics centered on recall rather than accuracy alone.

  • Cleans and prepares an imbalanced dataset

    Data loading, cleaning, augmentation and balancing; presets including the virus/bacteria distinction.

  • Exposes an ML engine through an API and a real-time dashboard

    FastAPI + React dashboard: start/pause training, SSE-based loss/accuracy tracking, checkpoint evaluation, image prediction.

Results

The comparison accounts for class imbalance and doesn't rely on accuracy alone. Recall, macro-F1, ROC-AUC, and Average Precision are among the metrics used to compare models.

Limitations

The project does not present a final score table (best checkpoint, chosen decision threshold, or academic grade).