{"id":27467,"library":"transnetv2-pytorch","title":"TransNetV2 PyTorch","description":"PyTorch implementation of TransNetV2 for shot-based video scene detection. Version 1.0.5, updated regularly with bug fixes.","status":"active","version":"1.0.5","language":"python","source_language":"en","source_url":"https://github.com/allenday/transnetv2_pytorch","tags":["video-segmentation","scene-detection","pytorch","deep-learning"],"install":[{"cmd":"pip install transnetv2-pytorch","lang":"bash","label":"Latest release"}],"dependencies":[{"reason":"PyTorch deep learning framework","package":"torch","optional":false},{"reason":"Video processing","package":"opencv-python","optional":true}],"imports":[{"note":"Official import path","symbol":"TransNetV2","correct":"from transnetv2 import TransNetV2"}],"quickstart":{"code":"from transnetv2 import TransNetV2\n\nmodel = TransNetV2()\npredictions = model.predict_video(\"video.mp4\")","lang":"python","description":"Loads the model and predicts scene boundaries for a video file."},"warnings":[{"fix":"Install ffmpeg or use a supported video container (e.g., mp4).","message":"The predict_video method expects the video to be in a format readable by OpenCV. Ensure ffmpeg is installed for codec support.","severity":"gotcha","affected_versions":"all"},{"fix":"Ensure internet access or pre-download weights manually.","message":"Model weights are downloaded on first use from the original TransNetV2 repository. Internet connection required.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Run 'pip install transnetv2-pytorch' (note the hyphen in package name).","cause":"Library not installed or installed under a different name.","error":"ModuleNotFoundError: No module named 'transnetv2'"},{"fix":"Upgrade to latest version: 'pip install --upgrade transnetv2-pytorch' and check import path.","cause":"Using an older version of the library or wrong import.","error":"AttributeError: 'TransNetV2' object has no attribute 'predict_video'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}