maxbbraun / fever

A contactless fever thermometer with auto-aim
MIT License
25 stars 12 forks source link

Improve face detection #2

Closed maxbbraun closed 4 years ago

maxbbraun commented 4 years ago

Face detection currently only works in a limited way, because the detector was not made for thermal images. Two possible directions to take from here:

  1. Use an RGB camera right next to the thermal camera, run face detection there, and reproject the detections into the thermal camera frame to read the temperature. Could use the Raspberry Pi Camera Module V2 to keep it cheap and simple or a Intel RealSense D400 if #1 requires it.

    • Pro: fairly straightforward implementation
    • Con: additional hardware, reprojection introduces error
  2. Make a thermal face detector. This could probably be done by fine-tuning a detector network previously trained on RGB data. This dataset of 1557 thermal images with bounding boxes might be a start. As for the detector, maybe try EfficientDet. In general, TensorFlow Lite compatibility might be preferable so an Edge TPU can be used.

    • Pro: clean all-in-one solution
    • Con: more unknowns in implementation

In either case, #2 may also require face landmarks (eyes, nose, mouth) instead of plain bounding boxes for better accuracy.

See also:

maxbbraun commented 4 years ago

I went with option 2 for now and created Thermal Face. It runs pretty well, but beware of this issue.

maxbbraun commented 4 years ago

Issue #2 is closed.