At it's core,
whatami is a tool that allows you to identify the objects contained in an image file.
It does this by leveraging the power of the MAX Image Segmenter model, one of the many free-to-use, open-source deep learning models available on IBM's Model Asset eXchange. The model has been converted to a TensorFlow.js implementation and the app runs entirely in Node.js.
In addition to displaying an image's contents,
whatami has extended this functionality by offering several commands that allow you to search over directories with multiple images for certain objects, save individual objects as new image files, show in-terminal previews of objects, and more.
npm to automatically add the
whatami command to your PATH.
$ npm i -g whatami
Now you can begin using
whatami like your very own command-line crystal ball 🔮 to identify what objects are contained in an image.
Keep reading for quick-and-easy install instructions, some information on the basic commands that are available and some GIFs to help you get started.
Use the basic command
whatami </path/image_name> to identify what objects are contained in an image. If you have multiple images you'd like to inspect, you can also provide the name of a directory containing image files.
To scan a directory of images for a certain object, use the
--contains command. When used in combination with the
--verbose option, the results for all images in a directory will be displayed.
If you'd like to see an in-terminal preview of any of these objects, use the
--show flag, followed by the name of the object you'd like to see. You can specify the 'colormap' to see all the objects highlighted within the original image.
To save any of the objects as individual image files, use the
--save flag, followed by the name of the object you'd like to save, or use 'all' to save all objects.
To remove an object or background from an image, use the
--remove flag, followed by the name of the object you'd like to remove or the shorthand aliases 'bg' or 'BG' to remove the background.
For more detailed usage information, see the in-app help page which can be accessed by executing
$ whatami <file> [--command] $ whatami <directory> [--command] $ whatami [--help | -h]
|Save the specfied object to it's own file. Also works with 'all'.|
|Save a copy of the image with the specfied object (or background) removed. Supports aliases 'bg' and 'BG'.|
|Show the specified object (or the entire image if blank) in the terminal.|
|Returns list of images containing the specified object. (Use --verbose option to see all results).|
$ whatami path/to/IMAGE.PNG
$ whatami sample.jpg --show 'dining table'
$ whatami pets/ --contains Dog
$ whatami . --remove BG
|This repository||Apache 2.0||LICENSE|
|Model Code (3rd party)||Apache 2.0||TensorFlow Models Repository|
|Model Weights||Apache 2.0||TensorFlow Models Repository|