@@ -54,26 +54,36 @@ For `backend="tensor"`, `input_chw` must be `CHW`, and batch tensor usage should
5454
5555### Provider path
5656
57- 1 . Fetch raw multiband Sentinel-2 SR patch
58- 2 . Optional input inspection on raw SR (` expected_channels=len(bands) ` , value range ` [0,10000] ` )
59- 3 . Convert raw SR ` 0..10000 ` to ` 0..255 ` -like scale
60- 4 . Apply official DOFA S2 per-band mean/std normalization on that ` 0..255 ` -like tensor
61- 5 . Resize to fixed ` 224x224 ` (bilinear; no crop/pad)
62- 6 . Load DOFA model variant (` base ` / ` large ` )
63- 7 . Forward with image tensor + wavelength vector
64- 8 . Return pooled embedding or reshape tokens to patch-token grid
57+ <pre class =" pipeline-flow " ><code ><span class =" pipeline-root " >PROVIDER</span > fetch raw multiband Sentinel-2 SR patch
58+ <span class =" pipeline-arrow " >-> ; </span > optional raw-value inspection
59+ <span class =" pipeline-detail " >expected_channels=len(bands), value range [0,10000]</span >
60+ <span class =" pipeline-arrow " >-> ; </span > raw SR 0..10000 -> ; 0..255-like scale
61+ <span class =" pipeline-arrow " >-> ; </span > official DOFA S2 per-band mean/std normalization
62+ <span class =" pipeline-arrow " >-> ; </span > resize to fixed 224x224
63+ <span class =" pipeline-detail " >bilinear; no crop / pad</span >
64+ <span class =" pipeline-arrow " >-> ; </span > load DOFA model variant
65+ <span class =" pipeline-branch " >variant:</span > base | large
66+ <span class =" pipeline-arrow " >-> ; </span > forward(image, wavelengths)
67+ <span class =" pipeline-arrow " >-> ; </span > output projection
68+ <span class =" pipeline-branch " >pooled:</span > embedding vector
69+ <span class =" pipeline-branch " >grid:</span > patch-token grid</code ></pre >
6570
6671### Tensor path
6772
68- 1 . Read raw SR ` input_chw ` (` CHW ` )
69- 2 . Reject already-normalized ` [0,1] ` -like inputs
70- 3 . Apply the same official DOFA S2 preprocessing used by the provider path:
71- - raw SR ` 0..10000 ` -> ` [0,1] `
72- - rescale to ` 0..255 ` -like values
73- - apply official per-band mean/std normalization
74- 4 . Resize to ` 224x224 `
75- 5 . Resolve wavelengths from ` sensor.wavelengths ` or infer from ` sensor.bands `
76- 6 . Forward DOFA with image + wavelengths
73+ <pre class =" pipeline-flow " ><code ><span class =" pipeline-root " >TENSOR</span > read raw SR input_chw
74+ <span class =" pipeline-arrow " >-> ; </span > reject already-normalized [0,1]-like inputs
75+ <span class =" pipeline-arrow " >-> ; </span > apply provider-equivalent DOFA preprocessing
76+ <span class =" pipeline-detail " >raw SR 0..10000 -> ; [0,1]</span >
77+ <span class =" pipeline-detail " >rescale to 0..255-like values</span >
78+ <span class =" pipeline-detail " >official per-band mean/std normalization</span >
79+ <span class =" pipeline-arrow " >-> ; </span > resize to fixed 224x224
80+ <span class =" pipeline-arrow " >-> ; </span > resolve wavelengths
81+ <span class =" pipeline-branch " >preferred:</span > sensor.wavelengths
82+ <span class =" pipeline-branch " >fallback:</span > infer from sensor.bands
83+ <span class =" pipeline-arrow " >-> ; </span > forward(image, wavelengths)
84+ <span class =" pipeline-arrow " >-> ; </span > output projection
85+ <span class =" pipeline-branch " >pooled:</span > embedding vector
86+ <span class =" pipeline-branch " >grid:</span > patch-token grid</code ></pre >
7787
7888Fixed adapter behavior:
7989
0 commit comments