O'Reilly logo

Java Deep 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 and extract image metadata by linking them with the original images. Now, we need to extract features from those preprocessed images so that they can be fed into CNNs.

We need the map operations for feature extractions for business, data, and labels. These three operations will ensure that we don't lose any image provenance (see the imageFeatureExtractor.java script):

  • Business mapping with the form imageID | businessID
  • Data map of the form imageID | image data
  • Label map of the form businessID | labels

First, we must define a regular expression pattern to extract a jpg name from the CSVImageMetadataReaderclass, which is used to match against training labels:

public static ...

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