--- license: agpl-3.0 datasets: - keanteng/miniddbs-jpeg pipeline_tag: image-classification library_name: pytorch tags: - generative-ai - medical-imaging - deep-cnn - breast-cancer - classification new_version: keanteng/efficientnet-breast-cancer-classification-0603-3 --- # Breast Cancer Classification with EfficientNet > Bad performance for some unknown reasons, might be architectural issues This repository contains a fine-tuned EfficientNet model for breast cancer classification based on mammography images. Due to the indistinguishable nature of the dataset various runs had been conducted to perform the original 3 classes classification according to the original DDSM dataset but the accuracy obtained is dismal (approx 67%) contrary to literature review of (>90%). I have also explored dual input Swin Transformer using the Tumour Mask, however, similar dismal accuracy is obtained. We can look at the dataset and notice that the images all looks about the same except Normal. Thus, the detection strategy becomes detecting the presence of cancer by merging to Benign and Cancer images as a class against the Normal images. With such approach, accuracy significant increases and achieve reliable performance. ## Model Description The model is based on the [EfficientNet](https://docs.pytorch.org/vision/main/models/generated/torchvision.models.efficientnet_b7.html#torchvision.models.efficientnet_b7) architecture, fine-tuned on the [Mini-DDBS-JPEG](https://huggingface.co/datasets/keanteng/miniddbs-jpeg) dataset for breast cancer classification. ### Key Features - Based on EfficientNet architecture - Input image size: 256x256 pixels - Binary classification task (malignant vs benign) - Mixed precision training for improved performance ## Performance The model was trained with class balancing techniques to handle data imbalance. Performance metrics on the test set: | Metric | Value | |--------|-------| | Test Accuracy | 0.41687979539641945 | | Test Loss | 69.53334480539307 | For detailed performance metrics including precision, recall, and F1-score per class, please check the [training notebook](https://github.com/keanteng/wqd7025). ## Usage Please check the [inference compute](https://github.com/keanteng/wqd7025/blob/main/inference/inference_comparison.ipynb).