📄

I Want AI to Recognize an Image and Output a Text Description of What's in It

This article was automatically translated from theJapanese original by AI. It may contain translation errors.

This post was published over 2 years ago. Its content may be outdated.

Introduction

Various companies offer image recognition APIs. The goal is to have an image recognized and output a text description of what’s in it. For example, given an image of a blue whale, I want it to output the string “blue whale” rather than “animal”.

Cloud Vision API

This is an image recognition API offered by Google. (Cloud Vision API)

https://cloud.google.com/vision/docs/detecting-web?hl=ja

Let’s use this API to recognize what’s in an image. Input image: IMG

10 Web entities found: 

    Score      : 1.498650074005127
    Description: Three Days of Happiness

    Score      : 1.0687499046325684
    Description: Sugaru Miaki

    Score      : 1.05840003490448
    Description: Three Days of Happiness

    Score      : 0.5787000060081482
    Description: Novel

    Score      : 0.5769000053405762
    Description: Parasite in Love - Roman

    Score      : 0.5256999731063843
    Description: Light novel

    Score      : 0.4254000186920166
    Description: Hardcover

    Score      : 0.4147999882698059
    Description: Media Works Bunko

    Score      : 0.3255000114440918
    Description: Manga

    Score      : 0.28519999980926514
    Description: 

This is exactly what I wanted to do. It picked up the book title, and even the author’s information came up as a related entity. That said, it apparently only outputs English, so if you want it in Japanese you’d need to run it through translation.

Trying the Cloud Vision API sample

ScreenshotScreenshot

Trying the AWS Rekognition sample

Screenshot This is pure image recognition.

Finally

I tried ChatGPT too. Screenshot

This might be the best one 😂

Recent Articles

Network(beta)

Drag to move / Ctrl+wheel to zoom