async searchFromFiles(filePaths, targetWords, inferenceCallback) {
    // Read the content of the image files as tensors with dimensions
    // that match the requirement of the image classifier.
    const {height, width} = this.getImageSize();
    const imageTensors = [];
    for (const file of filePaths) {
      const imageTensor = await readImageAsTensor(file, height, width);
      imageTensors.push(imageTensor);
    }

    // Combine images to a batch for accelerated inference.
    const axis = 0;
    const batchImageTensor = tf.concat(imageTensors, axis);
    if (inferenceCallback != null) {
      inferenceCallback();
    }

    // Run inference.
    const t0 = tf.util.now();
    const classNamesAndProbs = await this.classify(batchImageTensor);
    const tElapsedMillis = tf.util.now() - t0;

    const foundItems = searchForKeywords(
        classNamesAndProbs, filePaths, targetWords);

    // TensorFlow.js memory cleanup.
    tf.dispose([imageTensors, batchImageTensor, imageTensors]);

    return {
      targetWords,
      numSearchedFiles: filePaths.length,
      foundItems,
      tElapsedMillis
    };
  }
Search for images with content matching target wrods.

@param {string[]} filePaths An array of paths to image files
@param {string[]} targetWords What target words to search for. An image
  will be considered a match if its content (as determined by
  `imageClassifer`) matches any of the target words.
@param {() => any} inferenceCallback An optional callback that will
  be invoked when the model is running inference on image data.