@@ -452,7 +452,7 @@ def save_prediction(
452452
453453 array = self .masks [index ] * mask_multiplier
454454 self .prediction = array
455- array_to_image (array , output , self .image , dtype = dtype , ** kwargs )
455+ array_to_image (array , output , self .source , dtype = dtype , ** kwargs )
456456
457457 if vector is not None :
458458 raster_to_vector (output , vector , simplify_tolerance = simplify_tolerance )
@@ -516,7 +516,7 @@ def predict(
516516 point_labels = self .point_labels
517517
518518 if point_crs is not None :
519- point_coords = coords_to_xy (self .image , point_coords , point_crs )
519+ point_coords = coords_to_xy (self .source , point_coords , point_crs )
520520
521521 if isinstance (point_coords , list ):
522522 point_coords = np .array (point_coords )
@@ -537,7 +537,7 @@ def predict(
537537 point_labels = np .array (point_labels )
538538
539539 if isinstance (box , list ) and point_crs is not None :
540- box = np .array (bbox_to_xy (self .image , box , point_crs ))
540+ box = np .array (bbox_to_xy (self .source , box , point_crs ))
541541
542542 predictor = self .predictor
543543 masks , scores , logits = predictor .predict (
0 commit comments