2
我想检查一下,在组织我的文件夹和标签的理解方面,对于Caffe的做法是否正确。Caffe中的目录结构和标签
我乘坐的火车目录结构如下所示:
~/Documents/software_dev/caffe/data/smalloffice/images/train
a_person
not_a_person
train.txt
其中两个a_person和not_a_person是目录。
我train.txt文件看起来像如下:
train.txt:
----------
not_a_person/1_rotated.jpg 0
not_a_person/2_rotated.jpg 0
not_a_person/3_rotated.jpg 0
not_a_person/4_rotated.jpg 0
not_a_person/5_rotated.jpg 0
...
...
...
a_person/947_rotated.jpg 1
...
...
...
同样,我的VAL目录结构如下所示:
~/Documents/software_dev/caffe/data/smalloffice/images/val
a_person
not_a_person
val.txt
其中两个a_person和not_a_person是目录。
我val.txt文件看起来像下面:
val.txt:
--------
not_a_person/1_rotated.jpg 0
not_a_person/2_rotated.jpg 0
not_a_person/3_rotated.jpg 0
...
...
...
a_person/152_rotated.jpg 1
...
...
...
参照到ilsvrc12,train.txt和val.txt(因此,它的结构)的含量如下:
train.txt:
----------
n01440764/n01440764_10026.JPEG 0
n01440764/n01440764_10027.JPEG 0
n01440764/n01440764_10029.JPEG 0
n01440764/n01440764_10040.JPEG 0
...
...
...
val.txt:
--------
ILSVRC2012_val_00000001.JPEG 65
ILSVRC2012_val_00000002.JPEG 970
ILSVRC2012_val_00000003.JPEG 230
ILSVRC2012_val_00000004.JPEG 809
...
...
...
让我感到困惑的是实际上与ilsvrc12中构造的内容相反,val目录不包含任何子目录,即不包含任何分组。对我的分类有什么影响吗?我坚持要得到一个0.5的常数(见here),这会触发我检查我是否正确执行了关于标签和文件夹结构的准确性。
欢迎任何提示和建议。
我明白了。除了对准确性没有影响之外,它们是否正确,我将它作为val目录的子目录?我问这是因为在ilsvrc12中,它没有引入这个子目录(因此,分组)。我担心它会影响洗牌等。 –
不,它从字面上看没有任何效果。它只是一个图像路径 - 如果图像路径不存在,它将只是一个问题,但如果所有路径都存在,那么这不是问题。 – mprat