Dataset statistical calculation.
Project description
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
cvds-0.0.1.tar.gz
(3.3 kB
view details)
Built Distribution
cvds-0.0.1-py3-none-any.whl
(4.9 kB
view details)
File details
Details for the file cvds-0.0.1.tar.gz
.
File metadata
- Download URL: cvds-0.0.1.tar.gz
- Upload date:
- Size: 3.3 kB
- Tags: Source
- Uploaded using 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
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 592d4e2b1ee24f200b6eb18f5ac4a4a5869520a192b595e80aceb9a51f6ff58d |
|
MD5 | ccefa7b9d12614eda397bfcf1131cab9 |
|
BLAKE2b-256 | 2ca25804c5e3b16e68e2f598f4687409240e7f74ee5a9910c7c63923b9753d10 |
File details
Details for the file cvds-0.0.1-py3-none-any.whl
.
File metadata
- Download URL: cvds-0.0.1-py3-none-any.whl
- Upload date:
- Size: 4.9 kB
- Tags: Python 3
- Uploaded using 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
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 133e6308a036fdae63ed900d34118adc891b88f748bee7dd4b80a3a0faff6226 |
|
MD5 | 33d087ea5f1f0a58f186f7b5581de278 |
|
BLAKE2b-256 | b0755a270c9abffe3bd12c32e8ab140e319d081ee73c2e59ad4134f666440d5f |