PyTorch implementation of paper "MT-ORL: Multi-Task Occlusion Relationship Learning" (ICCV 2021)

Related tags

HardwareMT-ORL
Overview

MT-ORL: Multi-Task Occlusion Relationship Learning

Official implementation of paper "MT-ORL: Multi-Task Occlusion Relationship Learning" (ICCV 2021)


Paper: [ICCV2021], [arXiv]

Author: Panhe Feng1,2, Qi She2, Lei Zhu1, Jiaxin Li2, Lin ZHANG2, Zijian Feng2, Changhu Wang2, Chunpeng Li1, Xuejing Kang1, Anlong Ming1

1Beijing University of Posts and Telecommunications, 2ByteDance Inc.

Introduction

Retrieving occlusion relation among objects in a single image is challenging due to sparsity of boundaries in image. We observe two key issues in existing works: firstly, lack of an architecture which can exploit the limited amount of coupling in the decoder stage between the two subtasks, namely occlusion boundary extraction and occlusion orientation prediction, and secondly, improper representation of occlusion orientation. In this paper, we propose a novel architecture called Occlusion-shared and Path-separated Network (OPNet), which solves the first issue by exploiting rich occlusion cues in shared high-level features and structured spatial information in task-specific low-level features. We then design a simple but effective orthogonal occlusion representation (OOR) to tackle the second issue. Our method surpasses the state-of-the-art methods by 6.1%/8.3% Boundary-AP and 6.5%/10% Orientation-AP on standard PIOD/BSDS ownership datasets.

Citation

If you find our work helpful to your research, please cite our paper:

@InProceedings{Feng_2021_ICCV,
    author    = {Feng, Panhe and She, Qi and Zhu, Lei and Li, Jiaxin and Zhang, Lin and Feng, Zijian and Wang, Changhu and Li, Chunpeng and Kang, Xuejing and Ming, Anlong},
    title     = {MT-ORL: Multi-Task Occlusion Relationship Learning},
    booktitle = {Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV)},
    month     = {October},
    year      = {2021},
    pages     = {9364-9373}
}

Environmental Setup

Quick start full script:

conda create -n mtorl python=3.7 -y
conda activate mtorl
conda install pytorch==1.8.0 torchvision==0.9.0 cudatoolkit=11.1 -c pytorch -c conda-forge
conda install imageio h5py

# clone code
git clone https://github.com/fengpanhe/MT-ORL
cd MT-ORL

Data Preparation

You can download two datasets we have processed from here (PIOD.zip and BSDSownership.zip), or follow the documentation of the DOOBNet to prepare two datasets.

Unzip PIOD.zip and BSDSownership.zip to ./data/, the file structure is as followed:

data
├── BSDSownership
│   ├── Augmentation
│   ├── BSDS300
│   ├── testfg
│   ├── test.lst
│   ├── trainfg
│   └── train.lst
├── PIOD
│   ├── Aug_JPEGImages
│   ├── Aug_PngEdgeLabel
│   ├── Aug_PngOriLabel
│   ├── Data
│   ├── test_ids.lst
│   ├── train_ids.lst
│   └── val_doc_2010.txt

Training

Download the Res50 weight file resnet50s-a75c83cf.zip form PyTorch-Encoding, and unzip to ./data/

PASCAL Instance Occlusion Dataset (PIOD)

For training OPNet on PIOD dataset, you can run:

python3 main.py --cuda --amp --epoch 20  --base_lr 0.00003 \
    --dataset piod --dataset_dir data/PIOD \
    --bankbone_pretrain data/resnet50s-a75c83cf.pth \
    --save_dir result/piod_saved

BSDS ownership

For training OPNet on BSDS ownership, you can run:

python3 main.py --cuda --amp --epoch 20 --boundary_lambda 1.1 \
    --dataset bsdsown --dataset_dir data/BSDSownership \
    --base_lr 0.0003 --module_name_scale "{'backbone': 0.1}" \
    --bankbone_pretrain data/resnet50s-a75c83cf.pth \
    --save_dir result/bsdsown_saved

Evaluation

Here we provide the PIOD and the BSDS ownership dataset's evaluation and visualization code in tools/doobscripts folder (this code is modified from DOOBNet/doobscripts).

Matlab is required for evaluation. We have a python script (tools/evaluate/evaluate_occ.py) that calls the matlab evaluation program. you can follow Calling MATLAB from Python to configure matlab for python.

To evaluate PIOD, you can run:

# Evaluate multiple
python tools/evaluate/evaluate_occ.py --dataset PIOD --occ 1 --epochs "5:20:2" --zip-dir result/piod_saved/test_result

# Evaluate one
python tools/evaluate/evaluate_occ.py --dataset PIOD --occ 1 --zipfile result/piod_saved/test_result/epoch_19_test_result.tar

To evaluate BSDSownership, you can run:

# Evaluate multiple
python tools/evaluate/evaluate_occ.py  --dataset BSDSownership --occ 1 --epochs "5:20:2" --zip-dir result/bsdsown_saved/test_result

# Evaluate one
python tools/evaluate/evaluate_occ.py --dataset BSDSownership --occ 1 --zipfile result/bsdsown_saved/test_result/epoch_19_test_result.tar

Trained Models

Here we obtain better performance than those reported in the paper.

