{"id":17976681,"url":"https://github.com/iamhankai/full-stack-filters","last_synced_at":"2025-07-27T00:11:48.396Z","repository":{"id":87392277,"uuid":"206337391","full_name":"iamhankai/Full-Stack-Filters","owner":"iamhankai","description":"Pytorch code for paper: Full-Stack Filters to Build Minimum Viable CNNs","archived":false,"fork":false,"pushed_at":"2019-09-10T13:13:53.000Z","size":3390,"stargazers_count":16,"open_issues_count":0,"forks_count":6,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-20T13:22:08.375Z","etag":null,"topics":["convolutional-neural-networks","model-compression"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/iamhankai.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"License.txt","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-09-04T14:22:01.000Z","updated_at":"2022-02-02T02:43:42.000Z","dependencies_parsed_at":null,"dependency_job_id":"51e47323-3e99-4e06-94a9-0b77e5970da8","html_url":"https://github.com/iamhankai/Full-Stack-Filters","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iamhankai%2FFull-Stack-Filters","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iamhankai%2FFull-Stack-Filters/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iamhankai%2FFull-Stack-Filters/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iamhankai%2FFull-Stack-Filters/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/iamhankai","download_url":"https://codeload.github.com/iamhankai/Full-Stack-Filters/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245489763,"owners_count":20623789,"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":["convolutional-neural-networks","model-compression"],"created_at":"2024-10-29T17:24:43.476Z","updated_at":"2025-03-25T15:31:20.729Z","avatar_url":"https://github.com/iamhankai.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Full-Stack Filters\r\nCode for Paper: [Full-Stack Filters to Build Minimum Viable CNNs (MVNet)](https://arxiv.org/abs/1908.02023)\r\n\r\nIn this paper, we propose a novel convolution operation with full-stack filters and auxiliary masks to reduce redundancy in convolution filters for building minimum viable CNNs, i.e. MVNets. A series of full-stack filters with additional binary masks which requiring negligible memory resource in the proposed convolution method can generate much more inherited sub-filters and achieve approximate performance to the original convolution.\r\n\r\n\u003cimg src=\"./fig/full-stack-filters.png\" width=\"600\" hegiht=\"400\" align=center /\u003e\r\n\r\n### Description\r\n- MVNet with Full-Stack Filters inference code on CIFAR-10 dataset.\r\n- We provide the trained model in `models/cifar10-s64.th` which occupies 15 MB, including `1.0 MB` `float32` weights and `14.0 MB` binary masks stored in `int8` format (so it's `1.75 MB` in `bool` format which is not supported in PyTorch yet).\r\n\r\n### Files description\r\nRequirements: Python 3.6, PyTorch 0.4\r\n\r\n- `MaskConv2d` in `mask_conv.py` is the new convolution class with full-stack filters used for replacing `nn.Conv2d`.\r\n- `mask_vgg.py` is the VGG-16 using the proposed full-stack filters.\r\n- `test.py` is the test script on CIFAR-10 dataset.\r\n\r\n### Usage\r\n1. Download CIFAR-10 python version from [cifar-10-python.tar.gz](https://www.cs.toronto.edu/~kriz/cifar-10-python.tar.gz), put it in anywhere you like such as `$data/cifar-10-python.tar.gz`. \r\n2. Run `python test.py --resume=models/cifar10-s64.th --data-dir=$data` in default setting, you will get `93.1%` accuracy.\r\n\r\n### Performance\r\nPerformance on CIFAR-10 with VGG-16 as architecture:\r\n\r\n\u003cimg src=\"./fig/cifar10-vgg.png\" width=\"400\" hegiht=\"80\" align=center /\u003e\r\n\r\nFor other experimental results, please refer to the original paper.\r\n\r\n### Citation\r\nIf you use these models in your research, please cite:\r\n```\r\n@article{han2019full,\r\n  title={Full-Stack Filters to Build Minimum Viable CNNs},\r\n  author={Han, Kai and Wang, Yunhe and Xu, Yixing and Xu, Chunjing and Tao, Dacheng and Xu, Chang},\r\n  journal={arXiv preprint arXiv:1908.02023},\r\n  year={2019}\r\n}\r\n```\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiamhankai%2Ffull-stack-filters","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fiamhankai%2Ffull-stack-filters","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiamhankai%2Ffull-stack-filters/lists"}