Annbless/DUTCode

How to inference with video with smaller resolution

Opened this issue · 3 comments

Hello,

Thanks for your great work for video stabilization!

How can I inference with video with smaller resolution, such as 114*180? I modified WIDTH and HEIGHT in config file, but when I tried on my data, it occured some error, like ValueError: cannot reshape array of size 216 into shape (9, 11, 2). It seems like have something wrong in MotionPro.py.

Looking forward to your reply, thanks!

Hi, Thanks for your interest.
Please also make corresponding changes in find homography functions, where I assumed the input size is 640, 480, so the grid border for outliers is set to a relative large value (like 640/16 - 1). You can try to reduce the border value to (180 / 16 - 1).
If you are not hurry, I can upload a patch a few days later ...

Thanks for your reply @Annbless, waiting for your good news.

But if you are too busy to update this issue, you could give me some further hints to solve this issue (like line xx to line yy in xxx.py) and I will check it by myself.

Hi, I remember that change several absolute values around this line is able to adapt the DUT code to smaller or larger resolution. To be specific, the value 39 comes from "cfg.MODEL.WIDTH/cfg.MODEL.PIXELS -1".