Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # encoding: UTF-8
- import glob as gb
- import cv2
- import os.path as osp
- import os
- #Returns a list of all folders with participant numbers
- img_path = gb.glob("/home/xieyangyang/Downloads/dataset/Grayscale_Thermal/FastCarNig/v/*png")
- img_path.sort()
- i = 1
- for path in img_path:
- rename = osp.join(osp.split(path)[0], str(i) + '.png')
- os.rename(path, rename)
- i = i + 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement