AK
Akhand-Pratap-Tiwari/skin_cancer_classification_flask_app
Flask app used to classify cancer images into 7 classes using soft attention and IRV2.
Flask App for Skin Cancer classification using IRV2 and Soft Attention
A flask app to run cancer classifier and classifiy cancer into 7 given classes:
akiec: Actinic Keratoses and Intraepithelial Carcinoma/Bowen diseasebcc: Basal Cell Carcinomabkl: Benign lesions of the Keratosis type (solar lentigine/seborrheic keratoses and lichen-planus like keratosis)df: Dermatofibromamel: Melanomanv: Melanocytic Nevivasc: Vascular Lesions (angiomas, angiokeratomas, pyogenic granulomas and hemorrhages)
File descriptions:
- The
app.pycontains the main logic for the flask app. - The
example_image.jpgis the exmaple image which is sent in encoded form in base64 format. example_request.ipynbshows how to use this flask app.requirements.txtcontains the main requirements for the project.saved_model_v4.hdf5is the actual model being used for the classification.
How to run:
- First install Python 3.11.6.
- Install everything mentioned in requirements.txt.
- Install any additional libs if any error occurs.
- Now, in the root directroy run the
flask runcommand. - Now, in the run the jupyter notebook to see the response as output.
This project was made more as microservice rather than being a standalone service so it might not meet your taste but it demonstrates the required functionality. You can see the example notebook for more info.
More to read
If you want to dive deeper into the model code and soft attention then have a look at this: