Vision of the camera was stuck and lagging during the hip tracking with using ur5 robtot arm and mediapipe mode

Hi, everyone, here is a little issue that happened during my little project, can u guys help me ?

I was using the mediapipe model to recognize and track the mid-point of human hips, following the mid-point position to make a coordinate for the robot arm tracking. For convenience, I am using TCP communication and through the robot_ip to control the UR5 robot arm movement on URSim 3.14

But during the development, the vision of the camera was stuck and lagging during the hips mid-point tracking, which caused the UR5 robot arm isn’t able to move, curious is, there is no error code generated and it seems there is no failure between URSim and my program

Be mentioned that, I am using pyCharm, python 3.9, URSim 3.14 UR5 robot arm, openCV ver 4.7,

It would be truly appreciated to you guys if it can be fixed, thanks!!!

Here is the link to my program

Here is the response from my program :

C:\Users\qyz\PycharmProjects\UR_Facetracking-master\venv\Scripts\python.exe C:\Users\qyz\PycharmProjects\UR_Facetracking-master\hip_tracking_version5.py
initialising robot
waiting for everything to be ready
Robot Pose: [-0.1201, -0.4318, 0.1461, -0.0012, 3.1163, 0.0389]
Robot joint positions: [-1.6007, -1.7271, -2.2030, -0.8080, 1.5951, -0.0310]
robot initialised
starting loop
INFO: Created TensorFlow Lite XNNPACK delegate for CPU.
Robot Pose: [-0.1353, 0.2214, 0.7392, -1.3512, -0.7077, 0.7722]
Robot joint positions: [-3.7004, -1.1002, -1.5895, -0.3528, 1.5387, -0.0080]

Process finished with exit code -1