pytorch scripy code

import os

folder = ' '

files = os.listdir(folder)

fp = open('./det_valid.txt', 'w')

for file in files:

if file.endswith('.jpg'):

full_name = os.path.join(folder, file)

fp.write(full_name)

fp.write('\n')

fp.close()

你可能感兴趣的:(深度学习入门,python)