Reference to the nonexistent field 'imdb'.

I want to change the dataset from 'cuhk03.mat' dataset to 'cuhk03_detected_lomo.mat'(the‘cuhk03_detected_lomo.mat' is a dataset which has been processed with LOMO characteristics ),but it has an error when i run the same program,it shows:
% Reference to the nonexistent field 'imdb'
% wrong in train_id_net_res_2stream (line 8)
imdb = imdb.imdb;
I don't understand Why did it go wrong when i just change the dataset. The complete code is as follows:
% function train_id_net_res_2stream(varargin)
% -------------------------------------------------------------------------
% Part 4.1: prepare the data
% -------------------------------------------------------------------------
% Load character dataset
imdb = load('F:\2016_person_re-ID-master\2016_person_re-ID-master\cuhk03-prepare-eval/cuhk03_detected_lomo.mat') ;
imdb = imdb.imdb;
% -------------------------------------------------------------------------
% Part 4.2: initialize a CNN architecture
% -------------------------------------------------------------------------
net = resnet52_2stream();
net.params(net.getParamIndex('fc751f')).learningRate = 0.01;
net.params(net.getParamIndex('fc751b')).learningRate = 0.2;
net.conserveMemory = true;
net.meta.normalization.averageImage = reshape([105.6920,99.1345,97.9152],1,1,3);
% -------------------------------------------------------------------------
% Part 4.3: train and evaluate the CNN
% -------------------------------------------------------------------------
opts.train.averageImage = net.meta.normalization.averageImage;
opts.train.batchSize = 30;
opts.train.continue = true;
opts.train.gpus = 1; %Select gpu card. The gpu id in Matlab start from 1.
opts.train.prefetch = false ;
opts.train.expDir = './data/resnet52_2stream_drop0.9_new1' ; % your model will store here
opts.train.learningRate = [0.1*ones(1,70),0.01*ones(1,5)] ;
opts.train.derOutputs = {'objective', 0.5,'objective_2', 0.5,'objective_final', 1} ;
opts.train.weightDecay = 0.0005;
opts.train.numEpochs = numel(opts.train.learningRate) ;
[opts, ~] = vl_argparse(opts.train, varargin) ;
% Call training function in MatConvNet
[net,info] = cnn_train_dag(net, imdb, @getBatch,opts) ;
I'd appreciate it if you could give me some advice.Thank you!
supplement:
When i take the semicolon off the end of the load() line,it shows:
% imdb =
descriptors: [26960x14097 double]
imgList: {14097x1 cell}
note: '1_001_1_01.png means the 1st set, the 001th person, the 1st camera, and the…'
Reference to the nonexistent field 'imdb'
wrong in train_id_net_res_2stream (line 8)
imdb = imdb.imdb;
I'm so sorry that the mat file is so big that i can not attach it with the paper clip icon.

4 comentarios

madhan ravi
madhan ravi el 27 de Oct. de 2018
file?
mengqiu ren
mengqiu ren el 27 de Oct. de 2018
What's file? The file about LOMO feature extraction ?
Image Analyst
Image Analyst el 27 de Oct. de 2018
Take the semicolon off the end of the load() line and tell us what it shows in the command window when that line executes. Also, attach the mat file with the paper clip icon.
When i take the semicolon off,it shows:
% imdb =
descriptors: [26960x14097 double]
imgList: {14097x1 cell}
note: '1_001_1_01.png means the 1st set, the 001th person, the 1st camera, and the…'
% Reference to the nonexistent field 'imdb'
% wrong in train_id_net_res_2stream (line 8)
imdb = imdb.imdb;
I'm so sorry that the mat file is so big that i can not attach it with the paper clip icon

Iniciar sesión para comentar.

 Respuesta aceptada

madhan ravi
madhan ravi el 28 de Oct. de 2018

0 votos

Try
imdb.descriptors
Or
imdb.imgList

7 comentarios

madhan ravi
madhan ravi el 28 de Oct. de 2018
You don’t have any field named imdb that’s what causing the error
mengqiu ren
mengqiu ren el 28 de Oct. de 2018
It works!Thank you !
madhan ravi
madhan ravi el 28 de Oct. de 2018
Anytime :)
mengqiu ren
mengqiu ren el 28 de Oct. de 2018
Editada: mengqiu ren el 28 de Oct. de 2018
sorry to bother you again,after I follow your method, the program starts running.
% imdb = load('F:\2016_person_re-ID-master\2016_person_re-ID-master\cuhk03-prepare-eval/cuhk03_detected_lomo.mat');
imdb.descriptors
imdb = imdb.imdb;
But the same error eventually occurred.
I think it just load the data in the mat file without actually running the program.
madhan ravi
madhan ravi el 28 de Oct. de 2018
Again you are doing the same mistake
But I've corrected the statement in your way,
% imdb = load('F:\2016_person_re-ID-master\2016_person_re-ID-master\cuhk03-prepare-eval/cuhk03_detected_lomo.mat');
imdb.descriptors
imdb = imdb.imdb;
madhan ravi
madhan ravi el 28 de Oct. de 2018
imdb=imdb.descriptors

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Startup and Shutdown en Centro de ayuda y File Exchange.

Etiquetas

Preguntada:

el 27 de Oct. de 2018

Comentada:

el 28 de Oct. de 2018

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by