databricks / spark-deep-learning

Deep Learning Pipelines for Apache Spark
https://databricks.github.io/spark-deep-learning
Apache License 2.0
1.99k stars 494 forks source link

module 'sparkdl.image.imageIO' has no attribute 'readImagesWithCustomFn' #229

Open venus-kni opened 4 years ago

venus-kni commented 4 years ago

Hello guys, I want to apply deep learning to load the images by using pysparkdl and google colab. but after running the following commands in colab, I take an error. can anybody help me, please?

the version of pyspark is "sparkdl==0.2.2"

this is the code:

from sparkdl.image import imageIO as imageIO

tulips_df = ImageSchema.readImages("flower_photos/tulips").withColumn("label", lit(1))
daisy_df = imageIO.readImagesWithCustomFn("flower_photos/daisy", decode_f=imageIO.PIL_decode).withColumn("label", lit(0)) 

this is the error: AttributeError: module 'sparkdl.image.imageIO' has no attribute 'readImagesWithCustomFn'