Advanced pipelines for video datasets
Project description
Bumblebee
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
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
Release history Release notifications | RSS feed
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.5.4.tar.gz
(11.8 kB
view details)
Built Distribution
File details
Details for the file eyecu-bumblebee-0.5.4.tar.gz
.
File metadata
- Download URL: eyecu-bumblebee-0.5.4.tar.gz
- Upload date:
- Size: 11.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.4 CPython/3.9.0 Windows/10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 83c805f2dfc018f5f315d62d6a1066265ee5008f8d6025020d7b7b8d410a26ec |
|
MD5 | 99771681897d40eb6856c4f919ef1570 |
|
BLAKE2b-256 | c0c0e88f193e1c9d5da50969bab730db03ee717f426a82b33a3e168156866e0f |
File details
Details for the file eyecu_bumblebee-0.5.4-py3-none-any.whl
.
File metadata
- Download URL: eyecu_bumblebee-0.5.4-py3-none-any.whl
- Upload date:
- Size: 15.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.4 CPython/3.9.0 Windows/10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 075f1725de3c6e8e499caeb3434ef7eae74bb6bef7be436f5431fcd97024dd66 |
|
MD5 | 66fe4eacef8b4f2a832833d71c460721 |
|
BLAKE2b-256 | 38b51b185fdd273b5923486c0d4d9850ae87a9264319521e494438588e6fd4c9 |