Spaces:
Sleeping
Sleeping
conf threshold increased to 0.01
Browse files- yolo_predictor.py +2 -2
yolo_predictor.py
CHANGED
|
@@ -76,7 +76,7 @@ def validate_4channel_tiff(image_path):
|
|
| 76 |
logger.error(f"Could not validate TIFF file. Tifffile error: {str(e)}, Rasterio error: {str(e2)}")
|
| 77 |
raise ValueError(f"Could not validate TIFF file. Errors: tifffile={str(e)}, rasterio={str(e2)}")
|
| 78 |
|
| 79 |
-
def predict_yolo(yolo_model, image_path, conf=0.
|
| 80 |
"""
|
| 81 |
Predict using YOLO model on 4-channel TIFF image
|
| 82 |
|
|
@@ -100,7 +100,7 @@ def predict_yolo(yolo_model, image_path, conf=0.001):
|
|
| 100 |
logger.info(f"YOLO prediction completed. Results type: {type(results[0])}")
|
| 101 |
return results[0] # Return first result
|
| 102 |
|
| 103 |
-
def predict_pipeline(ndvi_model, yolo_model, image_path, conf=0.
|
| 104 |
"""
|
| 105 |
Simplified pipeline: Validate input -> Run YOLO prediction
|
| 106 |
|
|
|
|
| 76 |
logger.error(f"Could not validate TIFF file. Tifffile error: {str(e)}, Rasterio error: {str(e2)}")
|
| 77 |
raise ValueError(f"Could not validate TIFF file. Errors: tifffile={str(e)}, rasterio={str(e2)}")
|
| 78 |
|
| 79 |
+
def predict_yolo(yolo_model, image_path, conf=0.01):
|
| 80 |
"""
|
| 81 |
Predict using YOLO model on 4-channel TIFF image
|
| 82 |
|
|
|
|
| 100 |
logger.info(f"YOLO prediction completed. Results type: {type(results[0])}")
|
| 101 |
return results[0] # Return first result
|
| 102 |
|
| 103 |
+
def predict_pipeline(ndvi_model, yolo_model, image_path, conf=0.01):
|
| 104 |
"""
|
| 105 |
Simplified pipeline: Validate input -> Run YOLO prediction
|
| 106 |
|