Coder Social home page Coder Social logo

memo / py-msa-kdenlive Goto Github PK

View Code? Open in Web Editor NEW
29.0 2.0 5.0 267 KB

Python script to load a Kdenlive (OSS NLE video editor) project file, and conform the edit on video or numpy arrays.

Home Page: http://www.deepmeditations.ai

License: GNU General Public License v3.0

Python 98.77% Shell 1.23%
deep-learning deep-neural-networks machine-learning generative-adversarial-network generative-model generative-art video-editing video-editor human-computer-interaction

py-msa-kdenlive's Introduction

py-msa-kdenlive

Python script to load a Kdenlive (OSS NLE video editor) project file, and conform the edit on video or numpy arrays.

I used this to create www.deepmeditations.ai (editing video snippets exported from a Generative Adversarial Network, and conforming that edit on numpy arrays of z-sequences).

More information and motivations at https://medium.com/@memoakten/deep-meditations-meaningful-exploration-of-ones-inner-self-576aab2f3894

Paper: https://nips2018creativity.github.io/doc/Deep_Meditations.pdf

Installation

Clone or download the repo, and install dependencies with pip install -r requirements.txt. If I've missed anything (very possible - I extracted this from a much larger set of packages I've been developing and working with) please file an issue. I've only tested this with python 2.7 on Ubuntu, but I think it should work on any OS, and with python 3.x too.

Usage

You can run the python script run.py with the command line arguments:

-k, --kdenlive_prj_path # path to kdenlive project
-n, --track_name # name of track in kdenlive project to use
-i, --input_path # path to input numpy array (e.g. containing z-sequence) or video file
-g, --groundtruth_path # [OPTIONAL] path to ground truth edited array or video file (for checking functionality)
-o, --output_path # path to desired output numpy array containing conformed sequence
-v, --verbose # if 1, dumps entire edit to console (comparing to ground truth if available)

e.g.

python run.py \
    --kdenlive_prj_path "./testdata/test.kdenlive" \
    --track_name "Video 1" \
    --input_path "./testdata/z_orig.npy" \
    --groundtruth_path "./testdata/z_edited.npy" \
    --output_path "z_out.npy" \
    --verbose 0

You can look at the contents of:

  • test_npy.sh and test_video.sh for examples on how to use the script.
  • run.py to see the code on how to use the python API
  • ./msa/kdenlive/kdenlive.py to see the main source and full API.

Citation

Paper to be presented at the 2nd Workshop on Machine Learning for Creativity and Design at the 32nd Conference on Neural Information Processing Systems (NeurIPS) 2018. If you find this useful, please cite the paper:

@article{deepmeditations2018,
  title={Deep Meditations: Controlled navigation of latent space},
  author={Akten, Memo and Fiebrink, Rebecca and Grierson, Mick},
  journal={NeurIPS, Workshop on Machine Learning for Creativity and Design},
  year={2018}
}

py-msa-kdenlive's People

Contributors

memo avatar

Stargazers

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

Watchers

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