Cloudinary Blog
Learn more...

How to automatically tag and categorize photos according to their content

Jan 05, 2015 by Nadav Soferman

ReKognition scene categorization Drawing insights from user generated content can be very useful. If you allow users to upload images, you might want to better understand what their images contain. Whether a photo is of a landscape, people, animals, or nightlife, image processing and analysis can assist in further comprehension.

ReKognition scene categorization

Cloudinary takes care of the entire image management pipeline, from uploading, via dynamic image manipulation, to fast CDN delivery. You can use Cloudinary with our add-on for automatic scene categorization provided by ReKognition, a visual recognition solution developed by Orbe.us.

ReKognition logo The ReKognition scene categorization add-on analyzes scenes within photos and allows you to automatically classify your website’s images into a long list of potential categories.

Improve user experience, engagement and conversion

By automatically recognizing what images contain, developers can easily create pages or site sections based on images’ content (e.g. photos of animals, travel, special events, etc.). In addition, if your site supports a search option, you can have the search results include relevant images based on their visual content instead of just by their file names or user-assigned tags. These benefits can improve user experience on your site and increase engagement.

When you identify image content, you then know what images your users upload or search for and can target them with related content in order to enhance engagement and conversion. For example, if a user uploaded or searched for cat images, you can target him/her with actions, such as presenting pictures of other pets or any cats’ related content. Knowing the content of images on your site can have a direct impact on your online business.

How-to automatically categorize your images

Web and mobile developers can use Cloudinary's API to process images while uploading or process previously uploaded images.

For example, the image below was uploaded to Cloudinary using the code below. You can see that the image’s content is clearly of a dance party, so let’s see how it is categorized with the ReKognition add-on. Simply set the categorization upload parameter to rekognition_scene in order to perform the image’s content analysis and get the detected categories:

Cloudinary::Uploader.upload("my_dance_photo.jpg",
          :categorization => 'rekognition_scene', 
          :public_id => "dance_party")

Ruby:
cl_image_tag("dance_party.jpg")
PHP:
cl_image_tag("dance_party.jpg")
Python:
CloudinaryImage("dance_party.jpg").image()
Node.js:
cloudinary.image("dance_party.jpg")
Java:
cloudinary.url().imageTag("dance_party.jpg")
jQuery:
$.cloudinary.image("dance_party.jpg")
.Net:
cloudinary.Api.UrlImgUp.BuildImageTag("dance_party.jpg")
Sample dance party uploaded photo

Cloudinary’s upload API's result shows the uploaded image's detected categories as well as their level of accuracy, provided as a score between 0 and 1, where 1 is 100% accurate. As you can see in the example below, the ReKognition add-on detected several categories for the image above, that were each given a score. The best category match was 'dance', with a 0.719 accuracy score.  

    {"public_id"=>"dance_party",
     "url"=>
      "http://res.cloudinary.com/demo/image/upload/v1417446163/dance_party.jpg",
     ...
     "info"=>
      {"categorization"=>
        {"rekognition_scene"=>
          {"status"=>"complete",
           "data"=>
            {"matches"=>
              [{"tag"=>"dance", "score"=>0.719},
               {"tag"=>"blonde", "score"=>0.3055},
               {"tag"=>"model", "score"=>0.24},
               {"tag"=>"night_club", "score"=>0.1859},
               {"tag"=>"hair", "score"=>0.1449}]}}}},
    }

Image categorization data can be stored on your side in order to organize your content and target user interest. You can then take actions such as linking the categorization data to users that upload categorically related images. Once the information is captured, a data analysis can take place generating insights, including users’ image preferences. Based on the information and analysis provided, you will be able to take proactive actions to enhance user engagement and conversion.

See our documentation for more details about how to use the ReKognition add-on

Automatic tagging with ReKognition scene categorization

Cloudinary allows you to tag uploaded images. Each image can be assigned one or more tags. This feature automatically assigns tags based on categories that are detected by the ReKognition add-on.

You can see below that we set the auto_tagging parameter to 0.15 for the dance party example image above, which means that auto tagging will use the detected categories above this threshold. You can set the threshold to a higher level if you want to be more strict regarding the detected categories you want to tag. As for our example, the tagging results were 'blonde', 'dance', 'model', and 'nightclub':

Cloudinary::Uploader.upload("my_dance_photo.jpg", 
      :categorization => 'rekognition_scene', 
      :auto_tagging => 0.15, 
      :public_id => "dance_party")

Results in:

    "tags" => ["blonde", "dance", "model", "night_club"]

With automatic tagging using ReKognition’s scene categorization add-on, you will be able to use Cloudinary's admin API in order to list and search for all images with specific tags.

Summary

Understanding user generated content can provide you with great insights, allow you to take actions such as creating dynamic content pages, and match content to user preferences. Cloudinary’s service together with the fully integrated ReKognition scene categorization add-on provides developers with the powerful ability to enhance their image content management as well as increase their online users’ engagement and conversion.

ReKognition add-on

The ReKognition scene categorization add-on is available with all Cloudinary plans, You can try it out with the add-on’s free tier. If you don't have a Cloudinary account yet, sign up for a free account here.

KartRocket, managing high quality e-commerce sites

Dec 15, 2014 by Orly Bogler
KartRocket case study
Every once in a while we choose to present a case study of one of our customers and share it with our community. This is a good chance to show the different ways Cloudinary can be integrated, and the various types of customers we have. Today we would like to share a case study of KartRocket
 
 

About KartRocket

KartRocket is a SaaS based e-commerce platform that offers a transparent and complete e-commerce ecosystem that helps SMBs to create their online store in a few steps.
→ Read the full post

Introducing a complete and modern UI widget for cloud based image uploading

Cloudinary's upload widget Many websites and mobile applications support user uploaded images and other files. This requires a service to receive and process the uploads, store them safely, manipulate them to match the website or app’s design, and deliver them to your users. This also requires a user interface within your site or app that allows users to easily upload images.  

At Cloudinary, we have been taking care of the entire image management pipeline from the time our service was launched: from an upload API, to cloud storage via our rich set of image manipulation capabilities, to optimized CDN delivery.

→ Read the full post

How-to generate thumbnails for Office documents using Cloudinary and Aspose

Nov 13, 2014 by Nadav Soferman

Many websites and mobile applications with user generated content allow you to upload all kinds of files. Images, PDFs, and Microsoft Office files, such as Word, Excel, and PowerPoint are all common types of uploads.

Web or mobile developers may want to build   applications that allow users to download PDFs, support document previews, or embed image thumbnails of Office files. However, implementing these types of capabilities can be quite a challenging task.

→ Read the full post

Our free plan quota just got 500% bigger

Nov 05, 2014 by Orly Bogler
Tags: General, Startups
Free plan is biggerWe know what it's like to launch a new venture and what it takes to succeed as a company with bootstrapped origins.
 
Cloudinary was extremely fortunate to grow and become an established brand with an amazing customer base, and we never lost sight of our entrepreneurial spirit and love to the startup-y way of thought.
 
Images are a huge hassle and we'd love for everyone, both big and small to enjoy Cloudinary to the fullest and this is the motivation behind our free plan. We want to offer all companies the opportunity to try out our service, free of charge, without a time limit or hidden terms. And now, our Free plan has gotten even sweeter, because we've dramatically increased its quota, 500% its original size! Check it out:
→ Read the full post

10 Startups that manage their images in the cloud - Part 5

Oct 22, 2014 by Orly Bogler
Often developers these days realize that they may be "re-implementing the wheel" building in-house technical solutions that are external to their core proposition. To solve this problem, they are looking for the best off-the-shelf SaaS solutions that will help them focus, get to market sooner, with better products, for lower overall costs.
Often developers these days realize that they may be "re-implementing the wheel" building in-house technical solutions that are external to their core proposition. To solve this problem, they are looking for the best off-the-shelf SaaS solutions that will help them focus, get to market sooner, with better products, for lower overall costs.
→ Read the full post

JPEG-XR conversion with auto browser detection, optimize images for IE users

JPEG-XR Post Sites and apps are including more and more high-quality images. The more you can compress images to reduce their size in bytes, the smaller your bandwidth, the faster your site will load and the happier your users will be. But when compressing images, you need to make sure you maintain high visual quality.

Most web sites and mobile apps use the popular JPEG format to display their images and user uploaded photos. The JPEG format has efficient built-in compression that reduces image size while maintaining a reasonable visual quality. But you can reach much better results using more modern image file formats.

→ Read the full post

Reduce size of animated GIFs, automatically convert to WebM and MP4

Animated GIF to WebM and MP4

Short animated GIF-based video sequences seem to be spreading like wildfire around the web.

Media and news sites display short video segments, social apps allow their users to share animated GIFs with their friends, and while the dated animated GIF format is very useful for this purpose, it has one significant disadvantage - its huge file size.

Animated GIFs are not optimized for captured videos, resulting in large files, heavy bandwidth utilization, slow loading times, and sub-optimal user experience. Also, resizing and manipulating animated GIFs to match the graphic design of your site or app might be a lengthy, cpu-intensive process, as it consists of dozens or even hundreds of frames being manipulated individually.

→ Read the full post

How to automatically adapt website images to Retina and HiDPI devices

Jul 24, 2014 by Nadav Soferman

DPR Post Web development was much simpler only a few years ago, when we were building HTML pages that included images and photos, and all elements shared the same resolution units. If for example, you aimed at a standard 1024x768 screen, you knew these were exactly the number of pixels available for displaying HTML elements and images.

In 2010, Apple introduced the iPhone 4 with Retina display. In order to simplify things for developers, the logical screen resolution remained the same as previous iPhone models (640x960) while the physical screen resolution was exactly doubled (1280x1920). This means that if, for example, you embed an image tag in your HTML page with width of 200 pixels and height of 300 pixels, and you display a double-size image of 400x600 pixels, the Retina display shows all pixels of the larger image, resulting in a much clearer visual result and without performing browser-side down-scaling.

→ Read the full post

Automatic image moderation, removing adult or inappropriate photos using WebPurify and Cloudinary

Jul 22, 2014 by Nadav Soferman

WebPurify moderation add-on If your web or mobile application involves user-generated content, you may encounter users who upload inappropriate photos or images to your application. These could be images which offend other users - adult content, violent photos, etc. - or images which cause your site to violate laws or regulations.

There are two ways to identify and remove such images: you can either require approval of each image before it is displayed to your users, or display images immediately after upload, and then quickly remove them from your site as soon as a moderator has found them to be inappropriate.

→ Read the full post
More posts...