首页 > 其他分享 >Yolov5_DeepSort_Pytorch:基于 Yolov5 + Deep Sort 的实时多目标跟踪器

Yolov5_DeepSort_Pytorch:基于 Yolov5 + Deep Sort 的实时多目标跟踪器

时间:2023-04-22 10:33:14浏览次数:47  
标签:Sort Yolov5 source -- py 跟踪器 track weights


Yolov5_DeepSort_Pytorch:基于 Yolov5 + Deep Sort 的实时多目标跟踪器

 视界君 Python视界 昨天

Python视界分享



简介

该存储库包含一个两阶段跟踪器。YOLOv5(一系列在 COCO 数据集上预训练的对象检测架构和模型)生成的检测被传递到跟踪对象的 Deep Sort 算法。它可以跟踪Yolov5 模型经过训练可以检测的任何对象。

Yolov5_DeepSort_Pytorch:基于 Yolov5 + Deep Sort 的实时多目标跟踪器_深度学习

Yolov5_DeepSort_Pytorch:基于 Yolov5 + Deep Sort 的实时多目标跟踪器_python_02

教程

  • Yolov5 自定义数据训练
  • Deep Sort 训练(链接到外部存储库)
  • Yolov5 deep_sort pytorch 评测

安装依赖

递归克隆存储库:

git clone --recurse-submodules https://github.com/mikel-brostrom/Yolov5_DeepSort_Pytorch.git

安装依赖库

pip install -r requirements.txt

跟踪源

python3 track.py --source ... --show-vid  # show live inference results as well
  • Video: --source file.mp4
  • Webcam: --source 0
  • RTSP stream: --source rtsp://170.93.143.139/rtplive/470011e600ef003a004ee33696235daa
  • HTTP stream: --source http://wmccpinetop.axiscam.net/mjpg/video.mjpg

选择 Yolov5 模型

权衡推理速度和准确率,选择合适的模型。可以选择合适的模型进行自动下载:

python3 track.py --source 0 --yolo_weights yolov5s.pt --img 640  # smallest yolov5 family model
python3 track.py --source 0 --yolo_weights yolov5x6.pt --img 1280  # largest yolov5 family model

过滤跟踪类别

默认跟踪器跟踪所有的 MS COCO 类别。如果你只想跟踪人,推荐使用这些权重来提升性能。

python3 track.py --source 0 --yolo_weights yolov5/weights/crowdhuman_yolov5m.pt --classes 0  # tracks persons, only

如果要跟踪 MS COCO 类的子集,请在 classes 标志后添加相应的索引

python3 track.py --source 0 --yolo_weights yolov5s.pt --classes 16 17  # tracks cats and dogs, only

这是在 MS COCO 上训练的 Yolov5 模型可以检测到的所有可能对象的列表。请注意,此 repo 中类的索引从零开始。

https://tech.amikelive.com/node-718/what-object-categories-labels-are-in-coco-dataset/

部分类别截图:

Yolov5_DeepSort_Pytorch:基于 Yolov5 + Deep Sort 的实时多目标跟踪器_深度学习_03

项目地址:

https://github.com/mikel-brostrom/Yolov5_DeepSort_Pytorch


标签:Sort,Yolov5,source,--,py,跟踪器,track,weights
From: https://blog.51cto.com/oliverHuang/6215061

相关文章

  • cpp: Ten Sort Algotrthms
     //TenSortAlgorithms.h:此文件包含"TenSortAlgotrthms"类。十个常用排序算法C++11//2023年4月5日涂聚文GeovinDuedit.#ifndefTENSORTALGORITHMS_H#defineTENSORTALGORITHMS_H#include<vector>//#includedirective#include<string>#include<......
  • The Second Run of Quicksort
    代码#include<iostream>#include<vector>#include<cstdio>usingnamespacestd;constintmaxn=100010;vector<int>sequence;intmaxL,minR,cnt,k,n,tmp;boolbigger[maxn];boolpivot[maxn];intmain(){cin>>k;w......
  • 《rv1109 部署yolov5训练模型汇总》
    环境以及相关软件版本:yolov5(v5.0)、Ubuntu18.04、rknn-toolkit1.7.3、rv1109  一.yolov5环境安装1conda安装1.1Anaconda安装包:在浏览器中打开 https://www.anaconda.com/products/individual 下载适合你的操作系统的Anaconda安装包(Python版本根据需要选择......
  • TopoSort
    //TopoSort.cpp--TopologicalSortPage182#include<stdio.h>#include<stdlib.h>#include"myconst.h"#defineMAX_VERTEX_NUM20typedefintVertexType;typedefintInfoType;typedefstructArcNode{intadjvex;structArcNo......
  • 盘点Python内置函数sorted()高级用法实战
    今日鸡汤清川带长薄,车马去闲闲。大家好,我是Python进阶者。一、前言前几天在Python钻石交流群有个叫【emerson】的粉丝问了一个Python排序的问题,这里拿出来给大家分享下,一起学习下。其实这里【瑜亮老师】、【布达佩斯的永恒】等人讲了很多,只不过对于基础不太好的小伙伴们来说,还是有......
  • 【JS】- 排序浅记(sort)
    字母或数字,默认排序顺序为按字母升序 和array.reverse()配合可以实现倒序array.sort()在对象数据中,使用函数进行规则配置vararray=[{num:4},{num:2},{num:3}];//从小到大array.sort((a,b)=>a.num-b.num);输出:[{"num":2},{"num":3},{"num":4}]......
  • Ian and Array Sorting
    题目链接题目描述:TothankIan,Marygiftedanarray\(a\)oflength\(n\)toIan.Tomakehimselflooksmart,hewantstomakethearrayinnon-decreasingorderbydoingthefollowingfinitelymanytimes:hechoosestwoadjacentelements\(a_i\)and\(a_......
  • POJ 2299 Ultra-QuickSort(线段树+离散化)
    题目地址:POJ2299这题曾经用归并排序做过,线段树加上离散化也可以做。一般线段树的话会超时。这题的数字最大到10^10次方,显然太大,但是可以利用下标,下标总共只有50w。可以从数字大的开始向树上加点,然后统计下标比它小即在它左边的数的个数。因为每加一个数的时候,比该数大的数已经加完......
  • POJ 1094Sorting It All Out(拓扑排序)
    题目地址:http://poj.org/problem?id=1094这个题改了一下午。。代码越改越挫。。凑活着看吧。。#include<iostream>#include<stdio.h>#include<string.h>#include<stdlib.h>#include<math.h>#include<ctype.h>#include<queue>#include<map>......
  • Lecture#10 Sorting & Aggregation Algorithms
    接下来将学习使用我们现在学习的DBMS组件来执行查询。我们今天要讨论的算法都是基于Disk的,即查询的中间结果也需要存储到磁盘中。我们需要使用BufferPool去实现这些算法,要最大化磁盘连续I/O。QueryPlan:算子组织成树形结构,数据从叶子节点流向根节点,根节点的输出就是查......