您现在的位置:首页 >> 机器学习 >> 内容

m基于Yolov2深度学习网络的驾驶员打电话行为预警系统matlab仿真,带GUI界面

时间:2023/12/8 1:45:59 点击:

  核心提示:0Y_010m,包括程序操作录像...

1.完整项目描述和程序获取

>面包多安全交易平台:https://mbd.pub/o/bread/ZZebmZxt

>如果链接失效,可以直接打开本站店铺搜索相关店铺:

点击店铺

>如果链接失效,程序调试报错或者项目合作可以加微信或者QQ联系。

2.部分仿真图预览


3.算法概述

   随着汽车数量的不断增加,交通安全问题日益突出。其中,驾驶员手持电话行为是导致交通事故的一个重要原因。为了降低这类事故的发生率,本文提出了一种基于Yolov2深度学习网络的驾驶员手持电话行为预警系统。该系统能够实时监测驾驶员的驾驶行为,并在发现驾驶员手持电话时发出预警信号,提醒驾驶员集中注意力,确保行车安全。

4.部分源码

....................................................................

% --- Executes on button press in pushbutton1.

function pushbutton1_Callback(hObject, eventdata, handles)

% hObject    handle to pushbutton1 (see GCBO)

% eventdata  reserved - to be defined in a future version of MATLAB

% handles    structure with handles and user data (see GUIDATA)

global im;

global Predicted_Label;

cla (handles.axes1,'reset')

 

axes(handles.axes1);

set(handles.edit2,'string',num2str(0));

 

 

[filename,pathname]=uigetfile({'*.bmp;*.jpg;*.png;*.jpeg;*.tif'},'选择一个图片','F:\test');

str=[pathname filename];

% 判断文件是否为空,也可以不用这个操作!直接读入图片也可以的

% im = imread(str);

% imshow(im)

if isequal(filename,0)||isequal(pathname,0)

    warndlg('please select a picture first!','warning');

    return;

else

    im = imread(str);

    imshow(im);

end

 

 

% --- Executes on button press in pushbutton2.

function pushbutton2_Callback(hObject, eventdata, handles)

% hObject    handle to pushbutton2 (see GCBO)

% eventdata  reserved - to be defined in a future version of MATLAB

% handles    structure with handles and user data (see GUIDATA)

% global im;

%  

% [Predicted_Label, Probability] = classify(net, II);

% imshow(im);

global im;

global Predicted_Label;

 

 

load model.mat

img_size= [224,224];

 

 

axes(handles.axes1);

 

I               = imresize(im,img_size(1:2));

[bboxes,scores] = detect(detector,I,'Threshold',0.15);

flag=0;

if ~isempty(bboxes) % 如果检测到目标

    [Vs,Is] = max(scores);

    flag    = 1;

    I       = insertObjectAnnotation(I,'rectangle',bboxes(Is,:),Vs,LineWidth=2);% 在图像上绘制检测结果

end

imshow(I)

0Y_010m

---

作者:我爱C编程 来源:我爱C编程
本站最新成功开发工程项目案例
相关文章
相关评论
发表我的评论
  • 大名:
  • 内容:
本类固顶
  • 没有
  • FPGA/MATLAB商业/科研类项目合作(www.store718.com) © 2025 版权所有 All Rights Reserved.
  • Email:1480526168@qq.com 站长QQ: 1480526168