ShaoqingRen / SPP_net

SPP_net : Spatial Pyramid Pooling in Deep Convolutional Networks for Visual Recognition
363 stars 236 forks source link

Error in imdb_from_voc #47

Closed AbdealiLoKo closed 9 years ago

AbdealiLoKo commented 9 years ago

Get the following error when running Script_spp_voc (The error is in imdb_from_voc)

Error using fliplr (line 18)
X must be a 2-D matrix.

Error in imdb_from_voc (line 55)
             imwrite(fliplr(im), flip_image_at(i));

Error in Script_spp_voc>perpare_train_data (line 89)
    opts.imdb_train             = {  imdb_from_voc(opts.devkit, 'trainval', '2007', flip) };

Error in Script_spp_voc (line 46)
opts                        = perpare_train_data(opts, opts.flip | opts.flip_finetune);

When I check the data, the image is a 3D matrix.

ShaoqingRen commented 9 years ago

Hi @AbdealiJK,

The problem comes from matlab version. im(:, end : -1 : 1, :) can be used instead of fliplr()

AbdealiLoKo commented 9 years ago

Ah, You are right. I used flipdim(im, 2) which is supposed to have better performance :)