hotfix to make it works with ros

main
Eliza Moscovskaya 4 weeks ago
parent 0b3c74c463
commit b0f04daa78

@ -1,10 +1,11 @@
import numpy as np import numpy as np
from ml_gestures.predict import MLGesturePredictor
class SpecialGestureDetector: class SpecialGestureDetector:
def __init__(self, mode='geometric', model_path=None, class_names=None): def __init__(self, mode='geometric', model_path=None, class_names=None):
self.mode = mode self.mode = mode
if mode == 'ml': if mode == 'ml':
from ml_gestures.predict import MLGesturePredictor
if model_path is None or class_names is None: if model_path is None or class_names is None:
raise ValueError("Для ML нужны model_path и class_names") raise ValueError("Для ML нужны model_path и class_names")
self.ml_predictor = MLGesturePredictor(model_path, class_names) self.ml_predictor = MLGesturePredictor(model_path, class_names)

Loading…
Cancel
Save