Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

YOLO Nano Video Detector

Simple tool to detect objects and people in videos using AI. Works on Windows and macOS.

What does it do?

  • Takes a video file as input
  • Detects all objects in the video using YOLO Nano AI model
  • Draws green boxes around detected objects with labels and confidence scores
  • Optionally detects human poses (skeleton/keypoints)
  • Saves the annotated video as output

Requirements

  • Python 3.8 or newer (3.11+ recommended)
  • About 500 MB free disk space
  • Internet connection (first run only - to download the AI model)

Quick Start (3 Steps)

Step 1: Install dependencies

Windows (PowerShell):

python -m pip install --upgrade pip
pip install -r requirements.txt

macOS/Linux (Terminal):

python3 -m pip install --upgrade pip
pip3 install -r requirements.txt

Step 2: Run the detector

Windows (PowerShell):

python yolo_nano_v1.py --input "path/to/video.mp4" --output "path/to/output.mp4"

macOS/Linux (Terminal):

python3 yolo_nano_v1.py --input "path/to/video.mp4" --output "path/to/output.mp4"

Step 3: View your output

The processed video will be saved at the path you specified in --output.

Examples

Basic usage (detect objects)

python yolo_nano_v1.py --input "video.mp4" --output "video_detected.mp4"

Using folder paths (script finds video automatically)

python yolo_nano_v1.py --input "/path/to/folder" --output "/path/to/output_folder"

Higher detection accuracy

python yolo_nano_v1.py --input "video.mp4" --output "output.mp4" --conf 0.5

With pose detection (requires: pip install mediapipe)

python yolo_nano_v1.py --input "video.mp4" --output "output.mp4" --pose

Command Line Options

Option Default Description
--input Required Path to video file or folder with video
--output Required Path to save output video
--conf 0.25 Detection confidence (0.0-1.0). Higher = fewer detections
--pose Off Enable human pose detection

Troubleshooting

Q: "ModuleNotFoundError: No module named 'ultralytics'"

  • Run: pip install -r requirements.txt

Q: "Cannot open video"

  • Check file path is correct (use forward slashes / or double backslashes \\)
  • Supported formats: .mp4, .avi, .mov, .mkv

Q: "Failed to open video writer"

  • Try using .avi extension instead: --output "video.avi"

Q: Script is very slow

  • This is normal on CPU-only systems (can take 5-30 minutes for 5-minute video)
  • First run downloads the model (~6 MB) - this is one-time only

Q: How to enable GPU acceleration?

File Structure

yolo_nano_v1.py        - Main script
requirements.txt       - Python dependencies
README.md             - This file
run_windows.bat       - Quick run script for Windows
# YOLO Nano Video Detector — Overview

This repository contains a simple, beginner-friendly script to run Ultralytics YOLO (Nano) on a video file and save an annotated output video with bounding boxes and labels.

Keep these files:
- `yolo_nano_v1.py` — main script (object detection; optional pose)
- `requirements.txt` — minimal dependencies
- `README.md` — this brief overview
- `SETUP.txt` — step-by-step setup instructions
- `START_HERE.txt` — quick commands, customization tips, troubleshooting

Quick usage (from the project folder):

Windows PowerShell
```powershell
python yolo_nano_v1.py --input "path/to/video.mp4" --output "path/to/output.mp4"

macOS / Linux

python3 yolo_nano_v1.py --input "path/to/video.mp4" --output "path/to/output.mp4"

Options you can use:

  • --conf : detection confidence threshold (default 0.25)
  • --pose : enable MediaPipe pose overlay (optional, requires mediapipe)

If you need more help, open START_HERE.txt — it contains exact commands, customization tips, and troubleshooting steps.

That’s it — this README keeps things minimal and directs users to START_HERE.txt and SETUP.txt for details.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages