Skip to main content

Autolabel is an image labeling tool using Neural Network

Project description

Autolabel

Autolabel is an image labeling tool. Currently images are labeled using ResNet18-152 implemented by pytorch. Autolabel can be used as a cli tool or as a library.

Installation

python setup.py install

Command line usage

See --help for a command overview

Usage: autolabel [OPTIONS] [IMAGES]...

Options:
  --batch-size INTEGER
  --sep TEXT                      Separator
  --top INTEGER
  -o, --output FILENAME           Output file
  -m, --model [resnet18|resnet34|resnet50|resnet101|resnet152]
  --help                          Show this message and exit.

In the simplest form this mean:

autolabel image.jpg

Autolabel supports reading file names from STDIN:

find /myimages -type f -iname '*.jpg' | autolabel

Library usage

from autolabel.image import ImageListDataset
from autolabel.classifier.resnet import Resnet18Classifier
from pathlib import Path

classifier = Resnet18Classifier()
images = [Path('/path/to/image.jpg'), Path('/path/to/another/image.png')]
dataset = ImageListDataset(images)
res = classifier.predict(dataset, top=top)
for p, decoded in res.items():
    print(p, decoded)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

autolabel-0.0.1.tar.gz (21.8 kB view hashes)

Uploaded Source

Built Distributions

autolabel-0.0.1-py3.8.egg (83.7 kB view hashes)

Uploaded Source

autolabel-0.0.1-py3-none-any.whl (36.9 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page