Git Product home page Git Product logo

ais-bonn / ocvp-object-centric-video-prediction Goto Github PK

View Code? Open in Web Editor NEW
13.0 8.0 1.0 3.08 MB

Official implementation of: "Object-Centric Video Prediction via Decoupling of Object Dynamics and Interactions" by Villar-Corrales et al. ICIP 2023

Home Page: https://sites.google.com/view/ocvp-vp

Python 99.73% Shell 0.27%
transformers unsupervised-learning video-prediction object-centric-learning object-centric-video-prediction

ocvp-object-centric-video-prediction's Introduction

Object-Centric Video Prediction via Decoupling
of Object Dynamics and Interactions

    

Official implementation of: Object-Centric Video Prediction via Decoupling of Object Dynamics and Interactions by Villar-Corrales et al. ICIP 2023. [Paper] [Project Page]

Installation

We refer to docs/INSTALL.md for detailed installation and preparation instructions.

Training

We refer to docs/TRAIN.md for detailed instructions for training your own Object-Centric Video Decomposition model. Additonally, we report the required training time for both the SAVi scene decomposition, as well as the OCVP-Seq predictor module.

Evaluation and Figure Generation

To reproduce the results provided in our paper, you can download our pretrained models, including checkpoints for the SAVi decomposition and prediction modules, by running the download_pretrained bash script:

chmod +x download_pretrained.sh
./download_pretrained.sh

Evaluate SAVi for Image Decomposition

You can evaluate a SAVi video decomposition model using the src/03_evaluate_savi_noMasks.py and src/03_evaluate_savi.py scripts. The former measures the quality of the reconstructed frames, whereas the latter measures the fidelity of the object masks.

Example:

python src/03_evaluate_savi_noMasks.py \
  -d experiments/MOViA/ \
  --checkpoint savi_movia.pth

python src/03_evaluate_savi.py \
  -d experiments/MOViA/ \
  --checkpoint savi_movia.pth

Evaluate Object-Centric Video Prediction

To evaluate an object-centric video predictor module (i.e. LSTM, Transformer, OCVP-Seq or OCVP-Par), you can use the src/05_evaluate_predictor.py script.

usage: 05_evaluate_predictor.py [-h] -d EXP_DIRECTORY -m SAVI_MODEL --name_predictor_experiment NAME_PREDICTOR_EXPERIMENT --checkpoint CHECKPOINT [--num_preds NUM_PREDS]

arguments:
  -d EXP_DIRECTORY, --exp_directory EXP_DIRECTORY
                        Path to the father exp. directory
  -m SAVI_MODEL, --savi_model SAVI_MODEL
                        Name of the SAVi checkpoint to load
  --name_predictor_experiment NAME_PREDICTOR_EXPERIMENT
                        Name to the directory inside the exp_directory corresponding to a predictor experiment.
  --checkpoint CHECKPOINT
                        Checkpoint with predictor pre-trained parameters to load for evaluation
  --num_preds NUM_PREDS
                        Number of rollout frames to predict for

Example 1: Reproduce LSTM predictor results on the Obj3D dataset:

python src/05_evaluate_predictor.py \
  -d experiments/Obj3D/ \
  --savi_model savi_obj3d.pth \
  --name_predictor_experiment Predictor_LSTM \
  --checkpoint lstm_obj3d.pth \
  --num_preds 25

Example 2: Reproduce OCVP-Seq predictor results on the MOVi-A dataset:

python src/05_evaluate_predictor.py \
  -d experiments/MOViA/ \
  --savi_model savi_movia.pth \
  --name_predictor_experiment Predictor_OCVPSeq \
  --checkpoint OCVPSeq_movia.pth \
  --num_preds 18

Generate Figures and Animations

To generate video prediction, object prediction and segmentation figures and animations, you can use the src/06_generate_figs_pred.py script.

Example:

python src/06_generate_figs_pred.py \
  -d experiments/Obj3D/ \
  --savi_model savi_obj3d.pth \
  --name_predictor_experiment Predictor_OCVPSeq \
  --checkpoint OCVPSeq_obj3d.pth \
  --num_seqs 10 \
  --num_preds 25

Acknowledgement

Our work is inspired and uses resources from the following repositories:

Contact and Citation

This repository is maintained by Angel Villar-Corrales.

Please consider citing our paper if you find our work or our repository helpful.

@inproceedings{villar_ObjectCentricVideoPrediction_2023,
  title={Object-Centric Video Prediction via Decoupling of Object Dynamics and Interactions},
  author={Villar-Corrales, Angel and Wahdan, Ismail and Behnke, Sven},
  booktitle={Internation Conference on Image Processing (ICIP)},
  year={2023}
}

In case of any questions or problems regarding the project or repository, do not hesitate to contact the authors at [email protected].

ocvp-object-centric-video-prediction's People

Contributors

angelvillar96 avatar ewertzjn avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

ewertzjn

ocvp-object-centric-video-prediction's Issues

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.