vardanagarwal / Proctoring-AI

Creating a software for automatic monitoring in online proctoring
MIT License
544 stars 329 forks source link

Issue on eye_tracker #20

Closed salam104 closed 3 years ago

salam104 commented 3 years ago

Traceback (most recent call last): File "eye_tracker.py", line 189, in eyeball_pos_left = contouring(thresh[:, 0:mid], mid, img, end_points_left) TypeError: slice indices must be integers or None or have an index method

vardanagarwal commented 3 years ago

Above this line can you write:

mid = int(mid)

salam104 commented 3 years ago

Yes, that issue is fixed.

Now am facing division by zero warning on this two lines. x_ratio = (end_points[0] - cx)/(cx - end_points[2]) y_ratio = (cy - end_points[1])/(end_points[3] - cy)

Thanks for your response.

vardanagarwal commented 3 years ago

Yeah, you can get that warning when their difference is zero. It won't affect the running of the code, however if you still want to eliminate it you can add an if statement to check if the value is zero before dividing.