Giter Club home page Giter Club logo

pyqt5-yolov5's Introduction

界面是在ultralyticsyolov5基础上建立的,界面使用pyqt5实现,内容较简单,娱乐而已。

功能:

  1. 模型选择
  2. 本地文件选择(视频图片均可)
  3. 开关摄像头
  4. 运行/终止
  5. 统计检测结果

界面 默认模型为yolov5s.pt,默认输入文件为电脑摄像头视频

使用视频: https://www.bilibili.com/video/BV1sQ4y1C7Vk?spm_id_from=333.999.0.0

摄像头检测画面:

摄像头

本地视频检测画面: 本地

本地图片检测画面: 本地

要做的事

一.yolov5utils/datasets.pyLoadWebcam类中*__ next __*的返回值改为

return img_path, img, img0, self.cap #(位置在270行上下)。

二. 为了避免中文路径报错(路径不包含中文可以忽略这一步),将utils/datasets.pyLoadImages类中的

img0 = cv2.imread(path)	#(位置在212行上下)。

改为

img0 = cv2.imdecode(np.fromfile(path, dtype=np.uint8), 1)

三.main_ui.py、yolo_win.pyicon文件夹(存放图标)放在yolov5-master根目录下。

运行yolo_win.py即可开启检测界面。

存在的一个小问题,切换模型或者文件过于频繁,可能会卡住,重启一下即可。这种情况很少出现,问题不大。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.