utils.general.plot3d(ax3, body3d_detected_1, type_str='hand', valid_idx=body_valid_1, color=np.array([0.0, 0.0, 1.0])) utils.general.plot3d(ax3, body3d_detected_2, type_str='hand', valid_idx=body_valid_2, color=np.array([0.0, 0.0, 1.0])) ax3.set_xlabel('X Label') ax3.set_ylabel('Y Label') ax3.set_zlabel('Z Label') plt.axis('equal') ax4 = fig.add_subplot(244, projection='3d') utils.general.plot3d(ax4, body3d_1, type_str='hand', valid_idx=body_valid_1, color=np.array([1.0, 0.0, 0.0])) utils.general.plot3d(ax4, body3d_2, type_str='hand', valid_idx=body_valid_2, color=np.array([1.0, 0.0, 0.0])) ax4.set_xlabel('X Label') ax4.set_ylabel('Y Label') ax4.set_zlabel('Z Label') plt.axis('equal') xy, z = plot_all_PAF(PAF_1, 3) ax5 = fig.add_subplot(245) ax5.imshow(xy) ax6 = fig.add_subplot(246) ax6.imshow(z) xy, z = plot_all_PAF(PAF_2, 3) ax7 = fig.add_subplot(247) ax7.imshow(xy) ax8 = fig.add_subplot(248) ax8.imshow(z) plt.show()
utils.general.plot2d(ax1, hand2d_detected, type_str='hand', valid_idx=hand_valid, color=np.array([0.0, 0.0, 1.0])) for j in range(21): plt.text(hand2d[j, 0], hand2d[j, 1], str(j)) ax2 = fig.add_subplot(232, projection='3d') utils.general.plot3d(ax2, hand3d_detected, type_str='hand', valid_idx=hand_valid, color=np.array([0.0, 0.0, 1.0])) ax2.set_xlabel('X Label') ax2.set_ylabel('Y Label') ax2.set_zlabel('Z Label') plt.axis('equal') ax3 = fig.add_subplot(233, projection='3d') utils.general.plot3d(ax3, hand3d, type_str='hand', valid_idx=hand_valid, color=np.array([1.0, 0.0, 0.0])) ax3.set_xlabel('X Label') ax3.set_ylabel('Y Label') ax3.set_zlabel('Z Label') plt.axis('equal') xy, z = plot_all_PAF(PAF, 3) ax4 = fig.add_subplot(234) ax4.imshow(xy) ax5 = fig.add_subplot(235) ax5.imshow(z) ax6 = fig.add_subplot(236) ax6.imshow(image_full_v) utils.general.plot2d(ax6, hand2d_origin, type_str='hand', valid_idx=hand_valid, color=np.array([0.0, 0.0, 1.0])) plt.show()
mask_crop = np.squeeze(mask_crop) PAF = np.squeeze(PAF) mask_image = np.stack([mask] * 3, axis=2) mask_crop_image = np.stack([mask_crop] * 3, axis=2) fig = plt.figure(1) ax1 = fig.add_subplot(231) plt.imshow(image_crop) utils.general.plot2d(ax1, body2d, valid_idx=body_valid) ax2 = fig.add_subplot(232) plt.imshow(image) ax3 = fig.add_subplot(233) plt.gray() plt.imshow(mask_image) ax4 = fig.add_subplot(234) plt.gray() plt.imshow(mask_crop_image) ax5 = fig.add_subplot(235) PAF_img, img_z = plot_all_PAF(PAF, 3) ax5.imshow(PAF_img) ax6 = fig.add_subplot(236) ax6.imshow(img_z) plt.show()