Skip to content
No description, website, or topics provided.
Lua
Branch: master
Clone or download
Roozbeh Mottaghi
Roozbeh Mottaghi changed the license
Latest commit 2717350 Feb 1, 2017
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
io
layers Adding RNN layer Jul 27, 2016
models Release code Jul 27, 2016
networks Release code Jul 27, 2016
LICENSE
README.md changed the license Feb 1, 2017
data.lua Release code Jul 27, 2016
main.lua Release code Jul 27, 2016
scene_gen.blend Release code Jul 27, 2016
setting_options.lua Release code Jul 27, 2016
train_functions.lua Release code Jul 27, 2016
utils.lua Release code Jul 27, 2016

README.md

"What happens if..." Learning to Predict the Effect of Forces in Images

This is the source code for a deep net that predicts the effect of applying a force to an object shown in a static image.

Citation

If you find the code useful in your research, please consider citing:

@inproceedings{mottaghiECCV16,
    Author = {Roozbeh Mottaghi and Mohammad Rastegari and Abhinav Gupta and Ali Farhadi},
    Title = {``What happens if..." Learning to Predict the Effect of Forces in Images},
    Booktitle = {ECCV},
    Year = {2016}
}

Requirements

This code is written in Lua, based on Torch. If you use Ubuntu 14.04+, you can follow these instructions to install torch.

You need to download the ForScene dataset (2GB). Extract the files and set the correct paths in setting_options.lua.

Training

To train the model, run:

th main.lua train

Test

Set the path to the learned model in setting_options.lua (config.initModelPath.fullNN). You also need to set the number of batches config.nIter and the batch size config.batchSize. To evaluate the model, run:

th main.lua test

Our released files contain a pre-trained model Model_iter_15000.t7, which is a model trained using AlexNet and object masks (no depth). You can set the path to this file and run a test to make sure you can re-produce the result (16.5% accuracy) in the paper.

Simulations

We have also provided the code for generating the simulations. You need to load scene_gen.blend in Blender game engine. It saves the initial and final pose of the objects in initial and final directories, respectively.

License

This code is released under Apache 2.0 license.

You can’t perform that action at this time.