Skip to content

Instantly share code, notes, and snippets.

@alankbi
Created April 7, 2020 06:11
Show Gist options
  • Save alankbi/12cec24d2cd7a510c23f652e7f1f8249 to your computer and use it in GitHub Desktop.
Save alankbi/12cec24d2cd7a510c23f652e7f1f8249 to your computer and use it in GitHub Desktop.
Create datasets with Detecto
from detecto import core
# All images and XML files in the same folder
dataset = core.Dataset('images/')
# Images and XML files in separate folders
dataset = core.Dataset('labels/', 'images/')
image, target = dataset[0]
print(image, target)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment