move the np.concatenate line inside the extract_keypoints function and make sure to return the concatenated array c1192a3 JefferyJapheth commited on Aug 2, 2023
modified # Function to perform holistic detection using Mediapipe def mediapipe_detection(image, model): # COLOR CONVERSION BGR 2 RGB image_rgb = cv2.cvtColor(image, cv2.COLOR_BGR2RGB) image_rgb.flags.writeable = False # Image is no longer writeable results = model.process(image_rgb) # Make prediction image_rgb.flags.writeable = True # Image is now writeable image_bgr = cv2.cvtColor(image_rgb, cv2.COLOR_RGB2BGR) # COLOR CONVERSION RGB 2 BGR return image_bgr, results 914e870 JefferyJapheth commited on Aug 2, 2023
specifying the webcam source explicitly by passing the webcam ID as an argument to the gr.Interface function. bd4424b JefferyJapheth commited on Aug 2, 2023
deleted multiple and left one "with mp_holistic.Holistic(min_detection_confidence=0.5, min_tracking_confidence=0.5) as holistic:" 3535ae8 JefferyJapheth commited on Aug 1, 2023
redefined predict_with_webcam . With this modification, the input tensor passed to the PreprocessLayer should have the correct shape, and the error should be resolved. 31a741d JefferyJapheth commited on Aug 1, 2023
added N_ROWS = 543 N_DIMS = 3 DIM_NAMES = ['x', 'y', 'z'] SEED = 42 NUM_CLASSES = 250 7d38abd JefferyJapheth commited on Aug 1, 2023
re-modified code with mediapipe and webcam initialized e156e53 JefferyJapheth commited on Aug 1, 2023
redefined predict_with_webcam function to return "Could not detect landmarks. Make sure your webcam is working properly." bc3cf69 JefferyJapheth commited on Aug 1, 2023
modified predict_with_webcam to continuously predict output. 824a609 JefferyJapheth commited on Aug 1, 2023
changed webcam size and added some exception handling to check for None values and return a meaningful message in this case 9e34ea5 JefferyJapheth commited on Aug 1, 2023
added dictionary class and modified prediction class to output the class 760b3da JefferyJapheth commited on Aug 1, 2023