Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to inference with video with smaller resolution #8

Open
mrluin opened this issue Aug 9, 2021 · 3 comments
Open

How to inference with video with smaller resolution #8

mrluin opened this issue Aug 9, 2021 · 3 comments

Comments

@mrluin
Copy link

mrluin commented Aug 9, 2021

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!

@Annbless
Copy link
Owner

Annbless commented Aug 9, 2021

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 ...

@mrluin
Copy link
Author

mrluin commented Aug 10, 2021

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.

@Annbless
Copy link
Owner

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".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants