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 --index-url https://download.pytorch.org/whl/cu128

Linux / Mac / CPU:

pip install torch==2.9.1

2. Install AWC Helpers

From PyPI:

pip install awc-helpers

Usage

from awc_helpers import DetectAndClassify

# Initialize the pipeline
pipeline = DetectAndClassify(
    detector_path="path/to/megadetector.pt",
    classifier_path="path/to/species_classifier.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.3.tar.gz (12.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.3-py3-none-any.whl (12.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: awc_helpers-0.1.3.tar.gz
  • Upload date:
  • Size: 12.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.3.tar.gz
Algorithm Hash digest
SHA256 6575889e6bad409600b47b7cb85319fa4e6d9bc1dd637f837d8833803237b51f
MD5 01a871166ad44f5184bbf96e3c7eb8a8
BLAKE2b-256 a2a1bfbf6111d2f3c06db59277716320d801df6e07acbf5d11c60c18a17e647c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: awc_helpers-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 12.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.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 a9c666089d5b78e4be98133e979368def69149648dbccbcfb19d9dc38075a7fb
MD5 e2f1d2a44301df069327e6cb92aacd74
BLAKE2b-256 8f655dab4b050a0f29fcef63c89b4e4684e55457217a7ffc1fd71845e4a9ac78

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