diff options
Diffstat (limited to 'src/main.rs')
-rw-r--r-- | src/main.rs | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src/main.rs b/src/main.rs index 45621cf..3055768 100644 --- a/src/main.rs +++ b/src/main.rs @@ -67,9 +67,14 @@ struct Args { tsp_approx: TspBaseAlg, /// Number of 2-Opt refinement steps. Has quickly diminishing returns - #[arg(short = 'r', default_value = "3")] + #[arg(short = 'r', default_value = "5")] refine: usize, + /// Don't try to improve result by rotating the output path such that less emphasis is put on + /// the similarity of the first and last image + #[arg(long)] + no_rotate: bool, + /// Ignore failed embeddings #[arg(short = 'i', long)] ignore_errors: bool, @@ -174,7 +179,13 @@ where }) .unzip(); - let (tsp_path, total_dist) = tsp(&embeds, &args.tsp_approx, args.refine, &args.hash_seed); + let (tsp_path, total_dist) = tsp( + &embeds, + &args.tsp_approx, + args.refine, + !args.no_rotate, + &args.hash_seed, + ); Ok(( tsp_path.iter().map(|i| images[*i].clone()).collect(), |