displayinput

Frequently Asked Questions

  • The Basics
    • What is Myriad?
    • What’s a Region Of Interest (ROI)?
    • What’s ROI detection?
    • Any examples of ROI detection?
    • How do I use it?
    • What’s the difference between Myriad, Myriad Desktop, and Myriad Trainer?
    • How does Desktop detect ROI?
    • Do I have to use Desktop and Trainer?
    • What’s the license? Can I use it in a commercial project?
    • Where do I get it?
  • Installation
    • What are the system requirements?
    • How do I install Myriad?
    • How do I install and run Desktop?
    • How do I install and run Trainer?
  • Concurrency
    • Does Myriad run on a local machine or in a cluster?
    • What is “pipeline parallelism”?
    • How does pipeline parallelism work in Myriad?
    • I’m not sure pipelining’s a good fit for my application.  Do I have any alternatives?

The Basics

What Is Myriad?

Myriad is a library written in Java that provides tools for image / signal processing, machine learning, and fault-tolerant distributed computing. Its primary purpose is to assist with the development of large-scale Region Of Interest (ROI) detection applications by providing the parts required to train a model to detect ROI in large datasets.

What’s a Region Of Interest (ROI)?

A Region Of Interest (ROI) is a feature, object, etc. in data that’s important/useful for a given application. Example applications include face detection, pedestrian tracking, and anomalous signal identification.  Myriad’s original application for NASA was to detect indications of structural damage in nondestructive evaluation data.

What’s ROI detection?

The process of automatically finding ROI within data.

Sample ROI detection results
Sample ROI detection results

Any examples of ROI detection?

If you’d like to see how Myriad was used in its original application of flagging indications of structural damage in inspection data, the Technical Review video put together for NASA is a good place to start as it goes over training and subsequent use of the model.  If you’d like to try it out, we’ve put together a pre-trained model and sample input files that you can use in Desktop.  The model has been taught to find possible indications of structural damage in ultrasonic inspections but will also work with varying degrees of success with other C-scan presentations (we’ve had good luck with microwave data for example).

How do I use it?

If you want to get up to speed quickly and don’t already have an ROI detector, start with Myriad Trainer to train a model for your application.  Use your trained model in Myriad Desktop to find ROI.

If you’ve already got an ROI detector in Python, MATLAB, etc. you can skip Trainer and go straight to Desktop.  Desktop can call your pre-existing code and parallelize it for you automatically.

If you’re starting from scratch and you’re comfortable with Java software development, skip straight to building your app with Myriad the library.  We’ve got API documentation and sample code to get you started.

What’s the difference between Myriad, Myriad Desktop, and Myriad Trainer?

Myriad Desktop is a multi-platform Graphical User Interface (GUI) tool that uses the Myriad toolkit to build and run an ROI detection pipeline. Myriad Desktop (“Desktop”) uses a pipeline parallelism architecture to break ROI detection into a series of stages, each with its own set of workers.

Myriad Trainer (“Trainer”) is a GUI tool that simplifies the ROI detection model training process. Models can be trained, tested, and saved for subsequent use in Desktop or other Myriad-based applications.

Myriad itself is the underlying toolkit.

In short: Trainer is used to train the models, Desktop is used to run the models, and Myriad is the toolkit everything else is based upon.

How does Desktop detect ROI?

If you’d just like to implement something similar, have a look at the ROI Detection Pipeline example as it basically covers the entire process.  If you’d like to know more about the algorithm, read on.

  1. Each input file specified is read by the Ingestor stage.
  2. The Pyramid stage blurs and subsamples the data to allow the ROI detector to consider the input at several different scales.  Without this capability, every ROI detection implementation would also have to implement its own methods for dealing with differently-sized inputs.
  3. An optional Preprocessing stage applies a preprocessing function to each step received from the Pyramid stage.
  4. The Sliding Window stage extracts subsets of data from the previous stage, the dimensions of which are set by the dimensions expected by the ROI detection stage.  If you’ve trained a model to expect 15×20, those are the dimensions of the window in this stage.
  5. The ROI Detection stage runs the ROI detection code: for each window received the ROI detector is asked to report whether the window appears to contain an ROI or does not.
  6. The Reporting stage compiles a list of the ROI found.
  7. Although not technically part of the pipeline, the Results stage compiles the ROI found for each input file.  In other words, it matches each ROI found in Step 6 to the original input file.

The following video demonstrates what happens when this algorithm looks for ROI.  In this example we’ve trained a Myriad machine learning model to recognize indications of structural damage in sensor data.

The region moving across the sample data is the sliding window and represents the data currently being examined by the machine learning model.  The interior of the window shows what the machine learning model “sees” when making its determinations (in this case, a Sobel edge detector has been applied).  If the model would classify the window as containing structural damage, the window’s border changes color as an indicator.

