Effacer les filtres
Effacer les filtres

Reference to the nonexistent field 'imdb'.

1 vue (au cours des 30 derniers jours)
mengqiu ren
mengqiu ren le 27 Oct 2018
Commenté : madhan ravi le 28 Oct 2018
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 commentaires
Image Analyst
Image Analyst le 27 Oct 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.
mengqiu ren
mengqiu ren le 28 Oct 2018
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

Connectez-vous pour commenter.

Réponse acceptée

madhan ravi
madhan ravi le 28 Oct 2018
Try
imdb.descriptors
Or
imdb.imgList
  7 commentaires
mengqiu ren
mengqiu ren le 28 Oct 2018
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 le 28 Oct 2018
imdb=imdb.descriptors

Connectez-vous pour commenter.

Plus de réponses (0)

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by