Skip to content

Instantly share code, notes, and snippets.

@FavioVazquez
Created May 2, 2018 15:46
Show Gist options
  • Select an option

  • Save FavioVazquez/b6e4ab8787f4bd4a7186d858a86c3521 to your computer and use it in GitHub Desktop.

Select an option

Save FavioVazquez/b6e4ab8787f4bd4a7186d858a86c3521 to your computer and use it in GitHub Desktop.
from sparkdl import DeepImagePredictor
# Read images using Spark
image_df = ImageSchema.readImages("flower_photos/sample/")
predictor = DeepImagePredictor(inputCol="image", outputCol="predicted_labels", modelName="InceptionV3", decodePredictions=True, topK=10)
predictions_df = predictor.transform(image_df)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment