All Projects â†’ georgegach â†’ Flowiz

georgegach / Flowiz

Licence: mit
Converts Optical Flow files to images and optionally compiles them to a video. Flow viewer GUI is also available. Check out mockup right from Github Pages:

Programming Languages

javascript
184084 projects - #8 most used programming language
python
139335 projects - #7 most used programming language
flow
126 projects

Projects that are alternatives of or similar to Flowiz

Myvision
Computer vision based ML training data generation tool 🚀
Stars: ✭ 453 (+214.58%)
Mutual labels:  vision, image
Doctron
Docker-powered html convert to pdf(html2pdf), html to image(html2image like jpeg,png),which using chrome(golang) kernel, add watermarks to pdf, convert pdf to images etc.
Stars: ✭ 141 (-2.08%)
Mutual labels:  image, converter
Cube2sphere
Python script to map 6 cube (cubemap, skybox) faces into an equirectangular (cylindrical projection, skysphere) map.
Stars: ✭ 120 (-16.67%)
Mutual labels:  image, converter
React Color Extractor
A React component which extracts colors from an image
Stars: ✭ 314 (+118.06%)
Mutual labels:  image, converter
Mybox
Easy tools of document, image, file, network, location, color, and media.
Stars: ✭ 45 (-68.75%)
Mutual labels:  image, converter
Png To Ico
convert png to ico format
Stars: ✭ 88 (-38.89%)
Mutual labels:  image, converter
Hrconvert2
A self-hosted, drag-and-drop, & nosql file conversion server that supports 62x file formats.
Stars: ✭ 132 (-8.33%)
Mutual labels:  image, converter
Flex Block
一个基于Hexo的主题
Stars: ✭ 133 (-7.64%)
Mutual labels:  image
Asyncimage
Asynchronous Image Loading from URL in SwiftUI
Stars: ✭ 139 (-3.47%)
Mutual labels:  image
Imgdupes
Finding and deleting near-duplicate images based on perceptual hash.
Stars: ✭ 135 (-6.25%)
Mutual labels:  image
Vifmimg
Image previews using Ãœberzug for Vifm (vi file manager)
Stars: ✭ 135 (-6.25%)
Mutual labels:  image
To Milliseconds
Convert an object of time properties to milliseconds: `{seconds: 2}` → `2000`
Stars: ✭ 136 (-5.56%)
Mutual labels:  converter
Image Shadow
Simple and small Javascript script to display the shadow of an image!
Stars: ✭ 142 (-1.39%)
Mutual labels:  image
Flutter cached network image
Download, cache and show images in a flutter app
Stars: ✭ 1,923 (+1235.42%)
Mutual labels:  image
React Native Story
React native instagram story
Stars: ✭ 144 (+0%)
Mutual labels:  image
React Avatar Editor
Small avatar & profile picture component. Resize and crop uploaded images using a intuitive user interface.
Stars: ✭ 1,846 (+1181.94%)
Mutual labels:  image
Defer.js
🥇 A super small, super efficient library that helps you lazy load everything like images, video, audio, iframe as well as stylesheets, and JavaScript.
Stars: ✭ 138 (-4.17%)
Mutual labels:  image
Releases
WLAN Pi Release Repository
Stars: ✭ 135 (-6.25%)
Mutual labels:  image
Pdfinverter
darken (or lighten) a PDF
Stars: ✭ 139 (-3.47%)
Mutual labels:  image
Decktape
PDF exporter for HTML presentations
Stars: ✭ 1,847 (+1182.64%)
Mutual labels:  converter

flowiz

Codacy Badge PyPI - License PyPI PyPI - Downloads

Launch Jupyter

Converts Optical Flow .flo files to images .png and optionally compiles them to a video .mp4 via ffmpeg

Installation

Grab the latest package from PyPI repo

pip install flowiz -U

or grab it straight from Github

pip install git+https://github.com/georgegach/flowiz/

or clone the repo and install using setup.py

git clone https://github.com/georgegach/flowiz.git
cd flowiz
python setup.py install --user

Make sure you have following packages installed

