{"id":25620448,"url":"https://github.com/bodokaiser/piwise","last_synced_at":"2025-04-06T19:13:40.336Z","repository":{"id":67458039,"uuid":"85674942","full_name":"bodokaiser/piwise","owner":"bodokaiser","description":"Pixel-wise segmentation on VOC2012 dataset using pytorch.","archived":false,"fork":false,"pushed_at":"2018-12-26T14:04:41.000Z","size":53,"stargazers_count":386,"open_issues_count":17,"forks_count":86,"subscribers_count":13,"default_branch":"master","last_synced_at":"2025-03-30T18:08:56.134Z","etag":null,"topics":["computer-vision","fcn","pytorch","segnet","semantic-segmentation"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bodokaiser.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2017-03-21T08:05:59.000Z","updated_at":"2025-03-27T12:39:39.000Z","dependencies_parsed_at":"2023-06-11T03:23:35.211Z","dependency_job_id":null,"html_url":"https://github.com/bodokaiser/piwise","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/bodokaiser%2Fpiwise","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bodokaiser%2Fpiwise/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bodokaiser%2Fpiwise/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bodokaiser%2Fpiwise/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bodokaiser","download_url":"https://codeload.github.com/bodokaiser/piwise/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247535520,"owners_count":20954576,"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","fcn","pytorch","segnet","semantic-segmentation"],"created_at":"2025-02-22T07:19:09.533Z","updated_at":"2025-04-06T19:13:40.308Z","avatar_url":"https://github.com/bodokaiser.png","language":"Python","readme":"# PiWiSe\n\nPixel-wise segmentation on the [VOC2012][dataset] dataset using\n[pytorch][pytorch].\n\n- [x] [FCN](https://arxiv.org/abs/1605.06211)\n- [x] [SegNet](https://arxiv.org/abs/1511.00561)\n- [ ] [PSPNet](https://arxiv.org/abs/1612.01105)\n- [x] [UNet](https://arxiv.org/abs/1505.04597)\n- [ ] [RefineNet](https://arxiv.org/abs/1611.06612)\n\n**For a more complete implementation of segmentation networks checkout [semseg](https://github.com/meetshah1995/pytorch-semseg).**\n\nNote:\n\n- FCN differs from original implementation see [this issue](https://github.com/bodokaiser/piwise/issues/4)\n- SegNet does not match original paper performance see [here](https://github.com/bodokaiser/piwise/issues/3)\n- PSPNet misses \"atrous convolution\" (conv layers of ResNet101 should be amended to preserve image size)\n\nKeeping this in mind feel free to PR. Thank you!\n\n## Setup\n\nSee dataset examples [here][dataset_example].\n\n### Download\n\nDownload [image archive][dataset_download] and extract and do:\n\n```\nmkdir data\nmv VOCdevkit/VOC2012/JPEGImages data/images\nmv VOCdevkit/VOC2012/SegmentationClass data/classes\nrm -rf VOCdevkit\n```\n\n### Install\n\nWe recommend using [pyenv][pyenv]:\n\n```\npyenv virtualenv 3.6.0 piwise\npyenv activate piwise\n```\n\nthen install requirements with `pip install -r requirements.txt`.\n\n## Usage\n\nFor latest documentation use:\n\n```\npython main.py --help\n```\n\nSupported model parameters are `fcn8`, `fcn16`, `fcn32`, `unet`, `segnet1`,\n`segnet2`, `pspnet`.\n\n### Training\n\nIf you want to have visualization open an extra tab with:\n\n```\npython -m visdom.server -port 5000\n```\n\nTrain the SegNet model 30 epochs with cuda support, visualization\nand checkpoints every 100 steps:\n\n```\npython main.py --cuda --model segnet2 train --datadir data \\\n    --num-epochs 30 --num-workers 4 --batch-size 4 \\\n    --steps-plot 50 --steps-save 100\n```\n\n### Evaluation\n\n\nThen we want to do semantic segmentation on `foo.jpg`:\n\n```\npython main.py --model segnet2 --state segnet2-30-0 eval foo.jpg foo.png\n```\n\nThe segmented class image can now be found at `foo.png`.\n\n[pyenv]: https://github.com/pyenv/pyenv\n[pytorch]: http://pytorch.org\n[dataset]: http://host.robots.ox.ac.uk/pascal/VOC/\n[dataset_example]: http://host.robots.ox.ac.uk/pascal/VOC/voc2012/segexamples\n[dataset_download]: http://host.robots.ox.ac.uk/pascal/VOC/voc2012/VOCtrainval_11-May-2012.tar\n\n### Results\n\n\nThese are some results based on segnet after 40 epoches. Set\n\n```python\nloss_weights[0] = 1 / 1\n```\nto deal gracefully with the unbalanced problem.\n\n\u003ctable\u003e\n  \u003cthead\u003e\n    \u003ctr\u003e\n      \u003cth\u003eInput\u003c/th\u003e\n      \u003cth\u003eOutput\u003c/th\u003e\n      \u003cth\u003eGround Truth\u003c/th\u003e\n    \u003c/tr\u003e\n  \u003c/thead\u003e\n  \u003ctbody\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\n        \u003cimg src=\"https://user-images.githubusercontent.com/1780466/50447927-c6c55200-091e-11e9-8b4e-65c84cd26f39.jpg\"\u003e\n      \u003c/td\u003e\n      \u003ctd\u003e\n        \u003cimg src=\"https://user-images.githubusercontent.com/1780466/50447931-c75de880-091e-11e9-954c-a405f6ec4bbb.jpg\"\u003e\n      \u003c/td\u003e\n      \u003ctd\u003e\n        \u003cimg src=\"https://user-images.githubusercontent.com/1780466/50447937-c7f67f00-091e-11e9-8d11-0f7f98def638.jpg\"\u003e\n      \u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\n        \u003cimg src=\"https://user-images.githubusercontent.com/1780466/50447928-c6c55200-091e-11e9-9c3f-cbd95918beb2.jpg\"\u003e\n      \u003c/td\u003e\n      \u003ctd\u003e\n        \u003cimg src=\"https://user-images.githubusercontent.com/1780466/50447933-c75de880-091e-11e9-8c8f-de6ce6a1eebd.jpg\"\u003e\n      \u003c/td\u003e\n      \u003ctd\u003e\n        \u003cimg src=\"https://user-images.githubusercontent.com/1780466/50447938-c7f67f00-091e-11e9-8d95-45c65ea21d57.jpg\"\u003e\n      \u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\n        \u003cimg src=\"https://user-images.githubusercontent.com/1780466/50447929-c75de880-091e-11e9-9386-608115753e88.jpg\"\u003e\n      \u003c/td\u003e\n      \u003ctd\u003e\n        \u003cimg src=\"https://user-images.githubusercontent.com/1780466/50447934-c75de880-091e-11e9-811f-90e1843ced14.jpg\"\u003e\n      \u003c/td\u003e\n      \u003ctd\u003e\n        \u003cimg src=\"https://user-images.githubusercontent.com/1780466/50447939-c7f67f00-091e-11e9-94e0-79c0ca87ee63.jpg\"\u003e\n      \u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\n        \u003cimg src=\"https://user-images.githubusercontent.com/1780466/50447930-c75de880-091e-11e9-9853-1a03c8b94878.jpg\"\u003e\n      \u003c/td\u003e\n      \u003ctd\u003e\n        \u003cimg src=\"https://user-images.githubusercontent.com/1780466/50447935-c75de880-091e-11e9-9df2-78ccbc5866a4.jpg\"\u003e\n      \u003c/td\u003e\n      \u003ctd\u003e\n        \u003cimg src=\"https://user-images.githubusercontent.com/1780466/50447940-c7f67f00-091e-11e9-9b7d-6a351d489370.jpg\"\u003e\n      \u003c/td\u003e\n    \u003c/tr\u003e\n  \u003c/tbody\u003e\n\u003c/table\u003e\n","funding_links":[],"categories":["Paper implementations｜论文实现","Model Deployment library","Paper implementations"],"sub_categories":["Other libraries｜其他库:","PyTorch \u003ca name=\"pytorch\"/\u003e","Other libraries:"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbodokaiser%2Fpiwise","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbodokaiser%2Fpiwise","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbodokaiser%2Fpiwise/lists"}