sharpiless / yolov5-deepsort Goto Github PK
View Code? Open in Web Editor NEW最新版本yolov5+deepsort目标检测和追踪,能够显示目标类别,支持5.0版本可训练自己数据集
License: GNU General Public License v3.0
最新版本yolov5+deepsort目标检测和追踪,能够显示目标类别,支持5.0版本可训练自己数据集
License: GNU General Public License v3.0
File "/home/car/code/laserscan_camera_fuse/Yolov5-Deepsort-ros/demo.py", line 63, in
main()
File "/home/car/code/laserscan_camera_fuse/Yolov5-Deepsort-ros/demo.py", line 31, in main
result = det.feedCap(im)
File "/home/car/code/laserscan_camera_fuse/Yolov5-Deepsort-ros/utils/BaseDetector.py", line 35, in feedCap
im, faces, face_bboxes,bboxes_draw = update_tracker(self, im)
File "/home/car/code/laserscan_camera_fuse/Yolov5-Deepsort-ros/tracker.py", line 60, in update_tracker
outputs = deepsort.update(xywhs, confss, clss, image)
File "/home/car/code/laserscan_camera_fuse/Yolov5-Deepsort-ros/deep_sort/deep_sort/deep_sort.py", line 32, in update
bbox_tlwh = self._xywh_to_tlwh(bbox_xywh)
File "/home/car/code/laserscan_camera_fuse/Yolov5-Deepsort-ros/deep_sort/deep_sort/deep_sort.py", line 55, in _xywh_to_tlwh
bbox_tlwh[:, 0] = bbox_xywh[:, 0] - bbox_xywh[:, 2]/2.
IndexError: too many indices for tensor of dimension 1
when i try to debug ,i found that the issues occured when the image cannot be detected anything
Easy skip :
USE TRY EXCEPT: use except to skip this
try: result = det.feedCap(im) except Exception as e: result = {} print(e)
if the bug can be solved perfectly ,that 's would be wonderful! thanks @Sharpiless
File "C:\Users\xx\PycharmProjects\try\Yolov5-Deepsort-main\deep_sort\utils\parser.py", line 23, in merge_from_file
self.update(yaml.load(fo.read()))
TypeError: load() missing 1 required positional argument: 'Loader'
请问提示load()函数调用的时候缺少参数是怎么回事呢?
請問為什麼我無法使用自己的影片進行偵測,cv2.show出來的影片是原本的影片,我發現在yolo那邊回傳的BBOX,conf就是空陣列了,但我也透過使用pytorch.hub使用yolo返回bbox的資訊,但當我傳進deepsort時返回的result["frame"]還是原本的圖,我更進一部檢察result其他KEY的value,卻一樣是空陣列,沒有任何東西。請問這是哪邊出了問題?
debug过第一帧的置信度值是超过设定的阈值的,理论上是应该显示识别框的,但是总是从第二帧开始检测,这是什么原因呢?
在2080ti上面跑,速度很慢
这个可以支持自己改进的自定义yolov5模型吗?
您好看了您的工作深受启发,请问怎么输出跟踪结果的txt文件呢,刚刚入门目标检测,劳烦懂的朋友告知一下
画面里一旦检测目标比较多的时候,性能就会大幅度受到影响。
RuntimeError: Input type (torch.FloatTensor) and weight type (torch.HalfTensor) should be the same
如何训练deepsort自己的数据集?我已经训练了yolov5的自己的数据集。因为我需要跟踪的目标不是行人,也不是汽车,而是其他的物体。所以在deepsort对目标物体进行跟踪预测的时候,如果同一物体被遮挡再出现,其reID会改变。我想这应该就是我没有重新训练deepsort的原因。请大佬指导一下我该如何制作自己的数据集重新训练deepsort。
更换自己训练的检测模型后,报错 the size of tensor a(48) must match the size of tensor b(84) at non-singleton dimension 3
https://github.com/Fyra-BH/Yolov5-Deepsort.git
在原作者的基础上增加了一个requirements.txt
此外将demo.py改成命令行传参:
python demo.py [video_file_path]
不传参的话则调用摄像头
就是有点卡 算的不太准 有时一个椅子都识别成了
使用的rtx3060 12g显存
centos7
cuda:11.1,驱动:470.63.01
torch:1.7.1+cu110
接RTSP视频流,开始占用显存大概1.3G,过一段时间后显存占用越来越高,直到显存溢出,屏蔽deepsort部分,只跑检测不会出现这情况,不知道deepsort哪一部分导致显存占用升高
fa@ubuntu:~/Downloads/Yolov5-Deepsort-main$ python3 demo.py
/home/fa/Downloads/Yolov5-Deepsort-main/deep_sort/utils/parser.py:23: YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details.
self.update(yaml.load(fo.read()))
/home/fa/.local/lib/python3.8/site-packages/torch/nn/functional.py:718: UserWarning: Named tensors and all their associated APIs are an experimental feature and subject to change. Please do not use them for anything important until they are released as stable. (Triggered internally at /pytorch/c10/core/TensorImpl.h:1156.)
return torch.max_pool2d(input, kernel_size, stride, padding, dilation, ceil_mode)
fps: 0
Traceback (most recent call last):
File "demo.py", line 50, in
main()
File "demo.py", line 13, in main
t = int(1000/fps)
ZeroDivisionError: division by zero
您好,为什么使用自己的模型进行测试时会产生这个报错:
bbox_tlwh[:, 0] = bbox_xywh[:, 0] - bbox_xywh[:, 2]/2.
IndexError: too many indices for tensor of dimension 1
我运行代码后,在任务管理器的性能一栏看到CPU使用率很高,但是GPU几乎没有被使用。请问是哪里出了问题?
作者能列个运行环境版本清单吗?要不然调起来很麻烦
https://github.com/ultralytics/yolov5/releases/tag/v5.0
必须使用这个版本的yolov训练的模型,要不然会爆类似以下的报错!!
其他问题大家都给出解决方案了,没有的百度也能搜到!!!
如题,修改了AIDetector_pytorch.py中的 self.weights = 'weights/yolov5s.pt'
这一行,换成了自己训练出来的模型,但是什么都没检测出来,但这个模型单独用yolov5测试时是没有问题的,所以是还要修改哪里吗?
我想修改成gpu 2上跑,即在AIDetector_pytorch.py 中修改self.device = '2' if torch.cuda.is_available() else 'cpu',但是在运行的时候依旧是在gpu 0 上跑,请问这是为什么呢?
AttributeError: 'Upsample' object has no attribute 'recompute_scale_factor'
我想了解一下这个接口文件是怎么编写出来的,是根据哪个文件编写的,为什么我看完后不知道从何处入手,望大佬解答
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.