Skip to content

Commit

Permalink
Got rid of unnecessary code
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewmacdermott committed Feb 25, 2024
1 parent 9bc71db commit ab8a840
Showing 1 changed file with 2 additions and 27 deletions.
29 changes: 2 additions & 27 deletions HandAI/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,33 +2,8 @@
import cv2

topGesturesArray = [0,0,0,0] #up, down, palm, none
def mainLoop(numpy_image):
# BaseOptions = mp.tasks.BaseOptions
# GestureRecognizer = mp.tasks.vision.GestureRecognizer
# GestureRecognizerOptions = mp.tasks.vision.GestureRecognizerOptions
# VisionRunningMode = mp.tasks.vision.RunningMode

# # Create a gesture recognizer instance with the image mode:
# options = GestureRecognizerOptions(
# base_options=BaseOptions(model_asset_path='/path/to/model.task'),
# running_mode=VisionRunningMode.IMAGE)
# with GestureRecognizer.create_from_options(options) as recognizer:
# # The detector is initialized. Use it here.
# # ...



# # # Load the input image from an image file.
# # mp_image = mp.Image.create_from_file('/path/to/image')

# # Load the input image from a numpy array.
# mp_image = mp.Image(image_format=mp.ImageFormat.SRGB, data=numpy_image)
# # Perform gesture recognition on the provided single image.
# # The gesture recognizer must be created with the image mode.
# gesture_recognition_result = recognizer.recognize(mp_image)
# return gesture_recognition_result

# STEP 1: Import the necessary modules.
def mainLoop(numpy_image):
# STEP 1: Import the necessary modules.
import mediapipe as mp
from mediapipe.tasks import python
from mediapipe.tasks.python import vision
Expand Down

0 comments on commit ab8a840

Please sign in to comment.