Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to fix 'File '/path/to/datasets/VOC2012/ImageSets/Segmentation/val.txt' not found'? #8

Closed
b2220333 opened this issue May 12, 2015 · 5 comments

Comments

@b2220333
Copy link

When I execute ./sam_eval_all.sh which just change to use python2.7 , it shows:

sam@sam-desktop:~/code/download/Segmentation/lpo/src$ ./sam_eval_all.sh
File '/path/to/datasets/VOC2012/ImageSets/Segmentation/val.txt' not found! Check if DATA_DIR is set properly.
Traceback (most recent call last):
File "train_lpo.py", line 139, in
over_segs,segmentations,boxes,names = loadVOCAndOverSeg( 'test', detector='mssf' )
File "/home/sam/code/download/Segmentation/lpo/src/util.py", line 98, in loadVOCAndOverSeg
return loadAndOverSegDataset( lambda: ldr(im_set=="train",im_set=="valid",im_set=="test"), "VOC%s_%s"%(year,im_set), detector=detector, N_SPIX=N_SPIX )
File "/home/sam/code/download/Segmentation/lpo/src/util.py", line 70, in loadAndOverSegDataset
data = loader()
File "/home/sam/code/download/Segmentation/lpo/src/util.py", line 98, in
return loadAndOverSegDataset( lambda: ldr(im_set=="train",im_set=="valid",im_set=="test"), "VOC%s_%s"%(year,im_set), detector=detector, N_SPIX=N_SPIX )
ValueError: Failed to load dataset
File '/path/to/datasets/VOC2012/ImageSets/Segmentation/val.txt' not found! Check if DATA_DIR is set properly.
Traceback (most recent call last):
File "train_lpo.py", line 139, in
over_segs,segmentations,boxes,names = loadVOCAndOverSeg( 'test', detector='mssf' )
File "/home/sam/code/download/Segmentation/lpo/src/util.py", line 98, in loadVOCAndOverSeg
return loadAndOverSegDataset( lambda: ldr(im_set=="train",im_set=="valid",im_set=="test"), "VOC%s_%s"%(year,im_set), detector=detector, N_SPIX=N_SPIX )
File "/home/sam/code/download/Segmentation/lpo/src/util.py", line 70, in loadAndOverSegDataset
data = loader()
File "/home/sam/code/download/Segmentation/lpo/src/util.py", line 98, in
return loadAndOverSegDataset( lambda: ldr(im_set=="train",im_set=="valid",im_set=="test"), "VOC%s_%s"%(year,im_set), detector=detector, N_SPIX=N_SPIX )
ValueError: Failed to load dataset
File '/path/to/datasets/VOC2012/ImageSets/Segmentation/val.txt' not found! Check if DATA_DIR is set properly.
Traceback (most recent call last):
File "train_lpo.py", line 139, in
over_segs,segmentations,boxes,names = loadVOCAndOverSeg( 'test', detector='mssf' )
File "/home/sam/code/download/Segmentation/lpo/src/util.py", line 98, in loadVOCAndOverSeg
return loadAndOverSegDataset( lambda: ldr(im_set=="train",im_set=="valid",im_set=="test"), "VOC%s_%s"%(year,im_set), detector=detector, N_SPIX=N_SPIX )
File "/home/sam/code/download/Segmentation/lpo/src/util.py", line 70, in loadAndOverSegDataset
data = loader()
File "/home/sam/code/download/Segmentation/lpo/src/util.py", line 98, in
return loadAndOverSegDataset( lambda: ldr(im_set=="train",im_set=="valid",im_set=="test"), "VOC%s_%s"%(year,im_set), detector=detector, N_SPIX=N_SPIX )
ValueError: Failed to load dataset
File '/path/to/datasets/VOC2012/ImageSets/Segmentation/val.txt' not found! Check if DATA_DIR is set properly.
Traceback (most recent call last):
File "train_lpo.py", line 139, in
over_segs,segmentations,boxes,names = loadVOCAndOverSeg( 'test', detector='mssf' )
File "/home/sam/code/download/Segmentation/lpo/src/util.py", line 98, in loadVOCAndOverSeg
return loadAndOverSegDataset( lambda: ldr(im_set=="train",im_set=="valid",im_set=="test"), "VOC%s_%s"%(year,im_set), detector=detector, N_SPIX=N_SPIX )
File "/home/sam/code/download/Segmentation/lpo/src/util.py", line 70, in loadAndOverSegDataset
data = loader()
File "/home/sam/code/download/Segmentation/lpo/src/util.py", line 98, in
return loadAndOverSegDataset( lambda: ldr(im_set=="train",im_set=="valid",im_set=="test"), "VOC%s_%s"%(year,im_set), detector=detector, N_SPIX=N_SPIX )
ValueError: Failed to load dataset
File '/path/to/datasets/VOC2012/ImageSets/Segmentation/val.txt' not found! Check if DATA_DIR is set properly.
Traceback (most recent call last):
File "train_lpo.py", line 139, in
over_segs,segmentations,boxes,names = loadVOCAndOverSeg( 'test', detector='mssf' )
File "/home/sam/code/download/Segmentation/lpo/src/util.py", line 98, in loadVOCAndOverSeg
return loadAndOverSegDataset( lambda: ldr(im_set=="train",im_set=="valid",im_set=="test"), "VOC%s_%s"%(year,im_set), detector=detector, N_SPIX=N_SPIX )
File "/home/sam/code/download/Segmentation/lpo/src/util.py", line 70, in loadAndOverSegDataset
data = loader()
File "/home/sam/code/download/Segmentation/lpo/src/util.py", line 98, in
return loadAndOverSegDataset( lambda: ldr(im_set=="train",im_set=="valid",im_set=="test"), "VOC%s_%s"%(year,im_set), detector=detector, N_SPIX=N_SPIX )
ValueError: Failed to load dataset
File '/path/to/datasets/VOC2012/ImageSets/Segmentation/val.txt' not found! Check if DATA_DIR is set properly.
Traceback (most recent call last):
File "train_lpo.py", line 139, in
over_segs,segmentations,boxes,names = loadVOCAndOverSeg( 'test', detector='mssf' )
File "/home/sam/code/download/Segmentation/lpo/src/util.py", line 98, in loadVOCAndOverSeg
return loadAndOverSegDataset( lambda: ldr(im_set=="train",im_set=="valid",im_set=="test"), "VOC%s_%s"%(year,im_set), detector=detector, N_SPIX=N_SPIX )
File "/home/sam/code/download/Segmentation/lpo/src/util.py", line 70, in loadAndOverSegDataset
data = loader()
File "/home/sam/code/download/Segmentation/lpo/src/util.py", line 98, in
return loadAndOverSegDataset( lambda: ldr(im_set=="train",im_set=="valid",im_set=="test"), "VOC%s_%s"%(year,im_set), detector=detector, N_SPIX=N_SPIX )

