Coder Social home page Coder Social logo

silvialaurapintea / dejavu Goto Github PK

View Code? Open in Web Editor NEW
17.0 1.0 8.0 28.2 MB

C++ implementation of the experiments from "Deja vu: Motion Prediction in Static Images", SL Pintea, JC van Gemert, and AWM Smeulders, ECCV 2014.

Home Page: https://staff.fnwi.uva.nl/s.l.pintea/dejavu/

License: GNU General Public License v2.0

C++ 97.84% C 0.57% Python 0.98% CMake 0.53% Makefile 0.08%

dejavu's Introduction

DejaVu: Motion Prediction in Static Images

Official implementation of the DejaVu: "DejaVu: Motion Prediction in Static Images", Silvia L.Pintea, Jan C. van Gemert, Arnold WM Smeulders, European Conference on Computer Vision (ECCV), 2014. (archive link )

This work proposes motion prediction in single still images by learning it from a set of videos. The building assumption is that similar motion is characterized by similar appearance. The proposed method learns local motion patterns given a specific appearance and adds the predicted motion in a number of applications. This work (i) introduces a novel method to predict motion from appearance in a single static image, (ii) to that end, extends of the Structured Random Forest with regression derived from first principles, and (iii) shows the value of adding motion predictions in different tasks such as: weak frame-proposals containing unexpected events, action recognition, motion saliency. Illustrative results indicate that motion prediction is not only feasible, but also provides valuable information for a number of applications.

Requirements

The code was tested on Linux (Ubuntu 14.04 LTS):

  • OpenCV2.4.+,
  • vlfeat-0.9.16,
  • dlib-18.7
  • Boost.

Buiding the code

Edit the bin/CMakeLists.txt with the correct path towards the sources directory.

cmake CMakeLists.txt
make

Organization:

This code is organized as follows:

src/                                	    -- All C++ sources of the project
        helpers/                    	    -- Auxiliary functionality
        	Auxiliary.cpp/.h    	    -- Printing, matrix operations
        	SIFTlik.cpp/.h      	    -- Descriptor extraction
   		Tree.cpp/.h	    	    -- Builds the tree structure
	motionRF/			    -- All files that implement the motion trees
		MotionPatch.cpp/h   	    -- Defines the motion patch
		MotionPatchFeature.cpp/h    -- Extracts features from patches
		MotionPuzzle.cpp/h          -- Merges the predicted motions
		MotionRF.cpp/h		    -- Trains decision trees
		MotionRFdetector.cpp/h      -- Used at inference time
		MotionTree.cpp/h	    -- Tree utilities
		MotionTreeNode.cpp/h 	    -- Utilities for the tree nodes
		RunMotionRF.cpp/h           -- Combines everything together 
		evaluation
			MotionEval.cpp/.h   -- Evaluates motion predictions
	structuredRF/
		Puzzle.cpp/h 		    -- Combines labelings
		StructuredPatch.cpp/h       -- Defines the motion patch
		StructuredRF.cpp/h	    -- Trains structured decision tree
		StructuredRFdetector.cpp/h  -- Used at inference time
		StructuredTree.cpp/h	    -- Structured tree utilities
		StructuredTreeNode.cpp/h    -- Utilities for the structured tree nodes
		RunRF.cpp/h 		    -- Combines everything together
		evaluation
			LabelEval.cpp/.h    -- Evaluates structured predictions
motionMain.cpp 				    -- The main call for the motion predictions
structuredMain.cpp 			    -- The main call for structured predictions

Third party software:

third                   
	forest -- Implements Gall J. and Lempitsky V., "Class-Specific Hough Forests for Object Detection", (CVPR'09).
	sintel -- For optical flow reading from https://github.com/dscharstein/imageLib (C++ image library by Rick Szeliski and Daniel Scharstein, evolved from StereoMatcher code)

All credit for third party sofware is with the authors.

Usage

Edit the config file with the corresponding paths towards data (see bin/config_example.txt):

  • Usage: ./dejavu [what] [mode] [config.txt]

  • [what]: 0 - motion; 1 - motion evaluation

[mode (0)]: 0 - train; 1 - test; 2 - train & test; 3 - extract; 4 - extract flow (only Motion); 5 - train with jobrunners; 6 - test with jobrunners; 7 - extract OF with jobrunners

[mode (1)]: 0 - segmentation error, 1 - motion error, 2 - raw values for python, 3 - all.

[mode (2)]: generate config files

Citation

If you use this code, please cite the publication:

@inproceedings{pintea2014deja,
  title={D{\'e}ja vu: Motion prediction in static images},
  author={Pintea, Silvia L and Gemert, Jan C van and Smeulders, Arnold WM},
  booktitle={European Conference on Computer Vision},
  pages={172--187},
  year={2014},
  organization={Springer}
}

dejavu's People

Contributors

silvialaurapintea avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.