Skip to content

Instantly share code, notes, and snippets.

@icebeam7
Created Oct 21, 2021
Embed
What would you like to do?
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