Private Classification of Malignant Skin Tumors using a Neural Network
Project Overview This project uses neural networks to classify skin melanomas as benign or malignant based on high-resolution images. It aims to provide a private and fast preliminary assessment tool for individuals concerned about skin tumors, potentially before seeking professional medical advice, without having to publicly expose sensitive pictures that some individuals might not be comfortable with having out in public. Nillion Blind App functionality allows us to perform the necessary operations for inference in images without the model looking at the images.
Dataset The neural network is trained on a dataset comprising 13,900 high-resolution images categorized into benign and malign melanomas. This dataset is sourced from a publicly available collection on Kaggle, which provides a diverse set of photos to enhance the model's ability to generalize across different cases.
AI Model The core of the project is a neural network developed using nada_ai technology from Nillion. The model was designed to balance performance and comply with the Nillion blockchain storage constraints. It contains only 94 weights, it is still quite accurate.
Performance Metrics The model achieves the following performance metrics:
Precision: 80.607% Recall: 76.327% F1: 78.409% Accuracy: 76.625%
Deployment and Usage The model is hosted on the Nillion testnet, allowing users to interact with it through a Streamlit-based web application. Users can upload images of skin tumors and receive instant predictions on whether they are likely benign or malignant. The application ensures user privacy by not storing images and only using them temporarily to generate predictions.
User Interface The front end is designed with Streamlit, providing a user-friendly interface that requires minimal interaction. Users can upload an image, and the system processes it to provide a prediction. This setup is intended to be accessible even for users with limited technical or medical knowledge, and since our wallet is used to pay for the transactions, we sponsor the testnet computations.
We used python, Nada_ai which allows the implementation of AI frameworks into the Nillion network. Allowing to develop and store Pytorch models in a safe and private way. Finally, the webapp is made in streamlit for a simple and effective implementation. We considered the use of ngrock to allow the use from mobile phone, but gave us struggles with the Nada_ai asynchronous calls.