{"id":13499132,"url":"https://github.com/implus/SKNet","last_synced_at":"2025-03-29T04:30:35.758Z","repository":{"id":43174818,"uuid":"156865921","full_name":"implus/SKNet","owner":"implus","description":"Code for our CVPR 2019 paper: Selective Kernel Networks; See zhihu：https://zhuanlan.zhihu.com/p/59690223","archived":false,"fork":false,"pushed_at":"2019-03-26T12:22:11.000Z","size":589,"stargazers_count":583,"open_issues_count":7,"forks_count":107,"subscribers_count":9,"default_branch":"master","last_synced_at":"2024-08-01T22:50:09.232Z","etag":null,"topics":["cnn","selective-kernel-networks","sknet"],"latest_commit_sha":null,"homepage":"","language":"C++","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/implus.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}},"created_at":"2018-11-09T13:29:35.000Z","updated_at":"2024-07-25T08:26:23.000Z","dependencies_parsed_at":"2022-09-22T14:41:00.713Z","dependency_job_id":null,"html_url":"https://github.com/implus/SKNet","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/implus%2FSKNet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/implus%2FSKNet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/implus%2FSKNet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/implus%2FSKNet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/implus","download_url":"https://codeload.github.com/implus/SKNet/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":222455994,"owners_count":16987581,"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":["cnn","selective-kernel-networks","sknet"],"created_at":"2024-07-31T22:00:29.648Z","updated_at":"2024-10-31T17:31:35.111Z","avatar_url":"https://github.com/implus.png","language":"C++","readme":"# SKNet: Selective Kernel Networks \u003csub\u003e([paper](https://arxiv.org/pdf/1903.06586.pdf))\u003c/sub\u003e\nBy Xiang Li\u003csup\u003e[1,2]\u003c/sup\u003e, Wenhai Wang\u003csup\u003e[3,2]\u003c/sup\u003e, Xiaolin Hu\u003csup\u003e[4]\u003c/sup\u003e and Jian Yang\u003csup\u003e[1]\u003c/sup\u003e\n\n[PCALab, Nanjing University of Science and Technology]\u003csup\u003e[1]\u003c/sup\u003e [Momenta](https://momenta.ai/)\u003csup\u003e[2]\u003c/sup\u003e [Nanjing University]\u003csup\u003e[3]\u003c/sup\u003e [Tsinghua University]\u003csup\u003e[4]\u003c/sup\u003e.\n\n## Approach\n\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"https://github.com/implus/SKNet/blob/master/figures/sknet.jpg\"\u003e\n\u003c/div\u003e\n\u003cp align=\"center\"\u003e\n  Figure 1: The Diagram of a Selective Kernel Convolution module.\n\u003c/p\u003e\n\n\n## Implementation\nIn this repository, all the models are implemented by [Caffe](https://github.com/BVLC/caffe).\n \nWe use the data augmentation strategies with [SENet](https://github.com/hujie-frank/SENet). \n\nThere are two new layers introduced for efficient training and inference, these are *Axpy* and *CuDNNBatchNorm* layers.  \n+ The [*Axpy*](https://github.com/hujie-frank/SENet/blob/master/src/caffe/layers/) layer is already implemented in [SENet](https://github.com/hujie-frank/SENet).\n+ The [*CuDNNBatchNorm*] is mainly borrowed from [GENet](https://github.com/hujie-frank/GENet).\n\n## Trained Models\nTable 2. Single crop validation error on ImageNet-1k (center 224x224/320x320 crop from resized image with shorter side = 256). \n\n| Model | Top-1 224x | Top-1 320x | #P | GFLOPs | \n|:-:|:-:|:-:|:-:|:-:|\n|ResNeXt-50        |22.23|21.05|25.0M|4.24|\n|AttentionNeXt-56  |21.76|–    |31.9M|6.32|\n|InceptionV3       |–    |21.20|27.1M|5.73|\n|ResNeXt-50 + BAM  |21.70|20.15|25.4M|4.31|\n|ResNeXt-50 + CBAM |21.40|20.38|27.7M|4.25|\n|SENet-50          |21.12|19.71|27.7M|4.25|\n|SKNet-50          |20.79|19.32|27.5M|4.47|\n|ResNeXt-101       |21.11|19.86|44.3M|7.99|\n|Attention-92      | –   |19.50|51.3M|10.43|\n|DPN-92            |20.70|19.30|37.7M|6.50|\n|DPN-98            |20.20|18.90|61.6M|11.70|\n|InceptionV4       | –   |20.00|42.0M|12.31|\n|Inception-ResNetV2| –   |19.90|55.0M|13.22|\n|ResNeXt-101 + BAM |20.67|19.15|44.6M|8.05|\n|ResNeXt-101 + CBAM|20.60|19.42|49.2M|8.00|\n|SENet-101         |20.58|18.61|49.2M|8.00|\n|SKNet-101         |20.19|18.40|48.9M|8.46|\n\nDownload:\n\n|Model|caffe model|\n|:-:|:-:|\n|SKNet-50|[GoogleDrive](https://drive.google.com/file/d/1EKanqFkqoU3L6vgSLW3GjPciesZ2rrUH/view?usp=sharing)|\n|SKNet-101|[GoogleDrive](https://drive.google.com/file/d/1NEYIYeSXQeinLGU5GH2hf8T6MJytzt0U/view?usp=sharing)|\n\n20190323_Update: SKNet-101 model is deleted by mistake. We are retraining a model and it will come soon in 2-3 days.\n20190326_Update: SKNet-101 model is ready.\n\n## Attention weights correspond to object scales in low/middle layers\nWe look deep into the selection distributions from the perspective of classes on SK_2_3 (low), SK_3_4 (middle), SK_5_3 (high) layers:\n\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"https://github.com/implus/SKNet/blob/master/figures/cls_attention_diff.jpg\"\u003e\n\u003c/div\u003e\n\u003cp align=\"center\"\u003e\n  Figure 2: Average mean attention difference (mean attention value of kernel 5x5 minus that of kernel 3x3) on SK units of SKNet-50, for each of 1,000 categories using all validation samples on ImageNet. On low or middle level SK units (e.g., SK\\_2\\_3, SK\\_3\\_4), 5x5 kernels are clearly imposed with more emphasis if the target object becomes larger (1.0x -\u003e 1.5x).\n\u003c/p\u003e\n\nMore details of attention distributions on specific images are as follows:\n\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"https://github.com/implus/SKNet/blob/master/figures/pics_attention_3_scales.png\"\u003e\n\u003c/div\u003e\n\n\n\n## Citation\n\nIf you use Selective Kernel Convolution in your research, please cite the paper:\n    \n    @inproceedings{li2019selective,\n      title={Selective Kernel Networks},\n      author={Li, Xiang and Wang, Wenhai and Hu, Xiaolin and Yang, Jian},\n      journal={IEEE Conference on Computer Vision and Pattern Recognition},\n      year={2019}\n    }\n","funding_links":[],"categories":["Papers\u0026Codes","DLA"],"sub_categories":["SKNet"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimplus%2FSKNet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fimplus%2FSKNet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimplus%2FSKNet/lists"}