Spaces:
Running
Running
import gradio as gr | |
examples = [ | |
["Nevus_NCI.jpg"], | |
["melanoma_example.jpg"], | |
["ISIC_0115851.JPG"], | |
["mel_contact_polarized.JPG"], | |
["lesion2.jpg"], | |
["lesion3.jpg"], | |
# Add more images as needed | |
] | |
# Title and description | |
title = "🔎 Skin Cancer Image Classification - Classificazione di Tumori della Pelle" | |
description = """ | |
### Description | |
This app classifies skin cancer images into different categories using an AI model. 🖼️✨ | |
Upload your own image or use one of the examples to see the results. | |
**DISCLAIMER⚠️**\n | |
**This demo is for educational and informational purposes only**.It is not intended to provide a medical diagnosis, nor should it be considered a substitute for professional medical advice, diagnosis, or treatment. We are not liable for any misclassification of skin cancer images. If you have concerns about your health, please consult a healthcare professional. | |
### Descrizione | |
Questa app classifica le immagini di cancro della pelle in diverse categorie utilizzando un modello che utilizza intelligenza artificiale. 🖼️✨ | |
Carica la tua immagine o usa uno degli esempi elencati qui sotto per vedere i risultati. | |
**AVVISO⚠️**\n | |
Questa demo è solo a scopo educativo e informativo. Non è intesa a fornire una diagnosi medica, né deve essere considerata un sostituto di un consulto medico professionale, una diagnosi o un trattamento. Non siamo responsabili per eventuali errori nella classificazione delle immagini di cancro della pelle. Se hai preoccupazioni sulla tua salute, consulta un professionista sanitario. | |
### About Us | |
We are researchers in the [AImageLab](https://aimagelab.ing.unimore.it/imagelab/) 🔬 of the University of Modena and Reggio Emilia. | |
Some of us are working on **Artificial Intelligence for Medical Imaging** 🧠🧑⚕️👩⚕️🥼 | |
\n | |
Siamo dei ricercatori del laboratorio [AImageLab](https://aimagelab.ing.unimore.it/imagelab/) 🔬 dell' Università di Modena e Reggio Emilia. | |
Alcuni di noi lavorano sul **Medical Imaging con uso di Intelligenza Artificiale** 🧠🧑⚕️👩⚕️🥼 | |
### Technical Details 🤓 | |
The architecture used is a pre- trained Vision Transformer (ViT) on the ImageNet21k, with a fine-tuning on the [HAM10k dataset](https://huggingface.co/datasets/marmal88/skin_cancer) and a modified head to accommodate for the classes: Benign keratosis-like lesions, Basal cell carcinoma, Actinic keratoses, Vascular lesions, Melanocytic nevi, Melanoma, Dermatofibroma. | |
The best validation accuracy obtained was 0.9695. However this score is not a good indicator of performance given the class imbalances present in the dataset. | |
### Credits | |
Original model trained and uploaded on Hugging Face by user [Anwarkh1](https://huggingface.co/Anwarkh1). | |
HF Space dapted and updated by [Ettore Candeloro](https://ettorecandeloro.me/) | |
""" | |
# Load the model and launch the app with title, description, examples, | |
demo = gr.load("models/Anwarkh1/Skin_Cancer-Image_Classification", examples=examples, title=title, description=description).launch() | |