moondream icon indicating copy to clipboard operation
moondream copied to clipboard

use gaze detect only detecting faces don't have their gaze directions

Open cray1031 opened this issue 11 months ago • 1 comments

gaze_result = model.detect_gaze(pil_image, face_center) gaze_result:{'gaze': None}

cray1031 avatar Jan 16 '25 03:01 cray1031

Currently it only returns gaze if it thinks the gaze point is within the image. There's a setting you can use to change that behavior: https://github.com/vikhyat/moondream/blob/main/moondream/torch/moondream.py#L541-L546

Considering changing it to always return the predicted gaze by default and have a separate boolean output indicating whether it's out of frame or not; that way folks who are interested in direction can still use it easily.

vikhyat avatar Jan 28 '25 07:01 vikhyat