{"id":13738601,"url":"https://github.com/karolzak/ipyplot","last_synced_at":"2025-04-08T14:11:44.404Z","repository":{"id":37211150,"uuid":"259671755","full_name":"karolzak/ipyplot","owner":"karolzak","description":"IPyPlot is a small python package offering fast and efficient plotting of images inside Python Notebooks. It's using IPython with HTML for faster, richer and more interactive way of displaying big numbers of images.","archived":false,"fork":false,"pushed_at":"2024-07-10T08:17:34.000Z","size":29194,"stargazers_count":420,"open_issues_count":20,"forks_count":42,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-04-01T13:06:54.808Z","etag":null,"topics":["deep-learning","html","image-classification","image-processing","image-viewer","images","jupyter-notebook","machine-learning","notebook","notebooks","plotting-in-python","python","visualization"],"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/karolzak.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"github":["karolzak"],"patreon":"karolzak","open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2020-04-28T15:09:32.000Z","updated_at":"2025-03-20T06:40:53.000Z","dependencies_parsed_at":"2024-04-20T17:43:12.369Z","dependency_job_id":"5d1c22a3-5839-48c0-90d4-f71c887d572d","html_url":"https://github.com/karolzak/ipyplot","commit_stats":{"total_commits":46,"total_committers":5,"mean_commits":9.2,"dds":0.08695652173913049,"last_synced_commit":"393934f606734d5f03ba3f26f5e305a4237f06a9"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/karolzak%2Fipyplot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/karolzak%2Fipyplot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/karolzak%2Fipyplot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/karolzak%2Fipyplot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/karolzak","download_url":"https://codeload.github.com/karolzak/ipyplot/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247856544,"owners_count":21007621,"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":["deep-learning","html","image-classification","image-processing","image-viewer","images","jupyter-notebook","machine-learning","notebook","notebooks","plotting-in-python","python","visualization"],"created_at":"2024-08-03T03:02:28.843Z","updated_at":"2025-04-08T14:11:44.384Z","avatar_url":"https://github.com/karolzak.png","language":"Python","readme":"[![Build](https://github.com/karolzak/ipyplot/workflows/CI%20Build/badge.svg)](https://github.com/karolzak/ipyplot/actions?query=workflow%3A%22CI+Build%22)\n[![PyPI - version](https://img.shields.io/pypi/v/ipyplot.svg \"PyPI version\")](https://pypi.org/project/ipyplot/) \n[![Downloads](https://pepy.tech/badge/ipyplot)](https://pepy.tech/project/ipyplot)\n[![Downloads/Month](https://pepy.tech/badge/ipyplot/month)](https://pepy.tech/project/ipyplot/month)\n[![license](https://img.shields.io/github/license/mashape/apistatus.svg?maxAge=2592000)](https://github.com/karolzak/ipyplot/blob/master/LICENSE)\n\n**Share**:  \n[![Twitter URL](https://img.shields.io/twitter/url?url=https%3A%2F%2Fgithub.com%2karolzak%2Fipyplot)](http://twitter.com/share?text=IPyPlot%20-%20fast%20and%20effortless%20way%20to%20display%20huge%20numbers%20of%20images%20in%20Python%20notebooks\u0026url=https://github.com/karolzak/ipyplot/\u0026hashtags=python,computervision,imageclassification,deeplearning,ML,AI)\n[![LinkedIn URL](https://raw.githubusercontent.com/karolzak/boxdetect/master/images/linkedin_share4.png)](http://www.linkedin.com/shareArticle?mini=true\u0026url=https://github.com/karolzak/ipyplot\u0026title=IPyPlot%20python%20package)\n\n**IPyPlot** is a small python package offering fast and efficient plotting of images inside Python Notebooks cells. It's using IPython with HTML for faster, richer and more interactive way of displaying big numbers of images.\n\n![](https://raw.githubusercontent.com/karolzak/ipyplot/master/docs/example1-tabs.gif)\n\nDisplaying big numbers of images with Python in Notebooks always was a big pain for me as I always used `matplotlib` for that task and never have I even considered if it can be done faster, easier or more efficiently.  \nEspecially in one of my recent projects I had to work with a vast number of document images in a very interactive way which led me to forever rerunning notebook cells and waiting for countless seconds for `matplotlib` to do it's thing..   \nMy frustration grew up to the point were I couldn't stand it anymore and started to look for other options..  \nBest solution I found involved using `IPython` package in connection with simple HTML. Using that approach I built this simple python package called **IPyPlot** which finally helped me cure my frustration and saved a lot of my time.\n\n### Features:\n- [x] Easy, fast and efficient plotting of images in python within notebooks\n- [x] Plotting functions (see [examples section](#Usage-examples) to learn more):\n  - [x] `plot_images` - simply plots all the images in a grid-like layout \n  - [x] `plot_class_representations` - similar to `plot_images` but displays only the first image for each label/class (based on provided labels collection)\n  - [x] `plot_class_tabs` - plots images in a grid-like manner in a separate tab for each label/class based on provided labels\n- [x] Supported image formats:\n  - [x] Sequence of local storage URLs, e.g. `[your/dir/img1.jpg]`\n  - [x] Sequence of remote URLs, e.g. `[http://yourimages.com/img1.jpg]`\n  - [x] Sequence of `PIL.Image` objects\n  - [x] Sequence of images as `numpy.ndarray` objects\n  - [x] Supported sequence types: `list`, `numpy.ndarray`, `pandas.Series`\n- [x] Misc features:\n  - [x] `custom_texts` param to display additional texts like confidence score or some other information for each image\n  - [x] `force_b64` flag to force conversion of images from URLs to base64 format\n  - [x] click on image to enlarge \n  - [x] control number of displayed images and their width through `max_images` and `img_width` params\n  - [x] \"show html\" button which reveals the HTML code used to generate plots\n  - [x] option to set specific order of labels/tabs, filter them or ignore some of the labels\n- [x] Supported notebook platforms:\n  - [x] Jupyter\n  - [x] Google Colab\n  - [x] Azure Notebooks\n  - [x] Kaggle Notebooks\n\n## Getting Started\n\nTo start using IPyPlot, see [examples below](#Usage-examples) or go to \n[gear-images-examples.ipynb](https://github.com/karolzak/ipyplot/blob/master/notebooks/gear-images-examples.ipynb) notebook which takes you through most of the scenarios and options possible with **IPyPlot**.\n\n## Installation\n\n**IPyPlot** can be installed through [PyPI](https://pypi.org/project/ipyplot/):\n\n```\npip install ipyplot\n```\n\nor directly from this repo using `pip`:\n\n```\npip install git+https://github.com/karolzak/ipyplot\n```\n\n## Usage examples\n\nIPyPlot offers 3 main functions which can be used for displaying images in notebooks:\n\nTo start working with `IPyPlot` you need to simply import it like this:\n```python\nimport ipyplot\n```  \nand use any of the available plotting functions shown below (notice execution times).  \n- **images** - should be a sequence of either `string` (local or remote image file URLs), `PIL.Image` objects or `numpy.ndarray` objects representing images  \n- **labels** - should be a sequence of `string` or `int`\n\n#### Display a collection of images\n\n```python\nimages = [\n    \"docs/example1-tabs.jpg\",\n    \"docs/example2-images.jpg\",\n    \"docs/example3-classes.jpg\",\n]\nipyplot.plot_images(images, max_images=30, img_width=150)\n```\n\n![](https://raw.githubusercontent.com/karolzak/ipyplot/master/docs/example2-images.jpg)\n\n#### Display class representations (first image for each unique label)\n\n```python\nimages = [\n    \"docs/example1-tabs.jpg\",\n    \"docs/example2-images.jpg\",\n    \"docs/example3-classes.jpg\",\n]\nlabels = ['label1', 'label2', 'label3']\nipyplot.plot_class_representations(images, labels, img_width=150)\n\n```\n\n![](https://raw.githubusercontent.com/karolzak/ipyplot/master/docs/example3-classes.jpg)\n\n#### Display images in separate, interactive tabs for each unique class\n\n```python\nimages = [\n    \"docs/example1-tabs.jpg\",\n    \"docs/example2-images.jpg\",\n    \"docs/example3-classes.jpg\",\n]\nlabels = ['class1', 'class2', 'class3']\nipyplot.plot_class_tabs(images, labels, max_imgs_per_tab=10, img_width=150)\n\n```\n\n![](https://raw.githubusercontent.com/karolzak/ipyplot/master/docs/example1-tabs.gif)\n\nTo learn more about what you can do with IPyPlot go to [gear-images-examples.ipynb](https://github.com/karolzak/ipyplot/blob/master/notebooks/gear-images-examples.ipynb) notebook for more complex examples.\n","funding_links":["https://github.com/sponsors/karolzak","https://patreon.com/karolzak"],"categories":["Python"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkarolzak%2Fipyplot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkarolzak%2Fipyplot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkarolzak%2Fipyplot/lists"}