This repository contains code for training and evaluating deep learning models for the classification of segmented POC-CCA test images.
Experiments
We evaluate model performance using three architectures:ResNet-50 (He et al., 2016)MobileNetV2 (Sandler et al., 2018)Vision Transformer (ViT) (Dosovitskiy et al., 2020)Preprocessing and evaluation pipelines utilize the classification framework from react2-code, which incorporates the PyTorch-Pretrained-ViT implementation of the Vision Transformer (ViT) architecture.The experiments compare classification performance by treating trace results as positive or negative, and by training on either field technician labels or senior technician labels. A requirements.txt file is included detailing all necessary dependencies for the pipeline.Repository structure
poc-cca-test-classification/
│
├── helper.sh # Script for running multiple configs
├── run_train.sh # Script for running model training
├── run_test.sh # Script for running model testing
│
├── configs/ # JSON configuration files for different classification experiments
│ ├── mob_bin_traceneg_train_field/ # Config for MobileNetV2, trace as negative, training on field labels
│ ├── res_bin_tracepos_train_field/ # Config for ResNet50, trace as negative, training on field labels
│ ├── vit_bin_tracepos_train_sen/ # Config for ViT, trace as positive, training on senior tech labels
│ └── …
├── scripts/
│ ├── dataset_loader.py # Dataset class for loading segmented RDT images
│ ├── train.py # Main training script
│ ├── test.py # Model evaluation script
│ └── data_prep.ipynb # Notebook to prepare images using segmentation pipeline
train.py - Trains ResNet-50, MobileNetV2 or ViT based on the JSON configuration file. Produces model checkpoints, metrics and a summary of performance.test.py - Loads a trained model and produces predictions and evaluation metrics.