All posts in Recipes

Building a Timeline of your Video: Automatically Identify Objects, Sequence Times, and Integrate with Timeline.js

When we implemented InceptionNet, a microservice to detect and label objects (features) in photos, we knew it would be helpful. Then, we built out VideoMetadataExtraction, a video pipeline which allows you to run feature-detection algorithms (and others) on an entire video. This allowed for some really powerful activities — like automatically scanning through home security footage to find all the cars of a specific make & model, or stripping out all the nudity-containing scenes of a movie to make a G-rated version.

Today, we’ll go further by showing you how to visualize all the features in your video, thanks to the VideoTagSequencer and Timeline.js, a beautiful JavaScript library for displaying timelines on the web.

If you want to skip directly to the demo, please do. but come on back for a full breakdown of the integration pipeline and code samples! Read More…

One-page Web Tool: Transfer Style from One Image to Another in JavaScript alone

You may have already seen how to do style transfer via the StyleThief microservice in Python, but let’s take a different approach: what if I wanted to create a one-page website out of the service, without having to create any backend? That’s right: using only JavaScript and HTML, we’ll make it possible for website visitors to make their own images look like a Van Gogh, a Picasso, or any other piece of art they can find a digital photo of. Read More…

Train a Face Recognition Model to Recognize Celebrities

Sam Trammell and Rustina Wesley

Sam Trammell and Rustina Wesley from True Blood

Earlier this week we introduced Face Recognition, a trainable model that is hosted on Algorithmia. This model enables you to train images of people that you want the model to recognize and then you can pass in unseen images to the model to get a prediction score.

The great thing about this algorithm is that you don’t have to have a huge dataset to get a high accuracy on the prediction scores of unseen images. The Face Recognition algorithm trains your data quickly using at least ten images of each person that you wish to train on. Read More…

Smart Autogeneration of Thumbnails Banners, and Socials with Content Aware Resize

Earlier this week, we introduced media/ContentAwareResize, a microservice which crops images to any size… while ensuring that the important parts do not get removed! It does so by detecting important content (faces, etc) and centering the crop on these components, so you don’t accidentally remove your friend’s head when generating a banner image.

How can we wrap this service into a nice, usable tool? Since Algorithmia’s microservices are language-agnostic, meaning that they can be called from just about any programming language (including JavaScript), we can easily write a simple webpage to generate images in a variety of useful sizes, so that we can quickly create banners, thumbnails, and social-share versions of our photos. Read More…

How to Censor Faces with Video Processing Algorithms

Simon Pegg and Nick Frost faces blurred

Simon Pegg and Nick Frost from Wikimedia Commons

Earlier this week we introduced Censorface, an algorithm that finds the faces in images and then either blurs or puts a colored box over the faces to censor them. We thought it would be fun to pair it up with some of our video processing algorithms to show how you can use different algorithms together to censor a video clip when you don’t want to run the whole video.

Maybe you have some embarrassing videos that you want to share, but don’t want anyone to know it’s you! Or maybe you have a potentially viral video that you want to post on YouTube, but you need to protect the innocent. No matter what your use case is, let’s dive into creating non-nude video clips with censored faces! Read More…