| import numpy as np | |
| landmarks_arr = np.load("/home/rnd/Documents/Ameer/Dream/LivePortrait/landmarks_arr.npy") | |
| print("landmarks_arr shape", landmarks_arr.shape) | |
| import matplotlib.pyplot as plt | |
| # Plotting | |
| plt.figure(figsize=(10, 6)) | |
| source_lmk = -landmarks_arr[0] | |
| plt.plot(source_lmk[:, 0], source_lmk[:, 1], 'o', color='black') # 'o' for dots, 'color' for the color of the dots | |
| # Set background color to white | |
| plt.gca().set_facecolor('white') | |
| # Optional: Add labels and title | |
| plt.xlabel('X-axis') | |
| plt.ylabel('Y-axis') | |
| plt.title('Plot of Array (203, 2)') | |
| plt.savefig('landmarks_arr.png', bbox_inches='tight') |