Registry / ai-ml / transnetv2-pytorch

transnetv2-pytorch

JSON →
library1.0.5pypypi✓ verified 81d ago

PyTorch implementation of TransNetV2 for shot-based video scene detection. Version 1.0.5, updated regularly with bug fixes.

pip install transnetv2-pytorch
INSTALL
IMPORT
SIG · TRANSNETV2-PYTORCH
T
transnetv2-pytorch
ai-mlpythonv1.0.5
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

TransNetV2
from transnetv2_pytorch import TransNetV2
from transnetv2 import TransNetV2

Loads the model and predicts scene boundaries for a video file.

from transnetv2 import TransNetV2 model = TransNetV2() predictions = model.predict_video("video.mp4")
Debug
Known issues
gotchaThe predict_video method expects the video to be in a format readable by OpenCV. Ensure ffmpeg is installed for codec support.
fix
Install ffmpeg or use a supported video container (e.g., mp4).
affects: all
gotchaModel weights are downloaded on first use from the original TransNetV2 repository. Internet connection required.
fix
Ensure internet access or pre-download weights manually.
affects: all
Upgrade
Version history
1.0.5latest on PyPI · released Jun 1, 2025
Audit
Dependencies
torchrequiredPyTorch deep learning framework
opencv-pythonoptionalVideo processing
Agent activity
16 hits · last 30 days
node
14
OpenAI (training)
1
Resources
transnetv2-pytorch — pip install transnetv2-pytorch · libregistry