--- base_model: - apple/mobilevit-small model_name: mobilevit_small-chest_xray tags: - sft - vision - medical-imaging - chest-xray - pneumonia - covid19 - tuberculosis license: apache-2.0 language: - en pipeline_tag: image-classification library_name: transformers --- # 🫁 MobileViT-Small — Chest X-Ray Classifier (LoRA Fine-tune) This model is a **LoRA fine-tuned** version of [`apple/mobilevit-small`](https://huggingface.co/apple/mobilevit-small) for **chest X-ray classification** on **[Chest X-ray Pneumonia, COVID-19 & Tuberculosis dataset](https://www.kaggle.com/datasets/jtiptj/chest-xray-pneumoniacovid19tuberculosis)**. --- ## 🧩 Configuration | Attribute | Value | |------------|-------| | **Base Model** | `apple/mobilevit-small` | | **Fine-tuning Method** | LoRA (Low-Rank Adaptation) | | **Dataset** | [Chest X-ray Pneumonia/COVID-19/Tuberculosis](https://www.kaggle.com/datasets/jtiptj/chest-xray-pneumoniacovid19tuberculosis) | | **Classes** | COVID19, NORMAL, PNEUMONIA, TUBERCULOSIS | | **Epochs** | 10 | | **Batch Size** | 32 | | **Learning Rate** | 0.0005 | | **Optimizer** | AdamW | | **LoRA Config** | r=4, α=32, dropout=0.1, target_modules=[query, value] | | **Trainable Params** | 30.9K / 4.97M (0.62%) | --- ## 🫁 Example Image ![Chest X-Ray Example](https://huggingface.co/Jesteban247/mobilevit_small-chest_xray/resolve/main/chest_xray.png) --- ## 📊 Evaluation Results | Metric | Avg | COVID19 | NORMAL | PNEUMONIA | TUBERCULOSIS | |--------|------|----------|----------|-------------|---------------| | **Accuracy** | 0.9798 | 0.9909 | 0.9661 | 0.9648 | 0.9974 | | **Precision** | 0.9616 | 0.9640 | 0.9130 | 0.9696 | 1.0000 | | **Recall** | 0.9591 | 0.9727 | 0.9245 | 0.9673 | 0.9718 | | **F1 Score** | 0.9603 | 0.9683 | 0.9188 | 0.9684 | 0.9857 | | **AUC** | 0.9968 | 0.9991 | 0.9927 | 0.9959 | 0.9997 | **Test loss:** `0.0938`  **Inference time:** `0.476 s`