svhnL
SVHN dataset preprocessing and annotation file reading and converting python library
Installation
From PyPI :
$ pip install svhnl
Documentation
From ReadtheDocs : link
Functionalities
Dataset Download & extract
To download the original SVHN dataset [train, test or extra] from their website and extract the downloaded .tar.gz file, use.
Code Example :
>>>> import svhnl
>>>> train_dt_filename = svhnl.download(extract=False)
'./data/train.tar.gz'
>>>> test_dt_folder_path = svhnl.download(dataset_type='test', save_path='../dataset/svhn', extract=True, force=False, del_zip=False)
'../dataset/svhn/test'
Convert Annotation file into JSON
To read the .mat annotation file provided with the original svhn dataset and generate more flexible and light-weight .json annotation file, use.
Code Example :
import svhnl
svhnl.ann_to_json(file_path='./train/digitStruct.mat', save_path='./svhn_ann.json', bbox_type='normalize')
Convert Annotation file into csv
To read the .mat annotation file provided with the original svhn dataset and generate more operatable and light-weight .csv annotation file, use.
Code Example :
import svhnl
svhnl.ann_to_csv(file_path='./train/digitStruct.mat', save_path='./svhn_ann.csv', bbox_type='normalize')
Generate MDR dataset
To easily use the SVHN dataset in any MDR task [defined number of digit recognition or without restrictions on object detection] with digit cropping, RGB to Gray-scale conversion, digit count limiting, etc. Code Example :
import svhnl
image_np, ann_dict = svhnl.gen_dataset(image_path='../data/svhn/train', mat_path='../data/svhn/train/digitStruct.mat')
Metadata
Release files for svhnl 0.0.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| svhnl-0.0.5.tar.gz | 13.5 kB | Without provenance | Details for svhnl-0.0.5.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| svhnl-0.0.5-py3-none-any.whl | Python 3 | none | any | Details for svhnl-0.0.5-py3-none-any.whl |
Total release size: 21.4 kB
Release files / svhnl-0.0.5.tar.gz
| Download URL | svhnl-0.0.5.tar.gz |
|---|---|
| Size | 13.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0fe7ec85bcc6f0499d1e2978b023839d94a0ea0af7b954aaa07ddbc1741509e2
|
|
BLAKE2b-256 checksum How to use checksums |
488a06c08f76d5dc6c1213dcdd97ca463068b94e251c1fdfb12ee8262a6398dd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.8.0 pkginfo/1.8.2 readme-renderer/33.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.64.0 importlib-metadata/4.11.4 keyring/23.5.1 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.12
|
Release files / svhnl-0.0.5-py3-none-any.whl
| Download URL | svhnl-0.0.5-py3-none-any.whl |
|---|---|
| Size | 7.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1c0644a17f2752b080826f195477f43c5e5859ae8e8afc3e96de651a2d2e4f32
|
|
BLAKE2b-256 checksum How to use checksums |
cacbc419eb57822d47c17dc2b7234e8bd25c1b3e85c9248abbe1dad3c51a597e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.8.0 pkginfo/1.8.2 readme-renderer/33.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.64.0 importlib-metadata/4.11.4 keyring/23.5.1 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.12
|
Security for svhnl 0.0.5
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.