farukalamai / visionframe

Empower Your Computer Vision Projects with VisionFrame: Seamlessly Handle Video and Image

Home Page:https://pypi.org/project/visionframe/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

VisionFrame

Downloads Downloads Downloads

Empower Your Computer Vision Projects with VisionFrame: Seamlessly Handle Video and Image.

Table of Contents

  1. Installations
  2. Video To Frame

Installations

You can simply use pip to install the latest version of visionframe

pip install visionframe

Video To Frame

To extract frames from videos, simply import the FrameExtractor class from visionframe and create an instance with the desired parameters. Then, call the extract_frames() method:

from visionframe import FrameExtractor

VIDEO_DIR_PATH = "/path/to/videos"
IMAGE_DIR_PATH = "/path/to/images"
FRAME_STRIDE = 1 # every frame in the video will be extracted

frame_extractor = FrameExtractor(video_dir_path=VIDEO_DIR_PATH, image_dir_path=IMAGE_DIR_PATH, frame_stride=FRAME_STRIDE)
frame_extractor.extract_frames()

Replace VIDEO_DIR_PATH with the directory path where your videos are located, IMAGE_DIR_PATH with the directory path where you want to save the extracted frames, and adjust FRAME_STRIDE as needed

About

Empower Your Computer Vision Projects with VisionFrame: Seamlessly Handle Video and Image

https://pypi.org/project/visionframe/

License:MIT License


Languages

Language:Python 100.0%