hotfix to make it works with ros
This commit is contained in:
@@ -1,10 +1,11 @@
|
||||
import numpy as np
|
||||
from ml_gestures.predict import MLGesturePredictor
|
||||
|
||||
|
||||
class SpecialGestureDetector:
|
||||
def __init__(self, mode='geometric', model_path=None, class_names=None):
|
||||
self.mode = mode
|
||||
if mode == 'ml':
|
||||
from ml_gestures.predict import MLGesturePredictor
|
||||
if model_path is None or class_names is None:
|
||||
raise ValueError("Для ML нужны model_path и class_names")
|
||||
self.ml_predictor = MLGesturePredictor(model_path, class_names)
|
||||
|
||||
Reference in New Issue
Block a user