Skip to content

Instantly share code, notes, and snippets.

Created October 21, 2021 18:32
What would you like to do?
image_list = []
directories = os.listdir(training_images)
for tagName in directories:
tag = trainer.create_tag(, 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,, tag_ids=[]))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment