Social Media Image Recommender

Use machine learning to get image recommendations based on text content, improving post virality and SEO

Select a news article you'd like to analyze. Our machine learning algorithms inspect your images, and tell you which ones are best to use when sharing the article on social networks, improving your post's virality and search ranking.

1. Select a News Article

2. Select output size

Chose a dimension to smart crop the recommended images

How it works

Applying machine learning algorithms to get image recommendations based on text content

Want help Selecting the best image to go with your news article or blogpost? Social Media Image Recommender examines your text to find the most relevant keywords, then does the same with any images you have supplied. It then ranks your images, from most relevant to least, based on how strongly each image relates to the text's content.

Tools used

Method

  1. StanfordNLP/SentenceSplit and nlp/LDA extract tags from the provided text
  2. translation/GoogleTranslate detects the language of the content, translating to English if necessary
  3. opencv/SmartThumbnail resizes the images to the desired dimensions
  4. deeplearning/InceptionNet extracts tags the images
  5. nlp/Word2Vec calculates a similarity score between the text and image tags, scoring the images accordingly

Takeaway

When publishing online, your choice of images affects how often your post will be shared on social networks and where it will be ranked in search results. Social Image Recommender gives you an objective score for how well each image matches your content, so you can make better decisions and improve you post's virality.

Built For Developers

A simple, scalable API for machine intelligence

SAMPLE INPUT

import Algorithmia

client = Algorithmia.client('_API_KEY_')
algo = client.algo('web/SocialMediaImageRecommender/0.1.3')
input = {
  "text": "Not long ago, I watched a woman set a carton of Land O’ Lakes Fat-Free Half-and-Half on the conveyor belt at a supermarket...",
  "images": [
    "https://img.washingtonpost.com/newWK-diner0718071405452672.jpg",
    "https://img.washingtonpost.com/FDsmartfoodfeb01-6_1326560940.jpg",
    "https://img.washingtonpost.com/thanksgiving0161414090629.jpg"
  ],
  "dimension": {
    "height": 630,
    "width": 1200
  }
}
print algo.pipe(input)

SAMPLE OUTPUT

{
  "recommendations": [
    {
      "original_image": "https://img.washingtonpost.com/thanksgiving0161414090629.jpg",
      "score": 27.51867963721599,
      "social_image": "data://.algo/opencv/SmartThumbnail/temp/8b107ad5-e48a-40e5-bc5b-7b4bee391b32.png"
    },
    {
      "original_image": "https://img.washingtonpost.com/newWK-diner0718071405452672.jpg",
      "score": 26.429606594869853,
      "social_image": "data://.algo/opencv/SmartThumbnail/95a3b754-ccff-4aa7-b1be-3571bfcf8d5b.png"
    },
    {
      "original_image": "https://img.washingtonpost.com/FDsmartfoodfeb01-6_1326560940.jpg",
      "score": 25.39022464287755,
      "social_image": "data://.algo/opencv/SmartThumbnail/temp/a5af2c8e-7b81-434f-955c-762075f5f5e4.png"
    }
  ]
}
LEARN MORE

Join the thousands of developers already building intelligent apps

Get 10,000 additional credits when you sign up using the code "demos"

SIGN UP FOR FREE

Algorithms as a Microservice

Leverage an ever-growing library of more than 2,800 algorithmic microservices via an intuitive API. We provide the tools and manage the cloud infrastructure needed to run it at scale.

Learn more

Web Services for Business Logic

Instantly deploy your backend code as an API for public or private consumption. Every algorithm runs as it's own microservice, making each composable, interoperable, and secure.

Learn more

Hosted Trained Models

Have a trained machine learning or deep learning model? Turn it into a serverless microservices in minutes. We'll show you how to get started for free, and scale with ease.

Learn more