GPU Code generation for 'vehicle detector yolov2' in matlab2020a
2 次查看(过去 30 天)
显示 更早的评论
Hi,
I was trying to generate GPU cuda code for my program using matlab2020a. Am using detector 'vehicleDetectorYOLOv2()' for generating the vehicle detections and then using another neural network (network generated using 'patternnet') for color detection of detected vehicles.
is there any way I can generate GPU cuda code for vehicleDetectorYOLOv2() & neural network generated using patternnet using GPU coder?
I have found one link: https://in.mathworks.com/help/gpucoder/ug/code-generation-for-object-detection-using-YOLOv2.html. Could someone please suggest whether I should follow the same steps for 'vehicleDetectorYOLOv2()'?
Also any useful information regarding gpu code generation for 'neural network (network generated using 'patternnet')' also most welcome.
Am planning to use the generated CUDA code on a windows machine with installed NVIDIA GPU. any suggestions / adviceor usefull links on this?
0 个评论
回答(1 个)
Hariprasad Ravishankar
2020-11-30
Hi Nithin,
GPU Coder and MATLAB Coder support code generation for detect method of yolov2ObjectDetector in R2020a and therefore also supports the detector object returned by vehicleDetectorYOLOv2 function.
The patternnet function however is not supported for code generation. To workaround this limitation, you can create and train a shallow MLP SeriesNetwork object consisting of fullyConnected layers using the trainNetwork function in Deep Learning Toolbox.
Here is an example.
You can then save the trained SeriesNetwork object into a MAT file and generate code for the predict method using MATLAB Coder and GPU Coder.
Here is an example you can follow for generating code for SeriesNetwork and DAGNetwork objects.
Please let me know if this helps.
Hari
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 GPU Computing 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!