Spaces:
Sleeping
Sleeping
Update yolo_predictor.py
Browse files- yolo_predictor.py +2 -2
yolo_predictor.py
CHANGED
|
@@ -17,7 +17,7 @@ def load_yolo_model(model_path):
|
|
| 17 |
logger.info(f"Loading YOLO model from: {model_path}")
|
| 18 |
return YOLO(model_path)
|
| 19 |
|
| 20 |
-
def predict_yolo(yolo_model, image_path, conf=0.
|
| 21 |
"""
|
| 22 |
Predict using YOLO model on 4-channel TIFF image
|
| 23 |
|
|
@@ -103,7 +103,7 @@ def create_4channel_tiff(rgb_array, ndvi_array, output_path):
|
|
| 103 |
tifffile.imwrite(output_path, four_channel)
|
| 104 |
logger.info(f"Successfully saved 4-channel TIFF (RGB+NDVI format) to: {output_path}")
|
| 105 |
|
| 106 |
-
def predict_pipeline(ndvi_model, yolo_model, rgb_array, conf=0.
|
| 107 |
"""
|
| 108 |
Full pipeline: RGB -> NDVI -> 32-bit 4-channel TIFF (RGB+NDVI) -> YOLO prediction
|
| 109 |
|
|
|
|
| 17 |
logger.info(f"Loading YOLO model from: {model_path}")
|
| 18 |
return YOLO(model_path)
|
| 19 |
|
| 20 |
+
def predict_yolo(yolo_model, image_path, conf=0.001):
|
| 21 |
"""
|
| 22 |
Predict using YOLO model on 4-channel TIFF image
|
| 23 |
|
|
|
|
| 103 |
tifffile.imwrite(output_path, four_channel)
|
| 104 |
logger.info(f"Successfully saved 4-channel TIFF (RGB+NDVI format) to: {output_path}")
|
| 105 |
|
| 106 |
+
def predict_pipeline(ndvi_model, yolo_model, rgb_array, conf=0.001):
|
| 107 |
"""
|
| 108 |
Full pipeline: RGB -> NDVI -> 32-bit 4-channel TIFF (RGB+NDVI) -> YOLO prediction
|
| 109 |
|