Skip to content

Commit

Permalink
replace rename with move
Browse files Browse the repository at this point in the history
  • Loading branch information
mpelchat04 committed Sep 9, 2024
1 parent 0fc1a0e commit 75063d3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions inference_segmentation.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
from typing import Dict, Sequence, Union
from dataset.stacitem import SingleBandItemEO
import rasterio
from shutil import move


from utils.aoiutils import aois_from_csv
Expand Down Expand Up @@ -122,6 +123,6 @@ def main(params:Union[DictConfig, Dict]):
with rasterio.open(mask_path, 'r+') as raster:
raster.update_tags(**meta_data_dict)
output_path = get_key_def('output_path', params['inference'], expected_type=str, to_path=True,
default=str(working_folder / f"{aoi.aoi_id}_raw.tif"))
os.rename(mask_path, output_path)
default=mask_path)
move(mask_path, output_path)
logging.info(f"finished inferring image: {aoi.aoi_id} ")

0 comments on commit 75063d3

Please sign in to comment.