Skip to content

Commit a73146d

Browse files
committed
iw3: Fix edge dilation value contained in the filename when using --metadata
1 parent 9ca17ac commit a73146d

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

iw3/utils.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,9 +138,14 @@ def to_deciaml(f, scale, zfill=0):
138138
ema = f"_ema{to_deciaml(args.ema_decay, 100, 2)}"
139139
else:
140140
ema = ""
141+
if isinstance(args.edge_dilation, (list, tuple)):
142+
edge_dilation = "x".join([str(v) for v in args.edge_dilation])
143+
else:
144+
edge_dilation = args.edge_dilation
145+
141146
metadata = (f"_{args.depth_model}_{resolution}{tta}{args.method}_"
142147
f"d{to_deciaml(args.divergence, 10, 2)}_c{to_deciaml(args.convergence, 10, 2)}_"
143-
f"di{args.edge_dilation}_fs{args.foreground_scale}_ipd{to_deciaml(args.ipd_offset, 1)}{ema}")
148+
f"di{edge_dilation}_fs{args.foreground_scale}_ipd{to_deciaml(args.ipd_offset, 1)}{ema}")
144149
else:
145150
metadata = ""
146151

0 commit comments

Comments
 (0)