8Opt/yolo11-human-nonhuman-cls
By 8Opt · ↓ 6 · ♥ 1 · Updated 2026-01-04
What's in this repo
This page lists the files in 8Opt/yolo11-human-nonhuman-cls, including model.onnx.
- 1 ONNX models (.onnx files)
- 4 files, including 1 .md, 1 .pt, 1 .onnx
- Last updated 2026-01-04
ONNX files
| File | Size | Download |
|---|---|---|
| model.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
YOLOv11n Human vs Non-Human Classification
This is a fine-tuned YOLOv11s-cls model for binary classification.
📊 Performance
- Test Accuracy: 98.24% (836/851 correctly classified)
- Dataset: Human faces vs. Non-human (Statues, Art, Anime, Gaming)
- Experiment ID:
yolo11s_cls_260104_086
🚀 Model Usage
1. Using Ultralytics (Python)
The easiest way to use the trained PyTorch model:
from ultralytics import YOLO
# Load the model
model = YOLO('path/to/best.pt')
# Predict on an image
results = model('image.jpg')
# Process results
for result in results:
probs = result.probs # Probs object for classification outputs
print(f"Top-1 class: {result.names[probs.top1]}")
print(f"Confidence: {probs.top1conf:.2f}")
2. Using YOLO CLI
yolo classify predict model=path/to/best.pt source='image.jpg'
3. Using ONNX Runtime
For production or edge deployment without PyTorch:
import onnxruntime as ort
import numpy as np
import cv2
# Initialize session
session = ort.InferenceSession("model.onnx")
# Preprocess (Resize to 224x224, normalize [0, 1], CHW format)
img = cv2.imread("image.jpg")
img = cv2.resize(cv2.cvtColor(img, cv2.COLOR_BGR2RGB), (224, 224))
img = img.astype(np.float32) / 255.0
img = img.transpose(2, 0, 1)[np.newaxis, :] # Add batch dim
# Run Inference
outputs = session.run(None, {"images": img})
predicted_idx = np.argmax(outputs[0])
print(f"Predicted Class Index: {predicted_idx}")
📈 Baseline Metrics (04/01/2026)
- Model: YOLOv11s-cls
- Input Size: 224x224
- Test Accuracy: 98.24%
Model info
ultralytics
ultralytics
onnx
real-time
yolo
yolo11
classification
human-detection
vi
en
base_model:Ultralytics/YOLO11
base_model:quantized:Ultralytics/YOLO11
license:mit
↓ 6
♥ 1
Created: 2026-01-04
Updated: 2026-01-04
View on Hugging FaceFiles (4)
.gitattributes
README.md
best.pt
model.onnx
ONNX
Related models
More from 8Opt
No other models by this author.
More models
No task type declared.