From the course: Introduction to Deep Learning with OpenCV
Unlock the full course today
Join today to access over 24,800 courses taught by industry experts.
Overview of the dnn process - OpenCV Tutorial
From the course: Introduction to Deep Learning with OpenCV
Overview of the dnn process
- [Instructor] As part of using Open CV as an inference engine we load models trained in other deep learning frameworks such as TenserFlow, Caffe, and PyTorch. We then preprocess the images using blobFromImage and finally pass these blobs through our loaded pretrained model to get our output predictions. readNetFrom, blobFromImage, setInput, and forward are four of the methods that we use in the dnn module. Let's take a look at them in turn. As Open CV supports models from Caffee, TenserFlow, Torch, DarkNet and models from the omnx format all you need to do is load the models in wait and any configuration files for your use case. So readNetFromCaffe takes in as arguments the path to the prottotxt file with text descriptions of the network architecture and the path to the caffeModel file with the train model. blobFromImage creates a four-dimensional blob from the image and you can optionally resize and crop the image from the center, subtract mean values, scale values by the scale…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.