Giter VIP home page Giter VIP logo

bumblebee's Introduction

Bumblebee

PyPI Downloads
Bumblebee image

Bumblebee provides high level components to construct training pipelines for videos conveniently.

Install

pip install eyecu_bumblebee

Motivation

Everything should be made as simple as possible, but no simpler. - Albert Einstein

Our Websites

EyeCU Vision
EyeCU Future

Examples

A pipeline with basic elements

from bumblebee import *


if __name__ == "__main__":
    
    video_path = "/path/to/video.mp4"

    # Create a source
    file_stream = sources.FileStream(video_path)

    # Add an effect
    goto = effects.GoTo(file_stream)

    END_OF_VIDEO = file_stream.get_duration()
    goto(END_OF_VIDEO)

    # Create a dataset
    single_frame = datasets.Single(file_stream)

    last_frame = single_frame.read()

Using Manager API

from bumblebee import *


if __name__ == "__main__":
    
    # Create a training manager
    manager = managers.BinaryClassification(
        ["path/to/video_dir","path/to/another_dir"],
        ["path/to/labels"]
    )

    number_of_epochs = 300
    
    for epoch,(frame_no,frame,prob) in manager(number_of_epochs):
        # Use data stuff
        ...    

Read limited section of video

from bumblebee import *


if __name__ == "__main__":
  
    video_path = "/path/to/video.mp4"
    start_frame = 35
    end_frame = 40
    
    file_stream = sources.FileStream(video_path)
    
    limited_stream = effects.Start(file_stream,start_frame)
    limited_stream = effects.End(limited_stream,end_frame)

    single_frame = datasets.Single(file_stream)

    for frame in single_frame:
        ...  

Iterate frames with frame numbers

from bumblebee import *


if __name__ == "__main__":
  
    video_path = "/path/to/video.mp4"
    
    file_stream = sources.FileStream(video_path)
    
    single_frame = datasets.Single(file_stream)
    current_frame = effects.CurrentFrame(file_stream)
    
    
    for frame_ind,frame in zip(current_frame,single_frame):
        ...  

Iterate frames in batches

from bumblebee import *


if __name__ == "__main__":
  
    video_path = "/path/to/video.mp4"
    batch_size = 64
    
    file_stream = sources.FileStream(video_path)
    
    batch = datasets.Batch(file_stream, batch_size=batch_size)
    
    for frames in batch:
        ...  

Team

This project is currently developed and maintained by ovuruska.

License

Bumblebee has MIT license. You can find further details in LICENSE.

bumblebee's People

Contributors

ovuruska avatar

Stargazers

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