{"id":20849898,"url":"https://github.com/xai-demonstrator/visualime","last_synced_at":"2025-05-12T04:30:58.324Z","repository":{"id":57477495,"uuid":"475984846","full_name":"XAI-Demonstrator/visualime","owner":"XAI-Demonstrator","description":"Implementation of LIME focused on producing user-centric local explanations for image classifiers.","archived":false,"fork":false,"pushed_at":"2025-03-01T01:18:43.000Z","size":156,"stargazers_count":6,"open_issues_count":12,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-11T22:38:52.362Z","etag":null,"topics":["computer-vision","explainable-ai","interpretable-machine-learning","lime","xai"],"latest_commit_sha":null,"homepage":"https://visualime.readthedocs.io/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/XAI-Demonstrator.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":"2022-03-30T17:31:43.000Z","updated_at":"2024-12-01T17:10:40.000Z","dependencies_parsed_at":"2022-08-30T17:11:35.832Z","dependency_job_id":"33eeffc2-80bb-48fc-a5af-6f57800428c9","html_url":"https://github.com/XAI-Demonstrator/visualime","commit_stats":{"total_commits":129,"total_committers":6,"mean_commits":21.5,"dds":"0.21705426356589153","last_synced_commit":"046cc7bb91cb8c9c8e44828ca918c97735bf0d9f"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/XAI-Demonstrator%2Fvisualime","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/XAI-Demonstrator%2Fvisualime/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/XAI-Demonstrator%2Fvisualime/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/XAI-Demonstrator%2Fvisualime/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/XAI-Demonstrator","download_url":"https://codeload.github.com/XAI-Demonstrator/visualime/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253675157,"owners_count":21945907,"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","explainable-ai","interpretable-machine-learning","lime","xai"],"created_at":"2024-11-18T03:07:16.720Z","updated_at":"2025-05-12T04:30:58.021Z","avatar_url":"https://github.com/XAI-Demonstrator.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# VisuaLIME\n\n\u003c!-- EXCLUDE --\u003e\n[![Unit Test Status](https://github.com/XAI-Demonstrator/visualime/workflows/Unit%20Test/badge.svg?branch=main)](https://github.com/XAI-Demonstrator/visualime/actions/workflows/unit-test.yml)\n[![Coverage Status](https://coveralls.io/repos/github/XAI-Demonstrator/visualime/badge.svg?branch=main)](https://coveralls.io/github/XAI-Demonstrator/visualime?branch=main)\n[![Documentation Status](https://readthedocs.org/projects/visualime/badge/?version=latest)](https://visualime.readthedocs.io/en/latest/?badge=latest)\n[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)\n[![PyPI version](https://img.shields.io/pypi/v/visualime)](https://pypi.org/project/visualime/)\n[![PyPI - Status](https://img.shields.io/pypi/status/visualime)](https://pypi.org/project/visualime/)\n\u003c!-- /EXCLUDE --\u003e\n\n_VisuaLIME_ is an implementation of _LIME_ (Local Interpretable Model-Agnostic Explanations) [1]\nfocused on producing visual local explanations for image classifiers.\n\nIn contrast to the [reference implementation](https://github.com/marcotcr/lime), _VisuaLIME_\nexclusively supports image classification and gives its users full control over the\nproperties of the generated explanations.\nIt was written to produce stable, reliable, and expressive explanations at scale.\n\n_VisuaLIME_ was created as part of the\n[XAI Demonstrator project](https://github.com/XAI-Demonstrator/xai-demonstrator).\n\n**A full documentation is available on [visualime.readthedocs.io](https://visualime.readthedocs.io/).**\n\n## Getting Started\n\n💡 _If you're new to_ LIME, _you might want to check out the_\n[Grokking LIME](https://github.com/ionicsolutions/grokking-lime)\n_talk/tutorial for a general introduction prior to diving into_ VisuaLIME.\n\nTo install _VisuaLIME_, run:\n\n```shell\npip install visualime\n```\n\n_VisuaLIME_ provides two functions that package its building blocks into a reference explanation\npipeline:\n\n```python\nimport numpy as np\nfrom visualime.explain import explain_classification, render_explanation\n\nimage = ...  # a numpy array of shape (width, height, 3) representing an RGB image\n\ndef predict_fn(images: np.ndarray) -\u003e np.ndarray:\n    # a function that takes a numpy array of shape (num_of_samples, width, height, 3)\n    # representing num_of_samples RGB images and returns a numpy array of\n    # shape (num_of_samples, num_of_classes) where each entry corresponds to the\n    # classifiers output for the respective image\n    predictions = ...\n    return predictions\n\nsegment_mask, segment_weights = explain_classification(image, predict_fn)\n\nexplanation = render_explanation(\n        image,\n        segment_mask,\n        segment_weights,\n        positive=\"green\",\n        negative=\"red\",\n        coverage=0.2,\n    )\n```\n\nFor a full example, see\n[the example notebook on GitHub](https://github.com/xai-demonstrator/visualime/blob/main/example.ipynb).\n\n\u003c!-- EXCLUDE --\u003e\n## Roadmap\n\n- Verify that the algorithm matches the original LIME and document differences\n- Add performance benchmarks and optimize implementation of the algorithm\n- Include utilities to assess and tune explanations for stability and faithfulness\n- Create a user guide that walks through a best practice example of implementing\n  a fully configurable LIME explainer\n\u003c!-- /EXCLUDE --\u003e\n\n## References\n\n[1] Ribeiro et al.: _\"Why Should I Trust You?\": Explaining the Predictions of Any Classifier_\n    ([arXiv:1602.04938](https://arxiv.org/abs/1602.04938), 2016)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxai-demonstrator%2Fvisualime","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxai-demonstrator%2Fvisualime","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxai-demonstrator%2Fvisualime/lists"}