Skip to main content

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 --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
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.

Release files for classtree 0.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for classtree 0.0.3
File Interpreter ABI Platform
classtree-0.0.3-py3-none-any.whl Python 3 none any Details

Release files / classtree-0.0.3-py3-none-any.whl

Download URL classtree-0.0.3-py3-none-any.whl
Size 29.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
365d4882a0f3c3d6080e70b7f9e23dc9846ed3c41da851fe7a57c6f1b5107284
BLAKE2b-256 checksum
How to use checksums
5f3349d8f4d5747d5aa4d34654d1d6979b867a22355e795a1b7f9382945ce705
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.1.1 CPython/3.12.5

Release history Release notifications | RSS feed

This release

0.0.3 This release

1 release file

0.0.2

1 release file

0.0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page