waldo-vision / optical.flow.demo

A project that uses optical flow and machine learning to detect aimhacking in video clips.
https://www.waldo.vision
Mozilla Public License 2.0
536 stars 24 forks source link

Extra "." appended to "savepath" in lucasKanadeOpticalFlow.py #16

Closed hilletc7 closed 2 years ago

hilletc7 commented 2 years ago

This is just something small, but the output path in "lucasKanadeOpticalFlow.py" appends and extra "." at the beginning of the path.

I don't know if this a setup is for some future implementation, or just a typo, but in its current state, savepath = '.'+ vidpath.split('.')[-2] + '_LK_FLOW' + '.mp4' creates an invalid output path.

Either savepath = pathparts[-2] + '_LK_FLOW' + '.mp4' or savepath = vidpath.split('.')[-2] + '_LK_FLOW' + '.mp4' will fix it for now.

https://github.com/jaredb1011/waldo-anticheat/blob/d634f4ca27a38436e620f63177a9f3dbffbd62dc/opticalFlow/lucasKanadeOpticalFlow.py#L87

I really like the idea for this project and I hope this takes off!

jaredb1011 commented 2 years ago

So I had created a working folder in the same directory as this code and saved my input videos there, so that's why I had the extra period. It would probably be best to replace all of that with a GUI file selector