Implementing CNNs for image classification

The Scala object containing the main() method has the following workflow:

  1. We read all the business labels from the train.csv file
  2. We read and create a map from image ID to business ID of form imageIDbusID
  3. We get a list of images from the photoDir directory to load and process and, finally, get the image IDs of 10,000 images (feel free to set the range)
  4. We then read and process images into a photoID → vector map
  5. We chain the output of step 3 and step 4 to align the business feature, image IDs, and label IDs to get the feature extracted for the CNN
  6. We construct nine CNNs.
  7. We train all the CNNs and specify the model savings locations
  8. We then repeat step 2 to step 6 to extract the features from the ...

Get Scala Machine Learning Projects now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.