# afMLevel: paired raw and levelled atomic force microscopy height images with foreground masks

## Facts

- Provider: Heath AFM Lab
- License: CC-BY-4.0 (https://huggingface.co/datasets/Heath-AFM-Lab/afMLevel-data)
- Size: 6,499 files
- Format: TIFF, CSV (in sampled files)
- Stored at: Hugging Face, https://huggingface.co/datasets/Heath-AFM-Lab/afMLevel-data
- Access: public, readable without an account
- Category: Structural Biology
- Source: https://github.com/mayatek1/afMLevel
- Page: https://scigantic.com/archive/c5528365-d7b8-50ea-b998-1e2b9628666e
- Keywords: Structural Biology, image segmentation, TIFF, CSV, Hugging Face

## About

Training and test data for afMLevel, a deep learning tool from the Heath AFM lab that levels atomic force microscopy (AFM) topography images by automated background estimation or foreground masking. Each sample pairs a raw AFM height image with a reference image levelled by hand in NanoLocz, plus a binary foreground mask. There are 2,165 images (2,001 train, 164 test), 32-bit float single-channel TIFFs in nanometres, from 128 x 128 to 1024 x 1024 pixels, released before augmentation; masks are CSV files. Layout: train/ and test/ each with Image/, Levelled/ and Mask/ folders paired by index, plus per-image provenance tables (training_data_sources.csv, test_data_sources.csv). Read the TIFFs with tifffile rather than PIL to keep float height values. About 3 GB. Useful for AFM image processing, background subtraction and U-Net segmentation of biomolecular AFM. The card states the dataset is released under CC BY 4.0, with contributing authors of unpublished data agreeing to that license; cite the afMLevel paper and github.com/mayatek1/afMLevel.

## Load the data

```python
import pandas as pd
df = pd.read_csv("hf://datasets/Heath-AFM-Lab/afMLevel-data/test/Mask/test_mask_000.csv")
df.head()
```

## Data structure

File types in sampled files: TIFF, CSV

Example file: `test/Mask/test_mask_000.csv`

## Open it

- In a hosted notebook with the data mounted: https://scigantic.com/archive/c5528365-d7b8-50ea-b998-1e2b9628666e
- Full record as JSON (schema card included): https://api.scigantic.com/api/archives/c5528365-d7b8-50ea-b998-1e2b9628666e
- Over MCP: `get_schema_card` with id `c5528365-d7b8-50ea-b998-1e2b9628666e` at https://api.scigantic.com/mcp

## Related topics

- [CSV datasets](https://scigantic.com/topics/csv)
- [TIFF datasets](https://scigantic.com/topics/tiff)
- [Image segmentation datasets](https://scigantic.com/topics/image-segmentation)
- [Structural Biology datasets](https://scigantic.com/topics/structural-biology)
