Skip to main content

Advanced pipelines for video datasets

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

eyecu-bumblebee-0.4.16.tar.gz (11.6 kB view details)

Uploaded Source

Built Distribution

eyecu_bumblebee-0.4.16-py3-none-any.whl (15.5 kB view details)

Uploaded Python 3

File details

Details for the file eyecu-bumblebee-0.4.16.tar.gz.

File metadata

  • Download URL: eyecu-bumblebee-0.4.16.tar.gz
  • Upload date:
  • Size: 11.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.4 CPython/3.9.0 Windows/10

File hashes

Hashes for eyecu-bumblebee-0.4.16.tar.gz
Algorithm Hash digest
SHA256 5953c9254f2fd1648c31e36bf125f89ac6bc9a21da2ee56d3bb5d83e66988092
MD5 5395da517342f0bbddbbdf77136eee07
BLAKE2b-256 1a370430b36e0049266daa080d2e6aba5e513dce4ce50059f6c9d77485e3a41b

See more details on using hashes here.

File details

Details for the file eyecu_bumblebee-0.4.16-py3-none-any.whl.

File metadata

File hashes

Hashes for eyecu_bumblebee-0.4.16-py3-none-any.whl
Algorithm Hash digest
SHA256 3a289e0442678aeccfb6b507294432fc8ac05bdf999118527278d114b1b445ae
MD5 9ce69f8298d052da4dab17ce22b4459a
BLAKE2b-256 aadd731a2989f7decfa6761de674d4f4fc43778b2cf38d5ca51aa73e559db8a0

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page