{"id":27854147,"url":"https://github.com/braincreators/octconv","last_synced_at":"2025-05-04T08:59:37.250Z","repository":{"id":57447755,"uuid":"184409108","full_name":"braincreators/octconv","owner":"braincreators","description":"Octave Convolution Implementation in PyTorch","archived":false,"fork":false,"pushed_at":"2023-07-06T21:35:24.000Z","size":102,"stargazers_count":19,"open_issues_count":2,"forks_count":5,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-05-04T08:59:28.477Z","etag":null,"topics":["computer-vision","convolution","convolutional-neural-networks","implementation","machine-learning","octave","octconv","pytorch"],"latest_commit_sha":null,"homepage":null,"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/braincreators.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}},"created_at":"2019-05-01T11:52:40.000Z","updated_at":"2025-02-22T09:58:53.000Z","dependencies_parsed_at":"2022-09-15T22:12:35.457Z","dependency_job_id":"2516bfb7-42c2-4ffd-a5c2-059371032cfa","html_url":"https://github.com/braincreators/octconv","commit_stats":{"total_commits":37,"total_committers":3,"mean_commits":"12.333333333333334","dds":"0.21621621621621623","last_synced_commit":"a1ed9f872065a8f765621e231c2419d07fe7e69a"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/braincreators%2Foctconv","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/braincreators%2Foctconv/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/braincreators%2Foctconv/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/braincreators%2Foctconv/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/braincreators","download_url":"https://codeload.github.com/braincreators/octconv/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252310954,"owners_count":21727516,"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","convolution","convolutional-neural-networks","implementation","machine-learning","octave","octconv","pytorch"],"created_at":"2025-05-04T08:59:36.617Z","updated_at":"2025-05-04T08:59:37.236Z","avatar_url":"https://github.com/braincreators.png","language":"Python","readme":"# Octave Convolution\n\n[![Build Status](https://travis-ci.org/braincreators/octconv.svg?branch=master)](https://travis-ci.org/braincreators/octconv)\n\nImplementation of [Drop an Octave: Reducing Spatial Redundancy in\nConvolutional Neural Networks with Octave Convolution](https://arxiv.org/pdf/1904.05049.pdf)\n\n![schema](assets/octconv.png)\n\n## Paper Abstract\n\nIn natural images, information is conveyed at different frequencies \nwhere higher frequencies are usually encoded with fine details and \nlower frequencies are usually encoded with global structures. \nSimilarly, the output feature maps of a convolution layer can also be \nseen as a mixture of information at different frequencies. \nIn this work, we propose to factorize the mixed feature maps by their \nfrequencies, and design a novel Octave Convolution (OctConv) operation \nto store and process feature maps that vary spatially “slower” at a lower \nspatial resolution reducing both memory and computation cost. Unlike existing \nmulti-scale methods, OctConv is formulated as a single, generic, plug-and-play \nconvolutional unit that can be used as a direct replacement \nof (vanilla) convolutions without any adjustments in the network architecture. \nIt is also orthogonal and complementary to methods that suggest better \ntopologies or reduce channel-wise redundancy like group or depth-wise convolutions. \nWe experimentally show that by simply replacing convolutions with OctConv, \nwe can consistently boost accuracy for both image and video recognition tasks, \nwhile reducing memory and computational cost. \nAn OctConv-equipped ResNet-152 can achieve 82.9% top-1 classification accuracy on\n ImageNet with merely 22.2 GFLOPs.\n\n\n## Installation \n\nFrom PyPI:\n\n    pip install octconv\n\nBleeding edge version from github:\n\n    pip install git+https://github.com/braincreators/octconv.git#egg=octconv\n\n## Usage\n\n```python\nimport torch\nfrom octconv import OctConv2d\n\n\n# (batch, channels, height, width)\nx = torch.rand(5, 3, 200, 200)\n\nconv1 = OctConv2d(in_channels=3, out_channels=10, kernel_size=3, alpha=(0., 0.5), padding=1)\nconv2 = OctConv2d(in_channels=10, out_channels=20, kernel_size=7, alpha=(0.5, 0.8), padding=3)\nconv3 = OctConv2d(in_channels=20, out_channels=1, kernel_size=3, alpha=(0.8, 0.), padding=1)\n\nout = conv3(conv2(conv1(x)))  # shape: (5, 1, 200, 200)\n```\n\n## Original implementation\n\n - [facebookresearch/OctConv (MXNET)](https://github.com/facebookresearch/OctConv)\n\n## Citation\n\n```\n@article{chen2019drop,\n  title={Drop an Octave: Reducing Spatial Redundancy in Convolutional Neural Networks with Octave Convolution},\n  author={Chen, Yunpeng and Fan, Haoqi and Xu, Bing and Yan, Zhicheng and Kalantidis, Yannis and Rohrbach, Marcus and Yan, Shuicheng and Feng, Jiashi},\n  journal={arXiv preprint arXiv:1904.05049},\n  year={2019}\n}\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbraincreators%2Foctconv","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbraincreators%2Foctconv","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbraincreators%2Foctconv/lists"}