Emmanouil Tzorakoleftherakis,Mathworks
用matlab.®R2020B,您可以使用深度学习工具箱™块库以及Matlab功能块来模拟和生成Simulink中培训的深度学习模型的代码金宝app®。
了解如何使用控制,信号处理和传感器融合组件模拟Simulink的深度学习网络,以评估您的深度学习模型对金宝app系统级性能的影响。了解更多关于使用nvidia的更多信息®GPU在Simulink中加快执行您的深度学习网络模型。金宝app
截至MATLAB的R2020B释放®,您可以使用MATLAB功能块以及深度学习工具箱™块库进行模拟和生成Simulink中培训的深度学习模型的代码金宝app®。例如,要设计一个高速公路车道之后的系统,可以使用深度学习块来创建执行车道和车辆检测的Simulink子系统,将该子系统与更大的Simulink模型集成,其中包括其他组件,例如车辆动态模型,金宝app控制器后面的控制器,传感器融合和3D可视化,并通过部署前通过系统级仿真验证整体设计的性能。让我们看看我们如何创建在Simulink中执行车辆和车道检测的子系统。金宝app我们需要的第一件事是C ++编译器。我们还将需要提供从Matlab Coder™金宝app和GPU编码器™的接口到目标特定的深度学习库。最后,我们假设我们有一个预先训练的车道检测网络以及存储在MATLAB文件中的预先训练的YOLOV2车辆探测器。在Simuli金宝appnk模型中,我们正在从交通视频文件中读取,并且在车辆和车道检测部件之后我们正在使用车道和车辆注释再次显示交通视频。对于车道检测,首先我们正在调整视频帧的大小,以匹配培训的车道检测网络所期望的输入。接下来,我们将使用来自深度学习块库的“预测”块对培训的网络进行推断。 To link the block to the lane detector object we are providing the path to the appropriate MATLAB file. Another option here would be to use a MATLAB function. The predict block will output two lane boundaries represented by a parabolic equation with 3 parameters that are then transformed into lanes in image coordinates. For vehicle detection, we will use a MATLAB Function block to perform inference on the pretrained yolov2 vehicle detector. Inside the MATLAB Function block we will load the pretrained network, and call the detect method to get the bounding boxes and associated confidence scores. Next, we will specify the dimensions of the block outputs. The MATLAB Function block can also be used with other types of networks like LSTMs, and you can also use it to output activations from specific layers of the network. The last thing we need to do before we run the simulation, is to set the simulation target language to C++ in the model settings. Clicking the Run button will under the hood generate code from the Predict and MATLAB Function blocks and compile it for CPU-accelerated simulation. The output of the simulation displays the annotated traffic video as expected. Finally, you can also use GPU Coder with NVIDIA®GPU加速Simulink中深度学习模型的模拟。金宝app要配置GPU加速模型,请在模型设置中检查“GPU加速”框下的“GPU加速”框。在仿真中验证系统设计后,您可以从Simulink模型生成代码进行部署。金宝app您可以使用Simulin金宝appk Coder™,嵌入式编码器®或GPU编码器生成C ++或CUDA代码并在英特尔上部署深度学习网络®, 手臂®,或nvidia平台。
您还可以从以下列表中选择一个网站:
选择中国网站(以中文或英文)以获取最佳网站性能。其他MathWorks国家网站未优化您的位置。