muhammadsalmanalfaridzi commited on
Commit
9c68099
·
verified ·
1 Parent(s): 8d7cdc3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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 = "yolov8s-ppe.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="yolov8", # Tipe model YOLO, sesuaikan jika model YOLO yang digunakan berbeda
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