Skip to content

Commit

Permalink
fix: fixed leap visualization with ROI cropping
Browse files Browse the repository at this point in the history
  • Loading branch information
ShyAssassin committed Nov 13, 2023
1 parent 0f475fc commit 408afdd
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions TrackingBackend/app/algorithms/leap.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
------------------------------------------------------------------------------------------------------
"""

import math
import cv2
import math
import numpy as np
import onnxruntime as rt
from app.types import EyeData
Expand Down Expand Up @@ -97,9 +97,7 @@ def run_model(self, frame: MatLike) -> np.ndarray:
return pre_landmark

def draw_landmarks(self, frame: MatLike, landmarks: np.ndarray) -> None:
width, height = frame.shape[:2]
height -= 112
width += 112
height, width = frame.shape[:2]

for point in landmarks:
x, y = point
Expand Down

0 comments on commit 408afdd

Please sign in to comment.