All posts in Recipes

Acquiring Data for Document Classification

The Document Classifier is a powerful tool for generating keyword predictions for your documents, whether they are chat transcripts, emails, historical documents, scientific abstracts, or any number of other possible sources.

However, your predictions will only be as good as the dataset you’ve trained on. Since the Document Classifier algorithm supports retraining, this can be done in chunks right on the Algorithmia platform: grab a bunch of data, train your classifier on it, then come back immediately after or weeks later to add even more training data. Read More…

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…