Giter Site home page Giter Site logo

otanadzetsotne / vid23d_scallop Goto Github PK

View Code? Open in Web Editor NEW
5.0 1.0 1.0 17 KB

vid23d Scallop transforms 2D video into 3D stereo SBS video using depth estimation and stereo pair generation. Utilizing deep learning and computer vision, it supports frame processing, audio merging, and enhanced visualization.

License: MIT License

Python 100.00%
2d-to-3d 3d 3d-from-images ai depth-image sbs video-processing vr

vid23d_scallop's Introduction

vid23d Scallop

Introduction

vid23d_scallop is a Python application designed to transform 2D video frames into 3D stereo images using depth estimation and stereo pair generation. This project leverages deep learning models for depth perception and computer vision techniques to create enhanced visual experiences.

Features

  • Depth map estimation from 2D images.
  • Generation of stereo image pairs from single frames.
  • Video processing to extract frames and concatenate them back to video format.
  • Audio extraction and merging with processed video.

Prerequisites

Before you begin, ensure you have the following installed:

  • Python 3.8 or higher
  • OpenCV
  • Torch
  • tqdm
  • moviepy
  • matplotlib (optional, for debugging depth maps)

Installation

Clone the repository to your local machine:

git clone https://github.com/yourusername/vid23d_scallop.git
cd vid23d_scallop

Install the required Python libraries:

pip install -r requirements.txt

Usage

Configuring Your Device Edit conf.py to configure the processing device (CPU, CUDA, MPS):

import torch

device = 'cpu'
if torch.backends.mps.is_available():
    device = torch.device('mps')
if torch.cuda.is_available():
    device = torch.device('cuda')

print(f'Using device: {device}', flush=True)

Processing Videos

Use main.py to process videos through the command line. The script supports various operations including frame extraction, depth map creation, and stereo pair generation.

python main.py --input_video path/to/your/video.mp4 --output_dir path/to/output

Depth and Stereo Image Generation

img_depth.py and stereo.py are used internally to generate depth maps and stereo pairs, but can be used standalone for testing and development purposes.

Contributing

Contributions are welcome! Please fork the repository and submit a pull request with your new features or fixes.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgements

Our work uses code from MiDaS. We'd like to thank the authors for making this library available.

vid23d_scallop's People

Contributors

otanadzetsotne avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

roy-bertoli

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.