Home

Awesome

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

Installation

Building from source

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

MethodsBackbonemIoU (ss)Acc (ss)mIoU (msf)Acc (msf)Model
FCN-32dR50_v1c71.82%93.62%73.96%94.14%GoogleDrive
FCN-32d+TFR50_v1c76.31%94.57%77.80%94.96%GoogleDrive
FCN-32dR101_v1c74.53%94.29%76.08%94.63%GoogleDrive
FCN-32d+TFR101_v1c77.82%94.92%79.22%95.22%GoogleDrive
FCN-32d+ExtraR101_v1c78.04%95.01%79.69%95.41%GoogleDrive
FCN-32d+Extra+TFR101_v1c79.81%95.38%80.97%95.67%GoogleDrive
FCN-32d+Extra+TF<sup>*</sup>R101_v1c80.32%95.66%82.28%96.01%GoogleDrive

<sup>*</sup> further finetuned on the original train set

Cityscapes val set

MethodsBackbonemIoU (ss)Acc (ss)mIoU (msf)Acc (msf)Model
FCN-32d+ExtraR101_v1c78.29%96.09%79.40%96.27%GoogleDrive
FCN-32d+Extra+TFR101_v1c79.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

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}
}