{"id":13443356,"url":"https://github.com/david-knigge/ccnn","last_synced_at":"2025-03-20T16:31:03.181Z","repository":{"id":37524396,"uuid":"500737607","full_name":"david-knigge/ccnn","owner":"david-knigge","description":"Code repository of the paper \"Modelling Long Range Dependencies in ND: From Task-Specific to a General Purpose CNN\" https://arxiv.org/abs/2301.10540.","archived":false,"fork":false,"pushed_at":"2023-02-27T16:48:31.000Z","size":170,"stargazers_count":179,"open_issues_count":3,"forks_count":20,"subscribers_count":4,"default_branch":"main","last_synced_at":"2024-10-28T06:58:02.789Z","etag":null,"topics":["convolutional-neural-networks","deep-learning","pytorch"],"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/david-knigge.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,"roadmap":null,"authors":null}},"created_at":"2022-06-07T07:37:26.000Z","updated_at":"2024-09-15T10:23:39.000Z","dependencies_parsed_at":"2024-01-18T14:42:40.748Z","dependency_job_id":"38dfc8b1-1733-4648-a113-162c7ad28ef6","html_url":"https://github.com/david-knigge/ccnn","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/david-knigge%2Fccnn","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/david-knigge%2Fccnn/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/david-knigge%2Fccnn/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/david-knigge%2Fccnn/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/david-knigge","download_url":"https://codeload.github.com/david-knigge/ccnn/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244649809,"owners_count":20487496,"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","deep-learning","pytorch"],"created_at":"2024-07-31T03:01:59.610Z","updated_at":"2025-03-20T16:31:02.886Z","avatar_url":"https://github.com/david-knigge.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"## Modelling Long Range Dependencies in N-D: From Task-Specific to a General Purpose CNN\n\nCode repository of the paper [Modelling Long Range Dependencies in N-D: From Task-Specific to a General Purpose CNN](https://arxiv.org/abs/2301.10540).\n\n**Abstract**\n\nPerformant Convolutional Neural Network (CNN) architectures must be tailored to specific tasks in order to consider the length, resolution, and dimensionality of the input data. In this work, we tackle the need for problem-specific CNN architectures.\\break We present the \\textit{Continuous Convolutional Neural Network} (CCNN): a single CNN able to process data of arbitrary resolution, dimensionality and length without any structural changes.  Its key component are its \\textit{continuous convolutional kernels} which model long-range dependencies at every layer, and thus remove the need of current CNN architectures for task-dependent downsampling and depths. We showcase the generality of our method by using the \\emph{same architecture} for tasks on sequential (1D), visual (2D) and point-cloud (3D) data. Our CCNN matches and often outperforms the current state-of-the-art across all tasks considered.\n### Installation\n\n#### conda\nWe provide an environment file; ``environment.yml`` containing the required dependencies. Clone the repo and run the following command in the root of this directory:\n```\nconda env create -f environment.yml\n```\nIf you would like to install pytorch without cuda, instead run:\n```\nconda env create -f environment-nocuda.yml\n```\n\n### Repository Structure\nThis repository is organized as follows:\n- ``ckconv`` contains the main PyTorch library of our model.\n- ``models`` contains the model architectures used in our experiments.\n- ``datamodules`` contains the pytorch lightning datamodules used in our experiments.\n- ``cfg`` contains the configuration file in which to specify default arguments to be passed to the script.\n\n### Using the code\n\nAll experiments are run with `main.py`. Flags are handled by [Hydra](https://hydra.cc/docs/intro).\nSee `cfg/config.yaml` for all available flags. Flags can be passed as `xxx.yyy=value`.\n\n#### Useful flags\n\n- `net.*` describes settings for the models (model definition `models/resnet.py`).\n- `kernel.*` describes settings for the MAGNet kernel generator networks.\n- `mask.*` describes settings for the FlexConv Gaussian mask.\n- `conv.*` describes settings for the convolution operation. It can be used to switch between FlexConv, CKConv, regular Conv, and their separable variants.\n- `dataset.*` specifies the dataset to be used, as well as variants, e.g., permuted, sequential.\n- `train.*` specifies the settings used for the Trainer of the models.\n- `train.do=False`: Only test the model. Useful in combination with pre-training.\n- `optimizer.*` specifies and configures the optimizer to be used.\n- `debug=True`: By default, all experiment scripts connect to Weights \u0026 Biases to log the experimental results. Use this flag to run without connecting to Weights \u0026 Biases.\n- `pretrained.*`: Use these to load checkpoints before training.\n\n### Reproducing experiments\nPlease see the [experiments README](/experiments/README.md) for details on reproducing the paper's experiments.\n\n### Cite\nIf you found this work useful in your research, please consider citing:\n\n```\n@article{knigge2023modelling,\n  title={Modelling Long Range Dependencies in N-D: From Task-Specific to a General Purpose CNN},\n  author={Knigge, David M and Romero, David W and Gu, Albert and Bekkers, Erik J and Gavves, Efstratios and Tomczak, Jakub M and Hoogendoorn, Mark and Sonke, Jan-Jakob},\n  journal={International Conference on Learning Representations},\n  year={2023}\n}\n```\n\n### Acknowledgements\n\nThis work is supported by the [Qualcomm Innovation Fellowship (2021)](https://www.qualcomm.com/research/research/university-relations/innovation-fellowship/2021-europe) \ngranted to David W. Romero. David W. Romero sincerely thanks Qualcomm for his support. David W. Romero is financed as part of the\nEfficient Deep Learning (EDL) programme (grant number P16-25), partly funded by the Dutch Research Council (NWO). David Knigge is \npartially funded by Elekta Oncology Systems AB and a RVO public-private partnership grant (PPS2102).\n\nThis work was carried out on the Dutch national infrastructure with the support of SURF Cooperative.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavid-knigge%2Fccnn","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdavid-knigge%2Fccnn","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavid-knigge%2Fccnn/lists"}