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.0.tar.gz (14.9 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.0-py3-none-any.whl (15.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: awc_helpers-0.2.0.tar.gz
  • Upload date:
  • Size: 14.9 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.0.tar.gz
Algorithm Hash digest
SHA256 384c95d3e4f9cc8a87644ea3cbbebb17d8440aa17d226e8105aa2e9b692b005f
MD5 09f45bad7aa39ed3da650083425a7826
BLAKE2b-256 b4cc243e4c6e295bb12feb7627be0f08bb5e359d385d20578b97e7c68120b487

See more details on using hashes here.

File details

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

File metadata

  • Download URL: awc_helpers-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 15.3 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ff5c333be2efb4c513fa6a9f657749f84dc72b175ed93d1b376a83cffd3fec10
MD5 3da346f3a70b20bf9bb9ca36aad4e454
BLAKE2b-256 0ec6d5ea5770b7f084a3e37eb4fa077158545a47482396c2e15c70cf05daabf6

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