Update script.py
Browse files
script.py
CHANGED
|
@@ -39,7 +39,14 @@ def run_inference(model, image_path, conf_threshold, save_path):
|
|
| 39 |
full_path = os.path.join(image_path, image_name)
|
| 40 |
|
| 41 |
# Run inference
|
| 42 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 43 |
|
| 44 |
bbox_list = []
|
| 45 |
category_list = []
|
|
|
|
| 39 |
full_path = os.path.join(image_path, image_name)
|
| 40 |
|
| 41 |
# Run inference
|
| 42 |
+
# NEW (Add imgsz=1024)
|
| 43 |
+
results = model.predict(
|
| 44 |
+
full_path,
|
| 45 |
+
conf=conf_threshold,
|
| 46 |
+
imgsz=1024, # ⬅️ Match your training size
|
| 47 |
+
augment=True, # ⬅️ Optional: 'Test Time Augmentation'. Slows it down slightly but usually boosts mAP by 1-2%
|
| 48 |
+
verbose=False
|
| 49 |
+
)
|
| 50 |
|
| 51 |
bbox_list = []
|
| 52 |
category_list = []
|