Downloads · 30 days
0
harleensachdev/yolo-lanyard-object-detector
yolo-lanyard-object-detector is a object detection model from harleensachdev. Use it when you need objects located in an image. The card lists the license as mit.
A YOLOv8 nano model fine-tuned to detect ID cards/lanyards worn by people. This is Stage 2 of a two-stage detection pipeline for access control and security monitoring.
Downloads · 30 days
0
Access
Public
Updated Feb 1, 2026
Repo size
6.2 MB
Likes
0
Public
Click a slice to open those files.
.pt6.2 MB · 100%
From the Hugging Face model README
A YOLOv8 nano model fine-tuned to detect ID cards/lanyards worn by people. This is Stage 2 of a two-stage detection pipeline for access control and security monitoring.
id_tag (lanyard/ID card detection)This model is designed to work in a two-stage pipeline:
pip install ultralytics opencv-python huggingface_hub
from ultralytics import YOLO
import cv2
# Load model
model = YOLO("harleensachdev/yolo-lanyard-detector")
# Run detection
image = cv2.imread("your_image.jpg")
results = model(image)
# Check if lanyard detected
has_lanyard = len(results[0].boxes) > 0
if has_lanyard:
print("✓ Lanyard detected - Access granted")
else:
print("✗ No lanyard - Access denied")
from ultralytics import YOLO
import cv2
# Stage 1: Detect people
person_detector = YOLO("yolov8n.pt") # COCO pretrained
person_results = person_detector(image)
# Check if person detected (class 0 = person in COCO)
has_person = any(int(box.cls[0]) == 0 for box in person_results[0].boxes)
# Stage 2: Detect lanyard
lanyard_detector = YOLO("harleensachdev/yolo-lanyard-detector")
lanyard_results = lanyard_detector(image)
has_lanyard = len(lanyard_results[0].boxes) > 0
# Final decision
if has_person and has_lanyard:
print("✓ PASS: Person with valid ID")
elif has_person and not has_lanyard:
print("✗ FAIL: Person without ID")
else:
print("⚠️ No person detected")
This model is designed for security and access control purposes within the framework of SDG 16 (Peace, Justice and Strong Institutions). Users should:
@software{yolov8_lanyard_detector,
author = {Harleen Sachdev},
title = {YOLOv8 Lanyard Detector},
year = {2026},
publisher = {HuggingFace},
url = {https://huggingface.co/harleensachdev/yolo-lanyard-object-detector}
}
MIT License - See LICENSE file for details
For questions or collaboration: [Your contact information]
Last Updated: 2026-02-01