Advertisement
Guest User

Untitled

a guest
Mar 18th, 2019
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. # encoding: UTF-8
  2. import glob as gb
  3. import cv2
  4. import os.path as osp
  5. import os
  6.  
  7. #Returns a list of all folders with participant numbers
  8. img_path = gb.glob("/home/xieyangyang/Downloads/dataset/Grayscale_Thermal/FastCarNig/v/*png")
  9. img_path.sort()
  10. i = 1
  11. for path in img_path:
  12. rename = osp.join(osp.split(path)[0], str(i) + '.png')
  13. os.rename(path, rename)
  14. i = i + 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement