Git Product home page Git Product logo

single-video-curation-svd's Introduction

single-video-curation-svd

Educational repository for applying the main video data curation techniques presented in the Stable Video Diffusion paper. The goal is to provide an interactive resource for the community dig deeper into the curation techniques presented in the paper. As such, it doesn't guarantee precise correctness.

The curation techniques used in this repository are discussed in Appendix C of the paper, in detail. These include:

  • Cascaded Cut Detection
  • Keyframe-Aware Clipping
  • Optical Flow
  • Synthetic Captioning
  • Caption similarities and Aesthetics
  • Text Detection

The notebooks present these techniques on a single video file sourced from the UCF-101 dataset.

Video CoCa Caption V-BLIP Caption Zephyr-7B Caption
a group of men playing basketball on a court . the basketball player dribbles to the basket A basketball player in a group of men dribbles towards the basket on a court.

Readers are advised to first go through Appendix C of the Stable Video Diffusion paper before referring to the notebooks.

Setup

Below are the primary dependencies:

  • PyTorch (follow the installation instructions from the official site)
  • transformers
  • opencv-python
  • numpy
  • ffmpeg

Other dependencies will be detailed below.

Notebooks (should be run in order)

Clip extraction

Refer to the video_preprocessing_clip_extraction.ipynb notebook for this. You'd need to install the scenedetect library from here: https://github.com/Breakthrough/PySceneDetect. This shows both cascaded cut detection and keyframe-aware clipping. At the end of the notebook, you should expect to see different clips extracted from the provided video.

Captioning

video_preprocessing_captioning.ipynb presents synthetic captioning from a single video clip.

This uses three models:

  • CoCa (relies on open_clip)
  • V-BLIP (relies on EILEV)
  • Zephyr-7B (relies on transformers)

We had to apply some corrections to eilev to make it work. The correction patch can be found here.

Optical Flow

video_preprocessing_optical_flow_score.ipynb notebook shows the optical flow score computation only using the Farneback algorithm. It doesn't, however, show RAFT.

Caption similarities and Aesthetics

This is straightforward and is implemented in the video_preprocessing_similarity_aesthetics.ipynb notebook.

Text Detection

Refer to the video_preprocessing_text_detection.ipynb notebook for this. We use a wrapper library called craft_text_detector (repository) for this as it provides a handy package around the CRAFT text detection model. However, to make it work, we had to do some changes. The patch can be found here.

Acknowledgements

Thanks to ChatGPT for all the help.

Thanks to Dhruv Nair for his reviews.

single-video-curation-svd's People

Contributors

sayakpaul avatar

Stargazers

Abigail avatar jibin86 avatar  avatar Yilun Huang avatar  avatar Yuhao Zhou avatar Ye Yang avatar moon_river avatar  avatar Kimbing Ng avatar Jing Zhang avatar Samit avatar  avatar Zeyuan Chen avatar Jay Z. Wu avatar Yuchao Gu avatar  avatar huan ling avatar Patrick Kwon avatar Jeff Carpenter avatar  avatar ZhangZhengfu avatar Aneesh Dighe avatar Vikram Dutt avatar Junsong Chen avatar Suhas G avatar  avatar  avatar Jhin avatar Zhuorui Ye avatar  avatar Christian J. Mills avatar DoubleXING avatar Kamil Sindi avatar  avatar  avatar  avatar Shreyas Dixit avatar  avatar Tolga Cangöz avatar takuoko avatar Liu Gongye avatar Brian Spendolini avatar Onkar Nath Mishra avatar Jiwung Hyun avatar  avatar anilsathyan avatar 爱可可-爱生活 avatar  avatar Sayan Nath avatar Shreyas Jaiswal avatar Ayan Das avatar Diogo Santiago avatar Antonio Rueda-Toicen avatar MOHAMMAD ALBARHAM avatar  avatar  avatar Jianyi Wang avatar Haoge Deng avatar Aditya Ganesh Kumar avatar Ray Wang avatar Wang Qiang avatar YANHONG ZENG avatar alleniver avatar Kartikey Rawat avatar Paragoner avatar shuvam mandal avatar Ramesh avatar Juan Guillermo Gómez Torres, MSc avatar Raoni Meira Gabriel avatar Muhammad Anas Raza avatar Adithya Kamath avatar David Cardozo avatar Jeff Araujo avatar Margaret Maynard-Reid avatar Hakan Taştan avatar Suraj Parmar avatar Bilal Aamer avatar

Watchers

Dhruv Nair avatar  avatar Tolga Cangöz avatar

single-video-curation-svd'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.