SVLM Utils
SVLM Utils - Video and Image Processing Utilities for SVECTOR Video Language Model (SVLM)
Installation
pip install svlm-utils
Quick Start
from svlm_utils import process_vision_info, fetch_image, fetch_video
# Process messages with images/videos
messages = [
{
"role": "user",
"content": [
{"type": "text", "text": "Describe this video"},
{"type": "video", "video": "path/to/video.mp4", "max_fps": 8},
],
}
]
images, videos, video_kwargs = process_vision_info(messages)
Features
- 🎬 Video Processing: Load and sample video frames with configurable FPS
- 🖼️ Image Processing: Fetch images from URLs, base64, or local files
- 🔧 Multiple Backends: Support for decord, torchcodec, and PyAV
- ⚡ Optimized Sampling: Intelligent frame sampling for efficient processing
Video Loading Options
# Load video with specific settings
video_config = {
"video": "path/to/video.mp4",
"max_fps": 8, # Maximum frames per second to sample
"num_frames": 64, # Maximum total frames
"clip": (0, 10), # Optional: extract specific time range (seconds)
}
video_frames, metadata = fetch_video(video_config)
Supported Formats
Images
- Local files:
image.jpg,image.png - URLs:
http://...,https://... - Base64:
data:image/jpeg;base64,... - PIL Images: Direct PIL.Image objects
Videos
- Local files:
.mp4,.avi,.mov,.webm - File URLs:
file:///path/to/video.mp4
License
Apache License 2.0
Author
SVECTOR Corporation - https://svector.co
Metadata
Release files for svlm-utils 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| svlm_utils-1.0.0.tar.gz | 17.6 kB | Without provenance | Details for svlm_utils-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| svlm_utils-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for svlm_utils-1.0.0-py3-none-any.whl |
Total release size: 33.8 kB
Release files / svlm_utils-1.0.0.tar.gz
| Download URL | svlm_utils-1.0.0.tar.gz |
|---|---|
| Size | 17.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f7a9e088a0a9b2559f0dd28fa8afd095e35af5d7e1ba570e2599d9c84594f36e
|
|
BLAKE2b-256 checksum How to use checksums |
68283db4fe307c13ecc54ff03defb2afb3429327ad32ed252274adb9a0444acb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.10
|
Release files / svlm_utils-1.0.0-py3-none-any.whl
| Download URL | svlm_utils-1.0.0-py3-none-any.whl |
|---|---|
| Size | 16.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f327bd155d06eb6a74083306b756fdc0e7c71e682dfc4f80eb811629109a5a9f
|
|
BLAKE2b-256 checksum How to use checksums |
4cb824583d7873cecb72ac9c871b85e69e3defaf4acc18bf38e2823fd1f6522d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.10
|
Security for svlm-utils 1.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.