ONNX Model Zoo

harleensachdev/yolo-lanyard-detector

By harleensachdev · ↓ 0 · ♥ 0 · Updated 2026-01-31

What's in this repo

This page lists the files in harleensachdev/yolo-lanyard-detector, including best.onnx.

  • 1 ONNX models (.onnx files)
  • 6 files, including 1 .md, 1 .onnx, 1 .pt, 1 .png, 1 .json
  • Last updated 2026-01-31

ONNX files

File Size Download
best.onnx — Download

How to use

These ONNX files can be loaded with ONNX Runtime. To inspect a model graph, upload the file to the Netron viewer. Download links point to the original files on Hugging Face.

README

YOLO Lanyard Detector

Object detection model for detecting lanyards/ID badges on people.

Model Details

  • Architecture: YOLOv8 Nano
  • Task: Object Detection
  • Classes:
    • 0: lanyard (person wearing lanyard)
    • 1: no_lanyard (person not wearing lanyard)
  • Framework: Ultralytics YOLOv8

Performance

  • Validation mAP@0.5: 89.2%
  • Test mAP@0.5: 89.7%
  • Precision: 86.0%
  • Recall: 85.6%

Dataset

  • Total Images: 1720
  • Total Boxes: 3216
  • Train: 1204 images
  • Val: 258 images
  • Test: 258 images

Usage

from ultralytics import YOLO

# Load model
model = YOLO('best.pt')

# Predict
results = model('image.jpg')

# Process results
for result in results:
    boxes = result.boxes
    for box in boxes:
        class_id = int(box.cls[0])
        confidence = float(box.conf[0])
        x1, y1, x2, y2 = box.xyxy[0].cpu().numpy()
        
        if class_id == 0:
            print(f"Lanyard detected! Confidence: {confidence:.2f}")
        else:
            print(f"No lanyard. Confidence: {confidence:.2f}")

Real-Time Detection

# Webcam
results = model.predict(source=0, show=True)

# Video
results = model.predict(source='video.mp4', save=True)

Applications

  • School entrance monitoring
  • Office access control
  • Event security
  • Visitor management

SDG Impact

Addresses SDG 16 (Peace, Justice & Strong Institutions) by automating safety checks in educational institutions.

Training

  • Trained on Google Colab (FREE T4 GPU)
  • Training time: 0:20:53.094281
  • Optimizer: Adam
  • Data augmentation: Enabled

License

MIT License


Developed for: Goals in Code Hackathon 2026
Powered by: Featherless AI (Deployment Partner)

Model info

object-detection ultralytics
ultralytics onnx yolov8 object-detection lanyard-detection sdg-16 license:mit region:us
↓ 0 ♥ 0

Created: 2026-01-31

Updated: 2026-01-31

View on Hugging Face

Files (6)

.gitattributes
README.md
best.onnx ONNX
best.pt
confusion_matrix.png
training_summary.json

Related models