All Projects → visinf → Acis

visinf / Acis

Licence: apache-2.0
Actor-Critic Instance Segmentation (CVPR 2019)

Programming Languages

lua
6591 projects

Projects that are alternatives of or similar to Acis

Ciff
Cornell Instruction Following Framework
Stars: ✭ 23 (+53.33%)
Mutual labels:  reinforcement-learning
Rainbow Is All You Need
Rainbow is all you need! A step-by-step tutorial from DQN to Rainbow
Stars: ✭ 938 (+6153.33%)
Mutual labels:  reinforcement-learning
Flappybirdrl
Flappy Bird hack using Reinforcement Learning
Stars: ✭ 876 (+5740%)
Mutual labels:  reinforcement-learning
Deeplearning Trader
backtrader with DRL ( Deep Reinforcement Learning)
Stars: ✭ 24 (+60%)
Mutual labels:  reinforcement-learning
Cell Detr
Official and maintained implementation of the paper Attention-Based Transformers for Instance Segmentation of Cells in Microstructures [BIBM 2020].
Stars: ✭ 26 (+73.33%)
Mutual labels:  instance-segmentation
Rl Baselines Zoo
A collection of 100+ pre-trained RL agents using Stable Baselines, training and hyperparameter optimization included.
Stars: ✭ 839 (+5493.33%)
Mutual labels:  reinforcement-learning
Paac.pytorch
Pytorch implementation of the PAAC algorithm presented in Efficient Parallel Methods for Deep Reinforcement Learning https://arxiv.org/abs/1705.04862
Stars: ✭ 22 (+46.67%)
Mutual labels:  reinforcement-learning
Pytorch A3c
PyTorch implementation of Asynchronous Advantage Actor Critic (A3C) from "Asynchronous Methods for Deep Reinforcement Learning".
Stars: ✭ 879 (+5760%)
Mutual labels:  reinforcement-learning
Summary loop
Codebase for the Summary Loop paper at ACL2020
Stars: ✭ 26 (+73.33%)
Mutual labels:  reinforcement-learning
Easy21
Reinforcement Learning Assignment: Easy21
Stars: ✭ 11 (-26.67%)
Mutual labels:  reinforcement-learning
Deepgtav
A plugin for GTAV that transforms it into a vision-based self-driving car research environment.
Stars: ✭ 926 (+6073.33%)
Mutual labels:  reinforcement-learning
Toybox
The Machine Learning Toybox for testing the behavior of autonomous agents.
Stars: ✭ 25 (+66.67%)
Mutual labels:  reinforcement-learning
A3c
MXNET + OpenAI Gym implementation of A3C from "Asynchronous Methods for Deep Reinforcement Learning"
Stars: ✭ 9 (-40%)
Mutual labels:  reinforcement-learning
Unity Ml Environments
This repository features game simulations as machine learning environments to experiment with deep learning approaches such as deep reinforcement learning inside of Unity.
Stars: ✭ 23 (+53.33%)
Mutual labels:  reinforcement-learning
Gym Alttp Gridworld
A gym environment for Stuart Armstrong's model of a treacherous turn.
Stars: ✭ 14 (-6.67%)
Mutual labels:  reinforcement-learning
Advanced Deep Learning With Keras
Advanced Deep Learning with Keras, published by Packt
Stars: ✭ 917 (+6013.33%)
Mutual labels:  reinforcement-learning
Bindsnet
Simulation of spiking neural networks (SNNs) using PyTorch.
Stars: ✭ 837 (+5480%)
Mutual labels:  reinforcement-learning
Evolutionary Algorithm
Evolutionary Algorithm using Python, 莫烦Python 中文AI教学
Stars: ✭ 881 (+5773.33%)
Mutual labels:  reinforcement-learning
Rl algos
Reinforcement Learning Algorithms
Stars: ✭ 14 (-6.67%)
Mutual labels:  reinforcement-learning
Awesome Ai Books
Some awesome AI related books and pdfs for learning and downloading, also apply some playground models for learning
Stars: ✭ 855 (+5600%)
Mutual labels:  reinforcement-learning

Actor-Critic Instance Segmentation

Official implementation of the actor-critic model (Lua Torch) to accompany our paper

Nikita Araslanov, Constantin Rothkopf and Stefan Roth, Actor-Critic Instance Segmentation, CVPR 2019.

