BraggNN
A small CNN with a non-local attention block that regresses the center of a Bragg peak from an 11 × 11 patch.
Physics and weather · 31 operations Checked
Click or tap a spot to read it up close. Scroll or drag inside the diagram to move through it. Zoom with + and − or Ctrl and scroll. Press 0 for the whole graph. Swipe inside the diagram to move through it. Use + and − to zoom.
At a glance
- Task
- Physics and weather
- Parameters
- 33.2K
- Operations
- 31
- Framework
- PyTorch
- Recurrent
- No
- Published
- IUCrJ (arXiv 2020)
- Cited by
- 60 (as of 29 October 2026)
- Authors
- Zhengchun Liu, Hemant Sharma, Jun-Sang Park and others
- Source
- GitHub: lzhengchun/BraggNN
- Checked
- Passed: the trace was replayed operation by operation and matched the model's own output for this input.
Files
The file opened in a new tab. Use your browser's Save command there to keep it.
The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.
Details
- Stable ID
- m14972
- Graph hash
- adb9c67cd8d108f2e1b709d8d138c0b994c6141140285b13bc4f9603aaf9b657
- Skeleton hash
- 7a6c3b9c387f715c1a4ab4a3a2e3bba7e817e065cdf604db6aa2ce4889fefd07
- Architecture hash
- 3e0cd6df9003c52a043bba895a323929d6a4c856cf670dac9709b294894d710a
- Diagram SHA-256
- 52b2b338f587a91827510e58b6da6266c8ec65017d6b426fce73b5fda04d21bd
- TorchLens version
- 2.36.0
- Renderer
- graphviz 2.43.0+pyvips 3.2.0+libvips 8.18.7+render-opts@06c1f0d3
- Check
- Forward pass replayed in PyTorch
What it is
BraggNN is a small convolutional network that locates the center of an X-ray diffraction peak in a detector patch with sub-pixel precision. High Energy Diffraction Microscopy depends on these positions, which are normally computed by fitting the detector intensities to a theoretical peak shape such as pseudo-Voigt. The paper identifies the cost of that fitting as the main obstacle to real-time feedback during experiments.
The network turns a single-channel 11 × 11 patch into two numbers, the coordinates of the peak center, using 3 × 3 convolutions followed by fully connected layers. A non-local self-attention block on the feature maps of the first convolutional layer gives the early layers global information about the patch. In the paper's ablation, a model without that block had 50th and 75th percentile deviations more than 20% worse. During training the peak is shifted from the patch center by up to ±2 pixels, so that the model tolerates imperfect cropping.
On the paper's test dataset, BraggNN's positions differ from those of the conventional method by less than 0.29 pixels for 75% of peaks and less than 0.57 pixels for 95%. The paper reports that analyzing a dataset of 800 000 peaks takes 280ms on an NVIDIA V100 GPU, a speedup of more than 350× over its pseudo-Voigt fitting code on a quad-core server CPU. Regions with overlapping peaks are discarded before the network is applied, and the code repository states that the current design does not support overlapped peaks.
Key idea. BraggNN regresses Bragg peak positions directly with a small convolutional network and runs more than 200 times faster than conventional pseudo-Voigt fitting on a consumer-class GPU card.
- braggnn
- bragg peak
- bragg peak localization
- x-ray diffraction
- high-energy diffraction microscopy
- hedm
- peak center regression
- pseudo-voigt fitting
AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.
Cite the paper
@misc{liu2021braggnnfastxraybragg,
title={BraggNN: Fast X-ray Bragg Peak Analysis Using Deep Learning},
author={Zhengchun Liu and Hemant Sharma and Jun-Sang Park and Peter Kenesei and Antonino Miceli and Jonathan Almer and Rajkumar Kettimuthu and Ian Foster},
year={2021},
eprint={2008.08198},
archivePrefix={arXiv},
primaryClass={eess.IV},
url={https://arxiv.org/abs/2008.08198},
}