• Stars
    star
    138
  • Rank 264,508 (Top 6 %)
  • Language
    Python
  • Created almost 6 years ago
  • Updated over 3 years ago

Reviews

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

Repository Details

Segmentation realize Deeperlab only segmentation part

Deeperlab

This project aims at providing a fast, modular reference implementation for semantic segmentation models using PyTorch.

demo image

Highlights

  • Distributed Training: >60% Thank you ycszen, from his struct faster than the multi-thread parallel method(nn.DataParallel), we use the multi-processing parallel method.
  • Multi-GPU training and inference: support different manners of inference.
  • Provides pre-trained models and implement different semantic segmentation models.

Prerequisites

  • PyTorch 1.0
    • pip3 install torch torchvision
  • Easydict
    • pip3 install easydict
  • Apex
  • Ninja
    • sudo apt-get install ninja-build
  • tqdm
    • pip3 install tqdm

Pretrain Model

Model Zoo

Supported Model

Performance and Benchmarks

SS:Single Scale MSF:Multi-scale + Flip

PASCAL VOC 2012(SBD and Never SBD)

because I only realize the segmentation part,I tested its results on voc

Method Backbone TrainSet EvalSet Mean IoU(ss) Mean IoU(msf)
deeperlab(ours+SBD) R101_v1c train_aug val 79.71 80.26
deeperlab(ours) R101_v1c train_aug val 73.28 74.11

To Do

  • Detection part

Link

we must build the env for training

make link
make others

soft link to data,pretrain,log,logger

Training

  1. create the config file of dataset:train.txt, val.txt, test.txt
    file structure๏ผš(split with tab)
    path-of-the-image   path-of-the-groundtruth
  2. modify the config.py according to your requirements
  3. train a network:

Distributed Training

We use the official torch.distributed.launch in order to launch multi-gpu training. This utility function from PyTorch spawns as many Python processes as the number of GPUs we want to use, and each Python process will only use a single GPU.

For each experiment, you can just run this script:

export NGPUS=8
python -m torch.distributed.launch --nproc_per_node=$NGPUS train.py

Non-distributed Training

The above performance are all conducted based on the non-distributed training. For each experiment, you can just run this script:

bash train.sh

In train.sh, the argument of d means the GPU you want to use.

Inference

In the evaluator, we have implemented the multi-gpu inference base on the multi-process. In the inference phase, the function will spawns as many Python processes as the number of GPUs we want to use, and each Python process will handle a subset of the whole evaluation dataset on a single GPU.

  1. evaluate a trained network on the validation set:
    bash eval.sh
  2. input arguments in shell:
    usage: -e epoch_idx -d device_idx -c save_csv [--verbose ] 
    [--show_image] [--save_path Pred_Save_Path]

Segmentation-torch

if you are interested my algorithm, you can see my realized segmentation tool(dfn,deeperlab,deeplabv3 plus and so on):

Be Care for

because my device is 1080, we can't use 7*7 conv in two 4096 channel due to out of memory. so if you use it. you can change it in model/deeperlab.py

More Repositories

1

Open-PIFuhd

This is an implementation of PIFuhd based on Pytorch
Python
347
star
2

Yolo_Nano

Pytorch implementation of yolo_Nano for pedestrian detection
Python
140
star
3

OPEC-Net

Peeking into occluded joints: A novel framework for crowd pose estimation(ECCV2020)
Python
130
star
4

RDN-pytorch

Implement RDN with pytorch
Python
50
star
5

LibTorch_RefineDet

RefineDet_API_for_pytorch C++
Makefile
27
star
6

Minimal-Hand

Minimal-Hand based PyTorch (CVPR2020)
Python
27
star
7

Facial_Expression_Similarity

This project aims at providing a fast, modular reference implementation for A Compact Embedding for Facial Expression Similarity models using PyTorch.
Python
17
star
8

ETHSeg

ETHSeg: An Amodel Instance Segmentation Network and a Real-world Dataset for X-Ray Waste Inspection (CVPR2022๏ผ‰
12
star
9

pytorch_cpp

pytorch-using c++API
Makefile
8
star
10

REC-MV

REC-MV: REconstructing 3D Dynamic Cloth from Monucular Videos (CVPR2023)
7
star
11

TSN-pytorch

TSN-net for action recognization, and vote it according the paper
Python
6
star
12

YOLO2-pytorch

Implement yolov-2 with pytorch
Python
5
star
13

pytorch_cpp_API

This_Api_Using a general template to classify task.
Makefile
5
star
14

lingtengqiu.github.io

HTML
3
star
15

minimum-bounding-rectangle-MBR

using c++ realize
Python
3
star
16

FCN-pytorch

FCN-pytorch implement
Python
3
star
17

TSN_dense_flow_process

Here we do pre_process for tsn net to get the filelist for train
C++
2
star
18

Seg_tool_and_mini_rec_create

A tool use for seg label and a algorithm to get the each mask region-rect for xml messiage
Python
2
star
19

reconstruction-of-hands-and-human-survey

1
star
20

RichDreamer

1
star