{"id":20648671,"url":"https://github.com/csailvision/ibd","last_synced_at":"2025-07-31T11:07:05.562Z","repository":{"id":145492565,"uuid":"140571771","full_name":"CSAILVision/IBD","owner":"CSAILVision","description":"IBD: Interpretable Basis Decomposition for Visual Explanation","archived":false,"fork":false,"pushed_at":"2018-11-28T15:17:53.000Z","size":5966,"stargazers_count":52,"open_issues_count":3,"forks_count":14,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-04-17T02:02:45.405Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/CSAILVision.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2018-07-11T12:26:30.000Z","updated_at":"2024-12-30T09:15:19.000Z","dependencies_parsed_at":"2023-07-03T02:10:29.594Z","dependency_job_id":null,"html_url":"https://github.com/CSAILVision/IBD","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/CSAILVision/IBD","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CSAILVision%2FIBD","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CSAILVision%2FIBD/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CSAILVision%2FIBD/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CSAILVision%2FIBD/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CSAILVision","download_url":"https://codeload.github.com/CSAILVision/IBD/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CSAILVision%2FIBD/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268026395,"owners_count":24183418,"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","status":"online","status_checked_at":"2025-07-31T02:00:08.723Z","response_time":66,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2024-11-16T17:09:51.434Z","updated_at":"2025-07-31T11:07:05.535Z","avatar_url":"https://github.com/CSAILVision.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# IBD: Interpretable Basis Decomposition for Visual Explanation\n\n## Introduction\nThis repository contains the demo code for the ECCV'18 paper \"Interpretable Basis Decomposition for Visual Explanation\".\n\n## Download\n* Clone the code of Network Dissection Lite from github\n```\n    git clone https://github.com/CSAILVision/IBD\n    cd IBD\n```\n* Download the Broden dataset (~1GB space) and the example pretrained model. If you already download this, you can create a symbolic link to your original dataset.\n```\n    ./script/dlbroden.sh\n    ./script/dlzoo.sh\n```\n\nNote that AlexNet models work with 227x227 image input, while VGG, ResNet, GoogLeNet works with 224x224 image input.\n\n## Requirements\n\n* Python Environments\n\n```\n    pip3 install numpy sklearn scipy scikit-image matplotlib easydict torch torchvision\n```\n\nNote: The repo was written by pytorch-0.3.1. ([PyTorch](http://pytorch.org/), [Torchvision](https://github.com/pytorch/vision)) \n\n## Run IBD in PyTorch\n\n* You can configure `settings.py` to load your own model, or change the default parameters.\n\n* Run IBD \n\n```\n    python3 test.py\n```\n\n## IBD Result\n\n* At the end of the dissection script, a HTML-formatted report will be generated inside `result` folder that summarizes the interpretable units of the tested network. \n\n\n## Train Concept Basis\n\n* If you want to train the concept basis, delete the pretrained files first.\n```\n    rm result/pytorch_resnet18_places365/snapshot/14.pth \n    rm result/pytorch_resnet18_places365/decompose.npy \n\n```\n\n* Run the train script. \n\n```\n    python3 train.py\n```\n* Then run IBD.\n\n```\n    python3 test.py\n```\n\n## Reference\nIf you find the codes useful, please cite this paper\n```\n@inproceedings{IBD2018,\n  title={Interpretable Basis Decomposition for Visual Explanation},\n  author={Zhou, Bolei* and Sun, Yiyou* and Bau, David* and Torralba, Antonio},\n  booktitle={European Conference on Computer Vision},\n  year={2018}\n}\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcsailvision%2Fibd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcsailvision%2Fibd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcsailvision%2Fibd/lists"}