Skip to content

Dewiin/DTM_CTP2024

Repository files navigation

logo

AI-Powered Acne Detection


Table of Contents
  1. Introduction
  2. Features
  3. Getting Started
  4. Demo
  5. Contributing
  6. License

Introduction

BlemishBot aims to provide fast treatment suggestions for various acne conditions. We want people to gain clarity about their skin conditions, and we want them to get a general understanding of what treatments they can expect to start using. BlemishBot is NOT perfectly accurate, and it is NOT intended to replace professional consultations. For transparency, we actively encourage users to seek professional treatment from dermatologists.

Model Workflow

flowchart

Back to top

Features

  • Image-Based Detection: Detects and classifies 6 acne types:

    • papules
    • pustules
    • nodules
    • blackheads
    • cysts
    • acne scars
  • Chatbot Support: BlemishAI provides general skincare advice and answers to user queries.

  • Streamlit Interface: User-friendly web interface for image uploads and chatbot interaction.

  • Custom Training: The model is fine-tuned on a labeled dataset to ensure high accuracy.

Built With

Python Numpy OpenCV Streamlit Pillow Google Gemini

Back to top

Getting Started

To get a local copy of BlemishBot up and running locally follow these steps:

Prerequisites

  1. Make sure you have Python installed and use Python3 version 3.11 NOTE: You can check if Python is installed and its version with
    python -V | python --version
  2. Make sure you have Git installed
    NOTE: You can check if Python is installed and its version with
    git -v | git --version

Setup

  1. Navigate to the directory where you want to clone/run/save the application:
    cd example_directory
  2. Clone the repository:
    git clone https://github.com/Dewiin/DTM_CTP2024.git
  3. Navigate to the project directory:
    cd DTM_CTP2024
  4. Create a Python virtual environment in the cloned project directory:
    python3.11 -m venv .blemishbot_venv
  5. Activate the virtual environment (Windows OR Mac/Linux):
    1. Windows
        .\.blemishbot_venv\Scripts\activate
    2. Mac/Linux
        source .blemishbot_venv/bin/activate
  6. Install dependencies:
    pip install -r requirements.txt
  7. Set up a Gemini API key:
    • Inside the .streamlit folder, create a secrets.toml file. Inside secrets.toml, write:
      [secrets]
      GEMINI_API_KEY = "your-api-key"
    • Replace your-api-key with your Gemini API key (keep the quotations).

Usage

  1. Run the application:
    streamlit run app.py
  2. Using the features:
    • Upload an image to detect and classify acne.
    • Interact with the chatbot for skincare advice.

Back to top

Demo

Streamlit Web Application

Demo.mp4

Back to top

Contributing

We like open-source and want to develop practical applications for real-world problems. However, individual strength is limited. So, any kinds of contribution is welcome, such as:

  • New features
  • New models (your fine-tuned models)
  • Bug fixes
  • Typo fixes
  • Suggestions
  • Maintenance
  • Documents
  • etc

Heres how you can contribute:

  1. Fork the repository
  2. Create a new feature branch
  3. Commit your changes
  4. Push to the branch
  5. Submit a pull request

Back to top

License

MIT License

Copyright (c) 2024 DTM

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

About

Acne detection model

Resources

License

Stars

Watchers

Forks

Contributors