| import json | |
| import os | |
| import random | |
| path = "./Choices" | |
| files = os.listdir(path) | |
| img_path = "./images" | |
| img_files = os.listdir(img_path) | |
| for i, f in enumerate(img_files): | |
| prename = f.split(".")[0] | |
| if prename + ".txt" not in files: | |
| os.system('rm /mnt/bn/ic-vlm/personal/zhangyuan/Conbench/attribute_reason/images/{}'.format(f)) | |
| print(prename) | |
| print(i) | |