Science Score: 44.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (5.1%) to scientific vocabulary
Last synced: 6 months ago · JSON representation ·

Repository

Basic Info
  • Host: GitHub
  • Owner: kyc001
  • License: agpl-3.0
  • Language: Python
  • Default Branch: master
  • Size: 988 KB
Statistics
  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • Open Issues: 1
  • Releases: 0
Created 9 months ago · Last pushed 8 months ago
Metadata Files
Readme Contributing License Citation

README.md

YOLOv5 图形化目标检测工具

基于 PyQt5 和 YOLOv5 的图像目标检测程序,提供直观的图形化界面,支持加载本地训练模型、实时显示检测结果及参数调整。适用于快速验证模型效果、部署轻量级检测任务。

🚀 项目特点

  1. 图形化交互
    • 支持图片导入与预览,检测结果实时渲染在原图上。
    • 可视化调整检测参数(置信度阈值、NMS IoU 阈值)。
  2. 模型兼容性
    • 无缝加载 YOLOv5 官方预训练模型及自定义训练模型(.pt 文件)。
  3. 多平台支持
    • 基于 PyQt5 开发,支持 Windows/macOS/Linux 系统。
  4. 性能监控
    • 显示检测目标总数、类别数、平均置信度等统计信息。

📦 安装指南

环境要求

  • Python:3.8+
  • 依赖库
    PyQt5>=5.15.9 # 图形界面 torch>=2.0.0 # 深度学习框架(需支持 CUDA/CPU) torchvision>=0.15.0 # 计算机视觉工具 opencv-python>=4.8.0# 图像处理 numpy>=1.26.0 # 数值计算 Pillow>=10.0.1 # 图像加载

安装步骤

  1. 克隆项目
    bash git clone https://github.com/your-username/your-repo.git cd your-repo
  2. 创建虚拟环境(可选)
    bash python -m venv venv source venv/bin/activate # Linux/macOS venv\Scripts\activate # Windows
  3. 安装依赖
    bash pip install -r requirements.txt

🎮 使用说明

1. 启动程序

bash python main.py

2. 加载自定义模型

  • 点击 选择模型文件,选中训练好的 YOLOv5 模型(如 runs/train/exp1/weights/best.pt)。
  • 点击 加载模型,等待模型初始化完成。

3. 检测图像

  • 点击 加载图片,选择待检测的图像文件(支持 JPG/PNG/BMP 等格式)。
  • 调整 置信度阈值(建议 0.25-0.7)和 IoU 阈值(建议 0.4-0.6)。
  • 点击 开始检测,结果将显示在右侧窗口,统计信息同步更新。

4. 结果保存

  • 检测结果图像自动保存到程序根目录的 runs/detect/ 文件夹。

📷 界面截图

主界面
左:参数控制面板;右:图像预览与检测结果

🛠️ 参数说明

| 参数名称 | 功能描述 | 范围 | 默认值 | | ---------- | ------------------------------------------------------- | ---- | ------ | | 置信度阈值 | 过滤低置信度检测结果(值越高,检测越严格) | 0-1 | 0.5 | | IoU 阈值 | 非极大值抑制(NMS)的交并比阈值(值越高,保留的框越少) | 0-1 | 0.45 |

📚 模型训练建议

  1. 数据准备
    使用 RoboflowLabelImg 标注数据集,格式为 YOLO 标签(.txt)。
  2. 训练流程
    bash # 使用 YOLOv5 官方仓库训练 git clone https://github.com/ultralytics/yolov5 python train.py --data coco128.yaml --weights yolov5s.pt --epochs 100
  3. 导出模型
    训练完成后,将 runs/train/exp/weights/best.pt 复制到本项目目录中使用。

🤝 贡献与反馈

  • 问题反馈:请在 GitHub 仓库的 Issues 中提交 Bug 或功能请求。
  • 代码贡献:欢迎提交 Pull Request,但需先创建 Issue 说明改动内容。
  • 联系方式:邮箱 your-email@example.com,或 GitHub 私信。

📜 开源协议

本项目采用 MIT 开源协议,允许商业使用、修改和再发布,但需保留原作者声明。具体见 LICENSE 文件。

🌟 鸣谢

如果本项目对您有帮助,欢迎在 GitHub 上点亮 ⭐,感谢支持!

Owner

  • Name: kyc
  • Login: kyc001
  • Kind: user
  • Location: 天津市

I am kyc,a student in NanKai University, I am eager to learn on GitHub and contribute my part to this community.

Citation (CITATION.cff)

cff-version: 1.2.0
preferred-citation:
  type: software
  message: If you use YOLOv5, please cite it as below.
  authors:
  - family-names: Jocher
    given-names: Glenn
    orcid: "https://orcid.org/0000-0001-5950-6979"
  title: "YOLOv5 by Ultralytics"
  version: 7.0
  doi: 10.5281/zenodo.3908559
  date-released: 2020-5-29
  license: AGPL-3.0
  url: "https://github.com/ultralytics/yolov5"

GitHub Events

Total
  • Push event: 2
  • Create event: 3
Last Year
  • Push event: 2
  • Create event: 3

Dependencies

.github/workflows/ci-testing.yml actions
  • actions/checkout v4 composite
  • actions/setup-python v5 composite
  • astral-sh/setup-uv v6 composite
  • slackapi/slack-github-action v2.1.0 composite
.github/workflows/cla.yml actions
  • contributor-assistant/github-action v2.6.1 composite
.github/workflows/docker.yml actions
  • actions/checkout v4 composite
  • docker/build-push-action v6 composite
  • docker/login-action v3 composite
  • docker/setup-buildx-action v3 composite
  • docker/setup-qemu-action v3 composite
.github/workflows/format.yml actions
  • ultralytics/actions main composite
.github/workflows/links.yml actions
  • actions/checkout v4 composite
  • ultralytics/actions/retry main composite
.github/workflows/merge-main-into-prs.yml actions
  • actions/checkout v4 composite
  • actions/setup-python v5 composite
.github/workflows/stale.yml actions
  • actions/stale v9 composite
utils/docker/Dockerfile docker
  • pytorch/pytorch 2.0.0-cuda11.7-cudnn8-runtime build
utils/google_app_engine/Dockerfile docker
  • gcr.io/google-appengine/python latest build
pyproject.toml pypi
  • matplotlib >=3.3.0
  • numpy >=1.22.2
  • opencv-python >=4.6.0
  • pandas >=1.1.4
  • pillow >=7.1.2
  • psutil *
  • py-cpuinfo *
  • pyyaml >=5.3.1
  • requests >=2.23.0
  • scipy >=1.4.1
  • seaborn >=0.11.0
  • thop >=0.1.1
  • torch >=1.8.0
  • torchvision >=0.9.0
  • tqdm >=4.64.0
  • ultralytics >=8.1.47
requirements.txt pypi
  • PyYAML >=5.3.1
  • gitpython >=3.1.30
  • matplotlib >=3.3
  • numpy >=1.23.5
  • opencv-python >=4.1.1
  • pandas >=1.1.4
  • pillow >=10.3.0
  • psutil *
  • requests >=2.32.2
  • scipy >=1.4.1
  • seaborn >=0.11.0
  • setuptools >=70.0.0
  • thop >=0.1.1
  • torchvision >=0.9.0
  • tqdm >=4.66.3
utils/google_app_engine/additional_requirements.txt pypi
  • Flask ==2.3.2
  • gunicorn ==23.0.0
  • pip ==23.3
  • werkzeug >=3.0.1
  • zipp >=3.19.1