I need to write image_ids in a file which exist in mmdetection class . i tried to get the image_id by img_meta['ori_filename']
and implement this code to write all of the ids
data1=[]
data1.append(img_meta['ori_filename'])
f=open('file.txt','w')
for i in data1:
f.write(i)
but it write only one image . it couldn't append all the images i have
I assume you have a variable image_metas
where all the images are stored.
data1=[]
for img_meta in image_metas:
data1.append(img_meta['ori_filename'])
f=open('file.txt','w')
for i in data1:
f.write(i)