Update app.py
Browse files
app.py
CHANGED
@@ -8,13 +8,13 @@ from PIL import Image
|
|
8 |
import numpy as np
|
9 |
|
10 |
# Inisialisasi model deteksi menggunakan SAHI
|
11 |
-
model_path = "
|
12 |
confidence_threshold = 0.6 # Threshold kepercayaan
|
13 |
sahi_device = 'cuda' # Ganti dengan 'cpu' jika tidak menggunakan GPU
|
14 |
|
15 |
# Memuat model YOLO menggunakan SAHI
|
16 |
sahi_model = AutoDetectionModel.from_pretrained(
|
17 |
-
model_type="
|
18 |
model_path=model_path,
|
19 |
confidence_threshold=confidence_threshold,
|
20 |
device=sahi_device
|
|
|
8 |
import numpy as np
|
9 |
|
10 |
# Inisialisasi model deteksi menggunakan SAHI
|
11 |
+
model_path = "best.pt" # Ganti dengan path model YOLO lokal Anda
|
12 |
confidence_threshold = 0.6 # Threshold kepercayaan
|
13 |
sahi_device = 'cuda' # Ganti dengan 'cpu' jika tidak menggunakan GPU
|
14 |
|
15 |
# Memuat model YOLO menggunakan SAHI
|
16 |
sahi_model = AutoDetectionModel.from_pretrained(
|
17 |
+
model_type="yolov11", # Tipe model YOLO, sesuaikan jika model YOLO yang digunakan berbeda
|
18 |
model_path=model_path,
|
19 |
confidence_threshold=confidence_threshold,
|
20 |
device=sahi_device
|