Skip to content

Latest commit

 

History

History
33 lines (22 loc) · 2.42 KB

README.md

File metadata and controls

33 lines (22 loc) · 2.42 KB

Face detection

This uses the excellent Annotorious annotation tool from Recogito in combination with face-api.js to detect faces in IIIF images in the browser.

Implementation Notes

Annotorious integrates into Openseadragon which is one of the IIIF Image API viewers.

The face-api.js uses a JavaScript version of tenserflow and in this version a Single Shot Multibox Detector machine learning model to identify faces and return x,y,width,heigh in the image. My code then converts them to W3C annotations and passes them to Annotorious to draw them on to Openseadragon.

Try a IIIF Image

Try your own IIIF Image URL (URL should end with info.json):

IIIF Image URL: View

Examples

This isn't a perfect solution but does work on the following images:

  • National Library of Wales, Photograph by John Thomas - (Image at NLW)
  • National Library of Wales, Photograph by Geoff Charles - multiple people in photo - (Image at NLW)
  • National Library of Wales, Photograph by Geoff Charles - Men with hats - (Image at NLW)

The results for the following are not so great:

  • Group portrait from Library of The Jewish Theological Seminary - (Image in Europeana)
  • National Library of Wales, Photograph by Geoff Charles - multiple people some not looking at camera - (Image at NLW)