Skip to content
This repository has been archived by the owner on Aug 5, 2022. It is now read-only.

Incorrect results on openpose's HAND model #263

Open
versusvoid opened this issue Feb 27, 2019 · 0 comments
Open

Incorrect results on openpose's HAND model #263

versusvoid opened this issue Feb 27, 2019 · 0 comments

Comments

@versusvoid
Copy link

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant