mirror of
https://github.com/Sosokker/HomieCare.git
synced 2025-12-19 02:04:03 +01:00
Update action_model.py
This commit is contained in:
parent
eeb29dfd90
commit
3bf121db8c
@ -105,9 +105,8 @@ class ActionModel:
|
|||||||
pts = np.array(track.keypoints_list, dtype=np.float32)
|
pts = np.array(track.keypoints_list, dtype=np.float32)
|
||||||
out = self.action_model.predict(pts, frame.shape[:2])
|
out = self.action_model.predict(pts, frame.shape[:2])
|
||||||
action_name = self.action_model.class_names[out[0].argmax()]
|
action_name = self.action_model.class_names[out[0].argmax()]
|
||||||
action = '{}: {:.2f}%'.format(action_name, out[0].max() * 100)
|
|
||||||
# Add action to action list.
|
# Add action to action list.
|
||||||
ActionModel.ACTION_LIST.append(action)
|
ActionModel.ACTION_LIST.append(action_name)
|
||||||
if action_name == 'Fall Down':
|
if action_name == 'Fall Down':
|
||||||
ActionModel.IS_FALL_DOWN = True
|
ActionModel.IS_FALL_DOWN = True
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user