Skip to content

Repository files navigation

Acne Detection Using YOLOv8 🧠📸

This project detects acne on facial images using the YOLOv8 object detection model by Ultralytics. It is trained on a custom dataset formatted in YOLO style and can be run on CPU or GPU.


🚀 Features

  • Acne detection using YOLOv8
  • Custom labeled dataset
  • Simple installation & setup
  • Jupyter Notebook based training
  • Works on Windows / Linux / macOS

📂 Project Structure

Acne-Detection-Using-YOLOv8/ ├── data-2/ │ ├── train/ │ │ ├── images/ │ │ └── labels/ │ ├── valid/ │ │ ├── images/ │ │ └── labels/ │ ├── test/ │ │ ├── images/ │ │ └── labels/ │ └── data.yaml ├── acne-detection-using-yolo-v8.ipynb ├── requirements.txt └── README.md


🛠 Requirements

  • Python 3.8 – 3.11
  • pip
  • Git
  • (Optional) NVIDIA GPU + CUDA

⬇️ Installation

1️⃣ Clone Repository

git clone https://github.com/sufiinamulhassan/Acne-Detection-Using-YOLOv8.git cd Acne-Detection-Using-YOLOv8


2️⃣ Create Virtual Environment (Recommended)

Windows: python -m venv venv venv\Scripts\activate

Linux / macOS: python3 -m venv venv source venv/bin/activate


3️⃣ Install Dependencies

pip install -r requirements.txt

If YOLOv8 is not installed: pip install ultralytics


📊 Dataset Configuration

data.yaml example:

train: ../train/images val: ../valid/images test: ../test/images

nc: 1 names: ['Acne']


🚀 Training

Open Jupyter Notebook:

jupyter notebook

Open: acne-detection-using-yolo-v8.ipynb

Run all cells to train the model.


🔍 Inference

from ultralytics import YOLO

model = YOLO("runs/detect/train/weights/best.pt") model.predict(source="image.jpg", save=True)


📈 Output

  • Bounding boxes on acne areas
  • Confidence scores
  • Saved prediction images

🧠 Model

YOLOv8 (Ultralytics)


👤 Author

Inam Ul Hassan
BSCS Student | AI/ML Engineer | Data Scientist
Lahore, Pakistan


🌐 Connect with Me

LinkedIn GitHub Instagram Kaggle LeetCode

⭐ Support

Star ⭐ the repository if you find it helpful!

About

This repository contains an acne detection system built using YOLOv8 as part of the Digital Image Processing course. The project focuses on detecting and localizing acne regions in facial images using a deep learning based object detection approach.

Topics

Resources

Stars

11 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages