Created
August 13, 2021 03:40
-
-
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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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