Emmanouil Tzorakoleftherakis,Mathworks
用matlab.®在R2020b中,您可以使用深度学习工具箱™块库以及MATLAB函数块在Simulink中模拟和生成训练过的深度学习模型的代码金宝app®.
了解如何在Simulink中用控制、信号处理和传感器融合组件模拟深度学习网络,以评估深度学习模型对系统金宝app级性能的影响。了解更多关于使用NVIDIA的信息®GPUS在Simulink中加快执行您的深度学习网络模型。金宝app
截至MATLAB的R2020B释放®,您可以使用MATLAB函数块以及深度学习工具箱™块库,在Simulink中模拟和生成经过训练的深度学习模型的代码金宝app®.例如,要设计一个高速公路车道跟踪系统,你可以使用深度学习块创建一个Simulink子系统来执行车道和车辆检测,将这个子系统与一个更大的Simulink模型集成,该模型包括额外的组件,如车辆动力学模型、车道跟踪控金宝app制器、传感器融合和三维可视化,并在部署前通过系统级仿真验证总体设计性能。让我们看看如何在Simulink中创建一个执行车辆和车道检测的子系统。金宝app我们首先需要的是一个c++编译器。我们还需要支持包,提供从MATLAB编码器™金宝app和GPU编码器™到特定目标深度学习库的接口。最后,我们假设我们有一个预训练的车道检测网络以及一个预训练的yolov2车辆检测器存储在MATLAB文件中。在Simuli金宝appnk模型中,我们正在读取一个交通视频文件,在车辆和车道检测部分之后,我们将再次显示带有车道和车辆标注的交通视频。对于车道检测,首先我们调整视频帧的大小,以匹配训练车道检测网络所期望的输入。接下来,我们将使用来自深度学习块库的“Predict”块对经过训练的网络进行推理。 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加速模拟模拟模拟模拟模拟。金宝app要为GPU加速配置模型,请在模型设置中检查模拟目标下的“GPU加速”框。在仿真中验证系统设计后,您可以从Simulink模型生成用于部署的代码。金宝app您可以使用Simulin金宝appk Coder™,嵌入式编码器®或GPU编码器生成C ++或CUDA代码并在英特尔上部署深度学习网络®, 手臂®,或NVIDIA平台。
您还可以从以下列表中选择一个网站:
选择中国网站(以中文或英文)以获取最佳网站性能。其他MathWorks国家网站未优化您的位置。