{"id":13571792,"url":"https://github.com/georgegach/flowiz","last_synced_at":"2025-04-04T09:30:34.764Z","repository":{"id":37334791,"uuid":"149383036","full_name":"georgegach/flowiz","owner":"georgegach","description":"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:","archived":false,"fork":false,"pushed_at":"2023-10-03T23:44:21.000Z","size":46012,"stargazers_count":247,"open_issues_count":3,"forks_count":32,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-03-05T17:52:40.666Z","etag":null,"topics":["converter","flo","flow","image","middlebury","optical","python","video","vision","visualisation","visualization"],"latest_commit_sha":null,"homepage":"https://georgegach.github.io/flowiz","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/georgegach.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2018-09-19T02:50:12.000Z","updated_at":"2025-03-05T07:41:04.000Z","dependencies_parsed_at":"2023-11-26T13:16:18.650Z","dependency_job_id":"f9eab4c0-a470-44bd-8e31-b0ca87d17147","html_url":"https://github.com/georgegach/flowiz","commit_stats":{"total_commits":87,"total_committers":6,"mean_commits":14.5,"dds":"0.31034482758620685","last_synced_commit":"78e08e47f5b6ea8333729868ad8fd7d190a38a91"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/georgegach%2Fflowiz","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/georgegach%2Fflowiz/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/georgegach%2Fflowiz/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/georgegach%2Fflowiz/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/georgegach","download_url":"https://codeload.github.com/georgegach/flowiz/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247152750,"owners_count":20892549,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["converter","flo","flow","image","middlebury","optical","python","video","vision","visualisation","visualization"],"created_at":"2024-08-01T14:01:06.403Z","updated_at":"2025-04-04T09:30:29.735Z","avatar_url":"https://github.com/georgegach.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n\u003cimg src=\"https://raw.githubusercontent.com/georgegach/flowiz/master/flowiz/gui/web/assets/flowiz-logo.png\" width=400 alt='flowiz' style=\"margin:50px;max-width:400px\"\u003e\n\u003cp\u003e\n    \n\u003cp align=\"center\"\u003e\n\u003ca href=\"https://github.com/georgegach/flowiz/blob/master/LICENSE\"\u003e\u003cimg src=\"https://img.shields.io/pypi/l/flowiz.svg\" alt=\"PyPI - License\" /\u003e\u003c/a\u003e\n\u003ca href=\"https://pypi.org/project/flowiz/\"\u003e\u003cimg src=\"https://img.shields.io/pypi/v/flowiz.svg\" alt=\"PyPI\" /\u003e\u003c/a\u003e\n\u003ca href=\"https://pypistats.org/search/flowiz\"\u003e\u003cimg src=\"https://img.shields.io/pypi/dm/flowiz.svg\" alt=\"PyPI - Downloads\" /\u003e\u003c/a\u003e\n    \u003c/p\u003e\n\u003cp align=\"center\"\u003e\n\u003ca href=\"https://mybinder.org/v2/gh/georgegach/flowiz/master?filepath=demo%2Ftest.ipynb\"\u003e\u003cimg src=\"https://img.shields.io/static/v1.svg?label=launch\u0026amp;message=notebook\u0026amp;color=F37626\u0026amp;style=for-the-badge\u0026amp;logo=jupyter\" alt=\"Launch Jupyter\" /\u003e\u003c/a\u003e\u003c/p\u003e\n\u003c/p\u003e\n\n\u003ch1\u003e\u003c/h1\u003e\n\nConverts Optical Flow `.flo` files to images `.png` and optionally compiles them to a video `.mp4` via ffmpeg\n\n-   [Installation](#installation)\n-   [Usage](#usage)\n    -   [Command line usage](#command-line-usage)\n    -   [Python usage](#python-usage)\n    -   [GUI usage](#gui-usage)\n    -   [Help](#help)\n-   [Acknowledgements](#acknowledgements)\n-   [FAQ](#faq)\n-   [To-Do](#to-do)\n\n## Installation\n### PyPI\n\nEasiest option to install `flowiz` is to grab the latest package from PyPI repo\n\n```bash\npip install flowiz -U\n```\n\n### pip + Github\nAlternatively you may install the package directly from github repo\n\n```bash\npip install git+https://github.com/georgegach/flowiz/\n```\n\n### Build yourself\nOr you can run `setup.py` to build it yourself locally\n\n```bash\ngit clone https://github.com/georgegach/flowiz.git\ncd flowiz\npython setup.py install --user\n```\n\nMake sure you have requirements installed along with an `ffmpeg` to compile a video. `requirements.txt` contains latest working versions of this package. Feel free to use `pip-upgrader`. \n```bash\npip install -r requirements.txt\napt install ffmpeg \n# pacman -S ffmpeg\n```\n\n### Docker\nFirst dockerize cloned repo\n```bash\ngit clone https://github.com/georgegach/flowiz.git\ncd flowiz\ndocker build . -t myflowiz:latest\n```\n\nThen launch the container with port 8000 exposed\n```bash\ndocker run -it -p 8000:8000 myflowiz:latest\n```\n\nFinally, fire up http://localhost:8000 in your favorite browserH\n\n### Get it from DockerHub\nhttps://hub.docker.com/repository/docker/georgegach/flowiz\n```bash\ndocker run -it -p 8000:8000 georgegach/flowiz:latest\n```\n\n## Usage\n\nPackage can be used both from the command line and python script.\n\n### Command line usage\n\nThe following script grabs `.flo` files from `./demo/flo/` directory and converts into `.png` saving in the same directory\n\n```bash\npython -m flowiz demo/flo/*.flo\n```\n\nYou can pass output directory for `.png` images via `-o` or `--outdir` parameter\n\n```bash\npython -m flowiz demo/flo/*.flo --outdir demo/png/\n```\n\nYou 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)\n\n```bash\npython -m flowiz demo/flo/*.flo -o demo/png --videodir demo/mp4\n```\n\nPass `-r` or `--framerate` parameter to control the framerate of compiled video\n\n```bash\npython -m flowiz demo/flo/*.flo -o demo/png -v demo/mp4 --framerate 2\n```\n\n### Python usage\n\nRelevant python code is available in `demo/test.ipynb` notebook. Here's an excerpt:\n\n```python\nimport flowiz as fz\n\nfiles = glob.glob('demo/flo/*.flo')\nimg = fz.convert_from_file(files[0])\nplt.imshow(img)\n```\n\n![Image](https://raw.githubusercontent.com/georgegach/flowiz/master/demo/png/frame_0001.flo.png)\n\nIn case you need to visualize `U V` channels separately from your numpy `floArray`:\n\n```python\nuv = fz.convert_from_flow(floArray, mode='UV')\naxarr[0].imshow(uv[...,0], cmap=plt.get_cmap('binary'))\naxarr[1].imshow(uv[...,1], cmap=plt.get_cmap('binary'))\n```\n\n![Image](https://raw.githubusercontent.com/georgegach/flowiz/master/demo/githubassets/uv_flows.png)\n\n### GUI usage\n\nBeta version of the `flowiz` graphical user interface is now accessible via `flowiz.gui` package. It is packaged using [ChrisKnott / Eel](https://github.com/ChrisKnott/Eel) and available via default web browser. To run the GUI simply type:\n\n```bash\npython -m flowiz.gui\n```\n\nUpon 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.  \n\nMockup of the GUI is available at [georgegach.github.io/flowiz](http://georgegach.github.io/flowiz)\n\n![Demo Video](https://raw.githubusercontent.com/georgegach/flowiz/master/demo/githubassets/flowiz.demo.gif)\n\n### Help\n\n```bash\n$ python -m flowiz -h\n\nusage: __main__.py [-h] [--outdir OUTDIR] [--videodir VIDEODIR]\n                    [--framerate FRAMERATE]\n                    input [input ...]\n\npositional arguments:\n  input                 Input file(s). (e.g.: __ ./demo/flo/*.flo)\n\noptional arguments:\n  -h, --help            show this help message and exit\n  --outdir OUTDIR, -o OUTDIR\n                        Output directory path. Default: same directory as\n                        [.flo] files. (e.g.: __ -o ./demo/png/)\n  --videodir VIDEODIR, -v VIDEODIR\n                        Compiles [.mp4] video from [.png] images if parameter\n                        is passed. Parameter requires video output directory\n                        path without a filename. (e.g.: __ -v ./demo/mp4/)\n  --framerate FRAMERATE, -r FRAMERATE\n                        Frames per second of the video. (e.g.: __ -r 2)\n```\n\n```bash\n$ python -m flowiz.gui -h\nusage: __main__.py [-h] [--mode MODE]\n\noptional arguments:\n  -h, --help   show this help message and exit\n  --mode MODE  GUI engine: \"chrome\", \"edge\", \"electron\", \"browser\". Use \"None\" when working with Docker.\n```\n\n## Acknowledgements\n\nThe library is based on Midlebury's Vision Project MATLAB code: \u003chttp://vision.middlebury.edu/flow/\u003e\nOriginal credits to Daniel Scharstein (C++) and Deqing Sun (MATLAB)\n\n## FAQ\n\n\u003e Q: But what kind of name is `flowiz`?  \n\u003e A: The kind you choose when `flowkit`, `flowtools`, `flowlib`, `flowlab` are already taken.\n\n\u003e Q: Future work?  \n\u003e 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](https://img.shields.io/github/forks/georgegach/flowiz.svg?label=fork%20it\u0026style=social) and issue a pull request. \n\n## To-Do\n\n-   [x] Ported from Matlab `flow_code`\n-   [x] Project is available on PyPI \n-   [x] Dockerized\n-   [x] GUI\n    -   [ ] Improve Front to Back-end throughput performance\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgeorgegach%2Fflowiz","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgeorgegach%2Fflowiz","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgeorgegach%2Fflowiz/lists"}