File size: 1,450 Bytes
31781f0 ae84cff 31781f0 ae84cff | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 | ---
license: mit
tags:
- yolov5
- smoking-detection
- object-detection
- onnx
- pytorch
---
# SmokeGuard Models
YOLOv5 models untuk deteksi aktivitas merokok secara real-time.
## Models
| Model | Format | Size | Description |
|-------|--------|------|-------------|
| `best_checkpoint.pt` | PyTorch | ~40 MB | Model training terbaik |
| `last_checkpoint.pt` | PyTorch | ~40 MB | Checkpoint terakhir |
| `best_checkpoint.onnx` | ONNX (FP32) | ~80 MB | Export ONNX untuk inference |
| `best_checkpoint_int8.onnx` | ONNX (INT8) | ~20 MB | Quantized untuk CPU inference |
## Usage
### PyTorch
```python
import torch
model = torch.hub.load("ultralytics/yolov5", "custom", path="best_checkpoint.pt")
results = model("image.jpg")
results.show()
```
### ONNX Runtime
```python
import onnxruntime as ort
import numpy as np
session = ort.InferenceSession("best_checkpoint_int8.onnx")
input_name = session.get_inputs()[0].name
input_data = np.random.randn(1, 3, 640, 640).astype(np.float32)
output = session.run(None, {input_name: input_data})
```
## Quantization
Untuk quantization ONNX model, lihat notebook `quantisize.ipynb`.
## Citation
```bibtex
@article{IPI4527801,
title = "IMPLEMENTASI METODE YOLOv5 PADA SISTEM PENDETEKSI ROKOK DI AREA BEBAS ASAP ROKOK",
journal = "Institut Penelitian Matematika, Komputer, Keperawatan, Pendidikan dan Ekonomi (IPM2KPE)",
year = "2024",
author = "Fathoni, Aliffatul Majid; Zuliarso, Eri"
}
```
|