caffe
caffe copied to clipboard
Incorrect results on openpose's HAND model
I'm using synthetic test:
import cv2 as cv
import caffe
import numpy as np
proto = 'pose_deploy.prototxt'
weights = 'pose_iter_102000.caffemodel'
np.random.seed(223)
k = 368
inp = np.random.standard_normal([1, 3, k, k]).astype(np.float32)
# Caffe
caffe_net = caffe.Net(proto, weights, caffe.TEST)
caffe_net.blobs['image'].reshape(*inp.shape)
caffe_net.blobs['image'].data[...] = np.copy(inp)
res = caffe_net.forward()
caffeOut = caffe_net.blobs['net_output'].data
# OpenCV
net = cv.dnn.readNetFromCaffe(proto, weights)
net.setInput(inp)
cvOut = net.forward()
print(np.max(np.abs(caffeOut - cvOut)))
on OpenPose's hand model: http://posefs1.perception.cs.cmu.edu/OpenPose/models/hand/pose_iter_102000.caffemodel https://raw.githubusercontent.com/CMU-Perceptual-Computing-Lab/openpose/master/models/hand/pose_deploy.prototxt
Standard caffe produce max-abs error ~1e-8, this fork: ~0.025. Error appears for k >= 9
.
Running on Intel(R) Core(TM) i5-7400
Compiling with system-wide installed: MKL 2019.2.187 MKL-DNN 0.17.4