twostreamfusion icon indicating copy to clipboard operation
twostreamfusion copied to clipboard

imresize error

Open since92m opened this issue 8 years ago • 17 comments

hello, I got following error: Expected input number 1, A, to be nonempty. Error in imresize>parsePreMethodArgs (line 333) validateattributes(A, {'numeric', 'logical'}, {'nonsparse', 'nonempty'}, mfilename, 'A', 1); Error in imresize>parseInputs (line 248) [params.A, params.map, params.scale, params.output_size] = ... Error in imresize (line 141) params = parseInputs(varargin{:}); Error in cnn_ucf101_get_im_flow_batch (line 248) imt = imresize(gather(imt(dy:sz(1)+dy-1,dx:sz(2)+dx-1,:)), [opts.imageSize(1:2)]); Error in getBatchWrapper_ucf101_rgbflow>getBatch (line 52) im = cnn_ucf101_get_im_flow_batch(images, opts, ... Error in getBatchWrapper_ucf101_rgbflow>@(imdb,batch,moreopts)getBatch(imdb,batch,opts,numThreads,trainopts,moreopts) (line 3) fn = @(imdb,batch, moreopts) getBatch(imdb,batch,opts,numThreads, trainopts, moreopts) ; Error in cnn_train_dag>process_epoch (line 306) [inputs] = state.getBatch(state.imdb, batch, moreopts) ; Error in cnn_train_dag (line 108) s_train = process_epoch(net, state, opts, 'train'); Error in cnn_ucf101_fusion (line 349) [info] = cnn_train_dag(net, imdb, fn, opts.train) ;

since92m avatar Dec 15 '16 09:12 since92m

I got the same error,did you solve it?

Echotian avatar Dec 18 '16 09:12 Echotian

No, I didn't solve it, I don't know how to debug, and I am trying using keras.@Echotian

since92m avatar Dec 18 '16 09:12 since92m

I solved the problem,The path in cnn_setup_environment.m can not contain Chinese characters.

Echotian avatar Dec 24 '16 14:12 Echotian

I also have the same problem, as follow : data/ucf101/jpegs_256/v_YoYo_g10_c05/frame000000.jpg: error '' data/ucf101/jpegs_256/v_FieldHockeyPenalty_g12_c04/frame000000.jpg: error '' data/ucf101/jpegs_256/v_HandstandPushups_g16_c06/frame000000.jpg: error '' data/ucf101/jpegs_256/v_PlayingDaf_g12_c04/frame000000.jpg: error '' data/ucf101/jpegs_256/v_UnevenBars_g16_c04/frame000000.jpg: error '' data/ucf101/jpegs_256/v_HandstandPushups_g20_c04/frame000000.jpg: error '' data/ucf101/jpegs_256/v_TrampolineJumping_g11_c01/frame000000.jpg: error '' data/ucf101/jpegs_256/v_Rowing_g16_c01/frame000000.jpg: error '' Warning: could not read image 'data/ucf101/jpegs_256/v_YoYo_g10_c05/frame000000.jpg' because ''

In cnn_ucf101_get_frame_batch (line 126) In getBatchWrapper_ucf101_imgs>getBatch (line 45) In getBatchWrapper_ucf101_imgs>@(imdb,batch,moreopts)getBatch(imdb,batch,opts,numThreads,trainopts,moreopts) (line 3) In cnn_train_dag>process_epoch (line 306) In cnn_train_dag (line 108) In cnn_ucf101_spatial (line 217) Warning: could not read image 'data/ucf101/jpegs_256/v_FieldHockeyPenalty_g12_c04/frame000000.jpg' because '' In cnn_ucf101_get_frame_batch (line 126) In getBatchWrapper_ucf101_imgs>getBatch (line 45) In getBatchWrapper_ucf101_imgs>@(imdb,batch,moreopts)getBatch(imdb,batch,opts,numThreads,trainopts,moreopts) (line 3) In cnn_train_dag>process_epoch (line 306) In cnn_train_dag (line 108) In cnn_ucf101_spatial (line 217) Warning: could not read image 'data/ucf101/jpegs_256/v_HandstandPushups_g16_c06/frame000000.jpg' because '' In cnn_ucf101_get_frame_batch (line 126) In getBatchWrapper_ucf101_imgs>getBatch (line 45) In getBatchWrapper_ucf101_imgs>@(imdb,batch,moreopts)getBatch(imdb,batch,opts,numThreads,trainopts,moreopts) (line 3) In cnn_train_dag>process_epoch (line 306) In cnn_train_dag (line 108) In cnn_ucf101_spatial (line 217) Warning: could not read image 'data/ucf101/jpegs_256/v_PlayingDaf_g12_c04/frame000000.jpg' because '' In cnn_ucf101_get_frame_batch (line 126) In getBatchWrapper_ucf101_imgs>getBatch (line 45) In getBatchWrapper_ucf101_imgs>@(imdb,batch,moreopts)getBatch(imdb,batch,opts,numThreads,trainopts,moreopts) (line 3) In cnn_train_dag>process_epoch (line 306) In cnn_train_dag (line 108) In cnn_ucf101_spatial (line 217) Warning: could not read image 'data/ucf101/jpegs_256/v_UnevenBars_g16_c04/frame000000.jpg' because '' In cnn_ucf101_get_frame_batch (line 126) In getBatchWrapper_ucf101_imgs>getBatch (line 45) In getBatchWrapper_ucf101_imgs>@(imdb,batch,moreopts)getBatch(imdb,batch,opts,numThreads,trainopts,moreopts) (line 3) In cnn_train_dag>process_epoch (line 306) In cnn_train_dag (line 108) In cnn_ucf101_spatial (line 217) Warning: could not read image 'data/ucf101/jpegs_256/v_HandstandPushups_g20_c04/frame000000.jpg' because '' In cnn_ucf101_get_frame_batch (line 126) In getBatchWrapper_ucf101_imgs>getBatch (line 45) In getBatchWrapper_ucf101_imgs>@(imdb,batch,moreopts)getBatch(imdb,batch,opts,numThreads,trainopts,moreopts) (line 3) In cnn_train_dag>process_epoch (line 306) In cnn_train_dag (line 108) In cnn_ucf101_spatial (line 217) Warning: could not read image 'data/ucf101/jpegs_256/v_TrampolineJumping_g11_c01/frame000000.jpg' because '' In cnn_ucf101_get_frame_batch (line 126) In getBatchWrapper_ucf101_imgs>getBatch (line 45) In getBatchWrapper_ucf101_imgs>@(imdb,batch,moreopts)getBatch(imdb,batch,opts,numThreads,trainopts,moreopts) (line 3) In cnn_train_dag>process_epoch (line 306) In cnn_train_dag (line 108) In cnn_ucf101_spatial (line 217) Warning: could not read image 'data/ucf101/jpegs_256/v_Rowing_g16_c01/frame000000.jpg' because '' In cnn_ucf101_get_frame_batch (line 126) In getBatchWrapper_ucf101_imgs>getBatch (line 45) In getBatchWrapper_ucf101_imgs>@(imdb,batch,moreopts)getBatch(imdb,batch,opts,numThreads,trainopts,moreopts) (line 3) In cnn_train_dag>process_epoch (line 306) In cnn_train_dag (line 108) In cnn_ucf101_spatial (line 217) Error using imresize Expected input number 1, A, to be nonempty.

Error in imresize>parsePreMethodArgs (line 333) validateattributes(A, {'numeric', 'logical'}, {'nonsparse', 'nonempty'}, mfilename, 'A', 1);

Error in imresize>parseInputs (line 248) [params.A, params.map, params.scale, params.output_size] = ...

Error in imresize (line 141) params = parseInputs(varargin{:});

Error in cnn_ucf101_get_frame_batch (line 261) imt = imresize(gather(imt(dy:sz(1)+dy-1,dx:sz(2)+dx-1,:)), opts.imageSize(1:2));

Error in getBatchWrapper_ucf101_imgs>getBatch (line 45) im = cnn_ucf101_get_frame_batch(images, opts, ...

Error in getBatchWrapper_ucf101_imgs>@(imdb,batch,moreopts)getBatch(imdb,batch,opts,numThreads,trainopts,moreopts) (line 3) fn = @(imdb, batch, moreopts) getBatch(imdb,batch,opts,numThreads, trainopts, moreopts) ;

Error in cnn_train_dag>process_epoch (line 306) [inputs] = state.getBatch(state.imdb, batch, moreopts) ;

Error in cnn_train_dag (line 108) s_train = process_epoch(net, state, opts, 'train');

Error in cnn_ucf101_spatial (line 217) [info] = cnn_train_dag(net, imdb, fn, opts.train) ;

The dataset haven't data/ucf101/jpegs_256/v_YoYo_g10_c05/frame000000.jpg all the image is starting from frame000001.jpg, so >?

emigmo avatar Jan 10 '17 03:01 emigmo

Thanks for your reply,but question is still there@Echotian

since92m avatar Jan 10 '17 16:01 since92m

这一点我到没注意,一方面数据集没有了,另一方面尝试keras,good luck @emigmo

since92x avatar Jan 10 '17 16:01 since92x

The work will be very strong if rewrite the twostreamfusion framework using keras. I just want to see the result of the twostreamfusion, and I just want to know how he fusion the two stream in detail.

emigmo avatar Jan 13 '17 09:01 emigmo

@emigmo @since92m @Echotian Hello ,I want to know if you have run the code successfully?For the reason that '/media/yangyang/DATA/learn/DP codes/ucf101-img-vgg16-split1-dr0.85.mat' is not exist ,so I changed the code just as follows: % opts.modelA = fullfile(opts.modelPath, [opts.dataSet '-img-vgg16-split' num2str(opts.nSplit) '-dr0.85.mat']) ; opts.modelA = fullfile(opts.modelPath, [opts.dataSet '-img-vgg16-split' num2str(opts.nSplit) .mat']) ; yeah, I just throw away '-dr0.85',but other problems appear: 下标索引必须为正整数类型或逻辑类型。

出错 cnn_ucf101_get_im_flow_batch (line 95) last_frame = min(frameSamples(end), max(floor(nFrames - nStack/4 - opts.nFrameStack,nStack/4 )));

出错 getBatchWrapper_ucf101_rgbflow>getBatch (line 52) im = cnn_ucf101_get_im_flow_batch(images, opts, ...

出错 getBatchWrapper_ucf101_rgbflow>@(imdb,batch,moreopts)getBatch(imdb,batch,opts,numThreads,trainopts,moreopts) (line 3) fn = @(imdb,batch, moreopts) getBatch(imdb,batch,opts,numThreads, trainopts, moreopts) ;

出错 cnn_train_dag>process_epoch (line 306) [inputs] = state.getBatch(state.imdb, batch, moreopts) ;

出错 cnn_train_dag (line 108) s_train = process_epoch(net, state, opts, 'train');

出错 cnn_ucf101_fusion (line 353) [info] = cnn_train_dag(net, imdb, fn, opts.train) ; I want to know where you modified?Did you run the code out successfully? I hope to receive your reply. Thanks sincerely

JasmineeYang avatar Mar 27 '17 11:03 JasmineeYang

@JasmineeYang I‘ve got the same error. Did you find the solution. Thanks!

xiaollz avatar Jun 24 '17 14:06 xiaollz

@JasmineeYang Did you find the solution .Thanks!

ml930310 avatar Jul 04 '17 01:07 ml930310

@since92m I‘ve got the same error .did you find the solution.

ml930310 avatar Jul 10 '17 13:07 ml930310

@JasmineeYang 你可能是添加的路径不对。

ml930310 avatar Jul 13 '17 12:07 ml930310

I also solved the issue, and it is the problem with path.

xiaollz avatar Jul 13 '17 12:07 xiaollz

hello ,everyone.I I encountered a problem. error using vl_nnconv Out of memory on device. To view more detail about available memory on the GPU, use 'gpuDevice()'. If the problem persists, reset the GPU by calling 'gpuDevice(1)'. Do you have solved?

ml930310 avatar Jul 17 '17 13:07 ml930310

Hello,what does 66 lines' "input_flow" play a role in the function of getBatchWrapper_ucf101_imgs ?

liwang621 avatar Apr 25 '18 02:04 liwang621

I also solved the issue, and it is the problem with path.

could you tell me the exact path you use in your codes?

lvyali avatar Jan 15 '19 04:01 lvyali

I also solved the issue, and it is the problem with the path.

can you tell me how to solve this issue in detail? thank you

Haiyu12716 avatar Aug 06 '20 22:08 Haiyu12716