Skip to main content

A package to detect delivery persons in images using a fine-tuned ResNet-50 model.

Project description

Delivery Person Detection

A Python package to detect whether an image contains a delivery person using a fine-tuned ResNet-50 model.

Installation

You can install the package using pip:

pip install delivery-person

Note: Ensure that the delivery-person package is available on PyPI. If not, you can install it from the local directory as shown below.

Installing from Local Directory

Clone the repository or download the package files. Navigate to the package directory. Run:

pip install .

Usage

from delivery_person import DeliveryPersonDetector

# Initialize the detector
detector = DeliveryPersonDetector(
    model_path='path/to/fine_tuned_resnet50_1.pth',
    threshold=0.985,  # Optional: Set your desired threshold (default is 0.985)
    device='cuda'  # Optional: 'cpu' or 'cuda' (default is auto-detected)
)

# Predict on an image
image_path = 'path/to/image.jpg'
predicted_label, predicted_prob = detector.predict_image(image_path)

print(f"Predicted Label: {predicted_label}")
print(f"Confidence: {predicted_prob:.2f}%")

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

delivery_person-0.1.0.tar.gz (3.3 kB view details)

Uploaded Source

Built Distribution

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

delivery_person-0.1.0-py3-none-any.whl (3.7 kB view details)

Uploaded Python 3

File details

Details for the file delivery_person-0.1.0.tar.gz.

File metadata

  • Download URL: delivery_person-0.1.0.tar.gz
  • Upload date:
  • Size: 3.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.6

File hashes

Hashes for delivery_person-0.1.0.tar.gz
Algorithm Hash digest
SHA256 ae184b153f77a96f9b8f7ac82f7a2f7df977b25064213ff7625e22e6799e451a
MD5 b87150afd43ee72422a3634afe495cd6
BLAKE2b-256 34a694cee888a41ef7590f77c305a00cc2cac017ef10fbf1ddf9adb2356f00ca

See more details on using hashes here.

File details

Details for the file delivery_person-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for delivery_person-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 243f4c643dc5584f537713d88b4c29a66acaa3176f4a75bade666455a3a9db44
MD5 418ccc48b87a37c72d220c242611e107
BLAKE2b-256 566388b05b10d74bae960590d5012285e657a2187c3da9c05c6818347c8b26e7

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