Skip to main content

A Python package for managing and retrieving ImageNet-1k mappings among integer class IDs, string class IDs, and human-readable class names.

Project description

ImageNet Classes

A Python package for managing and retrieving ImageNet-1k (ImageNet2012) class names and mappings.

Installation

From PyPI (when published)

pip install imagenet-classes

From Source

git clone https://github.com/gonikisgo/imagenet-classes.git
cd imagenet-classes
pip install -e .

Quick Start

from class_mapping import ClassDictionary

# Initialize the class dictionary
class_dict = ClassDictionary()

# Get class name for ImageNet-1k class index 0
class_name = class_dict.get_class_name(0)
print(f"Class 0: {class_name}")

# Get ImageNet21k to ImageNet-1k class mapping
class_1k = class_dict.get_class_1k("n01440764")
print(f"Class 1k mapping: {class_1k}")

# Get custom class name
custom_name = class_dict.get_custom_class_name(0)
print(f"Custom name: {custom_name}")

License

This project is licensed under the MIT License - see the LICENSE file for details.

Support

For support, please open an issue on the GitHub repository.

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

imagenet_classes-0.1.2.tar.gz (633.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

imagenet_classes-0.1.2-py3-none-any.whl (632.8 kB view details)

Uploaded Python 3

File details

Details for the file imagenet_classes-0.1.2.tar.gz.

File metadata

  • Download URL: imagenet_classes-0.1.2.tar.gz
  • Upload date:
  • Size: 633.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for imagenet_classes-0.1.2.tar.gz
Algorithm Hash digest
SHA256 b9ab402a9ee9b5daec29d9e184d7b3f07bd4bb9d38ad53b3ddfd1f885542d3a0
MD5 d8f6f948229a8f1f5259594db4adb9ce
BLAKE2b-256 e9432347a232a1ead8954efe2911c0d62aa11611d28757c1778499d4e675584d

See more details on using hashes here.

File details

Details for the file imagenet_classes-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for imagenet_classes-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 905c42cd3e60c8ca55b1044cb2d95a81218a553237690309f0061b37e1cec4d8
MD5 c72dfbca70458aac72f62ca95b952f88
BLAKE2b-256 5da97fd24197e7eaf54d9c20ac61a76ea1d8651adcb9cced9d41931b01149603

See more details on using hashes here.

Supported by

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