Skip to content

Instantly share code, notes, and snippets.

@yuchen-xue
Created August 14, 2018 02:56
Show Gist options
  • Save yuchen-xue/5b0a4d61254e27e021032378c3ee32ff to your computer and use it in GitHub Desktop.
Save yuchen-xue/5b0a4d61254e27e021032378c3ee32ff to your computer and use it in GitHub Desktop.
Generate training list for darknet yolo training.
from pathlib import Path
for img_file in Path('./JPEGImages').iterdir():
with open('train.txt', 'w') as f:
print(img_file.resolve(), file=f)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment