In this presentation, we will detail two image processing applications which rely on a Cassandra centric architecture to achieve distributed, high accuracy analysis of a variety of image formats, types, and quality, and which require different kinds of metadata processing as well as feature extraction from the image themselves. We will outline the architecture choices made for the two use case studies, and how we found Cassandra to be the ideal choice for the persistence layer implementation technology. In conclusion we will discuss extensions to the two use cases discussed and some of the 'lessons learned' from the two implementation projects.
About the Speaker
Kerry Koitzsch Project Lead, Kildane Software Technologies, Inc
Kerry Koitzsch is a software engineer and architect specializing in big data applications, NoSQL databases, and image processing. He currently works for Correlli Software Systems, a big data analytics company in Sunnyvale CA.
2. Who Am I?
ï” Image processing enthusiast
ï” Big data technology enthusiast
ï” Robotics enthusiast
ï” NoSQL database enthusiast
ï” Microscopy enthusiast
ï” Software engineer
ï” Author
3. Overview of this Presentation
ï” This quick overview of some of our ongoing projects describes why Cassandra is a key
part of our ongoing research, development, and client support activities.
ï” The presentation highlights to areas of research which involve Cassandra technologies
in the âimages as big dataâ arena: an automated microscope slide application
prototype, and a stereo âsmart sensorâ mobile robot prototype.
ï” Both of the use cases describe rely heavily on Cassandra and related âhelper librariesâ
to provide data storage capabilities for the two software prototypes.
ï” Throughout the presentation we discuss how the flexibility, high performance, and
ability to âplay well withâ other components makes Cassandra an essential part of the
applications described here.
4. Some Context About Our Use Cases
ï” The automated microscopy case study is based upon our current POCs for a
distributed microscope slide analytics application. In it, we use standard optical
microscopes fitted with color digital cameras and an automatic slide-loading cartridge
system to process âdecksâ of glass or plastic microscope slides, usually of human cell
tissue of various kinds, the staining process depending on what the nature of the tissue
is, and, in the case of hematology slides (human blood) no staining at all. Different
resolutions of magnification, slide quality, and metadata must be processed.
ï” The stereo vision robotics platform case study is based upon our current POCs for a
stereo vision mobile robotics application. The application uses Hadoop, Spark, Flink,
Solr, and a number of additional machine learning libraries to analyze stereo image
pairs, build two- and three-dimensional models of the environment, and uses Bayesian
sensor fusion to enhance the 3D models with additional environmental information.
5. Our Objectives and How Cassandra Helps us Achieve Them
ï” In our use cases, we have to integrate mechanical control systems, complex âimage as big dataâ
analytics, and a variety of data formats and metadata in a common representation and with
efficient implementation.
ï” Cassandra and associated âhelper librariesâ such as Spring Data Cassandra, Solandra, and Katta
allow us to maintain a flexible technology stack while using off-the-shelf proven technologies
which âplay wellâ together.
ï” Cassandra has well-defined parameters for optimization, scalability, and availability.
ï” Cassandra enables us to meet our objective of maintaining flexibility while maintaining high
performance capabilities with a changeable server topology.
ï” Cassandra based technologies are flexible enough to accommodate a wide range of different
application domains, including microscopy (medical imagery of all kinds) and mobile robotics
applications (stereo vision âimage as big dataâ technology)
6. Our little software secret! :D
ï” We are not always software engineersâŠ.
ï” Sometimes, we are software ARCHAEOLOGISTS!
ï” But what is software archaeology? And how does it assist us build modern high-
performance distributed software systems?
8. Software Archaeology is Based Upon:
ï” The realization that the âfirst wave of AI technologiesâ (up to the mid-1990s)
introduced a host of valid ideas, concepts, strategies, and approaches which were not
completely assimilated into succeeding waves of AI technology.
ï” The realization that âlooking back at our software rootsâ may be a good thing.
ï” Identifying âbest of breedâ strategies of the past and re-thinking them, using up-to-
date software stacks. Some examples of these technologies include pre-Hadoop
distributed processing systems and algorithms, DeKleerâs implementations of âproblem
solversâ [1], geometric toolkits such as VANTAGE and Geometer [2],[3].
ï” This re-thinking and re-implementing process has already been successfully done for
POCs, products, research extensions and particularly for software patents [4]âŠ
9. Migrating âFirst Wave AIâ Concepts
ï” Quality image processing systems have been lost in the course of time (for
example General Electricâs Geometer [4], the Vantage modeling system [5], and
many others) ⊠while the implementation may need updating many of the
concepts may be --- and have been --- reimplemented using modern
technologies (and in particular Cassandra-centric technologies)
ï” Migrating our inspirations to modern implementation
ï” *Inspiration* does not *equal* implementation: we may choose to re-implement in
Clojure rather than Lisp, for example, and we use Cassandra-centric technology
stacks for almost *all* our implementationsâŠ
10. Why Our Case Studies are Cassandra-Centric
ï” Cassandra is a flexible, full-featured noSQL database
ï” Integrates well with Hadoop, Spark, and Flink-based software components
ï” A lot of development focus has already been done on different technology stacks, for
example, the SMACK stack
ï” Integrates well with the battery of Spring Framework components we use
ï” Cassandra is scalable, available, and highly-tunable
ï” âPlays wellâ with Lucene/Solr based technologies (via Solandra and other âglue-wareâ)
ï” Itâs easy to integrate Cassandra into use cases and software prototypes, allowing a
ârapid prototyping/developmentâ style
ï” Its also easy to use Cassandra in a plugin/module based architecture style
ï” Cassandra âplays wellâ with a variety of machine-learning libraries
ï” Cassandra is flexible enough for research, solid enough for products
11. POJOs to Cassandra via Spring Data
ï” Plain old java objects (POJOs) may be mapped to Cassandra using Spring Data
Cassandra
ï” We would also like to map ontology objects to Cassandra
ï” We begin with fundamental feature objects of images: regions, contours, lines,
junctions, and points, the kind of object instances generated from, for example,
connected component algorithms, edge extraction operators, and the like
ï” For our domain examples, the extracted image metadata and associated âfusedâ
data from other sensors [ for example microscope slide data sets might have other
sensor results associated with them, like spectrometry and chromatographic data ]
12. Images ARE Big Data
ï” Images have volume, variety, velocity, veracity
ï” While the image volume may be relatively low, the complexity of the individual
image objects may be extremely complex
ï” There may be associated signals (such as LIDAR and geolocation data)
ï” Images may be multispectral and multiresolution in nature
ï” Images may have significant associated metadata (as with medical imagery)
ï” Images may play only one part in a larger âbig data enterpriseâ
14. Case Study 1: An Automated Microscopy
System
ï” We want to be able to analyze large numbers of microscope slides automatically.
ï” The image analysis component may be complex and time consuming: we require a
distributed solution
ï” Images may require cleaning, rescaling, metadata extraction, and image format
conversion
ï” Analysis results are stored in Cassandra database with associated search
mechanisms via Solandra and custom code.
ï” The physical apparatus is a standard medical optical microscope with automated
stage and lighting controls and an automated microscope slide cartridge system
holding 25 microscope slides per deck.
18. Cassandra-Centric Infrastructure
ï” Cassandraâs flexibility allows us to adapt data models appropriately for new
experiments and ideas.
ï” We are also able to maintain consistent ontology development by progressively
evolving our table definitions and POJOs.
ï” We can develop our data models in separate Cassandra instances for purposes of
experimentation.
ï” Metadata can be easily expressed: this is particularly important for experimental
medical data, as citations, references to other data sets, parameters, and
associated sensor data may be present, as well as timestamps and audit trail /
handler data if information comes from a doctors office, insurance company, or
hospital.
21. Technology Stack, Case Study I
ï” Mechanical controls are implemented in Java and C++: these control the microscope
stage controls, lighting, positioning, cartridge control, and others
ï” Timestamps are generated by the microscope controls and are associated with analysis
records
ï” Slide images may be analyzed one or more times using different data analysis pipelines
ï” Slide images may be retained in the file system and subjected to feature extraction
and analysis
ï” We avoid saving images as blobs in Cassandra at this time
ï” We can âramp upâ our complexity gradually as we evolve our software. For example,
the next slide shows contour extraction from a microscope slide: the contour data may
be stored directly into Cassandra.
23. Conclusions, Case Study I
We learned in this case study that Cassandraâs flexible data modeling and
straightforward seamless integration with other âimage as big dataâ components,
including machine learning libraries such as Mahout and deeplearning4j enabled us
to build high performance slide analysis prototypes which were able to store complex
microscopic slide information (derived from feature extraction) and metadata
(associated with the image itself, such as citations, other sensor data, authorship and
auditing/handler data, and the like)
24. Case Study II: A Stereo Vision Robotics
Platform
Using a standard dual-image synchronized stereo camera on a mobile robotics platform, we
are able to obtain timestamped, geolocated/microgrid located image pairs for analysis. Image
pairs may be generated periodically to produce a set of sequential image pairs.
These image pairs are subjected to feature extraction, model building, and other analytic
techniques to produce scene models, which are associated with scene ontologies and scene
model templates to incorporate within a navigation program.
The navigation program and its data, along with internal sensors within the robot itself, allows
the mobile robot to successfully navigate scenes and perform simple tasks.
The navigation program is also able to perform qualitative navigation based on landmarks.
25. Goals of the Stereo Vision Platform
ï” Use a standard stereo image pair generating dual camera for experimentation
with a mobile robot
ï” We want to investigate two software problems: qualitative navigation and
integrated sensor fusion with robotic control
ï” We want to use inspiration from Poggioâs MIT Vision Machine in particular as a
starting point for our software
ï” However, we wish to use an integrated data pipeline design with âbest of breedâ
third-party components, including Cassandra, Hadoop/Spark, and Solr.
ï” We model much of our stereo three-dimensional modeling on Hartley and
Zisserman [5] and Faugeras [6]
31. Feature Extraction
ï” We can use many of the standard feature extraction techniques in a distributed
computing environment, including corner-finding, edges, junctions, t-junctions,
and the like.
ï” Connected component, canny edge extraction, deep learning, genetic algorithms
are all appropriate feature analysis technologies.
ï” Importing and exporting feature extraction data to and from Cassandra is easy
and makes sustainable experimentation possible.
ï” We can migrate from ontology to POJO to schema based design with ease as our
software can handle each of these representations.
33. Data Flow in the Robotics System
ï” Data flow in the robotics system is primarily mediated by Apache Kafka
ï” It turns out much of the extraneous âimage informationâ may be âthrown awayâ at
least temporarily --- for purposes of specific data flows
ï” Data flows may be mediated by Hadoop, Spark, or Flink based components
ï” Some machine learning components used in the data pipeline processing are now
technology agnostic : for example, Mahout supports Spark
ï” All of the image processing components have been found to work extremely well
and seamlessly with Cassandra
34. Conclusions, Case Study II
ï” Cassandra was a key component in our robotics software system
ï” We were able to run a Cassandra âimage databaseâ, âcontrol databaseâ, and
âenvironmental databaseâ concurrently on three different servers, and coordinate
the data effectively for sensor analysis, fusion, and control purposes.
ï” We found we were able to do ârapid prototypingâ of robotics software using
Cassandra as our primary data store technology
35. Some Observations about the Technologies
ï” In spite of the fact that the two applications we discussed here were so different, we evolved both
of the projects in parallel in order to leverage the common elements of the projects with a mind
towards development an âimage as big dataâ toolkit, with which it would be possible to develop a
wide range of domain applications, using the idea of âimages as big dataâ --- and the secondary
technologies of sensor fusion --- as unifying themes.
ï” Appropriate database technologies are key to the success of the POCs shown here, and Cassandra
proved to be the superior choice for a number of compelling reasons.
ï” While the idea of distributed image processing is by no means new --- a variety of
implementations on different hardware configurations including Symbolics LISP machines,
Connection Machine, and other parallel/multiprocessor hardware were implemented throughout
the 1990s
ï” These older distributed concepts have been replaced by Hadoop, Spark, Flink, and multicore/GPU
based applications at the low level, and, to a certain extent, by semantic web/ontology/reasoning
engines at the high level vision processing phase.
36. Conclusions and Future Work
ï” We intend to pursue our concept of innovation + software archaeology : best of
breed new implementation --- with inspiration from quality software systems of
past and present
ï” Applying it to new domain areas and POCs
ï” Particularly sensor fusion, âsmart sensorsâ, drone and mobile robotics applications
ï” We intend to pursue the research aspects of âimage as big dataâ, and to
implement POCs, products, and patents accordingly
38. References and Citations
ï” [1] Forbus, Kenneth D., and de Kleer, Johan. Building Problem Solvers, Cambridge,
MA: MIT Press, 1993.
ï” [2] Balakumar, P. et al. VANTAGE: A Frame-Based Geometric Modeling System,
Programmer/Users Manual V1.0. Robotics Institute, Carnagie Mellon University,
1988.
ï” [3] Barry, Michele, Cyrluk, David, Kapur, Deepak, Mundy, Joseph, and Nguyen,
Van-Duc. A Multi-Level Geometric Reasoning System for Vision. In Geometric
Reasoning, Depak Kapur and Joseph Mundy, eds. Cambridge, MA: MIT Press,
1989.
ï” [4] Patent, OCR Enabled Management of Accounts Payable and/or Accounts
Receivable Auditing Data, Patent Number 20110213685
ï” [5] Hartley, Richard, and Zisserman, Andrew. Multiple View Geometry in Computer
Vision. Cambridge University Press, 2000.
ï” [6] Faugeras, Olivier. Three Dimensional Computer Vision: A Geometric Viewpoint.
Cambridge MA: MIT Press, 1993.
Hinweis der Redaktion
There have already been several âwinsâ with software archaeology,including migrating the first wave neural network technologies to the so-called âdeep learningâ paradigm.
Some of this re-thinking included reimplementation using multicore, GPUs, and distributed technologies. And our own successful patents with OCR technologies.
Visual Data Ontology Objects mapped to Cassandra
We use the SMACK stack pretty consistently, using Spring components, especially Spring Data Spring Integration and Spring Batch as âglue-wareâ
TOPN type queries become very important if you have a large number of (similar) recognitions
Processin g data and mapping it into a format that neural nets can understand: Canova/DataVec is for this purpose.
Position, orientation, scale, major and minor axis can all be part of a Cassandra feature table and of course various shape features can be expressed as Java POJos or within an ontology.
Collage of images taken by the stereo camera : trinocular image processing is also possible and has some advantages