torch / demos

Demos and tutorials around Torch7.
355 stars 301 forks source link

Tracker demo instructions #25

Closed y22ma closed 8 years ago

y22ma commented 8 years ago

I've tried to run the 'tracker' demo with a video as input, and this is the command I used:

qlua run.lua --source video -v /<path to video>/video.avi -r 30 -l 37

This is the corresponding output:

ffmpeg -i /home/yanma/Desktop/follow_car.avi -r 30 -t 37 -map 0:v:0 -s 640x480 -qscale 1 /home/yanma/LibSrc/torch_demo/tracker/scratch/follow_car.avi_30fps_640x480_37s_c0_sk0_png/frame-%06d.png 2> /dev/null
Using frames in /home/yanma/LibSrc/torch_demo/tracker/scratch/follow_car.avi_30fps_640x480_37s_c0_sk0_png/frame-%06d.png
clearing video
rm -rf /home/yanma/LibSrc/torch_demo/tracker/scratch/follow_car.avi_30fps_640x480_37s_c0_sk0_png
 ... input window of convnet is 3x22x22 in size
 ... image downsampling ratio = 2
 ... calibrating encoder so as to produce a single vector for a training patch of width 64 and height 64
 ... appending a 11x11 L2-pooling
 ... encoder global downsampling ratio = 4

./source.lua:79: attempt to call method 'min' (a nil value)
stack traceback:
    ./source.lua:79: in function 'getframe'
    ./process.lua:98: in function 'process'
    ./state.lua:45: in function 'loop'
    ./display.lua:191: in function <./display.lua:176>

I believe that the source.rawFrame is a torch.Tensor, which should have a 'min' operator in it.

Any tip would be much appreciated!

y22ma commented 8 years ago

Fixed this issue by setting delete=true in the constructor for ffmpeg.Video in line 10 of source.lua

Not sure if this is the right fix. Please let me know, and I can submit a PR.

Update: I meant delete=false :)

Aysegul commented 8 years ago

I didn't see your last comment, it's actually delete=false, but true is interpreted as false too. I just prepared a PR, but since you solved the problem, you can submit if you want, I'll cancel mine. Btw didn't you get error in line 29, process.lua

y22ma commented 8 years ago

Yeah sorry I meant delete=false :) Yes I did get the error related to weights being a nil value in process.lua, I simply commented it out, and forgot all about it. Please go ahead with your PR, much appreciated.