ValueError: Failed to load dataset

sam@sam-desktop:~/code/download/Segmentation/lpo/src$ cat ./sam_eval_all.sh

This script reproduces table 3 in the paper

python train_lpo.py -f0 0.2 ../models/lpo_VOC_0.2.dat
python train_lpo.py -f0 0.1 ../models/lpo_VOC_0.1.dat
python train_lpo.py -f0 0.05 ../models/lpo_VOC_0.05.dat
python train_lpo.py -f0 0.03 ../models/lpo_VOC_0.03.dat
python train_lpo.py -f0 0.02 ../models/lpo_VOC_0.02.dat
python train_lpo.py -f0 0.01 ../models/lpo_VOC_0.01.dat -iou 0.925 # Increase the IoU a bit to make sure the number of proposals match
sam@sam-desktop:~/code/download/Segmentation/lpo/src$

How to solve it? Thank you~

@philkr
Copy link
Owner

philkr commented May 12, 2015

Maybe I wasn't clear enough in the README '/path/to/datasets' should be a path pointing to where you stored the VOC2012 dataset, for example '/data' or something similar...

@b2220333
Copy link
Author

Does this error mean before I run the first example(./sam_eval_all.sh ), I should download VOC2012 dataset and set the system variable 'DATA_DIR' to the absolute path of dataset?
Thank you~

@philkr
Copy link
Owner

philkr commented May 12, 2015

Yes you should download the VOC2012 dataset and then point the cmake variable DATA_DIR to its location.

@b2220333
Copy link
Author

I add:
set (DATA_DIR "/home/sam/code/download/CNN/caffe/caffe/data/ilsvrc12")

I try to use caffe/data/ilsvrc12:

mkdir -p VOC2012/ImageSets/Segmentation/
cp val VOC2012/ImageSets/Segmentation/
cp * VOC2012/ImageSets/Segmentation/

and finally, it passed and also show nothing:
sam@sam:/code/download/Segmentation/lpo/src$ bash sam_eval_all.sh
sam@sam:
/code/download/Segmentation/lpo/src$

Is that normal?
Thank you~

@philkr
Copy link
Owner

philkr commented Jun 4, 2015

Rodrigo's PR #10 should address this. We now have more verbose error messages. You might also confuse the imagenet and pascal datasets...

@philkr philkr closed this as completed Jun 4, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants