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
Universal Xiaomi MIoT integration for Home Assistant

Xiaomi MIoT Raw 简体中文 | English MIoT 协议是小米智能家居从 2018 年起推行的智能设备通信协议规范,此后凡是可接入米家的设备均通过此协议进行通信。此插件按照 MIoT 协议规范与设备通信,实现对设备的状态读取及控制。

1.9k Jan 02, 2023
Ansible tools for operating and managing fleets of Blinksticks in harmony using the Blinkstick Python library.

Ansible tools for operating and managing fleets of Blinksticks in harmony using the Blinkstick Python library.

Greg Robinson 3 Aug 10, 2022
🏡 My Home Assistant Configs. Be sure to 🌟 my repo to follow the updates!

Home Assistant Configuration Here's my Home Assistant configuration. I have installed HA on a Lenovo ThinkCentre M93P Tiny with an Intel Dual-Core i5-

iLyas Bakouch 25 Dec 30, 2022
LedFx is a network based LED effect controller with support for advanced real-time audio effects

Welcome to LedFx ✨ -Making music come alive! LedFx website: https://ledfx.app/ What is LedFx? What LedFx offers is the ability to take audio input, an

786 Jan 02, 2023
My 500 LED xmas tree

xmastree2020 This repository contains the code used for Matt's Christmas tree, as featured in "I wired my tree with 500 LED lights and calculated thei

Stand-up Maths 581 Jan 07, 2023
A dashboard for Raspberry Pi to display environmental weather data, rain radar, weather forecast, etc. written in Python

Weather Clock for Raspberry PI This project is a dashboard for Raspberry Pi to display environmental weather data, rain radar, weather forecast, etc.

Markus Geiger 1 May 01, 2022
Playing diabolo with two robot arms in ROS + Gazebo

Playing diabolo with robots This repository holds the ROS packages for playing diabolo with two UR5e robot arms on ROS Melodic (Ubuntu 18.04). Read ou

23 Dec 18, 2022
Raspberry Pi Pico Escape Room game.

Pico Escape Room Raspberry Pi Pico Escape Room game. Parts Raspberry Pi Pico Set of 2 x 20-pin Headers for Raspberry Pi Pico 4PCS Breadboards Kit Incl

Kevin Thomas 5 Feb 02, 2022
Open-Source board for converting RaspberryPI to Brain-computer interface

The easiest way to the neuroscience world with the shield for RaspberryPi - PIEEG (website). Open-source. Crowdsupply This project is the result of se

Ildaron 436 Jan 01, 2023
Programmable Rainbow Redstone Computer

Programmable Rainbow Redstone Computer Table of contents What is it? Program flasher How to use it What is it? PRRC is Programmable Rainbow Redstone C

Fern H 2 Jun 07, 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
ArucoFollow - A script for Robot Operating System and it is a part of a project Robot

ArucoFollow ArucoFollow is a script for Robot Operating System and it is a part

5 Jan 25, 2022
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
A module for cross-platform control of the mouse and keyboard in python that is simple to install and use.

PyUserInput PyUserInput is a group project so we've moved the project over to a group organization: https://github.com/PyUserInput/PyUserInput . That

Paul Barton 1k Dec 27, 2022
ESP32 recording button presses, and serving webpage that graphs the numbers over time.

ESP32-IoT-button-graph-test ESP32 recording button presses, and serving webpage via webSockets in order to graph the responses. The objective was to t

f-caro 1 Nov 30, 2021
Home Assistant component to handle key atom

KeyAtome Home Assistant component to handle key atom, a Linky-compatible device made by Total/Direct-Energie. Installation Either use HACS (default),

18 Dec 21, 2022
Home Assistant custom component to help ev-chargers stay below peak hourly energy levels.

Peaqev ev-charging Peaqev ev-charging is an attempt of charging an ev without breaching a preset monthly max-peak energy level. In order for this inte

Magnus Eldén 35 Dec 24, 2022
Pi-hole with Inky pHAT ePaper display

Pi-hole with Inky pHAT ePaper display This is my Pi-hole with an ePaper display.

11 Sep 13, 2022
Alarm Control Panel component for Zigbee Keypads using action_transaction field

hass_transaction_alarm_panel Alarm Control Panel component for Zigbee Keypads using action_transaction field. Works together with zigbee2mqtt Supporte

Konstantin 4 Jun 09, 2022
CircuitPython Driver for Adafruit 24LC32 I2C EEPROM Breakout 32Kbit / 4 KB

Introduction CircuitPython driver for Adafruit 24LC32 I2C EEPROM Breakout Dependencies This driver depends on: Adafruit CircuitPython Bus Device Regis

foamyguy 0 Dec 20, 2021