ONNX Model Zoo

TristanF04/helmet-detector

By TristanF04 · ↓ 0 · ♥ 0 · Updated 2025-09-25

What's in this repo

This page lists the files in TristanF04/helmet-detector, including resnet18_helmet.onnx.

  • 1 ONNX models (.onnx files)
  • 13 files, including 3 .safetensors, 2 .jpg, 1 .md, 1 .png, 1 .py, 1 .onnx
  • Last updated 2025-09-25

ONNX files

File Size Download
models/resnet18_helmet.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

Helmet vs No-Helmet Classifier (ResNet18)

Goal: Classify if a person is wearing a safety helmet from an image.

Tech: PyTorch, TorchVision, transfer learning (ResNet18), ONNX export.

Results (from Kaggle run)

  • Train/Val/Test split: 70/15/15 on a small demo dataset (49 images total)
  • Best validation accuracy: 100%
  • Test accuracy: 90%
  • Confusion Matrix (test):

Confusion Matrix

Quickstart (Local)

python -m venv .venv
.venv\Scripts\activate
pip install -r requirements.txt
python infer.py sample_images/Helmet6.jpg
python infer.py sample_images/WithoutHelmet9.jpg

Model info

onnx safetensors region:us
↓ 0 ♥ 0

Created: 2025-09-25

Updated: 2025-09-25

View on Hugging Face

Files (13)

.gitattributes
.gitignore
README.md
confusion_matrix.png
infer.py
model.safetensors
model_2cls.safetensors
model_helmet2cls.safetensors
models/resnet18_helmet.onnx ONNX
models/resnet18_helmet.pt
requirements.txt
sample_images/Helmet6.jpg
sample_images/WithoutHelmet9.jpg

Related models