A Spark Computer Vision Wish List
This past week, AMPLab announced a machine learning library Keystone ML for Spark, evidently somewhat in competition with MLlib. The main feature it touts is ML pipelines, which Spark, although it introduced ML pipelines in Spark 1.2.0 in December, 2014, is not as sophisticated at. But what really caught my attention was its built-in handling of computer vision processing, as this would address two of the four types of data I blogged about earlier this year not commonly handled by Big Data and Data Science tools and teams.
Way back in the day when I was in grad school, computer vision consisted mostly of image moments, which didn't work. But then in 1999 David Lowe invented Scale-Invariant Feature Transform (SIFT), which identify image features that are robust against scaling, rotation, and translation, thus allowing easy tracking from one video frame to the next.
Keystone ML does indeed support feature-based computer vision. But there are limitations:
- For batch processing, there's no easy way to process an RDD of images. This is really more of a limitation of Spark than of Keystone ML. Spark is set up to process HDFS files consisting of either text or serialized objects. It's not set up to process scientific binary files. Spark's SparkContext needs a new method to create an RDD out of a directory of binary files.
- For stream processing, there should be an easy way to set up one Kafka stream per executor, so that each executor can process a video stream.
- Keystone uses SIFT for feature detection, but SIFT is patented. That is why the(non-distributed computing) computer vision library OpenCV supports similar competing algorithms such as BRISK and FREAK. A Spark computer vision library should support patent-free image feature detection.