{"id":18359756,"url":"https://github.com/snototter/vito","last_synced_at":"2025-04-06T13:32:14.283Z","repository":{"id":37952964,"uuid":"230996706","full_name":"snototter/vito","owner":"snototter","description":"Python utility package for common computer vision tasks.","archived":false,"fork":false,"pushed_at":"2024-09-03T22:47:47.000Z","size":1219,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-03-22T01:24:52.270Z","etag":null,"topics":["computer-vision-tools","data-visualization","image-processing","utility-library"],"latest_commit_sha":null,"homepage":"","language":"Python","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/snototter.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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-12-31T00:05:14.000Z","updated_at":"2024-05-07T21:40:27.000Z","dependencies_parsed_at":"2024-11-05T22:29:45.857Z","dependency_job_id":"d525cf7d-6bf4-48d2-849f-36684821aa6a","html_url":"https://github.com/snototter/vito","commit_stats":{"total_commits":201,"total_committers":3,"mean_commits":67.0,"dds":"0.42288557213930345","last_synced_commit":"3a104cdc0d78e1ee8e5db3a06fa87100ac12ebff"},"previous_names":[],"tags_count":35,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/snototter%2Fvito","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/snototter%2Fvito/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/snototter%2Fvito/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/snototter%2Fvito/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/snototter","download_url":"https://codeload.github.com/snototter/vito/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247488667,"owners_count":20946980,"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":["computer-vision-tools","data-visualization","image-processing","utility-library"],"created_at":"2024-11-05T22:24:24.496Z","updated_at":"2025-04-06T13:32:10.435Z","avatar_url":"https://github.com/snototter.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# vito - Vision Tools\n[![View on PyPI](https://badge.fury.io/py/vito.svg)](https://pypi.org/project/vito)\n[![PyPI - Downloads](https://img.shields.io/pypi/dm/vito.svg)](https://pypi.org/project/vito)\n[![Build Status](https://app.travis-ci.com/snototter/vito.svg?branch=master)](https://app.travis-ci.com/snototter/vito)\n[![Coverage Status](https://coveralls.io/repos/github/snototter/vito/badge.svg?branch=master)](https://coveralls.io/github/snototter/vito?branch=master)\n[![License](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/snototter/vito/blob/master/LICENSE?raw=true)\n\nPython utilities for common computer vision tasks.\nThe goal of this package is to provide a lightweight python-only package for very basic image manipulation tasks, optical flow handling, pseudocoloring and camera geometry.\n\n\n## Examples\n* **Pseudocoloring:** \n  ```python\n  from vito import imutils\n  from vito import imvis\n\n  # Load a single-channel image (data.dtype will be numpy.uint8)\n  peaks = imutils.imread('peaks.png', mode='L')\n  # Colorize it\n  colorized = imvis.pseudocolor(peaks, limits=None, color_map=colormaps.colormap_viridis_rgb)\n  imvis.imshow(colorized)\n\n  # Load 16-bit depth stored as PNG (data.dtype will be numpy.int32)\n  depth = imutils.imread('depth.png')\n  # Colorize it\n  colorized = imvis.pseudocolor(depth, limits=None, color_map=colormaps.colormap_turbo_rgb)\n  imvis.imshow(colorized)\n\n  ```\n  Exemplary visualizations: colorizing via the `turbo` rainbow colormap (left); same data reduced to 11 bins colorized using `viridis` (right). Input data is obtained from two translated and scaled Gaussian distributions.\n  ![Pseudocoloring Example](https://github.com/snototter/vito/raw/master/examples/visualizations/example-pseudocolor.png)\n* **Optical flow:**\n  ```python\n  from vito import flowutils\n  from vito import imvis\n\n  # Load optical flow file\n  flow = flowutils.floread('color_wheel.flo')\n  # Colorize it\n  colorized = flowutils.colorize_flow(flow)\n  imvis.imshow(colorized)\n  ```\n  Exemplary visualization: Optical flow (standard color wheel visualization) and corresponding RGB frame for one frame of the [MPI Sintel Flow](http://sintel.is.tue.mpg.de) dataset.\n  ![Optical Flow Example](https://github.com/snototter/vito/raw/master/examples/visualizations/example-flowvis.png)\n* **Pixelation:**\n  ```python\n  from vito import imutils\n  from vito import imvis\n\n  img = imutils.imread('homer.png')\n  rects = [(80, 50, 67, 84), (257, 50, 82, 75)]  # (Left, Top, Width, Height)\n  anon = imutils.apply_on_bboxes(img, rects, imutils.pixelate)\n  imvis.imshow(anon)\n  ```\n  Exemplary visualization: anonymization example using `imutils.apply_on_bboxes()` as shown above, with Gaussian blur kernel (`imutils.gaussian_blur()`, left) and pixelation (`imutils.pixelate()`, right), respectively.\n  ![Anonymization Example](https://github.com/snototter/vito/raw/master/examples/visualizations/example-anon.png)\n* For more examples (or if you prefer having a simple GUI to change visualization/analyze your data), see also the [**iminspect**](https://pypi.org/project/iminspect) package (which uses `vito` under the hood).\n\n\n## Dependencies\n* `numpy`\n* `Pillow`\n\n\n## Changelog\n* `1.6.1`\n  * House keeping: Internal adaptations to fix deprecated (NumPy) and changed (PIL) library usage.\n  * CI updates to [PyPI's trusted publishing](https://docs.pypi.org/trusted-publishers/).\n  * Code clean up (added type hints, docstrings, ...).\n* `1.6.0`\n  * Remove deprecated functionality (workarounds for Python versions older than 3.6).\n  * Add type hints and update documentation.\n  * Add parameter order check to `imsave` (that's the one thing I alwys mess up\n    when coding without IDE).\n  * `imsave` now creates the output directory structure if it did not exist.\n* `1.5.3`\n  * Mute initial notification about `imshow` backend.\n  * Catch exception and adjust `imshow` backend if used with headless OpenCV.\n* `1.5.2`\n  * Changed `imshow` to skip waiting for user input if `wait_ms=0`.\n  * Added (RGB) colormap handles for convenience.\n  * Drop support for deprecated Python version 3.5.\n* `1.5.1`\n  * Changed handling of `None` inputs for image concatenation/stacking.\n* `1.5.0`\n  * Extends the `imutils` submodule (rotation, concatenation \u0026 noop).\n  * Fix deprecation warnings with newer NumPy versions.\n  * Extended test suite.\n* `1.4.1`\n  * Removes f-strings to fix compatibility for older python 3.5.\n* `1.4.0`\n  * Changed `imvis.overlay` to use a more intuitive signature.\n  * Aliases for some `cam_projections` functions.\n  * Spell-checked all files via `pyspelling`.\n* `1.3.4`\n  * Extended input handling for `imutils` (support single channel input to rgb2gray).\n  * Aliases for some `imutils` functions.\n  * Cleaning up tests, documentation, etc.\n* `1.3.3`\n  * Prevent nan values caused by floating point precision issues in the `cam_projections` submodule.\n  * Remove the (empty) `tracking` submodule (to be added in a future release).\n  * Update the submodule list.\n* `1.3.2`\n  * Support custom label maps in `detection2d` module.\n  * Construct `BoundingBox`es from relative representations.\n* `1.3.1`\n  * Relative `BoundingBox` representation.\n  * Support label lookup for `Detection` instances directly.\n* `1.3.0`\n  * Common representations and utilities for 2D object detection via the `detection2d` module.\n    * `Detection` class to encapsulate object detections.\n    * `BoundingBox` class to work with axis-aligned bounding boxes.\n* `1.2.3`\n  * Support sampling from colormaps.\n  * Adjust tests to updated PIL version.\n* `1.2.2`\n  * Use explicit copies in `pseudocolor()` to prevent immutable assignment destination errors.\n* `1.2.1`\n  * Explicitly handle invalid (NaN and infinite) inputs to `pseudocolor()`.\n* `1.2.0`\n  * Add pixelation functionality for anonymization via `imutils`.\n  * Add Gaussian blur to `imutils`.\n* `1.1.5`\n  * Extend projection utils.\n* `1.1.4`\n  * Explicitly handle `None` inputs to `imutils`.\n* `1.1.3`\n  * Fix transparent borders when padding.\n* `1.1.2`\n  * Add sanity checks to `imutils` which prevent interpreting optional PIL/cv2 parameters as custom parameters.\n  * Add grayscale conversion to `imutils`.\n* `1.1.1`\n  * Maximum alpha channel value derived from data type.\n* `1.1.0`\n  * Added padding functionality.\n* `1.0.4`\n  * Improved test coverage.\n  * Fixed potential future bugs - explicit handling of wrong/unexpected user inputs.\n* `1.0.3`\n  * Minor bug fix: handle invalid user inputs in `imvis`.\n* `1.0.2`\n  * Additional tests and minor improvements (potential bug fixes, especially for edge case inputs).\n  * Ensure default image I/O parametrization always returns/saves/loads color images as RGB (even if OpenCV is available/used on your system).\n* `1.0.1`\n  * Fix colorizing boolean masks (where `mask[:] = True` or `mask[:] = False`).\n* `1.0.0`\n  * Rename flow package to `flowutils`.\n* `0.3.2`\n  * Rename colorization for optical flow.\n* `0.3.1`\n  * Fix `colormaps.by_name()` for grayscale.\n* `0.3.0`\n  * `apply_on_bboxes()` now supports optional kwargs to be passed on to the user-defined function handle.\n  * Changed `imread()`'s default `mode` parameter to optional kwargs which are passed on to Pillow.\n  * Raising error for non-existing files in `imread()`\n  * Added `colormaps.by_name()` functionality.\n  * Fixed bounding box clipping off-by-one issue.\n  * Added `imutils` tests ensuring proper data types.\n* `0.2.0`\n  * Optical flow (Middlebury .flo format) I/O and visualization.\n  * Support saving images.\n  * Visualization utils for tracking results.\n* `0.1.1`\n  * Changed supported python versions for legacy tests.\n* `0.1.0`\n  * First actually useful release.\n  * Contains most of the functionality of `pvt` (a library I developed throughout my studies).\n    * `cam_projections` - projective geometry, lens distortion/rectification (Plumb Bob model), etc.\n    * `colormaps` - colormap definitions for visualization (jet, parula, magma, viridis, etc.)\n    * `imutils` - image loading, conversion, RoI handling (e.g. apply functions on several patches of an image).\n    * `imvis` - visualization helpers, e.g. pseudocoloring or overlaying images.\n    * `pyutils` - common python functions (timing code, string manipulation, list sorting/search, etc.)\n* `0.0.1`\n  * Initial public release.\n  * Contains common python/language and camera projection utils.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsnototter%2Fvito","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsnototter%2Fvito","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsnototter%2Fvito/lists"}