DINO-4DSTEM logo DINO-4DSTEM Download
4D-STEM · scanning electron diffraction · unsupervised phase mapping

A self-supervised pipeline for 4D-STEM data analysis.

Unsupervised classification and phase mapping for 4D-STEM (4DSTEM) and scanning electron diffraction (SED) — also NBED and nanodiffraction. It groups your diffraction patterns into distinct structural regions and shows you why. No labels. No coding.

Free · Windows · one-time ~15 min setup · no programming required

A real NaPHI diffraction pattern classified into a class map
real NaPHI data — every probe position → a structural class
What it does

Point it at a scan. Get a map of what's actually different.

DINO-4DSTEM learns the structure in your data by itself, then paints the distinct regions on your scan — and gives you the evidence behind every class.

Automatic

Groups every diffraction pattern into structurally distinct classes — phases, crystallinity, texture — with no labels and no hand-tuning.

Interpretable

See why each region is its own class — its diffraction as a single frame, a grain average, or the whole class — plus attribution maps and an NMF baseline to check the answer.

No code

A desktop app plus a plain-English assistant. Double-click to launch, or just ask: “load this file, then train.” It drives the pipeline for you.

See the evidence

Check every class — at any scale.

Inspect a class’s diffraction as a single frame, a grain average, or the whole-class average. The noise falls away and the Bragg spots sharpen as you zoom out.

The same NaPHI class as a single frame, a grain average, and a class average — progressively cleaner
Bring your own data

It reads the formats you already have.

Point it at your files — nothing is uploaded, everything stays on your machine.

.prz · .npz · .npy
py4DSTEM / NumPy cubes — memory-mapped
.h5 · .hdf5 master
Dectris / Eiger / EMPAD masters
.dm4 · .dm3
Gatan — reads calibration from metadata
.raw
EMPAD — metadata rows cropped automatically
.mib (+.hdr)
Quantum Detectors Merlin / Medipix3
folder of images
.tif / .png / .jpg … numbered by scan order
Low dose?

Denoise it first — from a single exposure.

Beam-sensitive samples force you below the dose that gives a clean pattern. The Pre-processing tab denoises self-supervised: no clean reference, no repeated acquisition, nothing to tune.

Noise2Noise (binomial)
A fair coin flip per electron splits each pattern into two independent half-dose exposures of the same signal (Poisson thinning). A small dose-equivariant network maps one half to the other, then runs on the full exposure — counts preserved, no parameter to tune.
Flatten (radial background)
Removes the azimuthally-symmetric radial background — the direct-beam skirt and amorphous halo — so the Bragg and orientation signal stands out.
The other algorithms
The notebooks compare Noise2Void, Noise2Self and scan-to-scan Noise2Noise against the binomial split — with the math, and why the blind-spot methods need a hyperparameter and this one doesn't.
Made for real materials

Wherever the structure changes across the sample.

· Pharmaceutical thin films · Layered semiconductors · Beam-sensitive crystals · Crystallinity & phase mapping · Amorphous vs crystalline domains · Texture & orientation · Grain & domain analysis
Citing

Using it in your research? Please cite the paper.

DINO4DSTEM: A self-supervised framework for structural discovery in 4D-STEM.
Daniel Khaykelson, Lothar Houben, Boris Rybtchinski · arXiv:2608.15098 (2026)

Read the paper on arXiv

On GitHub, “Cite this repository” in the sidebar copies the BibTeX or APA entry for you.

Get started

Install in about 15 minutes. You only do it once.

Pick your operating system, download the bundle, and follow its guide. All three need free Miniconda / Miniforge installed first.

Windows
Double-click installers, Desktop icons — no terminal.

⬇  Download for Windows

Windows install guide →

Linux
./install.sh then ./launch_gui.sh. NVIDIA-GPU ready.

⬇  Download for Linux

Linux install guide →

macOS
./install.sh then ./launch_gui.sh. Runs on CPU.

⬇  Download for macOS

macOS install guide →

⚠️ Windows is the primary, fully tested platform. The Linux and macOS builds share the same code and their installers have been checked, but are not yet fully tested end-to-end — please open an issue or email daniel.kh@weizmann.ac.il if you hit a snag.

Windows offers two ways — pick whichever fits:

Install with git

For getting updates with one command later.

  1. Install Miniconda and Git (one time).
  2. Clone the repository:
    # download the code
    git clone https://github.com/DanielKhaykelson/dino-4dstem
  3. Run the same two installers (or install.bat for both).
  4. Later, get the newest version anytime:
    # update to the latest
    git pull
    install_2_dino4dstem.bat

First time? The bundle includes GETTING_STARTED.docx — a picture-by-picture, click-by-click walkthrough. Running on an NVIDIA GPU is optional (see the install page).