EMFET
Research use only. EMFET classifies individual, pre-cropped blood-cell images (from the NIH malaria single-cell dataset or similarly structured data) as Parasitized or Uninfected using a handcrafted 5-feature pipeline and a classical ML classifier. It does not detect cells in a whole blood smear, estimate parasitemia, identify parasite species/stage, or produce a patient-level diagnosis. It has not been validated as a clinical or diagnostic device.
Install
pip install emfet
Quick start: run the app
emfet
Launches the bundled Streamlit demonstration app in your browser — upload a pre-cropped cell image, see the step-by-step feature-extraction pipeline, and get a prediction from the bundled, pre-trained model. No separate model file or dataset needed to try it.
Quick start: use the library
from emfet.features import extract_features
features = extract_features("sample_cell.png")
# array([n_spots, max_spot_area, total_spot_area, spot_saturation, gray_std])
What's in the package
emfet.app/ theemfetconsole command — a Streamlit demonstration app, bundled with a pre-trained model, launchable with zero setup.emfet.features— the feature-extraction pipeline (Gray World color normalization, adaptive spot detection, morphological cleaning, HSV saturation), driven by aFeatureConfigso every processing stage is a configuration, not a code fork.emfet.data— dataset loading and patient-ID resolution for patient-grouped evaluation (required to avoid patient-level leakage on datasets with multiple images per patient).emfet.evaluate— a patient-grouped nested cross-validation harness with a built-in leakage guard, a full diagnostic-metrics suite, a permutation significance test, and paired Wilcoxon comparisons for ablation studies.emfet.ablation— stage/feature ablations and classical baseline descriptors (color histogram, LBP, GLCM, HOG) for comparison under the identical evaluation protocol.emfet.benchmark— controlled latency/memory/CPU measurement, reporting model size, load memory, and peak inference memory as distinct, explicitly-labeled quantities.
Labels
Parasitized = 0, Uninfected = 1 (emfet.data.LABEL_NAMES). The positive class for every
metric in emfet.evaluate is Parasitized (emfet.data.POSITIVE_CLASS).
Security note
Loading a pickled/joblib model executes arbitrary code during deserialization. Only load model files from sources you trust.
Full project, training/evaluation scripts, and reproducibility harness
This package is the importable library. The full research repository — CLI scripts for patient-grouped nested cross-validation, ablation sweeps, benchmarking, a Streamlit demonstration app, tests, and the manuscript this software accompanies — is at https://github.com/abkafi1234/cell_image.
License
MIT.
Metadata
Release files for emfet 2.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| emfet-2.0.0.tar.gz | 6.5 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| emfet-2.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 13.1 MB
Release files / emfet-2.0.0.tar.gz
| Download URL | emfet-2.0.0.tar.gz |
|---|---|
| Size | 6.5 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
550a21847179b5b6e5cdc624fdd555efd6e0ab418aca42b832d2255d12dc10ad
|
|
BLAKE2b-256 checksum How to use checksums |
92af8412747c88f0da5ab1b26a932d67879787781eee86652f0a34e479e95c63
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 18, 2026.
Transparency logRelease files / emfet-2.0.0-py3-none-any.whl
| Download URL | emfet-2.0.0-py3-none-any.whl |
|---|---|
| Size | 6.5 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
fcaee1c18d2c78dfded812c7fa62154b89649ee577ac424825b5308141600b26
|
|
BLAKE2b-256 checksum How to use checksums |
34081000fa528d815f4ddef285234eca05c2e3078fd5beab71b407578a95de55
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 18, 2026.
Transparency log