Skip to main content

datastate

Dataset statistical calculation.

How to use

from cvds import calc_mean_std, SegLabel

# calculate mean and std from image dataset
msd = calc_mean_std("dataset/image")
print(msd)
"""
output:
{'mean': array([[0.4923597 , 0.4912278 , 0.44912583]], dtype=float32), 'std': array([[0.2124527 , 0.20088832, 0.22155836]], dtype=float32)}
"""

# check label's information
lab_infor = SegLabel("dataset/label", num_classes=4)
print(lab.area)  # area of each category
print(lab.sample)  # number of samples per category
print(lab.index([0, 1, 2, 3]))  # list of path with index category
"""
output:
{'0': 18.079630533854164, '1': 42.78903537326389, '2': 18.866475423177086, '3': 20.26485866970486}
{'0': 5, '1': 8, '2': 4, '3': 6}
['dataset\\label\\45.png', 'dataset\\label\\47.png']
"""

TODO

  • calc neam and std (population).

  • calc area of each category in segmentation task.

  • calc number of samples per category in classification task.

  • calc anchor size and etc in detection task.

  • add other state calc about dataset.

Release files for cvds 0.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cvds 0.0.1
File Size Uploaded
cvds-0.0.1.tar.gz 3.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for cvds 0.0.1
File Interpreter ABI Platform
cvds-0.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 8.2 kB

Release files / cvds-0.0.1.tar.gz

Download URL cvds-0.0.1.tar.gz
Size 3.3 kB
Tags Source
SHA-256 checksum
How to use checksums
592d4e2b1ee24f200b6eb18f5ac4a4a5869520a192b595e80aceb9a51f6ff58d
BLAKE2b-256 checksum
How to use checksums
2ca25804c5e3b16e68e2f598f4687409240e7f74ee5a9910c7c63923b9753d10
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.8.10

Release files / cvds-0.0.1-py3-none-any.whl

Download URL cvds-0.0.1-py3-none-any.whl
Size 4.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
133e6308a036fdae63ed900d34118adc891b88f748bee7dd4b80a3a0faff6226
BLAKE2b-256 checksum
How to use checksums
b0755a270c9abffe3bd12c32e8ab140e319d081ee73c2e59ad4134f666440d5f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.8.10

Release history Release notifications | RSS feed

This release

0.0.1 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page