Image Recognition in Java

Hello everyone, In this post I am sharing about, How to perform Image Recognition in Java using Clarifai API. This example were tested with environment and same has been shared in the post.

About Clarifai API

The Clarifai is a Image & Vdieo Recognition API. That can be called via the webservice provided, to do that you should have the Client ID and Client Secret Key. That can be generated after creating an account in Clarifai. For more details you can visit https://www.clarifai.com/

Project Structure

Image Recognition in Java using Clarifai API example

Dependencies(JAR) List
  • core-2.2.0.jar
  • okhttp-3.4.2.jar
  • okio-1.11.0.jar
  • gson-2.8.0.jar

You can always download above JAR`s or Dependencies from Maven Repository or you can Downalod the complete project here.

ImageRecognizer.java

Input Image

Image Recognition in Java using Clarifai API example

Predicted Text

no person
tree
water
landscape
nature
summer
outdoors
grass
sky
travel
wood
lake
lawn
scenic
park
house
flower
daylight
garden
river

Download Example Here

Download from GitHub

References

1. https://www.clarifai.com/
2. https://developer.clarifai.com/guide/
3. https://github.com/Clarifai/clarifai-java