Giter VIP home page Giter VIP logo

slytest02's Introduction

Overview

The repo contains the script, which creates a video from sequences from DAVIS dataset.
Note: the script requires the DAVIS dataset to be present in the directory where the script will be launched.
The script uses base images from the JPEGImages directory and annotation images from Annotations to create an example video with annotation visualization. The script is using cv2 and numpy. In addition, the repo contains a simple logger, which uses Python's built-in logging module, and writes logs both to the file and stdout. The log_handler module also contains a decorator for measuring the runtime of the functions.

Get started

The script is designed to be launched from the command line with different arguments.

Example of splitting the image: python3 create_video.py --output_path path/to/file.mp4 --sets_number 3
Where both arguments are required: output path to the result file, and a number of sets which will be used to create the video.

Asciinema examples

Creating a video:
asciicast

Report

I started the approach to the solution by understanding how images in the Annotations directory are storing useful data. It takes some time and several tries, since I started to solve the problem with incorrect tools (I tried to handle images as masks with cv2.bitwise_and and the result was far from expected), which leads me to errors, trying and researching. After this problem was solved just with simple image blending, the rest part of the task didn't provide complex challenges. The easiest way was to handle each frame of the resulting video, pack it into the list and then create a video frame by frame. Since I already completed the first test task, I was able to re-use my code and copy-pasted the logger and argparser.

slytest02's People

Contributors

iwatkot avatar

Watchers

 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.