Target language problem with coder.load​DeepLearni​ngNetwork in Simulink

Hi everyone,
I am trying to implement a YOLO network in Simulink. For my first project, I used the YOLOV2ObjectDetectionUsingIntelMKLDNNExample. Running & experimenting with the example in Matlab works like charm. But when I try to run the yolov2_detection function in a Matlab Function Block in Simulink, I get a compiler error:
Target selection language property on Code Generation configuration was not set to C++. Simulation with deep learning network requires target language to be set to C++.
Changing the default mex compiler to cpp by using mex -setup cpp (MEX configured to use 'Microsoft Visual C++ 2017' for C++ language compilation.) didn't resolve the problem. Do I have to change the target language somewhere else? Is there another compiler? I would be thankful for any insights!
Minimal code example to reproduce the error (using the files in MATLAB\Examples\R2020a\deeplearning_shared\YOLOV2ObjectDetectionUsingIntelMKLDNNExample)
function out_img = run_yolo(img)
persistent yolov2Obj;
if isempty(yolov2Obj)
yolov2Obj = coder.loadDeepLearningNetwork('yolov2ResNet50VehicleExample.mat');
end
out_img = img
Specs:
  • Window10 System
  • Using Matlab2020A with the Deeplearning Toolbox
  • No Matlab Coder available

답변 (0개)

카테고리

도움말 센터File Exchange에서 Simulink Coder에 대해 자세히 알아보기

질문:

2020년 8월 6일

댓글:

2021년 2월 23일

Community Treasure Hunt

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

Start Hunting!

Translated by