BookmarkSubscribeRSS Feed

Image Processing with SAS Viya

Started ‎06-21-2019 by
Modified ‎06-21-2019 by
Views 5,212

SAS Viya provides CAS actions for processing images. Combining these image processing actions with deep learning actions allows SAS Viya to step into the realm of computer vision.

 

SAS Viya image actions let you read and write images, process images, and manipulate the image data. SAS Viya deep learning actions let you construct and train convolutional neural networks, as well as score and deploy them.

What CAS actions are available?

Ten image processing CAS actions are currently available:

 

CAS-action-table.png

Select any image to see a larger version.
Mobile users: To view the images, select the "Full" version at the bottom of the page.

 

Ten deep learning CAS actions are available as part of the SAS Viya deep learning action set.

 

CAS-action-table2.png

 

What can you do with CAS image actions?

Each image action lets you accomplish a number of tasks. Details on these are in the documentation , but I will briefly describe some capabilities of the processImages and augmentImages actions to whet your appetite.

processImages CAS action

The processImages action is quite rich. For example, it lets you:

  • Create a patch from an image
  • Detect edges (with Canny)
  • Resize an image
  • Calculate image derivatives
  • Apply the Laplace operator
  • Normalize images
  • Apply a threshold
  • Convert color spaces
  • Blur an image

A plethora of examples including visuals using Python code are available in the SAS Viya 3.3 documentation.

 

See a few examples below:

 

3-1-1024x459.png

 

4-1.png

 

5-1.png

 

augmentImages Action

The CAS augmentImages action lets you:

  • Create patches–either sliding windows or rectangle coordinates
  • Augment images, for example
    • Rotate
    • Flip
    • Darken
  • Process more than one patch or augmentation command in a single run

See the example from the documentation below:

 

6-1ip.png

 

An excellent demonstration on distinguishing images via Jupyter notebook and Python code that call CAS actions (Dolphins versus Giraffes) is available on Github.

 

7-1.png

 

Aside: We notice that in these images that none of the dolphins and none of the giraffes are wearing life preservers. This is because:

  1. The giraffes are safely on land and not in danger of falling into water over their heads. Not to mention that even baby giraffes are 6 feet tall, so water “over their heads” would have to be over 6 feet.
  2. The dolphins are proficient swimmers and many can hold their breath underwater for more than eight minutes.

The dolphin versus giraffe example using SAS Viya with python-dlpy is nicely laid out for you in a Jupyter notebook.

 

8-1.png

 

I hope I have piqued your interest. To learn more, spend some time looking at the documentation and the links below!

References and More Information

Version history
Last update:
‎06-21-2019 05:17 PM
Updated by:
Contributors

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

Free course: Data Literacy Essentials

Data Literacy is for all, even absolute beginners. Jump on board with this free e-learning  and boost your career prospects.

Get Started

Article Tags