ELFNet uses ELFPredictor, a full-grid SAD-to-ELF model.
SAD grid (B, 1, D, H, W)
-> FlatResNet3D
-> main ELF prediction (B, 1, D, H, W)
The model returns the main prediction and an empty auxiliary list for this backbone:
main, aux = model(sad)For inference, use:
elf = model.predict_elf(sad)Default production configuration:
input channels: 1
base channels: 32
residual blocks: 16
kernel size: 5
attention every: 4 blocks
The backbone contains:
- A circular-padding convolution stem.
- Same-resolution residual blocks.
- Periodic CBAM attention blocks.
- A residual post block.
- A sigmoid main head.
Each residual block contains:
circular Conv3d
GroupNorm
GELU
circular Conv3d
GroupNorm
squeeze-excitation
residual add
GELU
Circular padding is the only explicit periodic treatment in this architecture.
The flat backbone inserts 3D CBAM blocks through the residual body:
channel attention: global average/max pooling -> 1x1 Conv3d MLP -> sigmoid
spatial attention: channel average/max maps -> Conv3d -> sigmoid
The final head uses Sigmoid, so the main predicted ELF channel is bounded in
[0, 1] before writing.
The production training objective combines:
weighted SmoothL1 voxel loss
periodic gradient loss
sorted-value CDF distribution loss
adaptive peak objective
learned Kendall uncertainty weights
The SAD-derived interstitial weight map is:
w = (1 - sad / sad.max()) ** gamma_w
w = w / mean(w)
Current production training defaults:
gamma_w = 2.0
delta = 0.1
aux_weight = 0.0
cdf_bins = 64
cdf_sigma = 0.02
cdf_tail_start = 0.60
cdf_tail_weight = 2.0
cdf_max_voxels = 20000
This model does not use:
crystallographic symmetry operations
Seitz matrices
patch-local symmetry transforms
patch extraction
overlap blending