text
stringlengths
0
820
terns in a single image are uninformative of the crop type,
as evidenced by the low performance of systems relying on
single images [14]. Our encoder architecture can be seen
in Fig.4(a,b). We now describe the temporal and spatial en-
coder submodules.
Temporal encoder Thus, we tokenize a SITS record
X∈RT×H×W×Cinto a set of tokens of size (NT×NH×
NW×d), as described in section 3.3 and subsequently re-
shape to ZT∈RNHNW×NT×d, to get a list of token time-
10422
series for all patch locations. The input to the temporal en-
coder is:
Z0
T=concat (ZTcls,ZT+PT[t,:])∈RNHNW×K+NT×d
(5)
where PT[t,:]∈RNT×dandZTcls∈RK×dare respec-
tively added and prepended to all NHNWtimeseries and
t∈RTis a vector containing all Tacquisition times. All
samples are then processed in parallel by a Transformer
module. Consequently, the final feature map of the tem-
poral encoder becomes ZL
T∈RNHNW×K+NT×din which
the first Ktokens in the temporal dimension correspond to
the prepended clstokens. We only keep these tokens, dis-
carding the remaining NTvectors.
Spatial encoder We now transpose the first and second
dimensions in the temporal encoder output, to obtain a list
of patch features ZS∈RK×NHNW×dfor all output classes.
In a similar spirit, the input to the spatial encoder becomes:
Z0
S=concat (ZScls,ZS+PS)∈RK×1+NHNW×d(6)
where PS∈RNHNW×dare respectively added to all
Kspatial representations and each element of ZScls∈
RK×1×dis prepended to each class-specific feature map.
We note, that while in the temporal encoder clstokens were
prepended to all patch locations, now there is a single cls
token per spatial feature map such that ZScls are used to
gather global SITS-level information. Processing with the
spatial encoder leads to a similar size output feature map
ZL
S∈RK×1+NHNW×d.
3.5. Decoder architecture
The TSViT encoder architecture described in the pre-
vious section is designed as a general backbone for SITS
processing. To accommodate both global and dense pre-
diction tasks we design two decoder heads which feed on
different components of the encoder output. We view the
output of the encoder as ZL
S= [ZL
Sglobal |ZL
Slocal ]respec-
tively corresponding to the states of the global and local
clstokens. For image classification , we only make use of
ZL
Sglobal ∈RK×d. We proceed, as described in sec.3.2, by
projecting each feature into a scalar value and concatenate
these values to obtain global unormalised class probabilities
as shown in Fig.4(d). Complementarily, for semantic seg-
mentation we only use ZL
Slocal ∈RK×NHNW×d. These
features encode information for the presence of each class
over the spatial extent of each image patch. By project-
ing each feature into hwdimensions and further reshaping
the feature dimension to (h×w)we obtain a set of class-
specific probabilities for each pixel in a patch. It is pos-
sible now to merge these patches together into an output
map(H×W×K)which represents class probabilities for
each pixel in the original image. This process is presented
schematically in Fig.4(c).3.6. Position encodings
As described in section 3.4, positional encodings are in-
jected in two different locations in our proposed network.
First, temporal position encodings are added to all patch to-
kens before processing by the temporal encoder (eq.5). This
operation aims at breaking the permutation invariance prop-
erty of MSA by introducing time-specific position biases to
all extracted patch tokens. For crop recognition encoding
the absolute temporal position of features is important as
it helps identifying a plant’s growth stage within the crop
cycle. Furthermore, the time interval between successive
images in SITS varies depending on acquisition times and
other factors, such as the degree of cloudiness or corrupted
data. To introduce acquisition-time-specific biases into the
model, our temporal position encodings PT[t,:]depend di-
rectly on acquisition times t. More specifically, we make
note of all acquisition times t′= [t1, t2, ..., t T′]found in
the training data and construct a lookup table PT∈RT′×d
containing all learnt position encodings indexed by date.
Finding the date-specific encodings that need to be added
topatch tokens (eq.5) reduces to looking up appropriate in-
dices from PT. In this way temporal position encodings in-
troduce a dynamic prior of where to look at in the models’
global temporal receptive field, rather than simply encoding
the order of SITS acquisitions which would discard valu-
able information. Following token processing by the tem-
poral encoder, spatial position embeddings PSare added to
the extracted clstokens. These are not dynamic in nature
and are similar to the position encodings used in the orig-
inal ViT architecture, with the difference that these biases
are now added to Kfeature maps instead of a single one.