Update app.py
Browse files
app.py
CHANGED
@@ -41,7 +41,7 @@ def detect_combined(image):
|
|
41 |
|
42 |
try:
|
43 |
# ========== [1] YOLO: Deteksi Produk Nestlé (Per Class) ==========
|
44 |
-
yolo_pred = yolo_model.predict(temp_path, confidence=
|
45 |
|
46 |
# Hitung per class Nestlé
|
47 |
nestle_class_count = {}
|
@@ -191,7 +191,7 @@ def detect_objects_in_video(video_path):
|
|
191 |
cv2.imwrite(frame_path, frame)
|
192 |
|
193 |
# Process predictions for frame
|
194 |
-
predictions = yolo_model.predict(frame_path, confidence=
|
195 |
|
196 |
# Update class count for this frame
|
197 |
frame_class_count = {}
|
|
|
41 |
|
42 |
try:
|
43 |
# ========== [1] YOLO: Deteksi Produk Nestlé (Per Class) ==========
|
44 |
+
yolo_pred = yolo_model.predict(temp_path, confidence=50, overlap=80).json()
|
45 |
|
46 |
# Hitung per class Nestlé
|
47 |
nestle_class_count = {}
|
|
|
191 |
cv2.imwrite(frame_path, frame)
|
192 |
|
193 |
# Process predictions for frame
|
194 |
+
predictions = yolo_model.predict(frame_path, confidence=50, overlap=80).json()
|
195 |
|
196 |
# Update class count for this frame
|
197 |
frame_class_count = {}
|