The goal of opticalflow_utilies is to provide a pool of scripts that allows you to do whaterver you want with many different kinds of optical flows. For now the optical flow algorithms provided are from flownet2.
this installation script has been made on ubuntu 16.04. Its use is to easily install Flownet 2 caffe models as well as python opencv, numpy....
sudo apt-get update
bash build.bash
Utilities are in the 'solutions' folder at root.
The 'modules' folder at root contain different types of optic flow algorithms that you can easily select.
add a file called vision_module.py
next to a solution
cp modules/vision_module_flownet.py solutions/realtime/vision_module.py
cp modules/vision_module_flownet.py solutions/videos_to_computed_videos/vision_module.py
Each solution has many configuration parameters that you can see using -h
flag
Apply optic flow in realtime from webcam flux, previsualize and save the flux.
cd solutions/realtime
python2 realtime_vision.py -h
python2 realtime_vision.py -pre 2 -s save.avi
Apply optic flow on a video dataset, previsualize, save each computed video in 'save_here' folder + estimate compute time.
cd solutions/videos_to_computed_videos
cp ../../modules/vision_module_absdiff.py vision_module.py
python3 videos_vision.py -h
python3 videos_vision.py -pre 1 -e 2 -l video_list_example -s save_here
- .png to .flo
- .flo to .png in the same program (input IMG IMG)
- video to video of opticalFlow
- videos to videos of opticalFlow
- opticalflow in realtime
- save the reatime flow into a file
- send webcam stream, server compute opticalflow and return the result to the client
- send x videos, server compute opticalflow and return the result to the client
- send x images, server compute opticalflow and return the result to the client
- client is able to save anything the server returns
- add the choice to select any algorithm