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

swipe-labeler

v1.0.10

Published

Faster and easier dataset labeling for classification tasks by swiping on touch-enabled devices.

Downloads

8

Readme

Swipe Labeler

Easier and more accessible dataset labeling for classification tasks by swiping on touch-enabled devices.
It also enables you to label the dateset on your machine remotely using your phone.

Getting started

You can start by installing the package:

~$ npm install -g swipe-labeler

For the purpose of using the sample images provided, you can also clone the repository:

~$ git clone https://github.com/manzik/swipe-labeler/

Enter the following command to start a server on port 3000 for labeling the images inside folder swipe-labeler/sample_pet_images with classes cat for left swipe and dog for right swipe, and saving the labeled results in the csv file labels.csv:

~$ swipe-labeler -d swipe-labeler/sample_pet_images/ -s labels.csv --label-left cat --label-right dog -p 3000
Labels file doesn't exist, creating the labels file.
The server is running. You can navigate to http://<public_ip>:3000 on your touch-enabled device or http://localhost:3000 on your machine to access the labeler.

You can see a full list of options available by entering swipe-labeler -h:

~$ swipe-labeler -h
Usage: swipe-labeler [options]

Options:
  -d, --data <folderpath>     folder path for data to label
  -s, --save <filepath>       file path to save the resulting labels csv file
  -p, --port <port>           Port number (default: "8080")
  -ll, --label-left <label>   name for left swipe label
  -lr, --label-right <label>  name for right swipe label
  -lu, --label-up [label]     name for up swipe label
  -hc, --hide-class-numbers   hide the number of labled and remaining items in client's browser (default: false)
  -h, --help                  display help for command

* By using the same --save (-s) argument when starting the server next time, you can resume the labeling process.

Navigate to the machine's address on the specified port to access the labeler.
Every time you label an image, a line for the input label and the corresponding file gets appended to the labels.csv file on the go, and it will look like this in the end:

| file | label | | --------------|:-------------:| | pet_01.jpg | cat | | pet_02.jpg | dog | | pet_03.jpg | cat | | pet_04.jpg | dog | | pet_05.jpg | dog | | ... | ... |

  • The frontend swiping implementation is from here.
  • The sample images have been collected from the Unsplash website.