2

I would like to check if my understanding in organizing my folders and labeling is correct regarding Caffe's way of doing it.

My train directory structure looks like below:

~/Documents/software_dev/caffe/data/smalloffice/images/train
a_person  
not_a_person 
train.txt

where both a_person and not_a_person are directories.

My train.txt file looks like below:

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
...
...
...

Likewise, my val directory structure looks like below:

~/Documents/software_dev/caffe/data/smalloffice/images/val
a_person  
not_a_person 
val.txt

where both a_person and not_a_person are directories.

My val.txt file looks like below:

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
...
...
...

Referring to to ilsvrc12, the content of train.txt and val.txt (hence, its structure) is as follows:

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
...
...
...

What has confused me is actually as opposed to what is structured in ilsvrc12, the val directory contains no subdirectories i.e. contains no grouping. Is there any effect on my classification? I am stuck at getting an accuracy which is constant of 0.5 (see here) which triggers me to check if I performed correctly regarding the labeling and folder structure.

Any hints and suggestions are welcome.

4

1 回答 1

2

不,目录结构与您的评估完全无关。评估步骤获取您的图像文件val.txt,运行图像,并将分类结果与该图像文件名旁边的数字进行比较。这些目录是为了人类可读性而不是计算机可读性,因此它应该与您的 0.5 精度无关。

于 2017-03-02T16:34:38.170 回答