How to deploy a matlab function to raspberry pi 3b+

1 回表示 (過去 30 日間)
Muhammad Raihan Ekaputra Idrisatria
コメント済み: Vinicio Moya 2021 年 11 月 2 日
I've try to deploy a matlab function into my raspberry pi. Bellow is my matlab function and my deployment script :
function raspi_gneet_es_proj()
raspiObj=raspi();
cam=cameraboard(raspiObj,'Resolution','1920x1080');
net=coder.loadDeepLearningNetwork('MyNet_Result.mat','MyNetResult');
ukuran=net.Layers(1).InputSize;
ukuran=ukuran(1:2);
to_show="..........";
start=tic;
fprintf('Entry While Loop..... \n');
while true
img=snapshot(cam);
el_time=toc(start);
if el_time>1
IMG=imresize(img,ukuran);
[label,score]=net.classify(IMG);
max_scr=max(score);
label_str=string(label);
to_show=sprintf("Label : %s \n Score : %f \n",label_str,max_scr);
start=tic;
end
img_label=insertText(img,[0 0],to_show);
displayImage(raspiObj,img_label);
end
end
and bellow is my deployment script :
board=targetHardware("Raspberry Pi");
board.CoderConfig.TargetLang="C++";
dlcfg=coder.DeepLearningConfig("arm-compute");
dlcfg.ArmArchitecture="armv7";
dlcfg.ArmComputeVersion="19.05";
board.CoderConfig.DeepLearningConfig=dlcfg;
deploy(board,'raspi_gneet_es_proj')
and i got this error message :
Operands to the || and && operators must be convertible to logical scalar values.
Error in coder.Hardware
Error in coder.Hardware
Error in coder.matlabtarget.Hardware
Error in targetHardware (line 32)
obj = obj@coder.matlabtarget.Hardware(name);
i use a macbook pro
  1 件のコメント
Reeno Joseph
Reeno Joseph 2021 年 5 月 13 日
Hi Muhammad,
Can you please specify the MATLAB version that you are using ?

サインインしてコメントする。

回答 (1 件)

Stefanie Schwarz
Stefanie Schwarz 2021 年 9 月 30 日
According to this documentation page, we don't currently support deployment of deep learning networks from Mac to Raspi:
Note: You cannot generate and deploy deep learning code on Raspberry Pi hardware using macOS.
  1 件のコメント
Vinicio Moya
Vinicio Moya 2021 年 11 月 2 日
I have the same problem. How can I uninstall the deep learning from the Raspberry?

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeMATLAB Support Package for Raspberry Pi Hardware についてさらに検索

製品


リリース

R2020b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by