• Stars
    star
    139
  • Rank 262,954 (Top 6 %)
  • Language
    Python
  • License
    MIT License
  • Created about 5 years ago
  • Updated about 2 years ago

Reviews

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

Repository Details

Learnable Tree Filter for Structure-preserving Feature Transform

TreeFilter-Torch

By Lin Song, Yanwei Li, Zeming Li, Gang Yu, Hongbin Sun, Jian Sun, Nanning Zheng.

This project provides a cuda implementation for "Learnable Tree Filter for Structure-preserving Feature Transform" (NeurIPS2019) on PyTorch. Multiple semantic segmentation experiments are reproduced to verify the effectiveness of tree filtering module on PASCAL VOC2012 and Cityscapes. For the reason that the experiments in the paper were conducted using internal framework, this project reimplements them on PyTorch and reports detailed comparisons below. In addition, many thanks to TorchSeg.

introduce image

Prerequisites

  • PyTorch 1.2
    • sudo pip3 install torch torchvision
  • Easydict
    • sudo pip3 install easydict
  • Apex
    • https://nvidia.github.io/apex/index.html
  • Ninja
    • sudo apt-get install ninja-build
  • tqdm
    • sudo pip3 install tqdm
  • Boost (optional for Prim and Kruskal algorithm)
    • sudo apt-get install libboost-dev

Installation

Building from source

  • git clone https://github.com/StevenGrove/TreeFilter-Torch
  • cd TreeFilter-Torch/furnace/kernels/lib_tree_filter
  • sudo python3 setup.py build develop

This project implements three well-known algorithms of minimal spanning tree, i.e., Boruvka, Kruskal and Prim. The default algorithm is set to Boruvka for its linear computational complexity in the plain graph. The user can change the configuration in the source file "lib_tree_filter/src/mst/mst.cu" .

Pretrained Model

Performance and Benchmarks

Notes

FCN-32d: FCN with decoder whose maximum stride is 32;
Extra: Global average pooling + ResBlock;
TF: Learnable tree filtering module;
SS: Single-scale;
MSF: Multi-scale + Flip.

PASCAL VOC 2012 val set

Methods Backbone mIoU (ss) Acc (ss) mIoU (msf) Acc (msf) Model
FCN-32d R50_v1c 71.82% 93.62% 73.96% 94.14% GoogleDrive
FCN-32d+TF R50_v1c 76.31% 94.57% 77.80% 94.96% GoogleDrive
FCN-32d R101_v1c 74.53% 94.29% 76.08% 94.63% GoogleDrive
FCN-32d+TF R101_v1c 77.82% 94.92% 79.22% 95.22% GoogleDrive
FCN-32d+Extra R101_v1c 78.04% 95.01% 79.69% 95.41% GoogleDrive
FCN-32d+Extra+TF R101_v1c 79.81% 95.38% 80.97% 95.67% GoogleDrive
FCN-32d+Extra+TF* R101_v1c 80.32% 95.66% 82.28% 96.01% GoogleDrive

* further finetuned on the original train set

Cityscapes val set

Methods Backbone mIoU (ss) Acc (ss) mIoU (msf) Acc (msf) Model
FCN-32d+Extra R101_v1c 78.29% 96.09% 79.40% 96.27% GoogleDrive
FCN-32d+Extra+TF R101_v1c 79.58% 96.31% 80.85% 96.46% GoogleDrive

Usage

As in the original TorchSeg, distributed training is recommended for either single machine or multiple machines.
For detailed usage, please refer to the Training and Inference sections in TorchSeg.

To do

  • Experiments on ADE20K
  • Visualization of tree filter
  • Additional tasks
    • Object detection
    • Instance segmentation
    • Optical flow

Citation

Please cite the learnable tree filter in your publications if it helps your research.

@inproceedings{song2019learnable,
    title = {Learnable Tree Filter for Structure-preserving Feature Transform},
    author = {Song, Lin and Li, Yanwei and Li, Zeming and Yu, Gang and Sun, Hongbin and Sun, Jian and Zheng, Nanning},
    booktitle = {Advances in Neural Information Processing Systems},
    year = {2019}
}

Please cite this project in your publications if it helps your research.

@misc{treefilter-torch,
    author = {Song, Lin},
    title = {TreeFiler-Torch},
    howpublished = {\url{https://github.com/StevenGrove/TreeFilter-Torch}},
    year ={2019}
}

More Repositories

1

YOLOX

YOLOX is a high-performance anchor-free YOLO, exceeding yolov3~v5 with MegEngine, ONNX, TensorRT, ncnn, and OpenVINO supported. Documentation: https://yolox.readthedocs.io/
Python
9,231
star
2

BEVDepth

Official code for BEVDepth.
Python
709
star
3

cvpods

All-in-one Toolbox for Computer Vision Research.
Python
643
star
4

DeFCN

End-to-End Object Detection with Fully Convolutional Network
Python
494
star
5

BorderDet

BorderDet: Border Feature for Dense Object Detection(ECCV2020 Oral)
Python
431
star
6

DynamicRouting

Learning Dynamic Routing for Semantic Segmentation
Python
378
star
7

BEVStereo

Official code for BEVStereo
Python
253
star
8

OTA

Official implementation of our CVPR2021 paper "OTA: Optimal Transport Assignment for Object Detection" in Pytorch.
Python
241
star
9

AutoAssign

Pytorch implementation of "AutoAssign: Differentiable Label Assignment for Dense Object Detection"
Python
140
star
10

DenseTeacher

DenseTeacher: Dense Pseudo-Label for Semi-supervised Object Detection
Python
120
star
11

DisAlign

Implementation of "Distribution Alignment: A Unified Framework for Long-tail Visual Recognition"(CVPR 2021)
Python
117
star
12

Megvii-BaseDetection

You are welcomed to join us!
50
star
13

GFSD

This project provides an implementation for "Generalized Few-Shot Object Detection without Forgetting" (CVPR2021) on PyTorch.
Python
45
star
14

LLA

Official implementation of our paper "LLA: Loss-aware Label Assignment for Dense Pedestrian Detection" in Pytorch.
Python
35
star
15

4K-Face

4K-Face: A Dataset with Huge Scale-variance Faces
32
star
16

storage

provide Checkpoint for users.
1
star