Generate thumbnails for dataset items so things load faster and the ui is more stable. Especially good for videos.
This commit is contained in:
@@ -163,7 +163,8 @@ class BaseCaptioner(BaseExtensionProcess):
|
||||
def find_files(self):
|
||||
# recursivly find all the files in the path_to_caption with the specified extensions and save the paths to self.file_paths
|
||||
for root, dirs, files in os.walk(self.caption_config.path_to_caption):
|
||||
dirs[:] = [d for d in dirs if d != "_controls"]
|
||||
# skip _controls and hidden dirs (.thumbs, .tmp)
|
||||
dirs[:] = [d for d in dirs if d != "_controls" and not d.startswith(".")]
|
||||
for file in files:
|
||||
if any(
|
||||
file.lower().endswith(f".{ext}") and not file.startswith(".")
|
||||
|
||||
Reference in New Issue
Block a user