From 7e41818fd68a899d64d62c04e1098800cf79fc84 Mon Sep 17 00:00:00 2001 From: Christoph Hagen Date: Sun, 19 Nov 2023 23:32:28 +0100 Subject: [PATCH] specify thumbnail size --- Sources/ClassifierCreator.swift | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Sources/ClassifierCreator.swift b/Sources/ClassifierCreator.swift index 7be9e4f..ae70fd4 100644 --- a/Sources/ClassifierCreator.swift +++ b/Sources/ClassifierCreator.swift @@ -9,6 +9,8 @@ final class ClassifierCreator { private let sessionCheckpointIterations = 100 private let sessionIterations = 1000 + private let thumbnailSize = 100 + let server: URL let configuration: Configuration @@ -456,7 +458,7 @@ final class ClassifierCreator { let output = thumbnailDirectory.appendingPathComponent(String(format: "%04d.jpg", cap)) do { - let command = "magick convert \(inputUrl.path) -quality 70% -resize 100x100 \(output.path)" + let command = "magick convert \(inputUrl.path) -quality 70% -resize \(thumbnailSize)x\(thumbnailSize) \(output.path)" let (code, output) = try safeShell(command) if code != 0 { throw TrainingError.failedToCreateThumbnail(cap, output)