pip install numpy tqdm matplotlib eel
apt install ffmpeg

Usage

Package can be used both from the command line and python script.

Command line usage

The following script grabs .flo files from ./demo/flo/ directory and converts into .png saving in the same directory

python -m flowiz demo/flo/*.flo

You can pass output directory for .png images via -o or --outdir parameter

python -m flowiz demo/flo/*.flo --outdir demo/png/

You may compile converted .png images into a 24 fps .mp4 clip by passing -v or --videodir parameter with a video output directory (without a filename)

python -m flowiz demo/flo/*.flo -o demo/png --videodir demo/mp4

Pass -r or --framerate parameter to control the framerate of compiled video

python -m flowiz demo/flo/*.flo -o demo/png -v demo/mp4 --framerate 2

Python usage

Relevant python code is available in demo/test.ipynb notebook. Here's an excerpt:

import flowiz as fz

files = glob.glob('demo/flo/*.flo')
img = fz.convert_from_file(files[0])
plt.imshow(img)

Image

In case you need to visualize U V channels separately from your numpy floArray:

uv = fz.convert_from_flow(floArray, mode='UV')
axarr[0].imshow(uv[...,0], cmap=plt.get_cmap('binary'))
axarr[1].imshow(uv[...,1], cmap=plt.get_cmap('binary'))

Image

GUI usage

Beta version of the flowiz graphical user interface is now accessible via flowiz.gui package. It is packaged using ChrisKnott / Eel and available via default web browser. To run the GUI simply type:

python -m flowiz.gui

Upon launching the web app, drag and drop or choose .flo file(s) using the open file dialog. Files will be converted using the python backend and placed in a temporary directory flowiz/gui/web/guitemp. Upon every session temporary directory will be emptied to avoid unnecessary polution.

Mockup of the GUI is available at georgegach.github.io/flowiz

Demo Video

Help

$ python -m flowiz -h

usage: __main__.py [-h] [--outdir OUTDIR] [--videodir VIDEODIR]
                    [--framerate FRAMERATE]
                    input [input ...]

positional arguments:
  input                 Input file(s). (e.g.: __ ./demo/flo/*.flo)

optional arguments:
  -h, --help            show this help message and exit
  --outdir OUTDIR, -o OUTDIR
                        Output directory path. Default: same directory as
                        [.flo] files. (e.g.: __ -o ./demo/png/)
  --videodir VIDEODIR, -v VIDEODIR
                        Compiles [.mp4] video from [.png] images if parameter
                        is passed. Parameter requires video output directory
                        path without a filename. (e.g.: __ -v ./demo/mp4/)
  --framerate FRAMERATE, -r FRAMERATE
                        Frames per second of the video. (e.g.: __ -r 2)

Acknowledgements

The library is based on Midlebury's Vision Project MATLAB code: http://vision.middlebury.edu/flow/ Original credits to Daniel Scharstein (C++) and Deqing Sun (MATLAB)

FAQ

Q: But what kind of name is flowiz?
A: The kind you choose when flowkit, flowtools, flowlib, flowlab are already taken.

Q: Future work?
A: Some of the To-Do features are listed below with no determined timeline. If you'd like to contribute with the said features or something completely new, you may fork it and issue a pull request.

To-Do

  • [x] Ported from Matlab flow_code
  • [x] Project is available on PyPI
  • [x] GUI
    • [ ] Fully argparsable CLI launch support
    • [ ] File open with support
    • [ ] Original image overlay
    • [ ] Full file explorer
    • [ ] Flow file info
      • [ ] Basics: name, width, height, filesize
      • [ ] Histogram
    • [ ] Progress bar
    • [ ] Client-side .flo format validation (using tag)
  • [x] Library
    • [ ] Arrow visualizations (using opencv or custom compact nanomodule)
    • [ ] Standalone rgb and uv:binary image creation (removes matplotlib dependency)
    • [ ] Standalone .mp4 compiler (removes ffmpeg dependency)
  • [x] CLI
    • [x] Nothing for now
  • [x] Miscellaneous
    • [x] Better logo
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].