Downloads · 30 days
161
31% of all-time downloads
lakshya-rawat/YOLOV8s-Custom-Logo-detection
YOLOV8s-Custom-Logo-detection is a object detection model from lakshya-rawat. Use it when you need objects located in an image. It is set up for ultralytics. The card lists the license as apache-2.0.
Author: lakshya-rawat Model family: Ultralytics YOLOv8s Task: Object detection (logo detection on PDF first‑page images)
Downloads · 30 days
161
31% of all-time downloads
All-time downloads
522
Public
Repo size
22.8 MB
Likes
3
Public
Click a slice to open those files.
.pt22.5 MB · 97%
From the Hugging Face model README
Author: lakshya-rawat
Model family: Ultralytics YOLOv8s
Task: Object detection (logo detection on PDF first‑page images)
This repository contains a YOLOv8s model checkpoint trained on a custom logo detection dataset built from the first pages of PDF documents.
It is intended to be used as a building block for applications that need to:
The main training checkpoint is stored as:
best.pt – YOLOv8s weightsNote: The surrounding FastAPI application and clustering pipeline are not included here; this repo focuses only on the reusable detection model and a minimal usage script.
ultralytics Python package.jpg / .png)best.pt in this repositoryOverall training metrics:

Precision / recall curves:



Confusion matrices:


Install Python dependencies:
pip install ultralytics torch torchvision
If you plan to use this model from the Hugging Face Hub, also install:
pip install huggingface_hub
best.pt)best.pt in the same directory as this README.md and main.py.python main.py --weights best.pt --source path/to/first_page_image.jpg
This will:
best.ptYou can also use the model directly from Python:
from ultralytics import YOLO
model = YOLO("best.pt") # path to local checkpoint
results = model("path/to/first_page_image.jpg")
results[0].show() # display image with boxes
Once the model is pushed to the Hub under your account (for example):
lakshya-rawat/yolov8s-pdf-logo-detectorYou can load it directly:
from ultralytics import YOLO
model = YOLO("lakshya-rawat/yolov8s-pdf-logo-detector")
results = model("path/to/first_page_image.jpg")
for r in results:
r.show()
If you prefer to download the weights first:
huggingface-cli download lakshya-rawat/yolov8s-pdf-logo-detector best.pt
python main.py --weights best.pt --source path/to/first_page_image.jpg
You can reuse the same pattern as in main.py to plug the model into your own application:
from ultralytics import YOLO
model = YOLO("best.pt") # or "lakshya-rawat/yolov8s-pdf-logo-detector"
def detect_logos(image_path: str):
results = model(image_path)
detections = []
for r in results:
for box in r.boxes:
detections.append({
"xyxy": box.xyxy[0].tolist(),
"confidence": float(box.conf[0]),
"class_id": int(box.cls[0]),
})
return detections
You are free to extend this with OCR, clustering, or PDF‑specific logic in your own codebase.
best.pt – YOLOv8s checkpoint trained on a custom PDF logo dataset.main.py – Minimal example script to run inference via CLI.README.md – This model card and usage documentation.