DEV Community

BoTree Technologies
BoTree Technologies

Posted on • Updated on

Ruby on Rails: Automated Image Categorization using Google Vision API

Automated Image Categorization using Google Vision with Ruby

Nowadays, there are many use cases where you need to categorize user uploaded images and label it to prevent unwanted content to the website. We have built a solution for one of our eCommerce clients to detect the color and style of the uploaded photos of the fashion clothes.

Google has been advocating AI and ML big time and also provides many tool sets free to kick start the journey. Google Vision provides API which detects broad sets of categories within an image, it ranges from different modes of transportation to animals and many more.

In previous article, we have seen how to setup Ruby on Rails Development to access Google Vision API. I have also shared another post for text extraction from image using the same API. In this article, we will see how to categorize image using Google vision API.

Here is a small Ruby script that shows how we can detect labels for a user passport identity image. Google categorizes it as “Identity Document”, “Face”, “Skin”, “Nose”, “Chin”, “License”.

With such power of Google Vision platform, it is very easy to categorize images. There are many other new features of Google Vision which I will keep sharing with you. Keep following!

Have a happy coding!

Click here Learn more about Ruby on Rails Development Services!

Top comments (0)