Fun with Watson: Object recognition

Share this post:

Back in the old BBS days, users posted how-to guides called “fun-withs.”

Fun-withs were a sort of off-label user manuals. They weren’t really official uses, but they were uses all the same. To bring back some of the old fun-with spirit, I wanted to share a few off-label guides for how to use Watson. This one teaches Watson how to recognize an object of a user’s choice.

It’s easy to start training Watson on object recognition, and the best part is that no code is necessary to get started. You almost don’t even need this guide. All a user really needs is a large collection of images. I used pineapples because I had stumbled upon a huge cache of easily licensable photographs of pineapples (don’t ask me why).

What you’ll need

Put together a zip file of at least 50 low-resolution pictures of your chosen object. The total file size can’t be more than 5 megabytes, so that’s no more than 100 kilobytes per photo. On the plus side, you can have up to three zip files for a total of 15 megabytes. Sometimes less is more, but in this case, more is more. Let’s say my zip file is called “”

Next, assemble another zip file containing at least fifty pictures that are not pictures of your chosen object. If you think your object could be mistaken for another object that looks similar, put pictures of that in this zip file (for example, succulents can sometimes look like pineapples). This can help train Watson to really learn what your object is. We’ll call that file “”

Keep in mind that training an AI is all about the quality of the data set. You’re going to want good, clear photographs of your object in various poses and positions. If there are different ‘phases’ of your object, such as growth, color or maturity, you’ll want to include photos of those different phases.

Also, not all images will be complete images of your object, so it’s important to include a few “cut” images that feature a half or a part of a pineapple. In real life, Watson may encounter photos where only part of an object is featured, so it’s valuable to teach it to recognize the object in those cases as well. Half of a pineapple should still be as recognizable as a pineapple.

Simple next steps

Once you have your images together, go to this page and upload your files. Then name your class to describe your image (in my case “pineapple”). After that, click “Train your classifier.”

Now you can test Watson and see if it’s learned to recognize your image. If not, you can continue training it by uploading more images of the object and things that are not the object. It will get better as you give it more data.

As promised, not one line of code was harmed in the making of this guide. It really is that easy. The best part is that so much of Watson is this accessible, there are many more potential fun-withs you can try.

You can try out the voice and tone analyzer. You can build decision trees. You can even do speech to text or text to speech, all right in your browser. Just click this one button on the Bluemix Catalog page:

Learn more about the fun you can have with Watson.

Add Comment
No Comments

Leave a Reply

Your email address will not be published.Required fields are marked *

More Cognitive stories

Why cloud AI is a solid bet

At Think 2018 later this month, IBM will be showcasing cloud platforms, AI-based services and how the two work together to help businesses push forward. Forbes contributor Paul Teich recently highlighted why “being a leader in AI is a significant accomplishment for a company that is in its second century.” First is the value of […]

Continue reading

KBC K’Ching chatbot uses IBM Watson for authentic conversational interface

In my last post, I explained how K’Ching, a financial app for young people, has a familiar look and feel to apps they’re already using. Now I’ll share a little about how we developed our open chatbot with Watson Conversation on the IBM Cloud. Building a chatbot from scratch K’Ching is an open chatbot, which […]

Continue reading

Bringing AI and cloud to low-code development: Mendix and IBM Cloud

Technical complexity and other roadblocks shouldn’t prevent organizations from using advanced cloud services. So IBM and Mendix, a leader in low-code platforms, are partnering to make sure they don’t. According to IDC, cloud computing is now a substantial part of new IT spending and is expected to grow from $96.5 billion in 2016 to more than […]

Continue reading