Skip to main content

Australian Wildlife Conservancy's Wildlife detection and species classification inference tools

Project description

AWC Helpers

Wildlife detection and species classification inference tools combining MegaDetector with custom species classifiers.

Installation

1. Install PyTorch

Windows (with CUDA GPU):

pip install "torch<=2.9.1" "torchvision<=0.24.1" --index-url https://download.pytorch.org/whl/cu128

Linux / Mac / Windows with CPU:

pip install "torch<=2.9.1" "torchvision<=0.24.1"

2. Install AWC Helpers

From PyPI:

pip install awc-helpers

Usage

from awc_helpers import DetectAndClassify

# Initialize the pipeline
pipeline = DetectAndClassify(
    detector_path="models/md_v1000.0.0-redwood.pt",
    classifier_path="models/awc-135-v1.pth",
    label_names=["species_a", "species_b", "species_c"],
    detection_threshold=0.1,
    clas_threshold=0.5,
)

# Run inference on image paths
results = pipeline.predict(
    inp=["path/to/image1.jpg", "path/to/image2.jpg"],
    clas_bs=4
)

for result in results:
    print(result)
# print example:
# AWCResult(identifier='"path/to/image1.jpg"', bbox=(0.1, 0.2, 0.3, 0.4), bbox_label='animal', bbox_conf=0.95, labels_probs=(('kangaroo', 0.87),))

Documenntation

Refer to this for more details

License

This project is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License (CC BY-NC-SA 4.0).

Non-commercial use only. Derivative works must use the same license.

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

awc_helpers-0.2.1.tar.gz (15.1 kB view details)

Uploaded Source

Built Distribution

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

awc_helpers-0.2.1-py3-none-any.whl (15.4 kB view details)

Uploaded Python 3

File details

Details for the file awc_helpers-0.2.1.tar.gz.

File metadata

  • Download URL: awc_helpers-0.2.1.tar.gz
  • Upload date:
  • Size: 15.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.9

File hashes

Hashes for awc_helpers-0.2.1.tar.gz
Algorithm Hash digest
SHA256 64f42ba4b9640820df72f0d59f5efcd339a671d398d36b666f8560b00358f8b3
MD5 2eff7e6d0eb13339d7d728c30324fcc2
BLAKE2b-256 4a2f53ab841b66f929934a97995502e4dc89513e672736e98fe21a869ab8fb89

See more details on using hashes here.

File details

Details for the file awc_helpers-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: awc_helpers-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 15.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.9

File hashes

Hashes for awc_helpers-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 9c722621cfc612f8521e8a25174ab5a9f9326e071b300e0536f8fd5fde759533
MD5 1c9e6511428e0f715557db6fac01aa95
BLAKE2b-256 4cbea8f114debda574ad3132ba1e705ab64274099170f3becc6b61663a3ea6ba

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