yolov8-object-tracking

RizwanMunawarAGPL-3.0更新放缓

基于 YOLOv8、PyTorch 和 OpenCV 实现目标检测与多目标跟踪,可直接跑通视频流中的实时追踪,省去自己拼装检测器和跟踪器的麻烦。

YOLOv8 Object Tracking Using PyTorch, OpenCV and Ultralytics

1.0.0发布于 2023-01-10 22:19 UTC376star68fork同步于 2026-11-07 07:32 UTC

怎么上手

由 README 提炼,执行前请确认
git clone https://github.com/RizwanMunawar/yolov8-object-tracking.git
cd yolov8-object-tracking
pip install ultralytics==8.0.0
硬件要求按 README 说明

README 未说明显存和 GPU 型号要求;示例使用 yolov8s.pt 和 yolov8m.pt 权重,可处理摄像头实时输入。

下载:源码 zip·GitHub Releases(安装包)本站不镜像安装包

项目说明

由 README 自动翻译提炼

基于 YOLOv8 和 OpenCV 的目标跟踪脚本,对视频、图片或摄像头画面做检测并跟踪

基于 YOLOv8、PyTorch 和 OpenCV 实现目标检测与多目标跟踪,可直接跑通视频流中的实时追踪,省去自己拼装检测器和跟踪器的麻烦。

核心能力

  • 用 Ultralytics YOLOv8 模型做目标检测
  • 结合 OpenCV 处理视频流与摄像头输入
  • 支持视频文件、单张图片、内置摄像头和外接摄像头四种输入源
  • 跟踪结果自动写入 runs/detect/train 目录

容易踩的坑

仅兼容 ultralytics==8.0.0,装其他版本可能跑不通;首次运行会自动下载 yolov8s.pt 或 yolov8m.pt 权重,需联网;命令里的脚本路径用反斜杠写法,在 Linux 或 macOS 上要改成斜杠。

内容由模型根据 README 生成,可能不完整或不准确,以官方文档为准。看原文 README

最近发版

1 个版本1.0.0
  1. 1.0.0YOLOv8 Object Tracking Ultralytics最新正式版2023-01-10 · 2023-01-10 22:19 UTC

    YOLOv8 Object Tracking Ultralytics

用户点评

登录用户的真实使用记录,可按版本和硬件筛选
共 0 条

    还没有人点评。第一个说出真实体验的人最有价值。

    README 原文

    未翻译

    yolov8-object-tracking

    This is compatible only with ultralytics==8.0.0. However, I highly recommend using the latest version of the Ultralytics package and referring to the official Ultralytics codebase here: GitHub Repository.

    Static Badge

    Steps to run Code

    • Clone the repository
    https://github.com/RizwanMunawar/yolov8-object-tracking.git
    
    • Move to the cloned folder
    cd yolov8-object-tracking
    
    • Install the ultralytics package
    pip install ultralytics==8.0.0
    
    • Do tracking with the mentioned command below
    #video file
    python yolo\v8\detect\detect_and_trk.py model=yolov8s.pt source="test.mp4" show=True
    
    #imagefile
    python yolo\v8\detect\detect_and_trk.py model=yolov8m.pt source="path to image"
    
    #Webcam
    python yolo\v8\detect\detect_and_trk.py model=yolov8m.pt source=0 show=True
    
    #External Camera
    python yolo\v8\detect\detect_and_trk.py model=yolov8m.pt source=1 show=True
    
    • Output file will be created in the runs/detect/train with the original filename

    Results 📊

    Star History

    Star History Chart

    References 🔗

    Some of my articles/research papers | Computer vision awesome resources for learning | How do I appear to the world? 🚀

    Article Title & LinkPublished Date
    Ultralytics YOLO11: Object Detection and Instance Segmentation🤯Published Date
    Parking Management using Ultralytics YOLO11Published Date
    My 🖐️Computer Vision Hobby Projects that Yielded EarningsPublished Date
    Best Resources to Learn Computer VisionPublished Date
    Roadmap for Computer Vision EngineerPublished Date
    How did I spend 2022 in the Computer Vision FieldPublished Date
    Domain Feature Mapping with YOLOv7 for Automated Edge-Based Pallet Racking InspectionsPublished Date
    Exudate Regeneration for Automated Exudate Detection in Retinal Fundus ImagesPublished Date
    Feature Mapping for Rice Leaf Defect Detection Based on a Custom Convolutional ArchitecturePublished Date
    Yolov5, Yolo-x, Yolo-r, Yolov7 Performance Comparison: A SurveyPublished Date
    Explainable AI in Drug Sensitivity Prediction on Cancer Cell LinesPublished Date
    Train YOLOv8 on Custom DataPublished Date

    More Information

    For more details, you can reach out to me on Medium or connect with me on LinkedIn