--- license: apache-2.0 --- # Thyroid Ultrasonograph Image Classifier **Author:** Afif Ali Saadman **Type:** Deep Learning (Modified AlexNet variant) **Framework:** PyTorch **Date:** October 2025 ## Overview **This model was developed as part of an **independent research project** focused on classifying thyroid ultrasound images into multiple diagnostic categories using deep learning.** The model can identify: - **FTC** – Follicular Thyroid Carcinoma - **PTC** – Papillary Thyroid Carcinoma - **MTC** – Medullary Thyroid Carcinoma - **Benign** – Non-cancerous thyroid tissue ## Architecture NOTE: This model was trained on a T4 GPU in google colaboratory. * Model : This model was trained on a AlexNet like architecture with gradient checkpointing. * Loss Function: Cross Entropy Loss * Learning Rate: 0.0001 * Iters(Epochs): 20 ## Dataset This dataset was extracted from `FangDai/Thyroid_Ultrasound_Images `and `agent593/Thyroid-Ultrasound-Image-Classification-ViTModel/tree/main/dataset%20thyroid/` which were cleaned manually. 1. **FTC (Follicular Thyroid Carcinoma) – 100 images** 2. **PTC (Papillary Thyroid Carcinoma) – 99 images** 3. **MTC (Medullary Thyroid Carcinoma) – 99 images** 4. **Benign (Normal Thyroid) - 90 images** ## Confusion Matrix ![Confusion Matrix](matrix.png) ## Classification Report | Class | Precision | Recall | F1-Score | Support | | ---------------- | --------- | ------ | -------- | ------- | | FTC | 0.93 | 0.93 | 0.93 | 15 | | PTC | 0.88 | 0.70 | 0.78 | 10 | | MTC | 0.80 | 0.80 | 0.80 | 10 | | Benign | 0.88 | 1.00 | 0.94 | 15 | | **Accuracy** | - | - | 0.88 | 50 | | **Macro Avg** | 0.87 | 0.86 | 0.86 | 50 | | **Weighted Avg** | 0.88 | 0.88 | 0.88 | 50 | ## Final Report Benign: perfect classification (15/15) FTC: only one misclassified PTC: 2 misclassified (one as FTC, one as Benign) MTC: also strong, only a few mislabels ## More information For more information, kindly see this notebook:[USGResearch.ipynb · Afifsudoers/Thyroid-Canciroma-Image-Classifier-Model at main](https://huggingface.co/Afifsudoers/Thyroid-Canciroma-Image-Classifier-Model/blob/main/USGResearch.ipynb) ## Where you can find this model? **HuggingFace**:[Afifsudoers/Thyroid-Canciroma-Image-Classifier-Model · Hugging Face](https://huggingface.co/Afifsudoers/Thyroid-Canciroma-Image-Classifier-Model) Kaggle: [Afif Ali Saadman | Thyroid\_Canciroma\_Classifier | Kaggle](https://www.kaggle.com/models/afifalisaadman/thyroid-canciroma-classifier/) ## Citation ``` @misc{saadman2025thyroid, author = {Afif Ali Saadman}, title = {Thyroid Ultrasonograph Image Classifier}, year = {2025}, month = {October}, note = {Deep Learning (Modified AlexNet variant), PyTorch. Available at \url{https://huggingface.co/Afifsudoers/Thyroid-Canciroma-Image-Classifier-Model} and \url{https://www.kaggle.com/models/afifalisaadman/thyroid-canciroma-classifier/}} } ```