Caffe中的目录结构和标签 [英] Directory structure and labeling in Caffe

查看:150
本文介绍了Caffe中的目录结构和标签的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想检查一下我在组织文件夹和标签方面的理解是否正确,这与Caffe的处理方式有关.

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

其中a_person和not_a_person都是目录.

where both a_person and not_a_person are directories.

我的train.txt文件如下所示:

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

同样,我的val目录结构如下:

Likewise, my val directory structure looks like below:

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

其中a_person和not_a_person都是目录.

where both a_person and not_a_person are directories.

我的val.txt文件如下所示:

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

参考ilsvrc12,train.txt和val.txt的内容(因此,其结构)如下:

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

让我感到困惑的实际上与ilsvrc12中的结构相反,val目录不包含子目录,即不包含任何分组.对我的分类有影响吗?我坚持要获得0.5的恒定精度(请参见

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.

欢迎任何提示和建议.

推荐答案

否,目录结构完全不影响您的评估.评估步骤获取val.txt中的图像文件,遍历图像,然后将分类结果与该图像文件名旁边的数字进行比较.这些目录是出于人类可读性而不是计算机可读性,因此它与您的0.5准确性无关.

No, the directory structure has no bearing on your evaluation at all. The evaluation step takes the image files in your val.txt, runs the image through, and compares the classification result with the number next to that image filename. The directories is for human-readability not computer-readability, so it should have no bearing on your 0.5 accuracy.

这篇关于Caffe中的目录结构和标签的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