An end-to-end AI-powered web application built with Streamlit that leverages a deep learning model (EfficientNetV2B0) to classify six common skin conditions from facial images, generates personalized treatment plans using Gemini LLM, analyzes skincare ingredients, and assists users in locating local dermatologists through location-based web scraping.
This project is a monolithic Streamlit application. The model file is hosted on Hugging Face and downloaded on the first run.
skin-condition-app/
βββ π Skincare_rec.py # The main Streamlit application script
βββ π requirements.txt # Python dependencies for deployment
βββ π .streamlit/
β βββ secrets.toml # For storing API keys securely
βββ README.md # Project overview (this file)
-
π Skin Condition Prediction
- Upload a clear image of a skin concern.
- The app uses a fine-tuned EfficientNetV2B0 model to predict one of six conditions:
- Acne
- Carcinoma
- Eczema
- Keratosis
- Milia
- Rosacea
-
π€ AI-Powered Recommendations
- Utilizes the Gemini AI API to provide instant, personalized advice based on the prediction.
- Generates actionable home remedies and a tailored 7-day skincare plan.
-
π©ββοΈ Consult Dermatologists
- An integrated feature to find local dermatologists for professional consultation.
- Users can enter their city, and the app scrapes Justdial.com to provide a list of top-rated specialists with their name, location, and contact number.
-
Clone the Repository
git clone https://github.com/Tanishq-789/Skin-condition-analyzer.git cd Skin-condition-analyzer -
Create and Activate a Virtual Environment
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install Dependencies
pip install -r requirements.txt
-
Set Up API Key
- Create a folder named
.streamlitin your project directory. - Inside it, create a file named
secrets.toml. - Add your Gemini API key to the file:
GEMINI_API_KEY="your_google_gemini_api_key"
- Create a folder named
-
Run the Streamlit App
streamlit run app.py
The app will automatically download the required Keras model from Hugging Face on the first run.
- Architecture: EfficientNetV2B0 (pretrained on ImageNet)
- Accuracy: Achieved ~95.6% accuracy on the test dataset.
- Loss Function: Sparse Categorical Crossentropy
- Training: Fine-tuned on the augmented skin condition dataset with class weights to handle imbalances.
To ensure genuine implementation and best practices, I referred to the official Keras documentation and examples for fine-tuning EfficientNet models:
This served as a baseline reference while adapting and customizing the model training pipeline for skin condition classification.
- Framework: Streamlit
- ML Framework: TensorFlow / Keras
- AI Service: Gemini API
- Web Scraping: Selenium, BeautifulSoup4
- Deployed Model: skin-condition-classifier on Hugging Face
- Dataset: Augmented Skin Conditions Dataset on Kaggle
Tanishq Shinde π B.E. Computer Engineering, PICT π GitHub | LinkedIn | Hugging Face