Add gui for YoloV5 using PyQt5

Overview

<<<<<<< HEAD 更新2021.08.16

**添加图片和视频保存功能:

1.图片和视频按照当前系统时间进行命名

2.各自检测结果存放入output文件夹

3.摄像头检测的默认设备序号更改为0,减少调试报错

温馨提示:

1.项目放置在全英文路径下,防止项目报错

2.默认使用cpu进行检测,自己可以在init中手动切换GPU(因为我的笔记本太老了)

3.当前的摄像头检测的存储有一点点问题,播放速度比较快,不知道是不是我用cpu检测,导致的帧率不匹配的问题(后面有时间在捣鼓捣鼓,我现在强制调慢了FPS 😂

一、项目简介

使用PyQt5为YoloV5添加一个可视化检测界面,并实现简单的界面跳转,具体情况如下:

博客与B站:

博客地址:https://blog.csdn.net/wrh975373911/article/details/119322059?spm=1001.2014.3001.5501

B站视频:https://www.bilibili.com/video/BV1ZU4y1E7at

特点:

  1. UI界面与逻辑代码分离
  2. 支持自选定模型
  3. 同时输出检测结果与相应相关信息
  4. 支持图片,视频,摄像头检测
  5. 支持视频暂停与继续检测

目的:

  1. 熟悉QtDesign的使用
  2. 了解PyQt5基础控件与布局方法
  3. 了解界面跳转
  4. 了解信号与槽
  5. 熟悉视频在PyQt中的处理方法

项目图片:

登录界面 注册界面

检测界面

二、快速开始

环境与相关文件配置:

  • 按照 ult-yolov5 中requirement的要求配置环境,自行安装PyQt5,注意都需要在一个evn环境中进行安装与配置
  • 下载或训练一个模型,将“.pt”文件放到weights文件夹,(权重文件可以自己选,程序默认打开weights文件夹)
  • 设置init中的opt

两种程序使用方式:

  • 直接运行detect_logical.py,进入检测界面
  • 运行main_logical.py,先登录,在进入检测界面

三、 参考与致谢

四、 版权声明

仅供交流学习使用,项目粗拙,勿商用,实际应用中出现的问题,个人不管哦~

You might also like...
YOLOv5🚀 reproduction by Guo Quanhao using PaddlePaddle
YOLOv5🚀 reproduction by Guo Quanhao using PaddlePaddle

YOLOv5-Paddle YOLOv5 🚀 reproduction by Guo Quanhao using PaddlePaddle 支持AutoBatch 支持AutoAnchor 支持GPU Memory 快速开始 使用AIStudio高性能环境快速构建YOLOv5训练(PaddlePa

Various operations like path tracking, counting, etc by using yolov5

Object-tracing-with-YOLOv5 Various operations like path tracking, counting, etc by using yolov5

FaceAnon - Anonymize people in images and videos using yolov5-crowdhuman
FaceAnon - Anonymize people in images and videos using yolov5-crowdhuman

Face Anonymizer Blur faces from image and video files in /input/ folder. Require

Yolov5-opencv-cpp-python - Example of using ultralytics YOLO V5 with OpenCV 4.5.4, C++ and Python
Yolov5-opencv-cpp-python - Example of using ultralytics YOLO V5 with OpenCV 4.5.4, C++ and Python

yolov5-opencv-cpp-python Example of performing inference with ultralytics YOLO V

Yolov5 deepsort inference,使用YOLOv5+Deepsort实现车辆行人追踪和计数,代码封装成一个Detector类,更容易嵌入到自己的项目中
Yolov5 deepsort inference,使用YOLOv5+Deepsort实现车辆行人追踪和计数,代码封装成一个Detector类,更容易嵌入到自己的项目中

使用YOLOv5+Deepsort实现车辆行人追踪和计数,代码封装成一个Detector类,更容易嵌入到自己的项目中。

yolov5 deepsort 行人 车辆 跟踪 检测 计数
yolov5 deepsort 行人 车辆 跟踪 检测 计数

yolov5 deepsort 行人 车辆 跟踪 检测 计数 实现了 出/入 分别计数。 默认是 南/北 方向检测,若要检测不同位置和方向,可在 main.py 文件第13行和21行,修改2个polygon的点。 默认检测类别:行人、自行车、小汽车、摩托车、公交车、卡车。 检测类别可在 detect

YOLOv5 in PyTorch > ONNX > CoreML > TFLite
YOLOv5 in PyTorch ONNX CoreML TFLite

This repository represents Ultralytics open-source research into future object detection methods, and incorporates lessons learned and best practices evolved over thousands of hours of training and evolution on anonymized client datasets. All code and models are under active development, and are subject to modification or deletion without notice.

YoloV5 implemented by TensorFlow2 , with support for training, evaluation and inference. joint detection and semantic segmentation, based on ultralytics/yolov5,
joint detection and semantic segmentation, based on ultralytics/yolov5,

Multi YOLO V5——Detection and Semantic Segmentation Overeview This is my undergraduate graduation project which based on ultralytics YOLO V5 tag v5.0.

Comments
  • Automatically save labeled images or videos?

    Automatically save labeled images or videos?

    Hello developer, your program is very complete and fully functional, compared to other open source projects excellent experience. I have a small request, could you automatically save a labeled image or video after each image detection and video detection at the same time in the background? Thank you.

    opened by zxsitu 2
  • 把detect里的模型换成了yolov5+deep sort后,打不开摄像头

    把detect里的模型换成了yolov5+deep sort后,打不开摄像头

    Open camera to detect 1/1: 0... success (640x480 at 30.00 FPS).

    [ WARN:[email protected]] global D:\a\opencv-python\opencv-python\opencv\modules\videoio\src\cap_msmf.cpp (464) anonymous-namespace'::SourceReaderCB::OnReadSample videoio(MSMF): OnReadSample() is called with error status: -1072875772 [ WARN:[email protected]] global D:\a\opencv-python\opencv-python\opencv\modules\videoio\src\cap_msmf.cpp (476)anonymous-namespace'::SourceReaderCB::OnReadSample videoio(MSMF): async ReadSample() call is failed with error status: -1072875772 [ WARN:[email protected]] global D:\a\opencv-python\opencv-python\opencv\modules\videoio\src\cap_msmf.cpp (1752) CvCapture_MSMF::grabFrame videoio(MSMF): can't grab frame. Error: -1072875772 [ WARN:[email protected]] global D:\a\opencv-python\opencv-python\opencv\modules\videoio\src\cap_msmf.cpp (1752) CvCapture_MSMF::grabFrame videoio(MSMF): can't grab frame. Error: -1072875772

    opened by Jackson-leo 0
  • AttributeError: 'UI_Logic_Window' object has no attribute 'opt'

    AttributeError: 'UI_Logic_Window' object has no attribute 'opt'

    您好,我在运行python main_logic.py进入检测界面,选择了一段视频进行检测,就出现了如下问题: You pressed sign in Jump to main window Traceback (most recent call last): File "/home/tempdisk/PycharmProjects/YoloV5_PyQt5-main/detect_logical.py", line 240, in show_video_frame info_show = self.detect(name_list, img) # 检测结果写入到原始img上 File "/home/tempdisk/PycharmProjects/YoloV5_PyQt5-main/detect_logical.py", line 124, in detect img = letterbox(img, new_shape=self.opt.img_size)[0] AttributeError: 'UI_Logic_Window' object has no attribute 'opt' Aborted (core dumped) 请问您知道是什么原因造成的吗? 期待您的回复。

    opened by vitamin520 3
Owner
Ruihao Wang
Ruihao Wang
YOLOv5 detection interface - PyQt5 implementation

所有代码已上传,直接clone后,运行yolo_win.py即可开启界面。 2021/9/29:加入置信度选择 界面是在ultralytics的yolov5基础上建立的,界面使用pyqt5实现,内容较简单,娱乐而已。 功能: 模型选择 本地文件选择(视频图片均可) 开关摄像头

null 487 Dec 27, 2022
🍅🍅🍅YOLOv5-Lite: lighter, faster and easier to deploy. Evolved from yolov5 and the size of model is only 1.7M (int8) and 3.3M (fp16). It can reach 10+ FPS on the Raspberry Pi 4B when the input size is 320×320~

YOLOv5-Lite:lighter, faster and easier to deploy Perform a series of ablation experiments on yolov5 to make it lighter (smaller Flops, lower memory, a

pogg 1.5k Jan 5, 2023
TPH-YOLOv5: Improved YOLOv5 Based on Transformer Prediction Head for Object Detection on Drone-Captured Scenarios

TPH-YOLOv5 This repo is the implementation of "TPH-YOLOv5: Improved YOLOv5 Based on Transformer Prediction Head for Object Detection on Drone-Captured

cv516Buaa 439 Dec 22, 2022
Multi-task yolov5 with detection and segmentation based on yolov5

YOLOv5DS Multi-task yolov5 with detection and segmentation based on yolov5(branch v6.0) decoupled head anchor free segmentation head README中文 Ablation

null 150 Dec 30, 2022
Yolov5-lite - Minimal PyTorch implementation of YOLOv5

Yolov5-Lite: Minimal YOLOv5 + Deep Sort Overview This repo is a shortened versio

Kadir Nar 57 Nov 28, 2022
Qt-GUI implementation of the YOLOv5 algorithm (ver.6 and ver.5)

YOLOv5-GUI ?? YOLOv5算法(ver.6及ver.5)的Qt-GUI实现 ?? Qt-GUI implementation of the YOLOv5 algorithm (ver.6 and ver.5). 基于YOLOv5的v5版本和v6版本及Javacr大佬的UI逻辑进行编写

EricFang 12 Dec 28, 2022
Simple Linear 2nd ODE Solver GUI - A 2nd constant coefficient linear ODE solver with simple GUI using euler's method

Simple_Linear_2nd_ODE_Solver_GUI Description It is a 2nd constant coefficient li

:) 4 Feb 5, 2022
Torchserve server using a YoloV5 model running on docker with GPU and static batch inference to perform production ready inference.

Yolov5 running on TorchServe (GPU compatible) ! This is a dockerfile to run TorchServe for Yolo v5 object detection model. (TorchServe (PyTorch librar

null 82 Nov 29, 2022
Drone detection using YOLOv5

This drone detection system uses YOLOv5 which is a family of object detection architectures and we have trained the model on Drone Dataset. Overview I

Tushar Sarkar 27 Dec 20, 2022
A program to recognize fruits on pictures or videos using yolov5

Yolov5 Fruits Detector Requirements Either Linux or Windows. We recommend Linux for better performance. Python 3.6+ and PyTorch 1.7+. Installation To

Fateme Zamanian 30 Jan 6, 2023