All Projects → lkeab → BCNet

lkeab / BCNet

Licence: MIT license
Deep Occlusion-Aware Instance Segmentation with Overlapping BiLayers [CVPR 2021]

Programming Languages

python
139335 projects - #7 most used programming language
Cuda
1817 projects
C++
36643 projects - #6 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to BCNet

Entity
EntitySeg Toolbox: Towards Open-World and High-Quality Image Segmentation
Stars: ✭ 313 (-27.88%)
Mutual labels:  segmentation, instance-segmentation, fcos, detectron2
Multi Human Parsing
🔥🔥Official Repository for Multi-Human-Parsing (MHP)🔥🔥
Stars: ✭ 507 (+16.82%)
Mutual labels:  detection, segmentation, instance-segmentation
Deep Learning For Tracking And Detection
Collection of papers, datasets, code and other resources for object tracking and detection using deep learning
Stars: ✭ 1,920 (+342.4%)
Mutual labels:  detection, segmentation
Ochumanapi
API for the dataset proposed in "Pose2Seg: Detection Free Human Instance Segmentation" @ CVPR2019.
Stars: ✭ 168 (-61.29%)
Mutual labels:  detection, segmentation
Awesome Carla
👉 CARLA resources such as tutorial, blog, code and etc https://github.com/carla-simulator/carla
Stars: ✭ 246 (-43.32%)
Mutual labels:  detection, segmentation
Awesome Gan For Medical Imaging
Awesome GAN for Medical Imaging
Stars: ✭ 1,814 (+317.97%)
Mutual labels:  detection, segmentation
Up Detr
[CVPR2021 Oral] UP-DETR: Unsupervised Pre-training for Object Detection with Transformers
Stars: ✭ 126 (-70.97%)
Mutual labels:  detection, cvpr
Com.unity.perception
Perception toolkit for sim2real training and validation
Stars: ✭ 208 (-52.07%)
Mutual labels:  detection, segmentation
Caffe Model
Caffe models (including classification, detection and segmentation) and deploy files for famouse networks
Stars: ✭ 1,258 (+189.86%)
Mutual labels:  detection, segmentation
Scan2Cap
[CVPR 2021] Scan2Cap: Context-aware Dense Captioning in RGB-D Scans
Stars: ✭ 81 (-81.34%)
Mutual labels:  cvpr, cvpr2021
LBYLNet
[CVPR2021] Look before you leap: learning landmark features for one-stage visual grounding.
Stars: ✭ 46 (-89.4%)
Mutual labels:  cvpr, cvpr2021
cfvqa
[CVPR 2021] Counterfactual VQA: A Cause-Effect Look at Language Bias
Stars: ✭ 96 (-77.88%)
Mutual labels:  cvpr, cvpr2021
Model Quantization
Collections of model quantization algorithms
Stars: ✭ 118 (-72.81%)
Mutual labels:  detection, segmentation
Dstl unet
Dstl Satellite Imagery Feature Detection
Stars: ✭ 117 (-73.04%)
Mutual labels:  detection, segmentation
Paddlex
PaddlePaddle End-to-End Development Toolkit(『飞桨』深度学习全流程开发工具)
Stars: ✭ 3,399 (+683.18%)
Mutual labels:  detection, segmentation
Ac Fpn
Implement of paper 《Attention-guided Context Feature Pyramid Network for Object Detection》
Stars: ✭ 117 (-73.04%)
Mutual labels:  detection, instance-segmentation
3d Pointcloud
Papers and Datasets about Point Cloud.
Stars: ✭ 179 (-58.76%)
Mutual labels:  detection, segmentation
Yet-Another-Anime-Segmenter
Instance segmentation for anime characters based on CondInst and SOLOv2
Stars: ✭ 171 (-60.6%)
Mutual labels:  instance-segmentation, detectron2
Cnn Paper2
🎨 🎨 深度学习 卷积神经网络教程 :图像识别,目标检测,语义分割,实例分割,人脸识别,神经风格转换,GAN等🎨🎨 https://dataxujing.github.io/CNN-paper2/
Stars: ✭ 77 (-82.26%)
Mutual labels:  detection, segmentation
Dlcv for beginners
《深度学习与计算机视觉》配套代码
Stars: ✭ 1,244 (+186.64%)
Mutual labels:  detection, segmentation

