specify thumbnail size
This commit is contained in:
parent
f67a9a2de7
commit
7e41818fd6
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user