How to fix a "File not found" error
9 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
In particular, the learning part of the code has these instructions:
**Using the learning code**
- Download and install the 2006-2011 PASCAL VOC devkit and dataset (you should set VOCopts.testset='test' in VOCinit.m) The code expects to find the VOCdevkit in the path /VOC/VOCdevkit
- Modify 'voc_config.m' so BASE_DIR and PASCAL_YEAR are set to where you've unpacked the VOCdevkit
- Start matlab
- Run the 'compile' function to compile the helper functions (you may need to edit compile.m to use a different convolution routine depending on your system)
- Use the 'pascal' script to train and evaluate a model example:
pascal('bicycle', 3); % train and evaluate a 6 component bicycle model
I did as the instructions said. I then run the
line pascal('bicycle',3); on Matlab as suggested. But I get the following errors:
??? Error using ==> textread at 167
File not found.
Error in ==> pascal_data.m at 28
ids = textread(VOCopts.imgsetpath, dataset_fg), '%s');
Error in ==> pascal_train at 29
[pos, neg, impos] = pascal_data(cls, conf.pascal.year);
Error in ==> pascal at 49
model = pascal_train(cls, n, note);
I really don't know where I've gone wrong. My BASE_DIR path in voc_config.m is /software/datasets/pascal/TrainVal/VOCdevkit/
The PASCAL_YEAR is 2011.
This is how the directory looks: Inside TrainVal I have the downloaded and unzipped directory VOCdevkit, which includes VOC2011, which then has directories Annotations, ImageSets, VOCcode, etc. I even put a copy of VOCdevkit in this too, in case I've just got the structure wrong.
What am I doing wrong?
In pascal_data.m, I've added a line to see if the directory is getting carried forward into the textread function or not...
This is the code of the beginning of pascal_data.m (excluding comments):
conf=voc_config('pascal.year',year);
dataset_fg=conf.training.train_set_fg;
dataset_bg=conf.training.train_set_bg;
cachedir=conf.paths.model_dir;
VOCopts=conf.pascal.VOCopts
try
load([cachedir class '_' dataset_fg '_' year]);
catch
%then i added the following line to see what the training path even is
tic_toc_print('%s \n', dataset_fg)
ids = textread(sprintf(VOCopts.imgsetpath, dataset_fg),'%s');
But the output doesn't show any path...
I'm not very used to Matlab. I really don't know where to go from here.
0 comentarios
Respuestas (0)
Ver también
Categorías
Más información sobre Downloads en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!