Update app.py
Browse files
app.py
CHANGED
@@ -36,11 +36,6 @@ def detect_combined(image):
|
|
36 |
temp_path = temp_file.name
|
37 |
|
38 |
try:
|
39 |
-
# Resize gambar input menjadi 640x640
|
40 |
-
img = Image.open(temp_path)
|
41 |
-
img = img.resize((640, 640), Image.Resampling.LANCZOS) # Ganti ANTIALIAS dengan LANCZOS
|
42 |
-
img.save(temp_path, format="JPEG")
|
43 |
-
|
44 |
# ========== [1] YOLO: Deteksi Produk Nestlé (Per Class) ==========
|
45 |
yolo_pred = yolo_model.predict(temp_path, confidence=50, overlap=80).json()
|
46 |
|
|
|
36 |
temp_path = temp_file.name
|
37 |
|
38 |
try:
|
|
|
|
|
|
|
|
|
|
|
39 |
# ========== [1] YOLO: Deteksi Produk Nestlé (Per Class) ==========
|
40 |
yolo_pred = yolo_model.predict(temp_path, confidence=50, overlap=80).json()
|
41 |
|