Added training loop and model
This commit is contained in:
@@ -45,7 +45,7 @@ class KeypointExtractor:
|
||||
# check if cache file exists and return
|
||||
if os.path.exists(self.cache_folder + "/" + video + ".npy"):
|
||||
# create dataframe from cache
|
||||
return pd.DataFrame(np.load(self.cache_folder + "/" + video + ".npy"), columns=self.columns)
|
||||
return pd.DataFrame(np.load(self.cache_folder + "/" + video + ".npy", allow_pickle=True), columns=self.columns)
|
||||
|
||||
# open video
|
||||
cap = cv2.VideoCapture(self.video_folder + video)
|
||||
@@ -89,7 +89,6 @@ class KeypointExtractor:
|
||||
:return: the keypoints and the frame with keypoints on if draw is set to True
|
||||
:rtype: np.ndarray
|
||||
"""
|
||||
print("Extracting keypoints from frame")
|
||||
# Convert the BGR image to RGB and process it with MediaPipe Pose.
|
||||
results = self.holistic.process(cv2.cvtColor(image, cv2.COLOR_BGR2RGB))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user