Skip to main content

Model Meter

Project description

ModelMeter

ModelMeter

Unrestricted class structure compatibility and focused throughput assessment for your model's performance evaluation

Requirements

Python 3.8+

Installation

pip install model-meter

---> 100%

Example

Create it

  • Create a file main.py with:
from model_meter import ModelMeter
from ultralytics import YOLO

# Load the model
model = YOLO()

# Create the meter
meter = ModelMeter(model)

# Run the meter
throughput, avg_time_per_call = meter.measure(
    params=('./contents/dog.jpg',), 
    method_name="__call__",
)

print(f'Throughput: {throughput} images/second')
print(f'Avg time per call: {avg_time_per_call} seconds')

Run it

Run the script with:

$ python main.py

...

Throughput: 14.794271662158552 images/second
Avg time per call: 0.0675937297107937 seconds

License

This project is licensed under the terms of the MIT 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

model_meter-0.2.1.tar.gz (3.5 kB view hashes)

Uploaded Source

Built Distribution

model_meter-0.2.1-py3-none-any.whl (3.4 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page