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 / 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
)

# Results format: [(image_path, bbox_confidence, bbox, label, label_confidence), ...]
for result in results:
    print(result)
# print example:
# ("path/to/image1.jpg",
#  0.804,
#  (0.2246, 0.5885, 0.0678, 0.1022),
#  'Acanthagenys rufogularis | Spiny-cheeked Honeyeater',
#  0.9948)

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.1.5.tar.gz (14.0 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.1.5-py3-none-any.whl (14.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: awc_helpers-0.1.5.tar.gz
  • Upload date:
  • Size: 14.0 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.1.5.tar.gz
Algorithm Hash digest
SHA256 43ad8d68aa5faf645fd8278a40e9d19a31d3182b5454f48108f2074b67a6165f
MD5 b2e371b41cabc0cbfb8c4f87d8826d1f
BLAKE2b-256 89ca20c65cdb71588428f946ee7cb4978007b0b80c7790ac095295b3139c2fae

See more details on using hashes here.

File details

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

File metadata

  • Download URL: awc_helpers-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 14.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.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 eb87d2a9ffd317af8d0b55931b1b98ac2b3c9d96576d23c36d778e354091a880
MD5 f9fb751151ee37765a055b894bf21919
BLAKE2b-256 864a392261a664fcaac01e86bbb311c62921c02548cccbf7f840802d95755368

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