{"id":18519806,"url":"https://github.com/lxtgh/sfsegnets","last_synced_at":"2025-04-06T03:10:18.232Z","repository":{"id":43928265,"uuid":"285778846","full_name":"lxtGH/SFSegNets","owner":"lxtGH","description":"[ECCV-2020-oral]-Semantic Flow for Fast and Accurate Scene Parsing","archived":false,"fork":false,"pushed_at":"2024-03-12T13:48:37.000Z","size":828,"stargazers_count":378,"open_issues_count":4,"forks_count":44,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-03-30T02:07:13.376Z","etag":null,"topics":["semanticsegmentation"],"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/lxtGH.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":"2020-08-07T08:29:58.000Z","updated_at":"2025-01-10T08:06:08.000Z","dependencies_parsed_at":"2022-08-16T05:30:41.396Z","dependency_job_id":"e34e99fa-0a46-422f-99b7-4e4797dbb2b2","html_url":"https://github.com/lxtGH/SFSegNets","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/lxtGH%2FSFSegNets","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lxtGH%2FSFSegNets/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lxtGH%2FSFSegNets/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lxtGH%2FSFSegNets/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lxtGH","download_url":"https://codeload.github.com/lxtGH/SFSegNets/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247427006,"owners_count":20937201,"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":["semanticsegmentation"],"created_at":"2024-11-06T17:17:29.334Z","updated_at":"2025-04-06T03:10:18.195Z","avatar_url":"https://github.com/lxtGH.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SFSegNets(ECCV-2020-oral) and SFNet-Lite (Extension, IJCV-2023)\nReproduced Implementation of Our ECCV-2020 oral paper: Semantic Flow for Fast and Accurate Scene Parsing.\n\n**News! SFNet-Lite is accepted by IJCV!! A good end to my last work in the PhD study!!!**\n\n**Extension: SFNet-Lite achieve 78.8 mIoU while running 120 FPS, 80.1 mIoU while running at 50 FPS on TITAN-RTX.**\n\n![avatar](./figs/sfnet_lite.png)\n\n**Extension: SFNet-Lite achieve new state-of-the-art results (best speed and accuracy trade-off) on domain agnostic driving \nsegmentation benchmark (Unified Driving Segmentation).**\n![avatar](./figs/UDS_dataset.png)\n\n\n**SFNet is the first real time nework which achieves the 80 mIoU on Cityscape test set!!!!**\nIt also contains our another concurrent work: SRNet-IEEE-TIP:[link](https://arxiv.org/abs/2011.03308).\n\n\n![avatar](./figs/sfnet_res.png)\nOur methods achieve the best speed and accuracy trade-off on multiple scene parsing datasets.  \n\n![avatar](./figs/sfnets.png)\nNote that the original paper link is on [TorchCV](https://github.com/donnyyou/torchcv) where you can train SFnet models. \nHowever, that repo is over-complex for further research and exploration.\n\n## Question and Dissussion \n\nIf you **have any question and or dissussion on fast segmentation**, just open an issue. I will reply asap if I have the spare time.\n\n## DataSet Setting\nPlease see the DATASETs.md for the details.\n\n## Requirements\n\npytorch \u003e=1.4.0\napex\nopencv-python\nmmcv-cpu\n\n## Pretrained models and Trained CKPTs\nPlease download the pretrained models and put them into the pretrained_models dir on the root of this repo.\n\n### pretrained imagenet models\n\nresnet101-deep-stem-pytorch:[link](https://drive.google.com/file/d/11s2vaTV71Lc160TMulrmodletcEgRYqi/view?usp=sharing)\n\nresnet50-deep-stem-pytorch:[link](https://drive.google.com/file/d/1H2LhFcDZy6-4K5Yfs-8mHbTSe3WdaTrd/view?usp=sharing)\n\nresnet18-deep-stem-pytorch:[link](https://drive.google.com/file/d/16mcWZSWbV3hkFWJ2cP_eJRQ6Nr1BncCp/view?usp=sharing)\n\ndfnetv1:[link](https://drive.google.com/file/d/1xkkmIjKUbMifcrKdWU7I_-Jx_1YQAXfN/view?usp=sharing)\n\ndfnetv2:[link](https://drive.google.com/file/d/1ZRRE99BPhbXwq-ZzO8A5GFmfCe7zxMsz/view?usp=sharing)\n\nstdcv1/stdc2:[link](https://drive.google.com/drive/folders/1mgBLc7BGFPjM5wJXz0zjHiCn6jT9MWpT?usp=sharing)\n\n\n### trained ckpts:\n\n\n#### SFNet ckpts: \n\n##### Cityscape: \n\nsf-resnet18-Mapillary:[link](https://drive.google.com/file/d/1Hq7HhszrAicAr2PnbNN880ijAYcxJJ0I/view?usp=sharing)\n\nPlease download the trained model, the mIoU is on Cityscape validation dataset.\n\nresnet18(no-balanced-sample): 78.4 mIoU \n\nresnet18: 79.0 mIoU [link](https://drive.google.com/file/d/1X7w1HYrSXOJBkfRJuxtXdmR0BXUR-hR8/view?usp=sharing)\n+dsn [link](https://drive.google.com/file/d/1-U6NzJ0vb3q4Ev7YZ5FkL9X0L__bozM2/view?usp=sharing)\n\nresnet18 + map: 79.9 mIoU [link](https://drive.google.com/file/d/1wiJC_skx8MaZD6B0waz0CWnQBUlcQ6UD/view?usp=sharing) \n\nresnet50: 80.4 mIoU [link](https://drive.google.com/file/d/1oAOPISp_Rqva_9whsF7eE3pFxuGSc1Wf/view?usp=sharing)\n\ndfnetv1: 72.2 mIoU [link](https://drive.google.com/file/d/1aP9d4QVbGvBTABOFvi-okOs6DmJU8njH/view?usp=sharing)\n\ndfnetv2: 75.8 mIoU [link](https://drive.google.com/file/d/1iGE9IYImdrs5p0i3k85OoCQzuSUNhjNU/view?usp=sharing)\n\n\n\n#### SFNet-Lite ckpts:\n\n##### Cityscape: \n\nsfnet_lite_r18: [link](https://drive.google.com/file/d/1ifpyw3qEAzpzzKL_mZANrXJ_WfcaIWre/view?usp=sharing)\n\nsfnet_lite_r18_coarse_boost: [link](https://drive.google.com/file/d/1wqyHvIK5ccFfncU0rDg6g_p0NRJq4pkV/view?usp=sharing)\n\nsfnet_lite_stdcv2: [link](https://drive.google.com/file/d/1Xx5IRL80yu2ak9gCWWl4aXV1OdwhCsDG/view?usp=sharing)\n\nsfnet_lite_stdcv1: [link](https://drive.google.com/file/d/1DAZhnklnBKIbQZprCB1N1TwdZwU0OL6f/view?usp=sharing)\n\n\n##### Unified Driving Segmentation dataset ckpts:\n\nsfnet_lite_r18: [link](https://1drv.ms/u/s!Ai4mxaXd6lVBgQwhOL4whiHtNrye?e=4yW5aM)\n\nsfnet_lite_stdcv1: [link](https://1drv.ms/u/s!Ai4mxaXd6lVBgQopAjfwiFSotuWW?e=h5NUgw)\n\nsfnet_lite_stdcv2: [link](https://1drv.ms/u/s!Ai4mxaXd6lVBgQtmYXGHgyUnPUhn?e=GBHjq2)\n\n\n#### IDD dataset\n\nsfnet_lite_r18: [link](https://1drv.ms/u/s!Ai4mxaXd6lVBgQ6f8-aRMV-p9OGs?e=3NodMB)\n\nsfnet_lite_stdcv1: [link](https://1drv.ms/u/s!Ai4mxaXd6lVBgQ2qAkSh9gI9ix8b?e=rXrmkB)\n\nsfnet_lite_stdcv2: [link](https://1drv.ms/u/s!Ai4mxaXd6lVBgQ-Pchi1UaEtW_Rv?e=OAFU6Y)\n\n\n#### BDD dataset \n\nsfnet_lite_r18: [link](https://1drv.ms/u/s!Ai4mxaXd6lVBgRLCAX25vKyQ-R4f?e=5BNIcR)\n\nsfnet_r18: [link](https://1drv.ms/u/s!Ai4mxaXd6lVBgRFZnJjcIxNNS8jS?e=em7RTQ)\n\n\n#### Mapillary dataset \n\nto be release. \n\n\n## Demo \n\n### Visualization Results\n\npython demo_folder.py --arch choosed_architecture --snapshot ckpt_path --demo_floder images_folder --save_dir save_dir_to_disk\n\n## Training \n\nAll the models are trained with 8 GPUs.\nThe train settings require 8 GPU with at least **11GB** memory. \nPlease download the pretrained models before training.\n\n\n*Train ResNet18 model on Cityscapes*\n\nSFNet r18\n\n```bash\nsh ./scripts/cityscapes/train_cityscapes_sfnet_res18.sh\n```\n\nSFNet-Lite r18\n\n```bash\nsh ./scripts/cityscapes/train_cityscapes_sfnet_res18_v2_lite_1000e.sh\n```\n\nTrain ResNet101 models\n\n```bash\nsh ./scripts/cityscapes/train_cityscapes_sfnet_res101.sh\n```\n\n## Submission for test \n\n```bash\nsh ./scripts/submit_test_cityscapes/submit_cityscapes_sfnet_res101.sh\n```\n\n## Train the Domain Agnostic SFNet for UDS dataset.\n\nPlease use the DATASETs.md to prepare the UDS dataset. \n\n\n```bash\nsh ./scripts/uds/train_merged_sfnet_res18_v2.sh\n```\n\n\n## Citation\nIf you find this repo is useful for your research, Please consider citing our paper:\n\n\n```\n@article{Li2022SFNetFA,\n  title={SFNet: Faster and Accurate Domain Agnostic Semantic Segmentation via Semantic Flow},\n  author={Xiangtai Li and Jiangning Zhang and Yibo Yang and Guangliang Cheng and Kuiyuan Yang and Yu Tong and Dacheng Tao},\n  journal={IJCV},\n  year={2023},\n}\n@inproceedings{sfnet,\n  title={Semantic Flow for Fast and Accurate Scene Parsing},\n  author={Li, Xiangtai and You, Ansheng and Zhu, Zhen and Zhao, Houlong and Yang, Maoke and Yang, Kuiyuan and Tong, Yunhai},\n  booktitle={ECCV},\n  year={2020}\n}\n\n@article{Li2020SRNet,\n  title={Towards Efficient Scene Understanding via Squeeze Reasoning},\n  author={Xiangtai Li and Xia Li and Ansheng You and Li Zhang and Guang-Liang Cheng and Kuiyuan Yang and Y. Tong and Zhouchen Lin},\n  journal={IEEE-TIP},\n  year={2021},\n}\n```\n\n## Acknowledgement \nThis repo is based on Semantic Segmentation from [NVIDIA](https://github.com/NVIDIA/semantic-segmentation) and [DecoupleSegNets](https://github.com/lxtGH/DecoupleSegNets)\n\nGreat Thanks to **SenseTime Research** for Reproducing All these model ckpts and pretrained model.\n\n\n\n## License\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flxtgh%2Fsfsegnets","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flxtgh%2Fsfsegnets","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flxtgh%2Fsfsegnets/lists"}