Skip to content

Conversation

@ma4096
Copy link

@ma4096 ma4096 commented Aug 14, 2025

Problem: when no face is detected, the program crashes. Caused by np.stack of an empty list.

  • Added a check that there is at least one detection above the score threshold, otherwise exit with no detection
  • Added detection: bool in GazeResultsContainer to save no detection
  • Added utils.saveStack to prevent calling np.stack on an empty list. Returns either np.array or None
  • Added feature in vis.render that annotates the image with no detection if there is no detection

Problem: when running the system on (not ideal) videos for data analysis, it can happen that more than one face is detected if there is only one person in the frame. This complicates data analysis.

  • Added the option single_face: bool = False to pipeline.step. If True, selects the highest scoring face and discards all other detections

Problem: the usage example in README.md does not work

  • Imported all used packages
  • Added hints for torch devices (gpu is not a valid torch device)
  • Added display of the rendered image

Problem: demo.py does not run

  • Removed the string s from utils.selected_device, as it calls the undefined function date_modified(). As the string is never used (and mentions YOLOv3), I deemed it deprecated and removed it in total.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant