Covid_Patient_Aware_Image_Split
It is important not to split images of the same patient between the test and train sets to avoid overfitting. This repository splits a sample Covid/Normal classification dataset into test and train sets in a patient aware and stratified manner. The meta-data file is used to group the images based on Patient-ID. For example, all the images colored green belong to the same patient and should be either in the test or the train split.
While grouping should be done strictly to ensure there is no splitting images of a patient, stratification can be done approximately i.e. as well as possible. This code also assumes that all images of one patient have the same stratification category (diagnosis), meaning that all the images coming from the same Patient ID are either Covid or NonCovid.
To split images into 4 folders (train/Covid, train/NonCovid, test/Covid, test/NonCovid) inside splitted folder:
split_to_folders.py
To split images into a dictionary:
split_into_dictionary.py
To split images into a torch Dataloader:
split_into_dataloader.py
Metadata
Release files for patient-aware-splitter 0.0.1
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 |
|---|---|---|---|---|
| patient_aware_splitter-0.0.1.tar.gz | 4.0 kB | Without provenance | Details for patient_aware_splitter-0.0.1.tar.gz |
Release files / patient_aware_splitter-0.0.1.tar.gz
| Download URL | patient_aware_splitter-0.0.1.tar.gz |
|---|---|
| Size | 4.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
47460c3d87e72ccc1bcf5c813a4da35cd4bc01778d193360e5ba42c6f2b1f574
|
|
BLAKE2b-256 checksum How to use checksums |
6a022b2a70c5dec5c2cb7ee1a1f89111525411645772891ec6506f53afdd2342
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.7.4
|
Security for patient-aware-splitter 0.0.1
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.