Generate and Deploy CUDA Code for Object Detection on NVIDIA Jetson

Ram Cherukuri, MathWorks

GPU Coder™ generates optimized CUDA® code from MATLAB® code for deep learning, embedded vision, and autonomous systems. The generated code calls optimized NVIDIA® CUDA libraries and can be integrated into your project as source code, static libraries, or dynamic libraries. It can also be used for prototyping on GPUs, such as the NVIDIA Tesla® and NVIDIA Tegra®.

See an example of a real-time object detection algorithm using a deep learning neural network based on YOLO architecture. This single neural network predicts bounding boxes and class probabilities directly from an input image in one evaluation. The object is identified with a bounding box if the probability is above certain threshold.

Using cnncodegen function, you can generate CUDA code for your neural network and then integrate the generated code into a bigger application. The main function uses OpenCV API to read the input image and display the output image with bounding boxes. Using this workflow, you can deploy your deep learning algorithm on embedded GPU targets such as Jetson Tegra or Drive™ PX platforms.