{"id":23021069,"url":"https://github.com/zhoudaxia233/efficientunet-pytorch","last_synced_at":"2025-10-29T04:45:32.747Z","repository":{"id":53791892,"uuid":"191619890","full_name":"zhoudaxia233/EfficientUnet-PyTorch","owner":"zhoudaxia233","description":"A PyTorch 1.0 Implementation of Unet with EfficientNet as encoder","archived":false,"fork":false,"pushed_at":"2021-03-13T11:09:29.000Z","size":26,"stargazers_count":158,"open_issues_count":7,"forks_count":33,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-09T22:18:37.395Z","etag":null,"topics":["efficientnet","efficientunet","image-segmentation","unet","unet-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/zhoudaxia233.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-06-12T17:55:26.000Z","updated_at":"2025-02-19T14:21:05.000Z","dependencies_parsed_at":"2022-08-25T12:41:56.759Z","dependency_job_id":null,"html_url":"https://github.com/zhoudaxia233/EfficientUnet-PyTorch","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/zhoudaxia233%2FEfficientUnet-PyTorch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhoudaxia233%2FEfficientUnet-PyTorch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhoudaxia233%2FEfficientUnet-PyTorch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhoudaxia233%2FEfficientUnet-PyTorch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zhoudaxia233","download_url":"https://codeload.github.com/zhoudaxia233/EfficientUnet-PyTorch/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248119285,"owners_count":21050755,"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":["efficientnet","efficientunet","image-segmentation","unet","unet-pytorch"],"created_at":"2024-12-15T12:16:19.790Z","updated_at":"2025-10-29T04:45:32.671Z","avatar_url":"https://github.com/zhoudaxia233.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# EfficientUnet-PyTorch\nA PyTorch 1.0 Implementation of Unet with EfficientNet as encoder\n\n## Useful notes\n1. Due to some rounding problem in the decoder path (*not a bug, this is a feature* :smirk:), the input shape should be divisible by 32.  \ne.g. 224x224 is a suitable size for input images, but 225x225 is not.\n\n---\n## Requirements\n1. Python \u003e= 3.6\n2. [PyTorch](https://pytorch.org/get-started/locally/) \u003e= 1.0.0\n\n---\n## Installation\nInstall `efficientunet-pytorch`:\n```bash\npip install efficientunet-pytorch\n```\n\n---\n## Usage\n#### 1. EfficientNets\ne.g. say you want a *pretrained efficientnet-b5* model with *5* classes:\n```python\nfrom efficientunet import *\n\nmodel = EfficientNet.from_name('efficientnet-b5', n_classes=5, pretrained=True)\n```\nIf you prefer to use a model with a custom head rather than just a simple change of the \n`output_channels` of the last fully-connected layer, use:\n```python\nfrom efficientunet import *\n\nmodel = EfficientNet.custom_head('efficientnet-b5', n_classes=5, pretrained=True)\n```\n\u003e *The structure of model with custom head*:  \n`encoder` -\u003e `concatenation of [AvgPool2d, MaxPool2d]` -\u003e `Flatten` -\u003e `Dropout` -\u003e `Linear(512)` -\u003e `ReLU` -\u003e `Dropout`\n\u003e -\u003e `Linear(n_classes)`\n\n#### 2. EfficientUnets\ne.g. say you want a *pretrained efficientunet-b0* model with *2* output channels:\n```python\nfrom efficientunet import *\n\nb0unet = get_efficientunet_b0(out_channels=2, concat_input=True, pretrained=True)\n```\n\n---\n## Acknowledgment\nThe pretrained weights are directly borrowed from [this](https://github.com/lukemelas/EfficientNet-PyTorch) repo.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzhoudaxia233%2Fefficientunet-pytorch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzhoudaxia233%2Fefficientunet-pytorch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzhoudaxia233%2Fefficientunet-pytorch/lists"}