Dataset B-ODS B-OIS B-AP O-ODS O-OIS O-AP model test result
PIOD 80.0 80.5 84.3 77.5 77.9 80.8 PIOD_model.pth PIOD_test.tar
BSDS ownership 68.3 71.4 69.0 62.2 65.0 60.9 BSDSown_model.pth BSDSown_test.tar

Acknowledgement

The evaluation code tools/doobscripts is based on DOOBNet/doobscripts. Thanks to the contributors of DOOBNet.

We use the ResNet50 with pretrained from PyTorch-Encoding. Thanks to the contributors of PyTorch-Encoding.

Owner
Panhe Feng
Panhe Feng
Example code to sending USB Gadget multimedia keys via Python

Send Multimedia USB HID Keys via Python As an USB Gadget in Linux This gives a simple script with zero dependencies that can easily run on any Linux d

DevOps Nirvana 2 Jan 02, 2023
It is a serial communicator(controller, receiver...), communicate with sensor LP20 which is a laser ranger.

Intro It is a serial communicator(controller, receiver...), communicate with sensor LP20 which is a laser ranger. Its datasheet is contained in this r

3 Sep 19, 2022
Imbalaced Classification and Robust Semantic Segmentation

Imbalaced Classification and Robust Semantic Segmentation This repo implements two algoritms. The imbalance clibration (IC) algorithm for image classi

24 Jul 23, 2022
Home Assistant custom integration for e-distribución

e-Distribución is an energy distribution company that covers most of South Spain area. If you live in this area, you probably are able to register into their website to get some information about you

VMG 17 Sep 07, 2022
Quasi-static control of the centroid of quadruped robot

Quasi-static control of quadruped robot   This is a demo of the quasi-static controller for the centroid of the quadruped robot. The Quadratic Program

Junwen Cui 21 Dec 12, 2022
Classes and functions for animated text and graphics on an LED display

LEDarcade A collection of classes and functions for animated text and graphics on an Adafruit LED Matrix.

datagod 31 Jan 04, 2023
Cascade Drone Swarm Physical Demonstration Project

Cascade Drone Swarm Physical Demonstration Project Table of Contents About The Project Built With Getting Started Prerequisites Installation About The

3 Aug 24, 2022
Red Light Green Light Robot

Red Light Green Light Robot The primary problem addressed by our project is robotic follower behavior i.e. maintaining distance from a moving target.

Will Romano 2 Nov 20, 2021
A Python program that makes it easy to manage modules on a CircuitPython device!

CircuitPython-Bundle-Manager-v2 A Python program that makes it easy to manage modules on a CircuitPython device! The CircuitPython Bundle Manager v2 i

Ckyiu 1 Dec 18, 2021
Hook and simulate global keyboard events on Windows and Linux.

keyboard Take full control of your keyboard with this small Python library. Hook global events, register hotkeys, simulate key presses and much more.

BoppreH 3.2k Dec 30, 2022
Tools and documentation to aid in modifying the ADI ADALM Pluto firmware

Pluto firmware modifications This repository contains tools and documentation to aid in modifying the ADI ADALM Pluto firmware. Extraction of the Plut

Daniel Estévez 28 Dec 21, 2022
Example Python code for building RPi-controlled robotic systems

RPi Example Code Example Python code for building RPi-controlled robotic systems These python files have been compiled / developed by the Neurobionics

Elliott Rouse 2 Feb 04, 2022
This Home Assistant custom component adding support for controlling Midea dehumidifiers on local network.

This custom component for Home Assistant adds support for Midea air conditioner and dehumidifier appliances via the local area network. homeassistant-

Nenad Bogojevic 92 Dec 31, 2022
BMP180 sensor driver for Home Assistant used in Raspberry Pi

BMP180 sensor driver for Home Assistant used in Raspberry Pi Custom component BMP180 sensor for Home Assistant. Copy the content of this directory to

747Developments 1 Dec 17, 2021
Raspberry Pi Pico as a Rubber Ducky

Raspberry-Pi-Pico-as-a-Rubber-Ducky Kurulum Raspberry Pi Pico cihazınız için CircuitPython'u indirin. Boot düğmesine basılı tutarken cihazı bir USB ba

Furkan Enes POLATOĞLU 6 Dec 13, 2022
Python library to interact with the GCE Electronics IPX800 device

A python library to control a GCE-Electronics IPX800 V4 device through its API.

Marc-Aurèle Brothier 2 Oct 20, 2021
An alternative to Demise-Assistant-Batch made entirely in Python for more capabilities.

Demise-Assistant-Python An alternative to Demise-Assistant-Batch made entirely in Python for more capabilities. IMPORTANT NOTE Demise-Assistant-Batch

SkelOrganisation 1 Nov 24, 2021
Homeautomation system created with Raspberry Pi 3 and Firebase.

Homeautomation System - Raspberry Pi 3 Desenvolvido com Python, Flask com AJAX e Firebase permite o controle local e remoto Itens necessários Raspberr

Joselino Santos 0 Mar 09, 2022
An embedded application for toy-car controlling based on Raspberry Pi 3 Model B and AlphaBot2-Pi.

An embedded application for toy-car controlling based on Raspberry Pi 3 Model B and AlphaBot2-Pi. This is the source codes of my programming assignmen

StardustDL 4 Oct 19, 2022
Modeling and Simulation of Satellite Servicing Manipulators

Modeling and Simulation of Satellite Servicing Manipulators Final Project for the course ENPM662: Introduction to Robot Modeling (Fall 2021). This pro

Adarsh M 1 Jan 24, 2022