Skip to main content

A toolkit for hierarchical classification

Project description

Classtree

Classtree is a hierarchical classifier for images or text.

pip install classtree

The fastest way to use Classtree is to call the CLI on a folder of images or text files.

train_data/
|- animals/
    |- mammals/
       |- marsupials/
          |- koala/
             |- image001.jpg
             |- image002.jpg
             |- ...
          |- ...
    |- reptiles/
       |- ...
    |- ...
|- ...
classtree train images --model animals --dir train_data/animals

or

classtree train text --model animals --dir train_data/animals

And then use your model with the predict command.

classtree predict --model animals new_data/image304.jpg
> birds/raptors/eagle

Pre-trained Models

You can download a pre-trained model using the download command.

classtree download model dbpedia

Or download a pre-prepared dataset.

classtree download images inaturalist21-mini
classtree download text dbpedia

If you want to fine-tune an existing model, you can use the --from flag during training with any downloaded model.

classtree train text --model animals --from dbpedia --dir train_data/animals

Available Models

Task Name Size Dataset Notes
Image Classification inaturalist21-mini M inaturalist21-mini Non-commercial research/educational use only
Text Classification dbpedia M dbpedia

Available Datasets

Type Name Dataset Notes
Image inaturalist21-mini iNaturalist 2021 (Mini) Non-commercial research/educational use only
Text dbpedia DBPedia CC0: Public Domain

Evaluation

You can test your model on a hold-out dataset using the test command.

classtree test --model animals --dir=test_data/animals

Licensing

Classtree is available for non-commercial internal research use by academic institutions or not-for-profit organisations only, free of charge. Please, see the license for further details. To the extent permitted by applicable law, your use is at your own risk and our liability is limited. Interested in a commercial license? For commercial queries, please email aimlshop@adelaide.edu.au with subject line “Classtree Commercial License”.

This is an AIML Shop project.

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

classtree-0.0.1-py3-none-any.whl (29.9 kB view details)

Uploaded Python 3

File details

Details for the file classtree-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: classtree-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 29.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/4.0.2 CPython/3.11.7

File hashes

Hashes for classtree-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 59361c8b646ed78d831ad51baf03b46eabc5e4203575ea62384f5966065be9bf
MD5 1e71c654970e3925a588b9ab3d6b7d32
BLAKE2b-256 458d508dcb9400775243e2e5a77e7ff1d719cf1bd1322e285974780984e3c912

See more details on using hashes here.

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