{"id":18359755,"url":"https://github.com/snototter/iminspect","last_synced_at":"2025-04-06T13:32:13.830Z","repository":{"id":62570695,"uuid":"230753945","full_name":"snototter/iminspect","owner":"snototter","description":"Simple UI to visualize image-like data for faster python prototyping.","archived":false,"fork":false,"pushed_at":"2024-11-22T11:29:16.000Z","size":2024,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-22T01:24:41.740Z","etag":null,"topics":["computer-vision-tools","data-visualization","image-analysis","image-viewer"],"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-29T13:27:19.000Z","updated_at":"2024-11-22T11:29:20.000Z","dependencies_parsed_at":"2024-11-05T22:29:42.893Z","dependency_job_id":"971a71d9-6aa3-4395-b5e3-8ca413af49b2","html_url":"https://github.com/snototter/iminspect","commit_stats":{"total_commits":185,"total_committers":4,"mean_commits":46.25,"dds":"0.38378378378378375","last_synced_commit":"d60515bf5c258c52e1e2f9672a47c538a6273fee"},"previous_names":[],"tags_count":21,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/snototter%2Fiminspect","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/snototter%2Fiminspect/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/snototter%2Fiminspect/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/snototter%2Fiminspect/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/snototter","download_url":"https://codeload.github.com/snototter/iminspect/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-analysis","image-viewer"],"created_at":"2024-11-05T22:24:23.866Z","updated_at":"2025-04-06T13:32:13.819Z","avatar_url":"https://github.com/snototter.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# iminspect\n[![View on PyPI](https://img.shields.io/pypi/v/iminspect.svg)](https://pypi.org/project/iminspect)\n[![PyPI - Downloads](https://img.shields.io/pypi/dm/iminspect.svg)](https://pypi.org/project/iminspect)\n[![License](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/snototter/iminspect/blob/master/LICENSE?raw=true)\n\nA python utility package for image/matrix visualization.\n\n![Application logo](https://github.com/snototter/iminspect/blob/master/screenshots/logo.png?raw=true \"Application logo\")\n\nMoving from MATLAB to python I was missing fast and easy-to-use inspection tools for image data.\nThus, `iminspect` provides a collection of visualization/inspection capabilities along with a simplistic Qt-based GUI.\nThe goal is to enable quick and easy visualization/analysis of:\n* color images,\n* monochrome images (i.e. any type of 2D matrices),\n* label images (i.e. categorical data),\n* binary masks,\n* depth maps, and\n* optical flow data.\n\n\n## Qt Backend\n`iminspect` requires a [Qt](https://www.qt.io/) backend. In Python, you need to\neither install [PyQt](https://www.riverbankcomputing.com/software/pyqt/download)\nor [PySide](https://doc.qt.io/qtforpython-6/).  \nThe default installation **will not install** any of these backends, you have\nto select one on your own.\n\nOptionally, you can install `iminspect` with a specific backend. Currently,\n`pyqt5`, `pyqt6`, `pyside2`, and `pyside6` are supported:\n```bash\n# PyQt5\npython3 -m pip install \"iminspect[pyqt5]\"\n\n# OR PyQt6\npython3 -m pip install \"iminspect[pyqt6]\"\n\n# OR PySide2\npython3 -m pip install \"iminspect[pyside2]\"\n\n# OR PySide6\npython3 -m pip install \"iminspect[pyside6]\"\n```\n\n## Example usage (within a Python script):\n```python\nfrom iminspect.inspector import inspect, DataType\nimport numpy as np\n\n# Show random noise image:\ninspect(np.random.rand(4096,4096) - 0.5)\n\n# Show as class labels:\ninspect((np.random.rand(16,16) * 1e2 % 5).astype(np.int16), data_type=DataType.CATEGORICAL)\n\n# Show two images next to each other, e.g. useful to analyse RGB and\n# corresponding depth, or RGB and corresponding optical flow:\ninspect((data_color, data_depth))\n# or specify the data types manually:\ninspect((rgb, flow), data_type=(DataType.COLOR, DataType.FLOW)))\n```\n\nExample: visualizing categorical data (i.e. labels)\u003cbr/\u003e\n![Screenshot categorical data](https://github.com/snototter/iminspect/blob/master/screenshots/categorical.jpg?raw=true \"iminspect GUI\")\n\nExample: visualizing a mask image\u003cbr/\u003e\n![Screenshot binary data](https://github.com/snototter/iminspect/blob/master/screenshots/mask.jpg?raw=true \"iminspect GUI\")\n\nExample: visualizing RGB image and optical flow\u003cbr/\u003e\n![Screenshot optical flow](https://github.com/snototter/iminspect/blob/master/screenshots/rgb-flow.jpg?raw=true \"iminspect GUI\")\n\n\n## Example usage (standalone):\nThe `iminspect` package can be run as a standalone application, so you could create a launcher, add it to your system's binary/executable path, etc.\nYou can either do this manually via the following steps or try the `standalone/install-...` scripts.\n\n1. Set up a virtual environment (in this example, I'll use a separate `util-iminspect` folder to install the `iminspect` package):\n    ```bash\n    cd desired/installation/path\n    python3 -m venv util-iminspect\n    source util-iminspect/bin/activate\n    pip install -U pip\n    pip install iminspect\n    ```\n2. Run `iminspect` standalone via:\n    ```bash\n    desired/installation/path/util-iminspect/bin/python3 -m iminspect\n    ```\n\n\n## Custom input widgets:\nThe `iminspect.inputs` subpackage provides common user input widgets, e.g. to select a rectangular region-of-interest, enter an IP address, etc. See the `examples/inputs_demo.py` application on how to use it. Exemplary screenshot:\u003cbr/\u003e\n![Screenshot inputs demo](https://github.com/snototter/iminspect/blob/master/screenshots/input-widgets.jpg?raw=true \"Common input widgets\")\n\n\n## UI Documentation\n* To inspect a data point/pixel, just move the mouse above it.\n* Zooming:\n  * `Ctrl+Wheel` to zoom in/out.\n  * `Ctrl+Shift+Wheel` to speed up zooming.\n  * `Ctrl+{+|-}` to zoom in/out.\n  * `Ctrl+Shift+{+|-}` to zoom in/out faster.\n  * `Ctrl+F` to zoom such that the image fills the available canvas.\n  * `Ctrl+1` to scale to original size.\n* Scrolling:\n  * `Wheel` scrolls up/down.\n  * `Shift+Wheel` speeds up scrolling.\n  * `Ctrl+{Up|Down|Left|Right}` to scroll using keyboard.\n  * `Ctrl+Shift+{Up|Down|Left|Right}` to scroll faster/further. \n  * Press and move left/right button to drag the image if zoomed in.\n* Keyboard shortcuts:\n  * `Ctrl+Q` and `Ctrl+W` close the inspection GUI.\n  * `Ctrl+O` shows a dialog to open another file.\n  * `Ctrl+S` shows a dialog to save either the (raw) input or its current visualization.\n  * `Ctrl+T` toggles tool tip display when moving the mouse over the data.\n  * `Ctrl+R` reloads the current data such that the user can select a different visualization/data type.\n\n\n## Changelog\n* Upcoming\n  * Bug fix (ensure integral data type for Qt API calls)\n* `1.4.1`\n  * Adds the missing asset.\n* `1.4.0`\n  * Updates the build process, switching to [pyproject.toml](https://pip.pypa.io/en/stable/reference/build-system/pyproject-toml/)\n  * Users can choose which Qt/PySide version should be used via the package extras.\n* `1.3.11`\n  * Prevents a `TypeError` that occurs for some mouse wheel zoom actions on recent OS/Qt versions.\n  * Github workflow updates\n  * Remove Python EOL versions\n  * Fix OS \u0026 Python setup for CI test runner\n  * Update PyPI action to use [Trusted Publishing](https://packaging.python.org/en/latest/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/) / [OpenID Connect (OIDC)](https://docs.github.com/en/actions/deployment/security-hardening-your-deployments/configuring-openid-connect-in-pypi)\n* `1.3.10`\n  * Added utility scripts for [standalone installation](https://github.com/snototter/iminspect/blob/master/standalone/install-standalone-ubuntu-18.04.sh) (on Ubuntu).\n  * Clarified standalone usage example.\n  * Minor tweaks to the `inputs` subpackage.\n* `1.3.9`\n  * Handle non-finite values: Info/caution message shows in the data summary label, non-finite values are ignored in computing the data statistics.\n  * Option (Shortcut and toolbar button) to reload the currently inspected data with a different visualization/data type.\n  * Added application icon.\n* `1.3.8`\n  * Added support for opening files via dropping them from external image viewer applications. Tested with common Linux viewers (`eog` and `geeqie`).\n* `1.3.7`\n  * Support opening files by dropping them into the viewer.\n  * Added `__main__` to run module (open the inspector) via `python -m iminspect`\n* `1.3.6`\n  * Inspector handles 1D inputs.\n  * Minor tweaks to the `inputs` subpackage.\n* `1.3.5`\n  * Bug fix - rounding issues during initialization of custom slider widgets (which use floats).\n* `1.3.4`\n  * Minor tweaks to the `inputs` subpackage.\n* `1.3.3`\n  * Add functionality to open the inspector without data (in case you want to load from disk).\n* `1.3.2`\n  * Added color picker widget to `inputs`.\n  * Support multiple file selection dialog.\n* `1.3.1`\n  * Minor extensions to user `inputs` subpackage.\n* `1.3.0`\n  * Added a range slider to adjust visualization limits on the fly.\n  * Image viewer (canvas) now supports dragging.\n  * Support toggling the tool tip display.\n  * Support adding custom labels for categorical data.\n  * Fix running `inputs.py` as standalone demo (relative import confusion).\n* `1.2.0`\n  * Support multi-channel input data (with more than 4 channels).\n  * Support analysing multiple images at once, e.g. color images and corresponding optical flow.\n  * Major refactoring under the hood.\n* `1.1.0`\n  * Support saving visualization and raw input data to disk.\n  * Added shorthand wrapper to `inspect()` call.\n  * UI improvements/layout changes.\n  * Fixed typos such as `DataType.CATEGORICAL`.\n  * Added support for partially transparent images (i.e. RGBA).\n* `1.0.0`\n  * Major code refactoring: use data type enum instead of various flags (this breaks previous inspect() calls).\n  * Optical flow support.\n  * Load another file from disk (via `Ctrl+O`).\n  * Usability improvements, e.g. restore display settings when opening similar data type, handle file loading errors, etc.\n* `0.2.0`\n  * Major refactoring: moved image utils and colorizing code to separate [vito](https://github.com/snototter/vito) package.\n  * Usability improvements: keyboard shortcuts for zooming, scaling and scrolling.\n* `0.1.2`\n  * Added tests for non-GUI functionality.\n  * Integrate github runners for test/build/deploy.\n  * Fix definition for colormap gray.\n* `0.1.1`\n  * Additional features:\n    * ImageCanvas supports ROI selection (useful for custom input widgets).\n  * Refactoring:\n    * Clean up imports.\n    * Make pylint/flake8 happier.\n  * Fixes:\n    * Adjust scrollbars when zooming multiple linked ImageCanvas.\n* `0.1.0` - Initial public release.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsnototter%2Fiminspect","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsnototter%2Fiminspect","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsnototter%2Fiminspect/lists"}