All Projects → ehsanik → Dogtorch

ehsanik / Dogtorch

Licence: mit
Who Let The Dogs Out? Modeling Dog Behavior From Visual Data https://arxiv.org/pdf/1803.10827.pdf

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Dogtorch

Deterministic Gail Pytorch
PyTorch implementation of Deterministic Generative Adversarial Imitation Learning (GAIL) for Off Policy learning
Stars: ✭ 44 (-33.33%)
Mutual labels:  imitation-learning
Usss iccv19
Code for Universal Semi-Supervised Semantic Segmentation models paper accepted in ICCV 2019
Stars: ✭ 57 (-13.64%)
Mutual labels:  representation-learning
Predrnn Pytorch
Official implementation for NIPS'17 paper: PredRNN: Recurrent Neural Networks for Predictive Learning Using Spatiotemporal LSTMs.
Stars: ✭ 59 (-10.61%)
Mutual labels:  recurrent-neural-networks
Gat2vec
representation learning on attributed graphs
Stars: ✭ 48 (-27.27%)
Mutual labels:  representation-learning
Image Captioning
Image Captioning: Implementing the Neural Image Caption Generator with python
Stars: ✭ 52 (-21.21%)
Mutual labels:  recurrent-neural-networks
Imitation Learning Dagger Torcs
A Simple Example for Imitation Learning with Dataset Aggregation (DAGGER) on Torcs Env
Stars: ✭ 60 (-9.09%)
Mutual labels:  imitation-learning
Predicting Myers Briggs Type Indicator With Recurrent Neural Networks
Stars: ✭ 43 (-34.85%)
Mutual labels:  recurrent-neural-networks
Chicksexer
A Python package for gender classification.
Stars: ✭ 64 (-3.03%)
Mutual labels:  recurrent-neural-networks
Simplehtr
Handwritten Text Recognition (HTR) system implemented with TensorFlow.
Stars: ✭ 1,072 (+1524.24%)
Mutual labels:  recurrent-neural-networks
Gdax Orderbook Ml
Application of machine learning to the Coinbase (GDAX) orderbook
Stars: ✭ 60 (-9.09%)
Mutual labels:  recurrent-neural-networks
Tensorflow Cnn Time Series
Feeding images of time series to Conv Nets! (Tensorflow + Keras)
Stars: ✭ 49 (-25.76%)
Mutual labels:  recurrent-neural-networks
Tensorflow Lstm Sin
TensorFlow 1.3 experiment with LSTM (and GRU) RNNs for sine prediction
Stars: ✭ 52 (-21.21%)
Mutual labels:  recurrent-neural-networks
Imitation Learning
Autonomous driving: Tensorflow implementation of the paper "End-to-end Driving via Conditional Imitation Learning"
Stars: ✭ 60 (-9.09%)
Mutual labels:  imitation-learning
Ml In Tf
Get started with Machine Learning in TensorFlow with a selection of good reads and implemented examples!
Stars: ✭ 45 (-31.82%)
Mutual labels:  recurrent-neural-networks
Codeslam
Implementation of CodeSLAM — Learning a Compact, Optimisable Representation for Dense Visual SLAM paper (https://arxiv.org/pdf/1804.00874.pdf)
Stars: ✭ 64 (-3.03%)
Mutual labels:  representation-learning
Sangita
A Natural Language Toolkit for Indian Languages
Stars: ✭ 43 (-34.85%)
Mutual labels:  recurrent-neural-networks
Pgdrive
PGDrive: an open-ended driving simulator with infinite scenes from procedural generation
Stars: ✭ 60 (-9.09%)
Mutual labels:  imitation-learning
Dna Gan
DNA-GAN: Learning Disentangled Representations from Multi-Attribute Images
Stars: ✭ 65 (-1.52%)
Mutual labels:  representation-learning
Rcnn Relation Extraction
Tensorflow Implementation of Recurrent Convolutional Neural Network for Relation Extraction
Stars: ✭ 64 (-3.03%)
Mutual labels:  recurrent-neural-networks
Sentiment Analysis Nltk Ml Lstm
Sentiment Analysis on the First Republic Party debate in 2016 based on Python,NLTK and ML.
Stars: ✭ 61 (-7.58%)
Mutual labels:  recurrent-neural-networks

Who Let The Dogs Out? Modeling Dog Behavior From Visual Data

By Kiana Ehsani, Hessam Bagherinezhad, Joseph Redmon, Roozbeh Mottaghi, and Ali Farhadi

Abstract

Dogs are intelligent. Let's learn from them! We introduce DECADE, a dataset of ego-centric videos from a dog’s perspective as well as her corresponding movements. In this paper we propose a model that can

  1. Learn to act like a dog (predicting the dog’s future moves),
  2. Learn to plan like a dog (estimating a sequence of movements that take the state of the dog’s world from what is observed at a given time to a desired observed state),
  3. Learn from a dog (exploring the potentials of using the dog's movements for representation learning).

This project is presented as poster in CVPR'18.

Citing This Work

If you find this project useful in your research, please consider citing:

@inproceedings{ehsani2018dog,
    author = {Ehsani, Kiana and Bagherinezhad, Hessam and Redmon, Joseph and Mottaghi, Roozbeh and Farhadi, Ali},
    title = {Who Let The Dogs Out? Modeling Dog Behavior From Visual Data},
    booktitle = {CVPR},	    
    year = {2018}
}

Dataset

We introduce DECADE, a dataset of ego-centric dog video and joint movements. The dataset includes 380 video clips from a camera mounted on the dog’s head. It also includes corresponding information about body position and movement. Overall we have 24500 frames. We use 21000 of them for training, 1500 for validation, and 2000 for testing. Train, validation, and test splits consist of disjoint video clips.

We use a GoPro camera on the dog’s head to capture the ego-centric videos and sub-sample frames at the rate of 5 fps. An Arduino on the dog’s back connects to the IMUs and records the positional information. It also collects audio data via a microphone mounted on the dog’s back. We synchronize the GoPro with the IMU measurements using audio information.

The dataset can be downloaded from here.

Running the code

Requirements

This source code is implemented using PyTorch framework (v.0.2.0_3). For installing the framework and its prerequisites visit PyTorch official website.

Installation

  1. Clone the repository using the command

     git clone https://github.com/ehsanik/dogTorch
     cd dogTorch
    
  2. Download the dataset from here and unzip it.

  3. Make a link to the dataset.

     ln -s /PATH/TO/DATASET data
    
  4. Download the pretrained weights from here and unzip it.

Acting like a dog

We predict how the dog acts in the visual world in response to various situations. Specifically, we model the future actions of the dog given a sequence of previously seen images. To reproduce the results in the paper:

Model Test Accuracy Perplexity Angular metric All joints
CNN (Baseline) 19.84 0.2171 63.42 8.67
Ours 21.62 0.2514 59.61 9.49
  1. To test the network using pretrained models:

     python3 main.py --arch LstmImg2LastImus --read_features --input_length 5 --sequence_length 10 --output_length 5 --dataset DogClipDataset --features_dir data/new_features --use_test_for_val test --reload /PATH/TO/WEIGHTS/lstm-pred-5-to-5.pytar --image_feature 1024
    
  2. To train the network:

     python3 main.py --arch LstmImg2LastImus --read_features --input_length 5 --sequence_length 10 --output_length 5 --dataset DogClipDataset --features_dir data/new_features --image_feature 1024
    

Planning like a dog

In this part we model how dogs plan actions to accomplish a task. To achieve this, we design a task as follows: Given a pair of non-consecutive image frames, plan a sequence of joint movements that the dog would take to get from the first frame (starting state) to the second frame (ending state). To reproduce the results in the paper:

Model Test Accuracy Perplexity Angular metric All joints
CNN(Baseline) 14.61 0.1419 76.18 0.14
Ours 19.77 0.2362 63.14 3.66
  1. To test the network using pretrained models:

     python3 main.py --arch LstmImg2ActionPlanning --read_features --planning_distance 5 --sequence_length 7 --output_length 5 --features_dir data/new_features --single_image_feature --image_feature 512 --use_test_for_val test --reload /PATH/TO/WEIGHTS/lstm-plan-5.pytar
    
  2. To train the network:

     python3 main.py --arch LstmImg2ActionPlanning --read_features --planning_distance 5 --sequence_length 7 --output_length 5 --features_dir data/new_features --single_image_feature --image_feature 512 
    

Learning from a dog

To obtain the representation, we train a ResNet-18 model to estimate the dog movements from time t − 1 to time t by looking at the images at time t − 1 and t. We use a simple Siamese network with two ResNet-18 towers whose weights are shared.

To test the network:

python3 main.py test --arch FullyConvolutional --output_length 1 --sequence_length 1 --dataset NyuDataset --data data/nyu --no-strict --reload cnn_5_5_best_features.pytar --use_test_for_val --reload /PATH/TO/WEIGHTS/walkable.pytar

Press Coverage

       

       

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].