Algorithmia Blog - Deploying AI at scale

December 21, 2017

Advanced Image Manipulation and Data Extraction

A good image editor has a wide variety of features, from simple resizing to advanced photo manipulation. A good software platform needs similar tools as well, and when run in a scalable serverless environment, can include a variety of powerful image-transformation and data-extraction algorithms fueled by machine learning.

We’ve been building up a library of image-related algorithms for some time, created both by our in-house staff and our amazing community of 60,000 developers. If you’re interested in building algorithms and making them available to the community (as open-source or for royalty payments), it’s easy to publish an algorithm on Algorithmia!

Meanwhile, check out these great tools which you can use from any programming language, allowing you to code up complex image-editing and image-analysis workflows with just a few lines of code…

Image Acquisition and Enhancement

Downloading images is simple… unless the host uses non-referral links, redirectors, or wrappers which prevent direct downloads. SmartImageDownloader detects and circumvents these problems on a wide range of sites, giving you direct access to the images you want.

Resizing, both simple and content-aware

When you just want a simple way to resize your images without altering the content, use ResizeImage.

But if you want to automatically crop or resize the image while retaining salient features (e.g., not cutting off the top of your subject’s head), check out, SmartThumbnail, and ContentAwareResize — they all use deep learning to ensure that the important parts of your image stay visible.

Lastly, A2RL_online will re-crop your image in a way that improves the aesthetics (a.k.a, “make my image pretty”).

Detecting age, gender, and emotion

If you’re more interested in knowing how they feel, EmotionRecognitionCNNMBP tells you which emotions are present on their faces. It can help you figure out how users feel about your app, or how a crowd is reacting to your presentation.

Detecting and classifying objects (general)

You have a photo, and you want to know what’s in it… simple, right? For computers, this is still a difficult task, but a range of algorithms are available to help.

These are just some basic tools, though. Algorithmia’s APIs are naturally composable — the output from one can be directly piped into another. This, plus a scalable serverless infrastructure, allow us to do some advanced things with videos.

For example, we can apply an image algorithms to each individual frame of a video, then reassemble the result into a new video file. It’s difficult to describe how powerful this is, so just try out the demo to see colorization, stylization, and other transformations being applied to entire videos. Then read the blogpost and try out VideoTransform!

Similarly, VideoMetadataExtraction (see blogpost) lets you apply data-extraction algorithms to each frame of a video, then assembles the results into a single JSON result (or pipe it through VideoTagSequencer for a more searchable format). Check out the demo to find cars, clothing, faces, emotion, and more in video sequences. Or try this tutorial to detect and remove nudity from whole videos.