-
-
Save icebeam7/99382d4dca701919146b45fc378c8061 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
image_list = [] | |
directories = os.listdir(training_images) | |
for tagName in directories: | |
tag = trainer.create_tag(project.id, tagName) | |
images = os.listdir(os.path.join(training_images,tagName)) | |
for img in images: | |
with open(os.path.join(training_images,tagName,img), "rb") as image_contents: | |
image_list.append(ImageFileCreateEntry(name=img, contents=image_contents.read(), tag_ids=[tag.id])) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment