Skip to content

To deal with 《Computer Vision》 coursework, I utilize Yolov5 neural network instead of traditional methods based on computer graphics.Besides, I use Pyside6 and Gradio to achieve graphical interface.

License

Notifications You must be signed in to change notification settings

PerformapalSolv/Vehicle-detection

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Yolov5-vehicle-detection

[TOC]

前言

To deal with 《Computer Vision》 coursework, I utilize Yolov5 neural network instead of traditional methods based on computer graphics.Besides, I use Pyside6 and Gradio to achieve graphical interface.

这个项目是我的《计算机视觉》课程小作业。虽然目前(24/3/15)我还只能看懂并自搭Yolov3网络,但这并不影响我使用好Yolov5。

其中,最开始完成项目(v1.0)的思路都是按别人教程一步步照抄的 所参考课程

I'm only a user of knowledge, not a creator, right now.This is the biggest gap between experts and apprentices.

Yolov5 You Only Look Once: Unified, Real-Time Object Detection YOLOv3: An Incremental Improvement

所作工作

  • v1.0使用的暂时还是yolov5的预训练模型, 单纯将yolov5用起来了而已。

    最开始我选择BITVehicle数据集对Yolov5模型进行训练,训练结果Yolov5-vehicle-detection/yolov5/runs/train/exp2

    配置文件为:Yolov5-vehicle-detection/yolov5/datadata/myTrain.yaml

  • 结果,发现在北理工车辆数据集上训练的模型,只能对北理工车辆数据集起作用(过拟合)———原因:BITVehicle数据集太过高清,一个镜头大多只有一两个车辆,且车辆都是正面的静距离视角。

    如: 在这个图片中,因车辆里摄像头远了些,被标注为Truck

    test

对项目改进方面:

  1. 换用新的、泛化性更强的数据集训练

    最近也找到了合适的数据集:

    链接:https://pan.baidu.com/s/1ZozGHhCKqul6zwnB60_E4w?pwd=pwwk 提取码:pwwk

  2. 增加新功能:车辆计数

完成这两点,就从v1升级到v2;之后打算尝试挑战yolov5网络架构,使其更适配车辆识别。

简单介绍:如何使用本项目(V1.0 )

git clone <本项目>

激活相关python环境,进入Yolo文件夹下:python base_ui.py

image-20240315214141803

初步UI界面如图:

image-20240315214207644

演示效果:

动画

  1. 使用gradio网页端:python gradioDemo.py

image-20240315224810848

遇到的问题

1.raise NotImplementedError("cannot instantiate %r on your system" NotImplementedError: cannot instantiate 'PosixPath' on your system

我在Ubuntu服务器上训练的模型,在windows下加载时,报这样的错误。最后搜索yolov5 issues解决

方案

About

To deal with 《Computer Vision》 coursework, I utilize Yolov5 neural network instead of traditional methods based on computer graphics.Besides, I use Pyside6 and Gradio to achieve graphical interface.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published