{"id":13464430,"url":"https://github.com/Jittor/JSeg","last_synced_at":"2025-03-25T11:31:38.641Z","repository":{"id":60095039,"uuid":"538147369","full_name":"Jittor/JSeg","owner":"Jittor","description":"JSeg is a Semantic segmentation toolbox based on MMSegmentation and Jittor","archived":false,"fork":false,"pushed_at":"2024-07-14T08:43:24.000Z","size":3921,"stargazers_count":218,"open_issues_count":5,"forks_count":11,"subscribers_count":5,"default_branch":"main","last_synced_at":"2024-10-29T17:49:10.729Z","etag":null,"topics":["deep-learning","jittor","segnext","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":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Jittor.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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":"2022-09-18T15:09:27.000Z","updated_at":"2024-10-25T04:28:56.000Z","dependencies_parsed_at":"2024-03-29T05:24:21.458Z","dependency_job_id":"1b7e6afc-9cb7-46ca-951b-ca429d219bb4","html_url":"https://github.com/Jittor/JSeg","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/Jittor%2FJSeg","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jittor%2FJSeg/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jittor%2FJSeg/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jittor%2FJSeg/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Jittor","download_url":"https://codeload.github.com/Jittor/JSeg/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245454009,"owners_count":20617961,"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":["deep-learning","jittor","segnext","semantic-segmentation"],"created_at":"2024-07-31T14:00:42.863Z","updated_at":"2025-03-25T11:31:37.144Z","avatar_url":"https://github.com/Jittor.png","language":"Python","readme":"# JSeg\n\n**02/27/2024**\n\n**[CLIP-RC](project/clip_rc) have been accepted by CVPR2024**\n\n**09/27/2022**\n\n**[ External Attention ](python/jseg/ops/external_attention.py) have been accepted by TPAMI.**\n\n\n**09/19/2022**\n\n**[SegNeXt ](project/segnext) have been accepted by NeurIPS'2022.**\n\n\n## Introduction\nJSeg is a Semantic segmentation toolbox based on [MMSegmentation](https://github.com/open-mmlab/mmsegmentation), [Jittor](https://github.com/Jittor/jittor) and [JDet](https://github.com/Jittor/JDet)\n\n\u003c!-- **Features**\n- Automatic compilation. Our framwork is based on Jittor, which means we don't need to Manual compilation for these code with CUDA and C++. --\u003e\n\n\u003c!-- Framework details are avaliable in the [framework.md](docs/framework.md) --\u003e\n\n## Install\nJSeg environment requirements:\n\n* System: **Linux**(e.g. Ubuntu/CentOS/Arch), **macOS**, or **Windows Subsystem of Linux (WSL)**\n* Python version \u003e= 3.7\n* CPU compiler (require at least one of the following)\n    * g++ (\u003e=5.4.0)\n    * clang (\u003e=8.0)\n* GPU compiler (optional)\n    * nvcc (\u003e=10.0 for g++ or \u003e=10.2 for clang)\n* GPU library: cudnn-dev (recommend tar file installation, [reference link](https://docs.nvidia.com/deeplearning/cudnn/install-guide/index.html#installlinux-tar))\n\n**Step 1: Install the requirements**\n```shell\ngit clone https://github.com/Jittor/JSeg\ncd JSeg\npython -m pip install -r requirements.txt\n```\nIf you have any installation problems for Jittor, please refer to [Jittor](https://github.com/Jittor/jittor)\n\n**Step 2: Install JSeg**\n \n```shell\ncd JSeg\n# suggest this \npython setup.py develop\n# or\npython setup.py install\n```\nIf you don't have permission for install,please add ```--user```.\n\n## Getting Started\n\n### Datasets\nPlease check the [dataset_prepare](docs/dataset_prepare.md) for dataset preparation, The preparation of the dataset comes from [MMSegmentation](https://github.com/open-mmlab/mmsegmentation/blob/master/docs/en/dataset_prepare.md).\n\n### Config\nJSeg defines the used model, dataset and training/testing method by `config-file`, please check the [config.md](docs/config.md) to learn how it works.\n\n### Train\nWe support single-machine single-gpu, single-machine multi-gpu training, multi-machine training is not supported for the time being. Multi-gpu dependence can be referred to [here](https://cg.cs.tsinghua.edu.cn/jittor/tutorial/2020-5-2-16-44-distributed/)\n```shell\npython tools/run_net.py --config-file=path/to/config --task=train\n\n# For example\n# Single GPU\npython tools/run_net.py --config-file=project/fcn/fcn_r50-d8_512x1024_cityscapes_80k.py --task=train\n\n# Multiple GPUs\nmpirun -n 8 python tools/run_net.py --config-file=project/fcn/fcn_r50-d8_512x1024_cityscapes_80k.py --task=train\n```\n\n### Val\nWe provide an evaluation script to evaluate the dataset. If there is not enough CPU memory, you can save CPU memory by setting ```--efficient_val``` to store the evaluation results in a local file.\n```shell\npython tools/run_net.py --config-file=path/to/config --resume=path/to/ckp --task=val\n\n# For example\npython tools/run_net.py --config-file=project/fcn/fcn_r50-d8_512x1024_cityscapes_80k.py --resume=work_dirs/fcn_r50-d8_512x1024_cityscapes_80k/checkpoints/ckpt_80000.pkl --task=val\n```\n\n### Test for save result\nWe provide a test scripts to save the inference results of the data set, which can be saved in the specified location by setting ```--save-dir```.\n```shell\npython tools/run_net.py --config-file=path/to/config --resume=path/to/ckp --save-dir=path/to/save_dir --task=test\n\n# For example\npython tools/run_net.py --config-file=project/fcn/fcn_r50-d8_512x1024_cityscapes_80k.py --resume=work_dirs/fcn_r50-d8_512x1024_cityscapes_80k/checkpoints/ckpt_80000.pkl --save-dir=./ --task=test\n```\n\n### Demo\nWe provide a demo that can predict a single picture. For more information, please see [here](tools/demo.py)\n\n```python\nfrom jseg.utils.inference import InferenceSegmentor\n\n\ndef main():\n    config_file = 'project/fcn/fcn_r50-d8_512x1024_cityscapes_80k.py'\n    ckp_file = 'work_dirs/fcn_r50-d8_512x1024_cityscapes_80k/checkpoints/ckpt_80000.pkl'\n    save_dir = './'\n    image = 'cityscapes/leftImg8bit/val/munster/munster_000069_000019_leftImg8bit.png'\n\n    inference_segmentor = InferenceSegmentor(config_file, ckp_file, save_dir)\n    inference_segmentor.infer(image)\n\n\nif __name__ == \"__main__\":\n    main()\n\n```\n\n### Supported backbones:\n- :heavy_check_mark: ResNet (CVPR'2016)\n- :heavy_check_mark: ResNeXt (CVPR'2017)\n- :heavy_check_mark: [MobileNetV2 (CVPR'2018)](project/mobilenet_v2)\n- :heavy_check_mark: [ResNeSt (ArXiv'2020)](project/resnest)\n- :heavy_check_mark: [Vision Transformer (ICLR'2021)](project/vit)\n- :heavy_check_mark: [Swin Transformer (ICCV'2021)](project/swin)\n- :heavy_check_mark: [ConvNeXt (CVPR'2022)](project/convnext)\n- :heavy_check_mark: [BEiT (ICLR'2022)](project/beit)\n- :heavy_check_mark: [MAE (CVPR'2022)](project/mae)\n\n### Supported methods:\n- :heavy_check_mark: [FCN (CVPR'2015/TPAMI'2017)](project/fcn)\n- :heavy_check_mark: [PSPNet (CVPR'2017)](project/pspnet)\n- :heavy_check_mark: [DeepLabV3 (ArXiv'2017)](project/deeplabv3)\n- :heavy_check_mark: [DeepLabV3+ (CVPR'2018)](project/deeplabv3plus)\n- :heavy_check_mark: [UPerNet (ECCV'2018)](project/upernet)\n- :heavy_check_mark: [NonLocal Net (CVPR'2018)](project/nonlocal_net)\n- :heavy_check_mark: [ANN (ICCV'2019)](project/ann) \n- :heavy_check_mark: [DANet (CVPR'2019)](project/danet)\n- :heavy_check_mark: [CCNet (ICCV'2019)](project/ccnet)\n- :heavy_check_mark: [EMANet (ICCV'2019)](project/emanet)\n- :heavy_check_mark: [GCNet (ICCVW'2019/TPAMI'2020)](project/gcnet)\n- :heavy_check_mark: [PointRend (CVPR'2020)](project/point_rend)\n- :heavy_check_mark: [SegFormer (NeurIPS'2021)](project/segformer)\n- :heavy_check_mark: [EANet (TPAMI)](project/eanet)\n- :heavy_check_mark: [SegNeXt (NeurIPS'2022)](project/segnext)\n\n### Supported datasets:\n  - :heavy_check_mark: [ADE20K](docs/dataset_prepare.md#ade20k)\n  - :heavy_check_mark: [Cityscapes](docs/dataset_prepare.md#cityscapes)\n  - :heavy_check_mark: [PASCAL VOC](docs/dataset_prepare.md#pascal-voc)\n  - :heavy_check_mark: [iSAID](docs/dataset_prepare.md#isaid)\n  - :heavy_check_mark: [LoveDA](docs/dataset_prepare.md#LoveDA)\n  - :heavy_check_mark: [Potsdam](docs/dataset_prepare.md#isprs-potsdam)\n  - :heavy_check_mark: [Vaihingen](docs/dataset_prepare.md#isprs-vaihingen)\n\n\n## Contact Us\nWebsite: http://cg.cs.tsinghua.edu.cn/jittor/\n\nEmail: jittor@qq.com\n\nFile an issue: https://github.com/Jittor/jittor/issues\n\nQQ Group: 761222083\n\n\u003cimg src=\"https://cg.cs.tsinghua.edu.cn/jittor/images/news/2020-12-8-21-19-1_2_2/fig4.png\" width=\"200\"/\u003e\n\n## The Team\nJSeg is currently maintained by the [Tsinghua CSCG Group](https://cg.cs.tsinghua.edu.cn/). If you are also interested in JSeg and want to improve it, Please join us!\n\n\n## Citation\n\n\n```\n@article{hu2020jittor,\n  title={Jittor: a novel deep learning framework with meta-operators and unified graph execution},\n  author={Hu, Shi-Min and Liang, Dun and Yang, Guo-Ye and Yang, Guo-Wei and Zhou, Wen-Yang},\n  journal={Science China Information Sciences},\n  volume={63},\n  number={222103},\n  pages={1--21},\n  year={2020}\n}\n```\n\n## Reference\n1. [mmsegmentation](https://github.com/open-mmlab/mmsegmentation)\n2. [Jittor](https://github.com/Jittor/jittor)\n3. [JDet](https://github.com/Jittor/JDet)\n4. [mmcv](https://github.com/open-mmlab/mmcv)\n5. [timm](https://github.com/rwightman/pytorch-image-models)\n\n\n","funding_links":[],"categories":["Instance, Semantic and Panoptic Segmentation"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FJittor%2FJSeg","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FJittor%2FJSeg","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FJittor%2FJSeg/lists"}