Skip to content

Instantly share code, notes, and snippets.

@FavioVazquez
Last active May 2, 2018 16:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save FavioVazquez/af566a98d19952eb0b61938c4752f7dc to your computer and use it in GitHub Desktop.
Save FavioVazquez/af566a98d19952eb0b61938c4752f7dc to your computer and use it in GitHub Desktop.
from pyspark.ml.image import ImageSchema
image_df = ImageSchema.readImages("flower_photos/sample/")
image_df.registerTempTable("sample_images")
df = spark.sql("SELECT inceptionV3_udf_with_preprocessing(image) as predictions from sample_images").show(truncate=False)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment