仅作为记录,大佬请跳过。
import os
import csv
if not os.path.exists(csv_path):
with open(csv_path, 'w', encoding='utf-8') as f:
writer = csv.writer(f, lineterminator='\n')
writer.writerow(['img_path', 'labels_info']) # 【】
print('文件不存在')