O'Reilly logo

Scala Machine Learning Projects by Md. Rezaul Karim

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Image feature extraction

So far we have seen how to preprocess images so that features from those images can be extracted and fed into CNNs. Additionally, we have seen how to extract and map metadata and link it with the original images. Now it's time to extract features from those preprocessed images.

We also need to keep in mind the provenance of the metadata of each image. As you can guess, we need three map operations for feature extractions. Essentially, we have three maps. For details see the imageFeatureExtractor.scala script:

  1. Business mapping with the form imageIDbusinessID
  2. Data map of the form imageID → image data
  3. Label map of the form businessID → labels

We first define a regular expression pattern to extract the .jpg name ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required