March 2018
Beginner to intermediate
306 pages
9h 54m
English
For this recipe, you need to complete the following steps:
import cv2import numpy as np
image = cv2.imread('../data/Lena.png', cv2.IMREAD_COLOR)tensor = cv2.dnn.blobFromImage(image, 1.0, (224, 224), (104, 117, 123), False, False);
tensor = cv2.dnn.blobFromImages([image, image], 1.0, (224, 224), (104, 117, 123), False, True);
net = cv2.dnn.readNetFromCaffe('../data/bvlc_googlenet.prototxt', '../data/bvlc_googlenet.caffemodel')
net.setInput(tensor);prob = net.forward(); ...
Read now
Unlock full access