code: function getFacesFromLocations(img, rects, faceSize = 150) {
        return Promise.all(
          rects.map(rect => faceLandmarkPredictor.predictAsync(img, rect))
        )
          .then(shapes => fr.extractImageChips(img, fr.getFaceChipDetails(shapes, faceSize)))
      }
docs: /* extract the faces from an image for given face rectangles