Skip to content

An end-to-end full-stack web app that uses πŸ“Έ EfficientNetV2B0 to detect 6 common skin conditions from face images, and 🧠 Gemini AI to provide skincare plans, remedy suggestions, ingredient analysis, and professional PDF reports. Users can also enter their city to fetch top dermatologists via real-time Selenium scraping from Justdial

License

Notifications You must be signed in to change notification settings

Tanishq-789/Skin-condition-analyzer

Repository files navigation

🧠 AI Skincare Assistant

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.


πŸ—οΈ Project Structure

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)

🧩 Features

  • πŸ” 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.

πŸš€ How to Run Locally

  1. Clone the Repository

    git clone https://github.com/Tanishq-789/Skin-condition-analyzer.git
    cd Skin-condition-analyzer
  2. Create and Activate a Virtual Environment

    python -m venv venv
    source venv/bin/activate  # On Windows: venv\Scripts\activate
  3. Install Dependencies

    pip install -r requirements.txt
  4. Set Up API Key

    • Create a folder named .streamlit in 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"
  5. Run the Streamlit App

    streamlit run app.py

    The app will automatically download the required Keras model from Hugging Face on the first run.


πŸ“Š Model Information

  • 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.

πŸ“š References & Additional Efforts

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.


πŸ“¦ Tech Stack


πŸ§ͺ Web App Results

Home Page :

Home Page

Prediction Page :

Prediction Page

Remedies Page :

Remedies Page

Consult Experts Section :

Consult Experts

✍️ Author

Tanishq Shinde πŸŽ“ B.E. Computer Engineering, PICT 🌐 GitHub | LinkedIn | Hugging Face

About

An end-to-end full-stack web app that uses πŸ“Έ EfficientNetV2B0 to detect 6 common skin conditions from face images, and 🧠 Gemini AI to provide skincare plans, remedy suggestions, ingredient analysis, and professional PDF reports. Users can also enter their city to fetch top dermatologists via real-time Selenium scraping from Justdial

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages