Compare commits
2 Commits
f956b8b4d2
...
f3ee7a4fb4
Author | SHA1 | Date | |
---|---|---|---|
|
f3ee7a4fb4 | ||
|
026336f24d |
@ -144,6 +144,7 @@ final class ClassifierCreator {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
let changedImageList = await getChangedImageList()
|
let changedImageList = await getChangedImageList()
|
||||||
|
.filter { $0.image < imageCounts[$0.cap] ?? 0 } // Filter non-existent images
|
||||||
|
|
||||||
if changedImageList.isEmpty {
|
if changedImageList.isEmpty {
|
||||||
print("[INFO] No changed images to load")
|
print("[INFO] No changed images to load")
|
||||||
@ -180,6 +181,9 @@ final class ClassifierCreator {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private func loadImage(cap: Int, image: Int) async -> Bool {
|
private func loadImage(cap: Int, image: Int) async -> Bool {
|
||||||
|
guard createFolderIfMissing(imageDirectory.appendingPathComponent(String(format: "%04d", cap))) else {
|
||||||
|
return false
|
||||||
|
}
|
||||||
let url = imageUrl(base: server.appendingPathComponent("images"), cap: cap, image: image)
|
let url = imageUrl(base: server.appendingPathComponent("images"), cap: cap, image: image)
|
||||||
let tempFile: URL, response: URLResponse
|
let tempFile: URL, response: URLResponse
|
||||||
do {
|
do {
|
||||||
|
Loading…
Reference in New Issue
Block a user