Reference to the nonexistent field 'imdb'.

1 回表示 (過去 30 日間)
mengqiu ren
mengqiu ren 2018 年 10 月 27 日
コメント済み: madhan ravi 2018 年 10 月 28 日
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 件のコメント
Image Analyst
Image Analyst 2018 年 10 月 27 日
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 2018 年 10 月 28 日
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

サインインしてコメントする。

採用された回答

madhan ravi
madhan ravi 2018 年 10 月 28 日
Try
imdb.descriptors
Or
imdb.imgList
  7 件のコメント
mengqiu ren
mengqiu ren 2018 年 10 月 28 日
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 2018 年 10 月 28 日
imdb=imdb.descriptors

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMATLAB Support Package for USB Webcams についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by