# ModelMeter
<p align="center">
<a href="https://pypi.org/project/model-meter"><img src="https://i.imgur.com/QXuoJhK_d.webp?maxwidth=760&fidelity=grand" alt="ModelMeter" width="50%" height="50%"></a>
</p>
<p align="center">
<em>Unrestricted class structure compatibility and focused throughput assessment for your model's performance evaluation</em>
</p>
## Requirements
Python 3.8+
## Installation
```console
pip install model-meter
---> 100%
```
## Example
### Create it
* Create a file `main.py` with:
``` python
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:
```console
$ 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.
Raw data
{
"_id": null,
"home_page": "https://github.com/dayeondev/ModelMeter",
"name": "model-meter",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": "model meter",
"author": "Dayeon Oh",
"author_email": "dayeon.dev@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/6b/60/03ea9a2c1955b4345d05a59bbf8911f1f2f62a7fa9c7ac806fa1471c9da5/model_meter-0.2.1.tar.gz",
"platform": null,
"description": "# ModelMeter\n<p align=\"center\">\n <a href=\"https://pypi.org/project/model-meter\"><img src=\"https://i.imgur.com/QXuoJhK_d.webp?maxwidth=760&fidelity=grand\" alt=\"ModelMeter\" width=\"50%\" height=\"50%\"></a>\n</p>\n<p align=\"center\">\n <em>Unrestricted class structure compatibility and focused throughput assessment for your model's performance evaluation</em>\n</p>\n\n## Requirements\nPython 3.8+\n\n## Installation\n```console\npip install model-meter\n\n---> 100%\n```\n\n## Example\n\n### Create it\n\n* Create a file `main.py` with:\n\n``` python\nfrom model_meter import ModelMeter\nfrom ultralytics import YOLO\n\n# Load the model\nmodel = YOLO()\n\n# Create the meter\nmeter = ModelMeter(model)\n\n# Run the meter\nthroughput, avg_time_per_call = meter.measure(\n params=('./contents/dog.jpg',), \n method_name=\"__call__\",\n)\n\nprint(f'Throughput: {throughput} images/second')\nprint(f'Avg time per call: {avg_time_per_call} seconds')\n```\n\n### Run it\n\nRun the script with:\n\n```console\n$ python main.py\n\n...\n\nThroughput: 14.794271662158552 images/second\nAvg time per call: 0.0675937297107937 seconds\n```\n\n## License\n\nThis project is licensed under the terms of the MIT license.\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Model Meter",
"version": "0.2.1",
"project_urls": {
"Homepage": "https://github.com/dayeondev/ModelMeter"
},
"split_keywords": [
"model",
"meter"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "5d72953e5b2679fe1a4a9a905a768b7f0aad348f7c5d6550457da87553522539",
"md5": "51fbe9ad3886f5897f4c086fc552c8d6",
"sha256": "6dc6121b39ac4d9518341e82e6d3e8e57ad0b5541588037c47049079403ec867"
},
"downloads": -1,
"filename": "model_meter-0.2.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "51fbe9ad3886f5897f4c086fc552c8d6",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 3373,
"upload_time": "2024-03-21T15:48:03",
"upload_time_iso_8601": "2024-03-21T15:48:03.361826Z",
"url": "https://files.pythonhosted.org/packages/5d/72/953e5b2679fe1a4a9a905a768b7f0aad348f7c5d6550457da87553522539/model_meter-0.2.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "6b6003ea9a2c1955b4345d05a59bbf8911f1f2f62a7fa9c7ac806fa1471c9da5",
"md5": "5ddd079a45d1a7cccd712e9f668d6202",
"sha256": "44056142d91f6e2c048356b30e91ee8e9fbf3a5b5ec60e4fcade206540f24408"
},
"downloads": -1,
"filename": "model_meter-0.2.1.tar.gz",
"has_sig": false,
"md5_digest": "5ddd079a45d1a7cccd712e9f668d6202",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 3462,
"upload_time": "2024-03-21T15:48:04",
"upload_time_iso_8601": "2024-03-21T15:48:04.913312Z",
"url": "https://files.pythonhosted.org/packages/6b/60/03ea9a2c1955b4345d05a59bbf8911f1f2f62a7fa9c7ac806fa1471c9da5/model_meter-0.2.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-03-21 15:48:04",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "dayeondev",
"github_project": "ModelMeter",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "model-meter"
}