# coding: UTF-8 #设置编码
import os
import shutil
import tqdm
final_file_path = 'G:/A_Data/ImageSets/new_val.txt' # 新的txt
reference_file_path = 'G:/A_Data/ImageSets/person_val.txt' # txt文件
final = open(final_file_path, mode='w')
file = open(reference_file_path, 'r', encoding='UTF-8')
for line in tqdm.tqdm(file.readlines()):
curLine = line.strip().split(" ")
filename = curLine[0]
final.write(filename + '\n')
final.close()
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)