Do I have to use Desktop and Trainer?

No – both are independent projects built on Myriad.  Desktop can use any Myriad model and can also call external ROI detectors, either local applications or through REST calls to a server.

Trainer can read and write Myriad models that can be used in Desktop or any other Myriad application.

If you’re writing your own Myriad-based application, you can choose to use Desktop and Trainer, one or the other or neither.

What’s the license? Can I use it in a commercial project?

Myriad, Myriad Desktop, and Myriad Trainer are all licensed under the Apache License.  All three can be used in commercial projects, please refer to the text of the license for details.

Where do I get it?

All the source code is available from GitLab, we’ve compiled the links on the Myriad Downloads page.

^ top

Installation

What are the system requirements?

The short version: if you can run Java 8 (Oracle or OpenJDK), you can run Myriad.  Oracle provides the following basic requirements:

  • Memory: 128MB RAM
  • Disk: 126MB
  • Processor: Pentium 2 266MHz or better

We’ve run Myriad apps on Windows 7, 10, various 32 and 64-bit flavors of Linux, FreeBSD, TrueOS, and OpenBSD.

How do I install Myriad?

Myriad is distributed as an Apache Maven project.  Summarizing the build instructions:

  1. Install Java 8 or better.
  2. Install Maven.
  3. Grab a copy of the Myriad source code.
  4. Run mvn install.

How do I install and run Desktop?

Once you’ve compiled and installed Myriad, grab a copy of the Desktop source code and run mvn package.  When compilation is complete, run Desktop by double-clicking on desktop-1.0-SNAPSHOT-allinone.jar in the target/ sub-folder, or by issuing the command java -jar desktop-1.0-SNAPSHOT-allinone.jar at a command prompt.  More details on configuring Desktop are available from the documentation project and elsewhere.

How do I install and run Trainer?

Once you’ve compiled and installed Myriad, grab a copy of the Trainer source code and run mvn package.  When compilation is complete, run Trainer by double-clicking on MyriadTrainer-1.0-SNAPSHOT.jar in the target/ sub-folder, or by issuing the command java -jar MyriadTrainer-1.0-SNAPSHOT.jar at a command prompt.  More details on how to use Trainer are available from the documentation project and elsewhere.

^ top

Concurrency

Does Myriad run on a local machine or in a cluster?

Both!  Myriad uses the Akka distributed framework, which provides both local and distributed concurrency.  Myriad Desktop includes support for remoting, which allows construction of ad-hoc processing clusters.  The Desktop remoting video demonstrates calling a processing stage running on another computer.  You can switch between local and remote systems on the fly in Desktop.

Myriad also has experimental support for OpenCL to use hardware accelerators like AMD’s Radeon, NVIDIA’s GeForce, or Intel’s Xeon Phi.  If OpenCL support has been enabled in a Myriad-based application, Myriad will look for the best hardware accelerator available at run time.  If the accelerator is a supported GPU or the Xeon Phi, Myriad will run the OpenCL-based code on the accelerator instead of on the CPU.  No changes are required to source code or configuration files.

What Is “Pipeline Parallelism”?

Imagine that a complex task can be broken into a series of stages, where the results of one stage are the inputs of the next stage.  In a sequential pipeline, each stage has to finish before it hands off to the next stage.  The total time it takes to complete a task is then the sum of the times taken to complete each stage:

pipeline1

In a parallel pipeline, each stage is concurrent-when a worker finishes its work in the stage it immediately sends to the next stage.  The total time to complete a task is then proportional to the time it takes to complete the slowest task:

pipeline2

As a result, pipeline parallelism (also known as “pipelining”) can dramatically decrease the amount of time taken to perform a task.

How does pipeline parallelism work in Myriad?

Developers can make use of pipeline parallelism through the LinkedWorkerPool class.

Myriad Desktop constructs an ROI detection pipeline by treating each stage of the detection process as an independent pool of workers managed by a router.

myriad-pipeline

When new work comes in, the router submits the job to the workers’ task queue.  When a worker is available, it takes the next job off the queue and when complete sends its results back to the router.  The router then sends the completed job on to the next stage.

I’m not sure pipelining’s a good fit for my application. Do I have any alternatives?

If you’re developing your own application, you can pick and choose the parts of Myriad to use.  If pipelining isn’t a good fit, Myriad also provides access to the Actor model through Akka; lower-level (experimental) concurrency on CPUs and GPUS through OpenCL; and map-reduce algorithms through Mahout.   You can also forego all of that and just use standard Java concurrency patterns if you’d prefer.

^ top