import matplotlib.pyplot as plt import torch import cv2 import numpy as np import time from torchvision import transforms from utils.datasets import letterbox from utils.general import non_max_suppression_kpt from utils.plots import output_to_keypoint, plot_skeleton_kpts device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu") weigths = torch.load('yolov7-w6-pose.pt') model = weigths['model'] model = model.half().to(device) _ = model.eval() video_path = '../inference_data/video_4.mp4'