Instructions to use asna14/yolov8n-proctoring with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- ultralytics
How to use asna14/yolov8n-proctoring with ultralytics:
from ultralytics import YOLOvv8 model = YOLOvv8.from_pretrained("asna14/yolov8n-proctoring") source = 'http://images.cocodataset.org/val2017/000000039769.jpg' model.predict(source=source, save=True) - Notebooks
- Google Colab
- Kaggle
π YOLOv8n β GradicAI Exam Proctoring
YOLOv8 Nano model used for real-time AI-powered exam proctoring in the GradicAI platform.
Model Description
This is the standard YOLOv8n (nano) model from Ultralytics, pre-trained on the COCO dataset. It is used as-is (no fine-tuning) for the GradicAI proctoring service to detect prohibited objects and suspicious behavior during online exams.
| Property | Value |
|---|---|
| Architecture | YOLOv8 Nano |
| Parameters | 3.2M |
| Model Size | ~6 MB |
| Training Data | COCO (80 classes) |
| Input Resolution | 640Γ640 |
| Inference Speed | ~100-300ms (CPU) |
Classes Used for Proctoring
Out of the 80 COCO classes, GradicAI uses only 3 for proctoring:
| COCO Class ID | Label | Proctoring Action |
|---|---|---|
| 0 | person |
Count persons β warn if 0 or >1 |
| 67 | cell phone |
β οΈ Warning: phone detected |
| 73 | book |
β οΈ Warning: study material detected |
Violation Logic
if person_count == 0 β "face_absent" warning
if person_count > 1 β "multiple_persons" warning
if phone detected β "phone" warning
if book detected β "book" warning
3 warnings β exam terminated
How to Use
Installation
pip install ultralytics
Python Inference
from ultralytics import YOLO
# Load model
model = YOLO("yolov8n.pt")
# Run inference on an image
results = model("exam_frame.jpg", conf=0.25)
# Process detections
for box in results[0].boxes:
cls = int(box.cls[0])
conf = float(box.conf[0])
label = results[0].names[cls]
print(f"Detected: {label} ({conf:.2f})")
Integration with GradicAI Proctoring
import base64
import io
import numpy as np
from PIL import Image
from ultralytics import YOLO
PERSON_CLASS = 0
PHONE_CLASS = 67
BOOK_CLASS = 73
model = YOLO("yolov8n.pt")
def analyze_frame(b64_data: str) -> dict:
"""Analyze a base64-encoded webcam frame for proctoring violations."""
if "," in b64_data:
b64_data = b64_data.split(",", 1)[1]
raw = base64.b64decode(b64_data)
img = Image.open(io.BytesIO(raw)).convert("RGB")
frame = np.array(img)
results = model(frame, verbose=False, conf=0.25)[0]
persons = 0
violations = []
for box in results.boxes:
cls = int(box.cls[0])
if cls == PERSON_CLASS:
persons += 1
elif cls == PHONE_CLASS:
violations.append("phone")
elif cls == BOOK_CLASS:
violations.append("book")
if persons == 0:
violations.append("face_absent")
elif persons > 1:
violations.append("multiple_persons")
return {"violations": violations, "person_count": persons}
Part of GradicAI
This model powers the proctoring feature of GradicAI β an AI-powered exam and grading platform:
- π€ AI Grading β GPT-4o grades open-ended answers with per-question feedback
- πΉ Live Proctoring β YOLOv8n webcam monitoring via WebSocket
- π Structured Exams β Google Forms-style per-question UI
- π AI Quizzes β Auto-generated practice quizzes from exam content
License
The YOLOv8 model is released under the AGPL-3.0 license by Ultralytics.
Citation
@software{yolov8_ultralytics,
author = {Glenn Jocher and Ayush Chaurasia and Jing Qiu},
title = {Ultralytics YOLOv8},
version = {8.0.0},
year = {2023},
url = {https://github.com/ultralytics/ultralytics},
license = {AGPL-3.0}
}
- Downloads last month
- 14