npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@codait/magicat

v0.3.0

Published

Deep learning magic... with the convenience of cat!

Downloads

14

Readme

🧙😺 magicat

Deep learning magic... with the convenience of cat!

A Deep Learning powered CLI utility that brings computer vision to your command line!

basic usage

At it's core, magicat is a tool that allows you to identify the objects contained in an image file.

It does this by leveraging the power of the @codait/max-image-segmenter, which is a TensorFlow.js port of the MAX Image Segmenter pre-trained model. The MAX Image Segmenter is one of the many free-to-use, open-source deep learning models available on IBM's Model Asset eXchange.

In addition to displaying an image's contents, magicat 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.

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.

Prerequisites

  • Node.js v10.x or higher

Installation Instructions

Install using npm to automatically add the magicat command to your PATH.

$ npm install -g @codait/magicat

That's it!

Now you can begin using magicat like your very own command-line crystal ball 🔮 to identify what objects are contained in an image.

Basic Commands

For more detailed usage information, see the in-app help page which can be accessed by executing magicat -h

Use the basic command

$ magicat <file|directory|url>

to identify what objects are contained in an image. If you have multiple images you'd like to inspect, you can provide the path to a directory containing image files. In addition, you may also provide a URL to an image.

To scan a directory of images for a certain object, use the --contains option.

contains usage

If you'd like to see an in-terminal preview of any of these objects, use the --preview flag, followed by the name of the object you'd like to see.

object preview

Object preview made possible thanks to @sindresorhus and terminal-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 leave the name blank to save all objects.

saving objects

By default, the individual image files are saved in the same directory as the source image (or current working directory for image URLs). To specify a different directory to save files use the --output flag.

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 to remove the background. A copy of the image is saved with the specified object removed.

removing objects

By default, the individual image files are saved in the same directory as the source image (or current working directory for image URLs). To specify a different directory to save files use the --output flag.

Licenses

| Component | License | Link | | ------------- | -------- | -------- | | This repository | Apache 2.0 | LICENSE | | Model Code (3rd party) | Apache 2.0 | TensorFlow Models Repository | | Model Weights | Apache 2.0 | TensorFlow Models Repository |