Join Jonathan Fernandes for an in-depth discussion in this video Classification for an image: Inference, part of Introduction to Deep Learning with OpenCV.
- [Instructor] So we've loaded the different classes … of ImageNet and we're going to use the OpenCV DNN module … as an inference engine. … What we're going to do here is pass an image through … a pre-trained model that has been trained … on the 1,000 classes of ImageNet. … The model will then output the probability … the image contains each of the 1,000 classes. … So let's head over to our editor, … and let's load the Caffe model, … and let's comment out the classes because we've confirmed … that we can display the different classes. … Now if you open the prototxt file in the model folder. … So I do File, Open File and open this prototext file here. … You'll find the deep learning architecture … of the module is a JSON like structure. … The pretrained model is in the Caffe model file. … Both of these files are in the model folder … and I downloaded them from the Caffe zoo. … So let's read in these Caffe files, … so I'm going to head back to the image file … and I type in cv2.dnn.readNetFromCaffe …
- Deep learning for OpenCV
- Viewing images and video in OpenCV
- Working with blobs in the dnn module
- Image classification
- Video classification