Installation

We tested the code with Lua 5.2.4, CUDA 8.0 and cuDNN-5.1 on Ubuntu 16.04.

  • To install Lua Torch, please, follow the official docs
  • CuDNN 5.1 and CUDA 8.0 are available on the the nvidia website
  • Compile the Hungarian algorithm implementation (hungarian.c):
cd <acis>/code && make

Running the code

Training

Training the actor-critic model from scratch consists of four steps:

  1. Training the pre-processing network to predict angle quantisation
  2. Generating augmented data with the official data from the pre-processing network
  3. Pre-training the decoder part of the actor-critic model
  4. Training actor-critic on sequential prediction length

These steps are described in detail for CVPPP dataset next. You can download the dataset from the offical website. For instance segmentation, we use only A1 subset of the dataset, 128 annotated images in total.

The commands referenced below assume <ACIS>/code as the current directory, unless mentioned otherwise.

Training pre-processing network

As described in our paper, the actor-critic model uses angle quantisation [1] and the foreground mask, following Ren & Zemel [2]. The pre-processing network is an FCN and can be trained using main_preproc.lua. A bash script runs/cvppp_preproc.sh contains an example command for training the network. Running

./runs/cvppp_preproc.sh

will create a directory checkpoints/cvppp_preproc, where intermediate checkpoints, validation results and the training progress will be logged.

[1] Uhrig J., Cordts M., Franke U., and Brox T. Pixel-level encoding and depth layering for instance-level semantic labeling. In GCPR, 2016.
[2] Ren M. and Zemel R. End-to-end instance segmentation and counting with recurrent attention. In CVPR, 2017.

Generating augmented data

Instead of keeping the pre-processing net around while training the actor-critic model, we will generate the axiliary data (with augmentation) using the pre-processing net: the angles and the foreground. This will save GPU memory and improve runtime at the expense of some disk space.

./runs/cvppp_preproc_save.sh

The script will iterate through the dataset (300 epochs for CVPPP), each time with random augmentation switched on, such as rotation and flipping. You can change the amount of data generated using parameter -preproc_epoch (see cvppp_preproc_save.sh). By default, you should account for 80GB of generated data (disk space). The data will be saved into data/cvppp/A1_RAW/train/augm and data/cvppp/A1_RAW/val/augm. For the next steps, please, move the augmented data into data/cvppp/A1_AUG/train and data/cvppp/A1_AUG/val/:

mv data/cvppp/A1_RAW/train/augm/* data/cvppp/A1_AUG/train/
mv data/cvppp/A1_RAW/val/augm/* data/cvppp/A1_AUG/val/

Pre-training

The purpose of the pre-training stage is to learn a compact representation for masks (action space). The training is equivalent to Variational Auto-Encoder (VAE), where the reconstruction loss is computed for one target mask. Assuming the augmented data generated in the previous step, run

./runs/cvppp_pretrain.sh

The script will use pretrain_main.lua to create and train the actor model. It will also reduce the learning rate in stages. After the training, the script will create the checkpoints for the decoder, and the encoder trained to predict one mask, both used in the final training step, described next.

Training

main.lua is the entry script to train the actor-critic model on sequential prediction. The logging is realised with crayon. Please, follow this README to set it up.

To train BL-Trunc (baseline with truncated backprop), run

./runs/cvppp_train_btrunc.sh

To train AC (the actor-critic model), run

./runs/cvppp_train_ac.sh

Both scripts will train the respective models stagewise: the trained sequence length will gradually increase (5, 10, 15) while cutting the learning rate. schedules.lua contains the training schedule for both models.

Using trained models for inference

Directory eval/ contains the code to produce the final results for evaluation. Put the pre-trained models of the checkpoint for evaluation into eval/cvppp/models/<MODEL-ID>. Then, run

th cvppp_main.lua -dataIn [DATA-IN] -dataOut [DATA-OUT] -modelIdx <MODEL-ID> 

where the parameters in backets should be replaced with your own values. The script will save the final predictions in [DATA-OUT].

Citation

@inproceedings{Araslanov:2019:ACIS,
  title     = {Actor-Critic Instance Segmentation},
  author    = {Araslanov, Nikita and Rothkopf, Constantin and Roth, Stefan},
  booktitle = {Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR)},
  year = {2019}
}
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].