alessandro trinca tornidor
commited on
Commit
·
6756dd2
1
Parent(s):
264ecd7
[feat] add source to prefix string on WRITE_TMP_ON_DISK env
Browse files
samgis_lisa_on_cuda/prediction_api/lisa.py
CHANGED
@@ -61,9 +61,9 @@ def lisa_predict(
|
|
61 |
now = datetime.now().strftime('%Y%m%d_%H%M%S')
|
62 |
app_logger.info(msg_write_tmp_on_disk + f"with coords {prefix}, shape:{img.shape}, {len(img.shape)}.")
|
63 |
if img.shape and len(img.shape) == 2:
|
64 |
-
write_raster_tiff(img, transform, f"{prefix}_{now}_", f"raw_tiff", folder_write_tmp_on_disk)
|
65 |
if img.shape and len(img.shape) == 3 and img.shape[2] == 3:
|
66 |
-
write_raster_png(img, transform, f"{prefix}_{now}_", f"raw_img", folder_write_tmp_on_disk)
|
67 |
else:
|
68 |
app_logger.info("keep all temp data in memory...")
|
69 |
|
|
|
61 |
now = datetime.now().strftime('%Y%m%d_%H%M%S')
|
62 |
app_logger.info(msg_write_tmp_on_disk + f"with coords {prefix}, shape:{img.shape}, {len(img.shape)}.")
|
63 |
if img.shape and len(img.shape) == 2:
|
64 |
+
write_raster_tiff(img, transform, f"{source_name}_{prefix}_{now}_", f"raw_tiff", folder_write_tmp_on_disk)
|
65 |
if img.shape and len(img.shape) == 3 and img.shape[2] == 3:
|
66 |
+
write_raster_png(img, transform, f"{source_name}_{prefix}_{now}_", f"raw_img", folder_write_tmp_on_disk)
|
67 |
else:
|
68 |
app_logger.info("keep all temp data in memory...")
|
69 |
|