{"id":15554907,"url":"https://github.com/zfturbo/timm_3d","last_synced_at":"2025-04-12T14:11:07.399Z","repository":{"id":226375481,"uuid":"766836007","full_name":"ZFTurbo/timm_3d","owner":"ZFTurbo","description":"PyTorch Volume Models for 3D data","archived":false,"fork":false,"pushed_at":"2024-08-01T17:15:16.000Z","size":1801,"stargazers_count":51,"open_issues_count":2,"forks_count":4,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-21T12:58:47.911Z","etag":null,"topics":["3d-classification","3d-convolutional-network","3d-maxvit","3d-models","3d-resnet","3d-vgg","classification","densenet-pytorch","efficientnet","maxvit","pretrained-models","pytorch","timm","vgg"],"latest_commit_sha":null,"homepage":"","language":"Python","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/ZFTurbo.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-03-04T08:09:52.000Z","updated_at":"2025-01-16T02:56:48.000Z","dependencies_parsed_at":"2024-06-14T13:03:46.443Z","dependency_job_id":"57c781eb-1e61-40d8-9d85-41ab279735b4","html_url":"https://github.com/ZFTurbo/timm_3d","commit_stats":{"total_commits":7,"total_committers":2,"mean_commits":3.5,"dds":0.1428571428571429,"last_synced_commit":"95123fa348811f700c6e2da20a8d829fb0878565"},"previous_names":["zfturbo/timm_3d"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZFTurbo%2Ftimm_3d","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZFTurbo%2Ftimm_3d/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZFTurbo%2Ftimm_3d/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZFTurbo%2Ftimm_3d/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ZFTurbo","download_url":"https://codeload.github.com/ZFTurbo/timm_3d/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248578874,"owners_count":21127713,"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":["3d-classification","3d-convolutional-network","3d-maxvit","3d-models","3d-resnet","3d-vgg","classification","densenet-pytorch","efficientnet","maxvit","pretrained-models","pytorch","timm","vgg"],"created_at":"2024-10-02T15:04:22.915Z","updated_at":"2025-04-12T14:11:07.369Z","avatar_url":"https://github.com/ZFTurbo.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PyTorch Volumes Models for 3D data \n\nPython library with Neural Networks for Volume (3D) Classification based on PyTorch.\n\nThis library is based on famous [PyTorch Image Models (timm)](https://github.com/huggingface/pytorch-image-models) library for images. Most of the documentation can be used directly from there. \n\n## Installation\n\n* Type 1: `pip install timm-3d`\n* Type 2: Copy `timm_3d` folder from this repository in your project folder.\n\n## Quick start\n\nYou can create model as easy as:\n\n```python\nimport timm_3d\nimport torch\n\nm = timm_3d.create_model(\n    'tf_efficientnet_b0.in1k',\n    pretrained=True,\n    num_classes=0,\n    global_pool=''\n)\n\n# Shape of input (B, C, H, W, D). B - batch size, C - channels, H - height, W - width, D - depth\nres = m(torch.randn(2, 3, 128, 128, 128))\nprint(f'Output shape: {res.shape}') \n```\n\n* **Note 1**: you can use pretrained weights. They will be converted on the fly from 2D to 3D variant.\n* **Note 2**: More examples can be found [here](test.py) \n\n## Models\n\nCurrently supported models in 3D variant\n\n* Efficientnet family [[Code](timm_3d/models/efficientnet.py)]\n* ResNet family [[Code](timm_3d/models/resnet.py)]\n* CoAtNet and MaxVit family [[Code](timm_3d/models/maxxvit.py)]\n* ConvNext family [[Code](timm_3d/models/convnext.py)]\n* DenseNet family [[Code](timm_3d/models/densenet.py)]\n* VGG family [[Code](timm_3d/models/vgg.py)]\n\n[Full list of all possible models](docs/models_list.md)\n\n## Notes for 3D version\n\n### Input size\n\nRecommended input size for backbones can be calculated as: `K = pow(N, 2/3)`. \nWhere N - is size for input image for the same model in 2D variant.\n\nFor example for N = 224, K = 32. For N = 512, K = 64.\n\n### Related repositories\n\n * [pytorch-image-models (timm)](https://github.com/huggingface/pytorch-image-models) - original 2D repo\n * [classification_models_3D](https://github.com/ZFTurbo/classification_models_3D) - 3D volumes classification models for keras/tensorflow\n * [segmentation_models_pytorch_3d](https://github.com/ZFTurbo/segmentation_models_pytorch_3d) - 3D volumes segmentation models for PyTorch\n * [volumentations](https://github.com/ZFTurbo/volumentations) - 3D augmentations\n\n## Citation\n\nIf you find this code useful, please cite it as:\n```\n@article{solovyev20223d,\n  title={3D convolutional neural networks for stalled brain capillary detection},\n  author={Solovyev, Roman and Kalinin, Alexandr A and Gabruseva, Tatiana},\n  journal={Computers in Biology and Medicine},\n  volume={141},\n  pages={105089},\n  year={2022},\n  publisher={Elsevier},\n  doi={10.1016/j.compbiomed.2021.105089}\n}\n```\n\n## To Do List\n* Add support for more architectures\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzfturbo%2Ftimm_3d","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzfturbo%2Ftimm_3d","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzfturbo%2Ftimm_3d/lists"}