Open HARIHARAN1103 opened 5 years ago
Hello, I have the same problem. I managed to get a bit further by doing tmp = output_blobs.keys() print(tmp)
heatmap = np.transpose(np.squeeze(net.blobs['Mconv7_stage_6_L1'].data), (1,2,0)) # output 1
But afterwards heatmap and heatmap_avg pft and pft_avg Have dimension problems problems
how you solve the dimension problem after change ouput_blobs.keys()?
Are you running Python3? Then use list(dict.keys())
. I think Python2 returned dict.keys() as a list, not Python3.
I tired demo.ipynb at google colab. After installing the requirements I started to run the code. There arise an issue in the follwing code,
heatmap_avg = np.zeros((oriImg.shape[0], oriImg.shape[1], 19)) paf_avg = np.zeros((oriImg.shape[0], oriImg.shape[1], 38))
first figure shows padded images
f, axarr = plt.subplots(1, len(multiplier)) f.set_size_inches((20, 5))
second figure shows heatmaps
f2, axarr2 = plt.subplots(1, len(multiplier)) f2.set_size_inches((20, 5))
third figure shows PAFs
f3, axarr3 = plt.subplots(2, len(multiplier)) f3.set_size_inches((20, 10))
for m in range(len(multiplier)): scale = multiplier[m] imageToTest = cv.resize(oriImg, (0,0), fx=scale, fy=scale, interpolation=cv.INTER_CUBIC) imageToTest_padded, pad = util.padRightDownCorner(imageToTest, model['stride'], model['padValue']) print(imageToTest_padded.shape)
f2.subplots_adjust(right=0.93) cbar_ax = f2.addaxes([0.95, 0.15, 0.01, 0.7]) = f2.colorbar(ax2, cax=cbar_ax)
f3.subplots_adjust(right=0.93) cbar_axx = f3.addaxes([0.95, 0.57, 0.01, 0.3]) = f3.colorbar(ax3x, cax=cbar_axx) cbar_axy = f3.addaxes([0.95, 0.15, 0.01, 0.3]) = f3.colorbar(ax3y, cax=cbar_axy)
After excuting the code,
(184, 200, 3) At scale 0, The CNN took 105.94 ms.
TypeError Traceback (most recent call last)