{"id":27290244,"url":"https://github.com/evgenykashin/srmnet","last_synced_at":"2025-04-11T21:27:54.231Z","repository":{"id":37732575,"uuid":"188587887","full_name":"EvgenyKashin/SRMnet","owner":"EvgenyKashin","description":"PyTorch implementation of \"SRM : A Style-based Recalibration Module for Convolutional Neural Networks\"","archived":false,"fork":false,"pushed_at":"2019-06-02T19:20:50.000Z","size":5332,"stargazers_count":74,"open_issues_count":4,"forks_count":6,"subscribers_count":3,"default_branch":"master","last_synced_at":"2023-03-05T17:59:27.430Z","etag":null,"topics":["computer-vision","deep-learning","pytorch","srm"],"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/EvgenyKashin.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}},"created_at":"2019-05-25T16:19:20.000Z","updated_at":"2022-12-11T03:27:22.000Z","dependencies_parsed_at":"2022-08-08T21:30:37.526Z","dependency_job_id":null,"html_url":"https://github.com/EvgenyKashin/SRMnet","commit_stats":null,"previous_names":[],"tags_count":null,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EvgenyKashin%2FSRMnet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EvgenyKashin%2FSRMnet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EvgenyKashin%2FSRMnet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EvgenyKashin%2FSRMnet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/EvgenyKashin","download_url":"https://codeload.github.com/EvgenyKashin/SRMnet/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248482329,"owners_count":21111305,"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","deep-learning","pytorch","srm"],"created_at":"2025-04-11T21:27:52.707Z","updated_at":"2025-04-11T21:27:54.197Z","avatar_url":"https://github.com/EvgenyKashin.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SRM Network PyTorch\nAn implementation of SRM block, proposed in \"SRM : A Style-based Recalibration Module for Convolutional Neural Networks\".\n\n## Requirements\n- Python \u003e= 3.6\n- PyTorch \u003e= 1.1\n- torchvision\n- back \u003e 0.0.3\n\nback is PyTorch [backbone](https://github.com/EvgenyKashin/backbone) for training loop.\n## Implementation notes\n\u003cimg src=\"imgs/srm.png\"\u003e\n\nFor implementing channel-wise fully connected (CFC) layer I used\nConv1d layer which is equal to CFC with next parameters:\n```python\nConv1d(channels, channels, kernel_size=2, groups=channels)\n``` \nIt turns out the use of depthwise 1d convolution. \n## Training\n```bash\n# Cifar10\npython cifar10_train.py --model_name srmnet\n\n# ImageNet\npython imagenet_train.py --model_name srmnet\n\n# Logs\ntensorboard --logdir=logs --host=0.0.0.0 --port=8080\n\n```\n\n## Training parameters\n### Cifar\n```python\nbatch_size = 128\nepochs_count = 100\noptimizer = optim.SGD(model.parameters(), lr=0.1, momentum=0.9,\n                      weight_decay=1e-4)\nscheduler = MultiStepLR(optimizer, [70, 80], 0.1)\n```\n### ImageNet\n```python\nbatch_size = 64\nepochs_count = 100\noptimizer = optim.SGD(model.parameters(), lr=0.1, momentum=0.9,\n                      weight_decay=1e-4)\nscheduler = StepLR(optimizer, 30, 0.1)\n```\n## Results\n### Cifar10\n|           |ResNet32|Se-ResNet32|SRM-ResNet32|\n|:----------|:-------|:----------|:-----------|\n|accuracy   |92.1%   |92.5%      |92.9%       |\n|weights    |466,906 |470,266(+0.72%)|469,146(+0.48%)|\n\n\u003cimg src=\"imgs/plot.png\"\u003e\n\nDark blue - ResNet\n\nBlue - Se-ResNet\n\nGreen - SRM-ResNet\n\n[Weights](weights) for best models.\n\n### ImageNet\n|           |ResNet50|Se-ResNet50|SRM-ResNe50|\n|:----------|:-------|:----------|:-----------|\n|accuracy(top1)   |%   |%      |%       |\n|weights    |25,557,032 |28,071,976(+9.84%)|25,617,448(+0.23%)|\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fevgenykashin%2Fsrmnet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fevgenykashin%2Fsrmnet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fevgenykashin%2Fsrmnet/lists"}