Deep Occlusion-Aware Instance Segmentation with Overlapping BiLayers [BCNet, CVPR 2021]

License: MIT PWC PWC

This is the official pytorch implementation of BCNet built on the open-source detectron2.

Deep Occlusion-Aware Instance Segmentation with Overlapping BiLayers
Lei Ke, Yu-Wing Tai, Chi-Keung Tang
CVPR 2021

Highlights

  • BCNet: Two/one-stage (detect-then-segment) instance segmentation with state-of-the-art performance.
  • Novelty: A new mask head design, explicit occlusion modeling with bilayer decouple (object boundary and mask) for the occluder and occludee in the same RoI.
  • Efficacy: Large improvements both the FCOS (anchor-free) and Faster R-CNN (anchor-based) detectors.
  • Simple: Small additional computation burden and easy to use.

Visualization of Occluded Objects

Qualitative instance segmentation results of our BCNet, using ResNet-101-FPN and Faster R-CNN detector. The bottom row visualizes squared heatmap of object contour and mask predictions by the two GCN layers for the occluder and occludee in the same ROI region specified by the red bounding box, which also makes the final segmentation result of BCNet more explainable than previous methods. The heatmap visualization of GCN-1 in fourth column example shows that BCNet handles multiple occluders with in the same RoI by grouping them together. See our paper for more visual examples and comparisons.

Qualitative instance segmentation results of our BCNet, using ResNet-101-FPN and FCOS detector.

Results on COCO test-dev

(Check Table 8 of the paper for full results, all methods are trained on COCO train2017)

