update train file nam

This commit is contained in:
Victor Phan
2026-03-03 20:36:24 +07:00
parent 0a892c736a
commit 7574cec64d
14 changed files with 26 additions and 75 deletions
+3 -3
View File
@@ -3807,7 +3807,7 @@ async def change_detection_predict_workflow(
# --- STEP 6: COMPARE WITH GROUND TRUTH ---
print("[CHANGE DETECTION] Comparing with ground truth...")
gt_shapefile = "train/ST_training data_updated_1130points_new.shp"
gt_shapefile = "train/ST_training_data_updated_1130points_new.shp"
gt_raster = rasterize_ground_truth(gt_shapefile, (height, width), bbox, class_column="class")
# Calculate changes
@@ -3912,7 +3912,7 @@ async def change_detection_workflow(request: ChangeDetectionWorkflowRequest):
pred_transform = pred_ds.transform
# Rasterize ground truth training data
gt_shapefile = "train/ST_training data_updated_1130points_new.shp"
gt_shapefile = "train/ST_training_data_updated_1130points_new.shp"
gt_raster = rasterize_ground_truth(gt_shapefile, pred_arr.shape, bbox, class_column="class")
# Calculate change detection
@@ -4700,7 +4700,7 @@ async def predict_with_ndvi(config: PredictionWithNDVIConfig, background_tasks:
change_map = None
try:
# Use training shapefile as ground truth
gt_shapefile = "train/ST_training data_updated_1130points_new.shp"
gt_shapefile = "train/ST_training_data_updated_1130points_new.shp"
gt_raster = rasterize_ground_truth(gt_shapefile, (height, width), bbox, class_column="class")
# Compare prediction and ground truth
mask_valid = (gt_raster >= 0) & (prediction_raster >= 0)