This project implements single object tracking using a combination of Segment Anything Model (SAM) for segmentation and MeanShift for tracking.
It includes:
- Color‑based segmentation tracking
- SAM‑assisted segmentation with MeanShift tracking
- Hue‑based and brightness‑based tracking strategies
- Backprojection visualization for tracking debugging
- ⬤ Color segmentation tracking (tracks blue objects without SAM/MeanShift)
- 🔍 Segmentation + MeanShift tracking using Segment Anything Model (SAM)
- ☀️ Hue‑based and brightness/V‑channel‑based tracking (for dark/black objects)
- 📹 Displays original frames with bounding boxes and backprojection maps
git clone https://github.com/ahany42/Object-Tracking.git
cd Object-Trackingpython -m venv venv
source venv/bin/activate # macOS / Linux
venv\Scripts\activate # Windowspip install -r requirements.txtThe SAM model weights are too large to include in this repo. Download the ViT‑B SAM checkpoint and place it in the project folder (or update your paths in the code):
📌 SAM ViT‑B Checkpoint sam_vit_b_01ec64.pth Download from the official Segment Anything model releases.
This project implements single object tracking using a combination of Segment Anything Model (SAM) for segmentation and MeanShift for tracking.
It includes:
- Color‑based segmentation tracking
- SAM‑assisted segmentation with MeanShift tracking
- Hue‑based and brightness‑based tracking strategies
- Backprojection visualization for tracking debugging
- ⬤ Color segmentation tracking (tracks blue objects without SAM/MeanShift)
- 🔍 Segmentation + MeanShift tracking using Segment Anything Model (SAM)
- ☀️ Hue‑based and brightness/V‑channel‑based tracking (for dark/black objects)
- 📹 Displays original frames with bounding boxes and backprojection maps
git clone https://github.com/ahany42/Object-Tracking.git
cd Object-Trackingpython -m venv venv
source venv/bin/activate # macOS / Linux
venv\Scripts\activate # Windowspip install -r requirements.txtThe SAM model weights are too large to include in this repo. Download the ViT‑B SAM checkpoint and place it in the project folder (or update your paths in the code):
📌 SAM ViT‑B Checkpoint sam_vit_b_01ec64.pth Download from the official Segment Anything model releases.
Loading ....