Skip to main content

An OpenCV video player wrapper with YOLO detection support

Project description

YOLOPlayer 🎥

A OpenCV wrapper for video playback, detection overlays, and future extensions (YOLO, DeepSORT, SAM, Faster-RCNN). #right now only tested on YOLO

✨ Features: ✅ Replace cv2.imshow with a more usable player ⏯️ Pause/Play with Spacebar 🔁 Forward/Rewind with Arrow Keys 🖥️ Toggle Fullscreen with F 🚪 Quit with Q 🤖 (Optional) YOLO integration for human detection 📦 Easy to extend with tracking (DeepSORT), segmentation (SAM), Faster-RCNN, etc.

⌨️ Controls

Key Action
SPACE Pause / Play
Q Quit
F Fullscreen toggle
Forward 1 seconds
Rewind 1 seconds

Installation-

Clone the repo:

git clone https://github.com/raunitsingh/cvplayer.git cd yoloplayer

create and activate a virtual environment:

python -m venv venv source venv/bin/activate # Linux/Mac venv\Scripts\activate # Windows

install dependencies:

pip install -r requirements.txt

🚀 Usage:

Basic video player:

from yoloplayer import YOLOPlayer

Play a video file

player = YOLOPlayer("video.mp4") player.run()

for webcam:

player = YOLOPlayer(0) player.run()

For YOLO detection:

from yoloplayer import YOLOPlayer

player = YOLOPlayer("video.mp4", use_yolo=True, model_path="yolov8n.pt") player.run()

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

yoloplayer-0.1.1.tar.gz (2.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

yoloplayer-0.1.1-py3-none-any.whl (2.8 kB view details)

Uploaded Python 3

File details

Details for the file yoloplayer-0.1.1.tar.gz.

File metadata

  • Download URL: yoloplayer-0.1.1.tar.gz
  • Upload date:
  • Size: 2.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.12

File hashes

Hashes for yoloplayer-0.1.1.tar.gz
Algorithm Hash digest
SHA256 0de2e2f821d953c0a9b767b4c4d4c30f1233559cff52b89f378d17be130366d6
MD5 7c7f9b59a77ffc44ff205b3474746bd7
BLAKE2b-256 146e7aa9164e02283e33a96bc44ca54b7967b3d19f450aba141f5112d01bb251

See more details on using hashes here.

File details

Details for the file yoloplayer-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: yoloplayer-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 2.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.12

File hashes

Hashes for yoloplayer-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 67c93c3e41f05459f9d54a4d28514da2a96f3f2a9fb86f6149c2d12045b37f7b
MD5 debd06794508164160c55c0481f66120
BLAKE2b-256 effd1d6bc48795181402264d9b0b392932b04d41d4305c2c5d0c8f172934ad3a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page