{"id":17991577,"url":"https://github.com/speedinghzl/pytorch-deeplab","last_synced_at":"2025-10-23T16:41:17.477Z","repository":{"id":75822445,"uuid":"96548148","full_name":"speedinghzl/Pytorch-Deeplab","owner":"speedinghzl","description":"DeepLab-ResNet rebuilt in Pytorch","archived":false,"fork":false,"pushed_at":"2018-11-12T20:53:41.000Z","size":78,"stargazers_count":263,"open_issues_count":11,"forks_count":62,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-13T05:35:15.975Z","etag":null,"topics":["deeplab-resnet","pascal-voc","pytorch","semantic-segmentation"],"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/speedinghzl.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,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-07-07T14:46:34.000Z","updated_at":"2025-03-20T12:52:52.000Z","dependencies_parsed_at":"2023-03-11T01:15:51.433Z","dependency_job_id":null,"html_url":"https://github.com/speedinghzl/Pytorch-Deeplab","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/speedinghzl/Pytorch-Deeplab","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/speedinghzl%2FPytorch-Deeplab","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/speedinghzl%2FPytorch-Deeplab/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/speedinghzl%2FPytorch-Deeplab/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/speedinghzl%2FPytorch-Deeplab/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/speedinghzl","download_url":"https://codeload.github.com/speedinghzl/Pytorch-Deeplab/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/speedinghzl%2FPytorch-Deeplab/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260866771,"owners_count":23074882,"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":["deeplab-resnet","pascal-voc","pytorch","semantic-segmentation"],"created_at":"2024-10-29T19:22:50.733Z","updated_at":"2025-10-23T16:41:12.457Z","avatar_url":"https://github.com/speedinghzl.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DeepLab-ResNet-Pytorch\n\n**New!** We have released [Pytorch-Segmentation-Toolbox](https://github.com/speedinghzl/pytorch-segmentation-toolbox) which contains PyTorch Implementations for DeeplabV3 and PSPNet with **Better Reproduced Performance** on cityscapes.\n\nThis is an (re-)implementation of [DeepLab-ResNet](http://liangchiehchen.com/projects/DeepLabv2_resnet.html) in Pytorch for semantic image segmentation on the [PASCAL VOC dataset](http://host.robots.ox.ac.uk/pascal/VOC/).\n\n## Updates\n\n**9 July, 2017**:\n* The training script `train.py` has been re-written following the original optimisation setup: SGD with momentum, weight decay, learning rate with polynomial decay, different learning rates for different layers, ignoring the 'void' label (\u003ccode\u003e255\u003c/code\u003e).\n* The training script with multi-scale inputs `train_msc.py` has been added: the input is resized to \u003ccode\u003e0.5\u003c/code\u003e and \u003ccode\u003e0.75\u003c/code\u003e of the original resolution, and \u003ccode\u003e4\u003c/code\u003e losses are aggregated: loss on the original resolution, on the \u003ccode\u003e0.75\u003c/code\u003e resolution, on the \u003ccode\u003e0.5\u003c/code\u003e resolution, and loss on the all fused outputs.\n* Evaluation of a single-scale model on the PASCAL VOC validation dataset (using ['SegmentationClassAug'](https://www.dropbox.com/s/oeu149j8qtbs1x0/SegmentationClassAug.zip?dl=0)) leads to \u003ccode\u003e74.0%\u003c/code\u003e mIoU ['VOC12_scenes_20000.pth'](https://pan.baidu.com/s/1bP52R8) without CRF as post-processing step. The evaluation of multi-scale model is in progress.\n\n\n## Model Description\n\nThe DeepLab-ResNet is built on a fully convolutional variant of [ResNet-101](https://github.com/KaimingHe/deep-residual-networks) with [atrous (dilated) convolutions](https://github.com/fyu/dilation), atrous spatial pyramid pooling, and multi-scale inputs (not implemented here).\n\nThe model is trained on a mini-batch of images and corresponding ground truth masks with the softmax classifier at the top. During training, the masks are downsampled to match the size of the output from the network; during inference, to acquire the output of the same size as the input, bilinear upsampling is applied. The final segmentation mask is computed using argmax over the logits.\nOptionally, a fully-connected probabilistic graphical model, namely, CRF, can be applied to refine the final predictions.\nOn the test set of PASCAL VOC, the model achieves \u003ccode\u003e79.7%\u003c/code\u003e with CRFs and \u003ccode\u003e76.4%\u003c/code\u003e without CRFs of mean intersection-over-union.\n\nFor more details on the underlying model please refer to the following paper:\n\n\n    @article{CP2016Deeplab,\n      title={DeepLab: Semantic Image Segmentation with Deep Convolutional Nets, Atrous Convolution, and Fully Connected CRFs},\n      author={Liang-Chieh Chen and George Papandreou and Iasonas Kokkinos and Kevin Murphy and Alan L Yuille},\n      journal={arXiv:1606.00915},\n      year={2016}\n    }\n    \n## Dataset and Training\n\nTo train the network, one can use the augmented PASCAL VOC 2012 dataset with \u003ccode\u003e10582\u003c/code\u003e images for training and \u003ccode\u003e1449\u003c/code\u003e images for validation. Pytorch \u003e= 0.4.0.\n\nYou can download converted `init.caffemodel` with extension name .pth [here](https://drive.google.com/open?id=0BxhUwxvLPO7TVFJQU1dwbXhHdEk). Besides that, one can also exploit random scaling and mirroring of the inputs during training as a means for data augmentation. For example, to train the model from scratch with random scale and mirroring turned on, simply run:\n```bash\npython train.py --random-mirror --random-scale --gpu 0\n```\n\n## Evaluation\n\nThe single-scale model shows \u003ccode\u003e74.0%\u003c/code\u003e mIoU on the Pascal VOC 2012 validation dataset (['SegmentationClassAug'](https://www.dropbox.com/s/oeu149j8qtbs1x0/SegmentationClassAug.zip?dl=0)). No post-processing step with CRF is applied.\n\nThe following command provides the description of each of the evaluation settings:\n```bash\npython evaluate.py --help\n```\n\n## Acknowledgment\nThis code is heavily borrowed from [pytorch-deeplab-resnet](https://github.com/isht7/pytorch-deeplab-resnet).\n\n## Other implementations\n* [DeepLab-LargeFOV in TensorFlow](https://github.com/DrSleep/tensorflow-deeplab-lfov)\n* [DeepLab-LargeFOV in Pytorch](https://github.com/isht7/pytorch-deeplab-resnet)\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspeedinghzl%2Fpytorch-deeplab","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fspeedinghzl%2Fpytorch-deeplab","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspeedinghzl%2Fpytorch-deeplab/lists"}