Detector(Two-stage) Backbone Method mAP(mask)
Faster R-CNN Res-R50-FPN Mask R-CNN (ICCV'17) 34.2
Faster R-CNN Res-R50-FPN PANet (CVPR'18) 36.6
Faster R-CNN Res-R50-FPN MS R-CNN (CVPR'19) 35.6
Faster R-CNN Res-R50-FPN PointRend (1x CVPR'20) 36.3
Faster R-CNN Res-R50-FPN BCNet (CVPR'21) 38.4
Faster R-CNN Res-R101-FPN Mask R-CNN (ICCV'17) 36.1
Faster R-CNN Res-R101-FPN MS R-CNN (CVPR'19) 38.3
Faster R-CNN Res-R101-FPN BMask R-CNN (ECCV'20) 37.7
Box-free Res-R101-FPN SOLOv2 (NeurIPS'20) 39.7
Faster R-CNN Res-R101-FPN BCNet (CVPR'21) 39.8
Detector(One-stage) Backbone Method mAP(mask)
FCOS Res-R101-FPN BlendMask (CVPR'20) 38.4
FCOS Res-R101-FPN CenterMask (CVPR'20) 38.3
FCOS Res-R101-FPN SipMask (ECCV'20) 37.8
FCOS Res-R101-FPN CondInst (ECCV'20) 39.1
FCOS Res-R101-FPN BCNet (CVPR'21) 39.6, Pretrained Model, Submission File
FCOS Res-X101 FPN BCNet (CVPR'21) 41.2

Introduction

Segmenting highly-overlapping objects is challenging, because typically no distinction is made between real object contours and occlusion boundaries. Unlike previous two-stage instance segmentation methods, BCNet models image formation as composition of two overlapping image layers, where the top GCN layer detects the occluding objects (occluder) and the bottom GCN layer infers partially occluded instance (occludee). The explicit modeling of occlusion relationship with bilayer structure naturally decouples the boundaries of both the occluding and occluded instances, and considers the interaction between them during mask regression. We validate the efficacy of bilayer decoupling on both one-stage and two-stage object detectors with different backbones and network layer choices. The network of BCNet is as follows:

A brief comparison of mask head architectures, see our paper for full details.

Step-by-step Installation

conda create -n bcnet python=3.7 -y
source activate bcnet
 
conda install pytorch==1.4.0 torchvision==0.5.0 cudatoolkit=10.1 -c pytorch
 
# FCOS and coco api and visualization dependencies
pip install ninja yacs cython matplotlib tqdm
pip install opencv-python==4.4.0.40
# Boundary dependency
pip install scikit-image
 
export INSTALL_DIR=$PWD
 
# install pycocotools. Please make sure you have installed cython.
cd $INSTALL_DIR
git clone https://github.com/cocodataset/cocoapi.git
cd cocoapi/PythonAPI
python setup.py build_ext install
 
# install BCNet
cd $INSTALL_DIR
git clone https://github.com/lkeab/BCNet.git
cd BCNet/
python3 setup.py build develop
 
unset INSTALL_DIR

Dataset Preparation

Prepare for coco2017 dataset following this instruction. And use our converted mask annotations to replace original annotation file for bilayer decoupling training.

  mkdir -p datasets/coco
  ln -s /path_to_coco_dataset/annotations datasets/coco/annotations
  ln -s /path_to_coco_dataset/train2017 datasets/coco/train2017
  ln -s /path_to_coco_dataset/test2017 datasets/coco/test2017
  ln -s /path_to_coco_dataset/val2017 datasets/coco/val2017

Multi-GPU Training and evaluation on Validation set

bash all.sh

Or

CUDA_VISIBLE_DEVICES=0,1 python3 tools/train_net.py --num-gpus 2 \
	--config-file configs/fcos/fcos_imprv_R_50_FPN.yaml 2>&1 | tee log/train_log.txt

Pretrained Models

FCOS-version download: link

  mkdir pretrained_models
  #And put the downloaded pretrained models in this directory.

Testing on Test-dev

export PYTHONPATH=$PYTHONPATH:`pwd`
CUDA_VISIBLE_DEVICES=0,1 python3 tools/train_net.py --num-gpus 2 \
	--config-file configs/fcos/fcos_imprv_R_101_FPN.yaml \
	--eval-only MODEL.WEIGHTS ./pretrained_models/xxx.pth 2>&1 | tee log/test_log.txt

Visualization

bash visualize.sh

Reference script for producing bilayer mask annotation:

bash process.sh

The COCO-OCC split:

The COCO-OCC split download: link, which is detailed described in paper.

Citation

If you find BCNet useful in your research or refer to the provided baseline results, please star this repository and consider citing 📝:

@inproceedings{ke2021bcnet,
    author = {Ke, Lei and Tai, Yu-Wing and Tang, Chi-Keung},
    title = {Deep Occlusion-Aware Instance Segmentation with Overlapping BiLayers},
    booktitle = {CVPR},
    year = {2021}
}  

Related high-quality instance segmentation work:

@inproceedings{transfiner,
    author={Ke, Lei and Danelljan, Martin and Li, Xia and Tai, Yu-Wing and Tang, Chi-Keung and Yu, Fisher},
    title={Mask Transfiner for High-Quality Instance Segmentation},
    booktitle = {CVPR},
    year = {2022}
}

Related occlusion handling work:

@inproceedings{ke2021voin,
  author = {Ke, Lei and Tai, Yu-Wing and Tang, Chi-Keung},
  title = {Occlusion-Aware Video Object Inpainting},
  booktitle = {ICCV},
  year = {2021}
}

Related Links

Youtube Video | Poster| Zhihu Reading

Related CVPR 2022 Work on high-quality instance segmentation: Mask Transfiner

Related NeurIPS 2021 Work on multiple object tracking & segmentation: PCAN

Related ECCV 2020 Work on partially supervised instance segmentation: CPMask

License

BCNet is released under the MIT license. See LICENSE for additional details. Thanks to the Third Party Libs detectron2.

Questions

Leave github issues or please contact '[email protected]'

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].