diff --git a/deepforest/utilities.py b/deepforest/utilities.py index 6cc3d46b..91ca9285 100644 --- a/deepforest/utilities.py +++ b/deepforest/utilities.py @@ -296,7 +296,7 @@ def shapefile_to_annotations(shapefile, raster_crs = src.crs # Check matching the crs - if not gdf.crs == raster_crs: + if not gdf.crs.to_string() == raster_crs.to_string(): raise ValueError("The shapefile crs {} does not match the image crs {}".format( gdf.crs, src.crs))