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

Uploaded Python 3

File details

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

File metadata

  • Download URL: awc_helpers-0.1.4.tar.gz
  • Upload date:
  • Size: 13.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.1.4.tar.gz
Algorithm Hash digest
SHA256 9facae88493e8bc773407f7487570381635c870fb66d6f369dba69773b38e485
MD5 2ab89923139519acaa6e1f23065ffeb1
BLAKE2b-256 1efc7cc5269c93d4d6a506eec303a5f23b3db34ce6e6ac78ed3985ca8358480a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: awc_helpers-0.1.4-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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 723810a5367430144f4b147e94d3748607ea87a2425c8965fac237cae07f5510
MD5 5f572d8a2d43d1d3451ec6bdb7e5f806
BLAKE2b-256 b86c0031e5f7eeb5f80f17e8bd768d907df8204e38608877b8db2a2c21fe9b07

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