Code Monkey home page Code Monkey logo

autotransition's Introduction

AutoTransition: Learning to Recommend Video Transition Effects

This is an official implementation of AutoTransition: Learning to Recommend Video Transition Effects.

Transition Dataset

We release the videos with annotated transitions extracted from the video editing template on online video editing platforms. Due to the privacy policy, we only release the link to the videos. The dataset can be downloaded from here: Download Link

Use the following command to download the source video in the dataset:

python3 tools/download_videos.py annotation.json ./template_download

The videos will be downloaded to ./template_download.

Usage

Prepare Data

To speed up the training, we convert videos to JPEG image and extract audio features before training. Run the following commands to finish these steps:

python3 preprocess/convert_video_folder.py ./path/to/template_root
python3 preprocess/extract_audio_features.py ./path/to/template_root path/to/annotation.json --model_path /path/to/audio/model.pth --cuda

The pretrained Harmonic CNN model could be downloaded from this link.

Train & Test

To train transition embeddings:

python3 tools/run_net.py --cfg configs/base/train_transition_embedding.yaml \
  DATASET.TRANSITION_CLASSIFICATION.JSON_ANNOTATION /path/to/annotation.json \
  DATASET.TRANSITION_CLASSIFICATION.TEMPLATE_ROOT /path/to/template_root

The transition embeddings can be found in ./log directory after training.

To train transition recommendation:

python3 tools/run_net.py --cfg configs/base/train_transition_recommendation.yaml \
  MODEL.TRANSITION_TRANSFORMER.EMBEDDING.PRETRAINED_EMBEDDING /path/to/pretrained/transition/embedding.pth \
  DATASET.TRANSITION_DATASET.JSON_ANNOTATION /path/to/annotation.json \
  DATASET.TRANSITION_DATASET.TEMPLATE_ROOT /path/to/template_root

tensorboard --logdir=./log

autotransition's People

Contributors

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