**1. imagenet ILSVRC2014_ID to ILSVRC2012_ID
———————-**——————–
ILSVRC2014_ID又1860类,ILSVRC2012_ID 有1000类,1281167个训练图
matlab从ILSVRC2014_ID 选取ILSVRC2012_ID类别:
matlab代码
load('imagenet_filename.mat') %s
load('meta_clsloc.mat') %synsets
for i = 1:1000
% b = []
a1000 = a(i,:);
for ii = 1:1860
b1860 = synsets(ii).WNID;
if b1860 == a1000
S(i) = synsets(ii);
end
end
end
% c=s(1000).wnid
% d= s(1).wnid
k = []
for iii = 1:1000
k(iii) = S(iii).num_train_images;
end
sum(k)
save('imagenet_2012.mat','S')
按顺序排列
for wgb_ii = 1:1000
for wgb_i = 1:1000
if S(wgb_i).ILSVRC2014_ID ==wgb_ii
kkk(wgb_ii) = S(wgb_i);
end
end
end
synsets = kkk
save('imagenet_2012.mat','synsets')