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.
- Acne detection using YOLOv8
- Custom labeled dataset
- Simple installation & setup
- Jupyter Notebook based training
- Works on Windows / Linux / macOS
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
- Python 3.8 – 3.11
- pip
- Git
- (Optional) NVIDIA GPU + CUDA
git clone https://github.com/sufiinamulhassan/Acne-Detection-Using-YOLOv8.git cd Acne-Detection-Using-YOLOv8
Windows: python -m venv venv venv\Scripts\activate
Linux / macOS: python3 -m venv venv source venv/bin/activate
pip install -r requirements.txt
If YOLOv8 is not installed: pip install ultralytics
data.yaml example:
train: ../train/images val: ../valid/images test: ../test/images
nc: 1 names: ['Acne']
Open Jupyter Notebook:
jupyter notebook
Open: acne-detection-using-yolo-v8.ipynb
Run all cells to train the model.
from ultralytics import YOLO
model = YOLO("runs/detect/train/weights/best.pt") model.predict(source="image.jpg", save=True)
- Bounding boxes on acne areas
- Confidence scores
- Saved prediction images
YOLOv8 (Ultralytics)
Inam Ul Hassan
BSCS Student | AI/ML Engineer | Data Scientist
Lahore, Pakistan
Star ⭐ the repository if you find it helpful!