Emmanouil Tzorakoleftherakis, MathWorks
用MATLAB®R2020B,您可以使用深度学习工具箱™块库以及Matlab功能块来模拟和生成Simulink中培训的深度学习模型的代码万博1manbetx®.
了解如何使用控制,信号处理和传感器融合组件模拟Simulink的深度学习网络,以评估您的深度学习模型对万博1manbetx系统级性能的影响。了解更多关于使用nvidia的更多信息®图形处理器加速执行你的深度学习网络模型在Simulink。万博1manbetx
截止到MATLAB的R2020b版本®,您可以使用MATLAB功能块以及深度学习工具箱™块库进行模拟和生成Simulink中培训的深度学习模型的代码万博1manbetx®.例如,要设计一个高速公路车道之后的系统,可以使用深度学习块来创建执行车道和车辆检测的Simulink子系统,将该子系统与更大的Simulink模型集成,其中包括其他组件,例如车辆动态模型,万博1manbetx控制器后面的控制器,传感器融合和3D可视化,并通过部署前通过系统级仿真验证整体设计的性能。让我们看看我们如何创建在Simulink中执行车辆和车道检测的子系统。万博1manbetx我们需要的第一件事是C ++编译器。我们还将需要提供从Matlab Coder™万博1manbetx和GPU编码器™的接口到目标特定的深度学习库。最后,我们假设我们有一个预先训练的车道检测网络以及存储在MATLAB文件中的预先训练的YOLOV2车辆探测器。在Simuli万博1manbetxnk模型中,我们正在从交通视频文件中读取,并且在车辆和车道检测部件之后我们正在使用车道和车辆注释再次显示交通视频。对于车道检测,首先我们正在调整视频帧的大小,以匹配培训的车道检测网络所期望的输入。接下来,我们将使用来自深度学习块库的“预测”块对培训的网络进行推断。 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中深度学习模型的仿真。万博1manbetx要配置图形处理器加速的模型,请选中“模型设置”中的“模拟目标”下的“图形处理器加速”框。一旦在仿真中验证了系统设计,您就可以从Simulink模型生成用于部署的代码。万博1manbetx你可以使用Simulin万博1manbetxk Coder™,Embedded Coder®或GPU编码器生成c++或CUDA代码,并在Intel上部署深度学习网络®、手臂®,或nvidia平台。
你也可以从以下列表中选择一个网站:
选择中国网站(中文或英文)以获得最佳网站性能。其他MathWorks国家站点没有针对您所在位置的访问进行优化。