DCL
DCL copied to clipboard
problem with st_car datasets
It seems that the train.txt of STCAR porvided by source code is incorrect, the filename in the train.txt can not map to the source images. such as 013178.jpg
,013191.jpg
,013434.jpg
and so on.
It seems that the train.txt of STCAR porvided by source code is incorrect, the filename in the train.txt can not map to the source images. such as
013178.jpg
,013191.jpg
,013434.jpg
and so on.
I had the same problem when I used the CUB dataset.
They seem to combine the original dataset. cars_test(8041) cars_train(8144)
They seem to combine the original dataset. cars_test(8041) cars_train(8144)
OK, I got this! The annos should be downloaded from here The dataset should be downloaded from here
I think the writer maybe process the annos like the code following:
import scipy.io as spio
def processingLabel():
data = spio.loadmat('./cars_annos.mat')
annotations = data['annotations']
f_train = open('mat2txt_train.txt', 'w')
f_test = open('mat2txt_test.txt', 'w')
num = 1
for i in range(annotations.shape[1]):
name = str(annotations[0, i][0])[2:-2]
test = int(annotations[0, i][6])
clas = int(annotations[0, i][5])
name = str(name)
clas = str(clas)
test = str(test)
if test == '0' :
f_train.write(name[8:] + ' ' + clas + '\n')
else:
f_test.write(name[8:] + ' ' + clas + '\n')
f_train.close()
f_test.close()