• Stars
    star
    185
  • Rank 207,025 (Top 5 %)
  • Language
    Python
  • License
    Apache License 2.0
  • Created about 2 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

JSeg is a Semantic segmentation toolbox based on MMSegmentation and Jittor

JSeg

09/27/2022

External Attention have been accepted by TPAMI.

09/19/2022

SegNeXt have been accepted by NeurIPS'2022.

Introduction

JSeg is a Semantic segmentation toolbox based on MMSegmentation, Jittor and JDet

Install

JSeg environment requirements:

  • System: Linux(e.g. Ubuntu/CentOS/Arch), macOS, or Windows Subsystem of Linux (WSL)
  • Python version >= 3.7
  • CPU compiler (require at least one of the following)
    • g++ (>=5.4.0)
    • clang (>=8.0)
  • GPU compiler (optional)
    • nvcc (>=10.0 for g++ or >=10.2 for clang)
  • GPU library: cudnn-dev (recommend tar file installation, reference link)

Step 1: Install the requirements

git clone https://github.com/Jittor/JSeg
cd JSeg
python -m pip install -r requirements.txt

If you have any installation problems for Jittor, please refer to Jittor

Step 2: Install JSeg

cd JSeg
# suggest this 
python setup.py develop
# or
python setup.py install

If you don't have permission for install,please add --user.

Getting Started

Datasets

Please check the dataset_prepare for dataset preparation, The preparation of the dataset comes from MMSegmentation.

Config

JSeg defines the used model, dataset and training/testing method by config-file, please check the config.md to learn how it works.

Train

We 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

python tools/run_net.py --config-file=path/to/config --task=train

# For example
# Single GPU
python tools/run_net.py --config-file=project/fcn/fcn_r50-d8_512x1024_cityscapes_80k.py --task=train

# Multiple GPUs
mpirun -n 8 python tools/run_net.py --config-file=project/fcn/fcn_r50-d8_512x1024_cityscapes_80k.py --task=train

Val

We 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.

python tools/run_net.py --config-file=path/to/config --resume=path/to/ckp --task=val

# For example
python 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

Test for save result

We 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.

python tools/run_net.py --config-file=path/to/config --resume=path/to/ckp --save-dir=path/to/save_dir --task=test

# For example
python 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

Demo

We provide a demo that can predict a single picture. For more information, please see here

from jseg.utils.inference import InferenceSegmentor


def main():
    config_file = 'project/fcn/fcn_r50-d8_512x1024_cityscapes_80k.py'
    ckp_file = 'work_dirs/fcn_r50-d8_512x1024_cityscapes_80k/checkpoints/ckpt_80000.pkl'
    save_dir = './'
    image = 'cityscapes/leftImg8bit/val/munster/munster_000069_000019_leftImg8bit.png'

    inference_segmentor = InferenceSegmentor(config_file, ckp_file, save_dir)
    inference_segmentor.infer(image)


if __name__ == "__main__":
    main()

Supported backbones:

Supported methods:

Supported datasets:

Contact Us

Website: http://cg.cs.tsinghua.edu.cn/jittor/

Email: [email protected]

File an issue: https://github.com/Jittor/jittor/issues

QQ Group: 761222083

The Team

JSeg is currently maintained by the Tsinghua CSCG Group. If you are also interested in JSeg and want to improve it, Please join us!

Citation

@article{hu2020jittor,
  title={Jittor: a novel deep learning framework with meta-operators and unified graph execution},
  author={Hu, Shi-Min and Liang, Dun and Yang, Guo-Ye and Yang, Guo-Wei and Zhou, Wen-Yang},
  journal={Science China Information Sciences},
  volume={63},
  number={222103},
  pages={1--21},
  year={2020}
}

Reference

  1. mmsegmentation
  2. Jittor
  3. JDet
  4. mmcv
  5. timm

More Repositories

1

jittor

Jittor is a high-performance deep learning framework based on JIT compiling and meta-operators.
Python
3,050
star
2

JittorLLMs

计图大模型推理库,具有高性能、配置要求低、中文支持好、可移植等特点
Python
2,340
star
3

JNeRF

JNeRF is a NeRF benchmark based on Jittor. JNeRF re-implemented instant-ngp and achieved same performance with original paper.
C++
631
star
4

jrender

Jrender is an efficient differentiable rendering library implemented in jittor.
Python
314
star
5

JDet

JDet is an object detection benchmark based on Jittor. Mainly focus on aerial image object detection (oriented object detection).
Python
185
star
6

JGAN

JGAN model zoo supports 27 kinds of mainstream GAN models with high speed for jittor.
Python
171
star
7

PointCloudLib

Jittor Library for Point Cloud Processing
Python
113
star
8

segmentation-jittor

jittor segmentation lib
Python
61
star
9

LearnJittorBasicIn60Min

计图零基础快速入门教程(60分钟)
Jupyter Notebook
28
star
10

OCR-Baseline

Python
20
star
11

PFSegNets-Jittor

Python
18
star
12

JSparse

JSparse is a high-performance auto-differentiation library for sparse voxels computation and point cloud processing based on TorchSparse and Jittor.
Python
17
star
13

unsup3d-jittor

Jittor Implementation for the pepar Unsupervised Learning of Probably Symmetric Deformable 3D Objects from Images in the Wild (CVPR 2020 oral).
Python
17
star
14

lsgan-jittor

Python
16
star
15

ssd-jittor

Jittor object detection ssd(Single Shot MultiBox Detector) implemention.
Python
14
star
16

TrafficSignDetection

Python
13
star
17

cutt

CUDA Tensor Transpose (cuTT) library
C++
9
star
18

InstanceSegmentation-jittor

9
star
19

TsinghuaDogBaseline

ResNet-50 for TsinghuaDog classification
Python
9
star
20

deeplab-jittor

Python
9
star
21

shapenet-reconstruction-jittor

Python
6
star
22

mnistclassification-jittor

Python
4
star