当前位置:网站首页>Recognition of high-speed road signs by Matlab using alexnet
Recognition of high-speed road signs by Matlab using alexnet
2022-04-23 20:21:00 【Install a sound 77】
A classic case of transfer learning ,Alexnet It needs to be downloaded , Download requires registration matlab account number , Of course, this model is also available online , Make yourself at home .
doc Alexnet doc trainFasterRCNNObjectDetector
You can find the case information provided on the official website .

There are also relevant cases on the Internet for reference , Mainly refer to these two :
Of course, the actual use will certainly have bug, It needs to be adjusted slowly .
Just pay attention to the overall format , Just go . It takes up more memory when running .
clc
clear all
load('alexnet.mat',"net")
image = imageDatastore('C:\Users\1\Desktop\matlab_test_net',...
'IncludeSubfolders',true,'LabelSource','foldernames');
layersTransfer=net.Layers(1:end-3);
numClasses = numel(categories(image.Labels));
layers = [
layersTransfer
fullyConnectedLayer(numClasses,'WeightLearnRateFactor',20,'BiasLearnRateFactor',20)
softmaxLayer
classificationLayer];
options = trainingOptions('sgdm', ...
'MiniBatchSize',5, ...
'MaxEpochs',20, ...
'InitialLearnRate',0.0001);
netTransfer = trainNetwork(image,layers,options)
This is basically the default , Just change the photo storage path , Be careful img It's a photo format .
test= load('F:/xunlian/test.mat'); %it is not necessary
options = trainingOptions('sgdm', ...
'InitialLearnRate', 1e-5, ...
'MaxEpochs', 20, ... %twenty times The more training depth is not the better , It could backfire ,
'CheckpointPath', tempdir);
layer=netTransfer.Layers
% Here's the tsst incorrect , It should be a set of arrays , Is not a mat Count .
naq = readtable('test_table_youdian.xls')
% Use table Combine the data , Instead of importing from the outside
%naqq=table(test.gTruth.DataSource.Source,)
% For this naq To deal with
file = [] ;
aaa = test.gTruth.LabelData.biaozhi;
for i =1:30
file2=[file;test.gTruth.DataSource.Source{i}];
%table2array(test.gTruth.LabelData(2,1))
end
file=naq.imageFilename;
naqqq=table(file,aaa)
This data type is mainly made into table type ,
There are two ways One is from mat Put the data in the file and table() Combine
There's another one readtable() read excel Data in , Depending on your personal situation, choose .
The data in this is actually , Path and cut point

Training takes some time ( Add a key point , Need to add one backgroud Folder , Because this model is essentially a classification model , At least two categories are required, that is, there are two data sets , If you encounter this error , Refer to the previous blog )
And then I put this detector Save as mat Format
Then comes the test
img=imread(" picture .jpg")
load('wangluo.mat')
[bbox,score,label] = detect(detector,img);
index = find(score>0.8);
bbox = bbox(index,:);
score = score(index,:);
label = label(index,:);
img = insertObjectAnnotation(img,'Rectangle',bbox,score);
img = insertShape(img,'Rectangle',bbox);
imshow(img)
The test image is shown below :

It's rough , But the good thing is that it's simple , convenient , fast ......
Just make do with it , Don't think about publishing a paper .
版权声明
本文为[Install a sound 77]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204210551491110.html
边栏推荐
- star
- Azkaban recompile, solve: could not connect to SMTP host: SMTP 163.com, port: 465 [January 10, 2022]
- R language survival package coxph function to build Cox regression model, ggrisk package ggrisk function and two_ Scatter function visualizes the risk score map of Cox regression, interprets the risk
- PCL点云处理之直线与平面的交点计算(五十三)
- The flinkcdc reports an error: but this is no longer available on the server
- Computing the intersection of two planes in PCL point cloud processing (51)
- 【问题解决】‘ascii‘ codec can‘t encode characters in position xx-xx: ordinal not in range(128)
- 腾讯邱东洋:深度模型推理加速的术与道
- Recommend an open source free drawing software draw IO exportable vector graph
- The R language uses the timeroc package to calculate the multi time AUC value of survival data without competitive risk, and uses the confint function to calculate the confidence interval value of mul
猜你喜欢

Monte Carlo py solves the area problem! (save pupils Series)

CVPR 2022 | querydet: use cascaded sparse query to accelerate small target detection under high resolution

Automatically fill in body temperature and win10 task plan
![[graph theory brush question-4] force deduction 778 Swimming in a rising pool](/img/e3/a8cd9fc7773843e9e8ee6a6eba123f.png)
[graph theory brush question-4] force deduction 778 Swimming in a rising pool

Wave field Dao new species end up, how does usdd break the situation and stabilize the currency market?

What is the difference between a host and a server?

【PTA】整除光棍

Servlet learning notes

AQS learning
ArcGIS JS version military landmark drawing (dovetail arrow, pincer arrow, assembly area) fan and other custom graphics
随机推荐
nc基础用法3
Commit and ROLLBACK in DCL of 16mysql
Change the material of unity model as a whole
Paper writing 19: the difference between conference papers and journal papers
Es keyword sorting error reason = fielddata is disabled on text fields by default Set fielddata = true on keyword in order
The R language uses the timeroc package to calculate the multi time AUC value of survival data without competitive risk, and uses the confint function to calculate the confidence interval value of mul
Remote code execution in Win 11 using wpad / PAC and JScript 1
NC basic usage 4
腾讯邱东洋:深度模型推理加速的术与道
On BIM data redundancy theory
SQL Server connectors by thread pool 𞓜 instructions for dtsqlservertp plug-in
How about CICC fortune? Is it safe to open an account
R语言使用econocharts包创建微观经济或宏观经济图、indifference函数可视化无差异曲线、自定义计算交叉点、自定义配置indifference函数的参数丰富可视化效果
PostgreSQL basic functions
本地调用feign接口报404
redis 分布式锁
selenium.common.exceptions.WebDriverException: Message: ‘chromedriver‘ executable needs to be in PAT
. Ren -- the intimate artifact in the field of vertical Recruitment!
論文寫作 19: 會議論文與期刊論文的區別
R language ggplot2 visualization: ggplot2 visualizes the scatter diagram and uses geom_ mark_ The ellipse function adds ellipses around data points of data clusters or data groups for annotation