Skip to content

Instantly share code, notes, and snippets.

@Aditya1001001
Created August 13, 2021 03:40
Show Gist options
  • Save Aditya1001001/711fef6fae1c96682733f5ab7528c09f to your computer and use it in GitHub Desktop.
Save Aditya1001001/711fef6fae1c96682733f5ab7528c09f to your computer and use it in GitHub Desktop.
Script for renaming images in a directory to numbers for ease of access. Made for training YOLOv3 model on custom data.
import os
count = 0
for i in os.listdir():
os.rename(i,str(count)+ '.'+ i.split('.')[-1])
count+=1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment