Это определение для распознавания человеческого лица в 3D.Я хочу аннотировать все точки, но понятия не имею.у кого-нибудь есть идея?спасибо!
def line_up_landmarks(landmarks, ax, i):
ax.scatter(landmarks[i][:, 0], landmarks[i][:, 1], landmarks[i][:, 2], c='b', s=10) # plot landmarks in points
ax.plot(landmarks[i][0:17, 0], landmarks[i][0:17, 1], landmarks[i][0:17, 2], c='b') # 0 - 16 face
ax.plot(landmarks[i][17:22, 0], landmarks[i][17:22, 1], landmarks[i][17:22, 2], c='b') # 17 - 21 left eyebrow
ax.plot(landmarks[i][22:27, 0], landmarks[i][22:27, 1], landmarks[i][22:27, 2], c='b') # 22 - 26 right eyebrow
ax.plot(landmarks[i][27:31, 0], landmarks[i][27:31, 1], landmarks[i][27:31, 2], c='b') # 27 - 30 nose bridge
ax.plot(landmarks[i][31:36, 0], landmarks[i][31:36, 1], landmarks[i][31:36, 2], c='b') # 31 - 35 nose wings
ax.plot(np.append(landmarks[i][36:42, 0], landmarks[i][36, 0]), np.append(landmarks[i][36:42, 1], landmarks[i][36, 1]), np.append(landmarks[i][36:42, 2], landmarks[i][36, 2]), c='b') # 36 - 41 left eye
ax.plot(np.append(landmarks[i][42:48, 0], landmarks[i][42, 0]), np.append(landmarks[i][42:48, 1], landmarks[i][42, 1]), np.append(landmarks[i][42:48, 2], landmarks[i][42, 2]), c='b') # 42 - 47 right eye
ax.plot(np.append(landmarks[i][48:60, 0], landmarks[i][48, 0]), np.append(landmarks[i][48:60, 1], landmarks[i][48, 1]), np.append(landmarks[i][48:60, 2], landmarks[i][48, 2]), c='b')# 48 - 59 outer lip
ax.plot(np.append(landmarks[i][60:68, 0], landmarks[i][60, 0]), np.append(landmarks[i][60:68, 1], landmarks[i][60, 1]), np.append(landmarks[i][60:68, 2], landmarks[i][60, 2]), c='b')# 60 - 67 inner lip
ax.plot(landmarks[i][30:32, 0], landmarks[i][30:32, 1], landmarks[i][30:32, 2], c='b') # nose bridge to right wing
ax.plot([landmarks[i][30, 0], landmarks[i][35, 0]], [landmarks[i][30, 1], landmarks[i][35, 1]], [landmarks[i][30, 2], landmarks[i][35, 2]], c='b') # nose bridge to left wing