Advertisement
Guest User

Untitled

a guest
Mar 26th, 2017
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.82 KB | None | 0 0
  1. for i in range(0,343):
  2. ax.clear()
  3. px = probx[i,:].reshape(1,probx[i,:].size)
  4. py = proby[i,:].reshape(proby[i,:].size,1)
  5. # print "px shape: ", px.shape, "py shape", py.shape
  6. belief_x = np.matlib.repmat(px, 25,1)
  7. belief_y = np.matlib.repmat(py, 1,7)
  8. # print belief_x.shape, belief_y.shape
  9. belief = np.multiply(belief_x, belief_y)
  10. belief = belief / np.sum(belief)
  11. im = ax.imshow(belief, extent=[0, 6, 24, 0], aspect='auto', interpolation='gaussian', origin='upper')
  12. print "gt: ", dataset.grid_labels_test[i,:], "x: ", np.argmax(px), "y: ", np.argmax(py)
  13. ax.plot(dataset.grid_labels_test[i,0],dataset.grid_labels_test[i,1], 'k^')
  14. fig.colorbar(im, cax=cax)
  15. fig.canvas.draw()
  16. fig.savefig(str(i).join(('outputs/', '.png')))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement