---
title: 'GT-Loc: Joint Time and Geolocation'
url: https://www.emergentmind.com/topics/gt-loc
type: topic
---

# GT-Loc: Joint Time and Geolocation

GT-Loc is a retrieval-based geotemporal inference framework that jointly predicts **when** and **where** an outdoor image was captured by embedding images, timestamps, and GPS coordinates into a shared feature space. The method addresses timestamp prediction and geo-localization as coupled inference problems rather than independent tasks, arguing that outdoor appearance depends jointly on geographic context and cyclical time variables such as hour and month. In its published formulation, GT-Loc predicts **Time-of-Day** as hour, **Time-of-Year** as month, and geo-location as GPS latitude/longitude, using only the image at inference time [2507.10473].

## 1. Definition and task formulation

GT-Loc studies joint timestamp prediction and geo-localization from a single outdoor image. The training set is a collection of triplets
$$
S_{train} = \{(I_i, G_i, D_i)\}_{i=1}^N,
$$
where $I_i$ is an image, $G_i$ is a GPS coordinate, and $D_i$ is a date-time record. The model learns three aligned embeddings,
$$
V_i = \mathcal{V}(I_i), \qquad L_i = \mathscr{L}(G_i), \qquad T_i = \mathcal{T}(D_i),
$$
so that an image embedding can retrieve both a location embedding and a time embedding from galleries [2507.10473].

The motivation is explicitly geotemporal. Hour prediction depends on brightness, hue, shadow positioning, and sun position, but those cues vary with latitude, season, and climate. Month prediction depends on vegetation, weather, and snow, but seasonal appearance is geographically nonuniform. GT-Loc therefore treats timestamp prediction and geo-localization as interdependent rather than merely adjacent tasks. This differs from earlier timestamp-prediction settings that use geo-location at inference time, and from geo-localization systems that ignore time entirely.

The method is retrieval-based rather than classification-based or direct regression-based. At test time, GT-Loc embeds a query image once, compares it to a **time gallery** and a **location gallery** using cosine similarity, and returns the top retrieved time and GPS coordinate. This choice avoids fixed class discretization and permits compositional retrieval over the same unified space.

## 2. Shared embedding architecture

GT-Loc is a triple-encoder system consisting of an image encoder, a location encoder, and a time encoder. The image encoder uses a pretrained **CLIP ViT-L/14** backbone followed by a trainable projection MLP with two fully connected layers of dimensions **768** and **512**, with **ReLU** activation. The output is a 512-dimensional image embedding in the shared space [2507.10473].

The location encoder follows a GeoCLIP-style design. GPS coordinates are first transformed by **Equal Earth Projection (EEP)**, then encoded with multi-scale **Random Fourier Features (RFFs)**, and finally passed through MLPs:
$$
L_i = \mathscr{L}(G_i) = \sum_{i=1}^M f_i(\gamma(EEP(G_i), \sigma_i)).
$$
The implementation uses **3 RFF scales**, with $\sigma_i \in \{2^0, 2^4, 2^8\}$, and MLPs with **3 hidden layers of width 1024**, projecting to a 512-dimensional output. A dynamic queue stores the last **4096** seen locations for contrastive learning.

The time encoder is architecturally matched to the location encoder, but its input is a cyclical month-hour representation derived from Unix time. The timestamp is converted to
$$
D_i = \mathrm{unix2tuple}(U_i) = (m_i, d_i, H_i, M_i, S_i),
$$
then mapped to normalized cyclic coordinates
$$
\theta_i = \frac{1}{12} \left( (m_i - 1) + \frac{(d_i - 1)}{\mathcal{D}(m_i)} \right),
$$
$$
\phi_i = \frac{1}{24} \left( H_i + \frac{M_i}{60} + \frac{S_i}{3600} \right),
$$
so that $D_i' = (\theta_i,\phi_i)$ represents time-of-year and time-of-day on $[0,1)\times[0,1)$. The time encoder is then
$$
T_i = \mathcal{T}(U_i) = \sum_{i=1}^M f_i(\gamma(\mathrm{unix2cyclic}(U_i), \sigma_i)).
$$
This symmetry between time and location encoders is central to the model: both are treated as continuous 2D signals embedded through multi-scale Fourier features, but only time is given a specialized learning objective.

| Component | Input | Main design |
|---|---|---|
| Image encoder | RGB image | CLIP ViT-L/14 + 2-layer MLP |
| Location encoder | GPS coordinate | EEP + multi-scale RFF + MLP |
| Time encoder | Month-hour cyclic pair | multi-scale RFF + MLP |

This architecture places images, locations, and times in one common metric space. A plausible implication is that the model treats image-time and image-location association as two views of the same latent outdoor scene manifold rather than as separate prediction heads.

## 3. Cyclical time representation and Temporal Metric Learning

GT-Loc’s main methodological distinction is its treatment of time as a **cyclical** variable. Standard contrastive learning is presented as unsuitable for image-time alignment because neighboring timestamps such as 2pm and 3pm, or late March and early April, should not be treated as hard negatives. To address this, GT-Loc defines month-hour time on a **2D torus** and introduces **Temporal Metric Learning (TML)** with soft targets [2507.10473].

For two normalized timestamps $D_i'=(\theta_i,\phi_i)$ and $D_j'=(\theta_j,\phi_j)$, the toroidal temporal distance is the shortest wrap-around distance on each cyclic axis:
$$
\delta_{i,j} = \sqrt{ \sum_{\alpha \in \{\theta,\phi\}} \left( \min(1-|\Delta \alpha_{i,j}|,\ |\Delta \alpha_{i,j}|) \right)^2 },
$$
with $\Delta \alpha_{i,j}=\alpha_i-\alpha_j$. The paper notes minor typesetting issues in some formulas, but its stated intent is the shortest-distance geometry on the month-hour torus.

Given image embeddings $\{V_i\}_{i=1}^B$ and time embeddings $\{T_i\}_{i=1}^B$ in a batch, GT-Loc computes a predicted similarity distribution
$$
\mathbf{p}_{i}[j] = \frac{\exp \left( V_i \cdot T_j / \tau \right)}{\sum_{k=1}^B \exp \left( V_i \cdot T_k / \tau \right)},
$$
and a target distribution derived from toroidal temporal distances,
$$
\mathbf{q}_{i}[j] = 1 - \frac{\exp \left( \delta_{i,j} \right)}{\sum_{k=1}^B \exp \left( \delta_{i,k} \right)}.
$$
The time loss is
$$
\mathcal{L}_{time}^{(i)} = \mathrm{CE}(\mathbf{p}_i,\mathbf{q}_i).
$$

Image-location alignment still uses a standard contrastive objective. For sample $i$, with batch size $B$, queue size $S$, and temperature $\tau$, the image-location loss is
$$
\mathcal{L}_{loc}^{(i)} = -\sum_{j=1}^P \log \left( \frac{\exp(V_{ij} \cdot L_{ij} / \tau)}{\sum_{k=1}^{B+S} \exp(V_{kj} \cdot L_{kj} / \tau)} \right).
$$
The total loss is
$$
\mathcal{L}^{(i)} = \mathcal{L}_{loc}^{(i)} + \mathcal{L}_{time}^{(i)}.
$$

The paper’s ablations attribute much of GT-Loc’s performance to this choice. **TML (Cyclic)** outperforms CLIP, SimCLR, Rank-N-Contrast, and a Euclidean-distance version **TML ($\ell_2$)** on time prediction. This supports the paper’s central claim that temporal similarity in outdoor imagery is graded and periodic, not binary and Euclidean.

## 4. Data, training protocol, and inference

GT-Loc is trained on large-scale geo-tagged and time-stamped image corpora. The training datasets are **MediaEval Placing Task 2016 (MP-16)** with **4.72 million images** for geo-localization support, and **Cross-View Time (CVT)**, originally consisting of **206k** geo-tagged smartphone pictures from YFCC100M and **98k** static outdoor webcam images from SkyFinder [2507.10473].

The paper applies two notable preprocessing filters to CVT. First, it removes **night-time images**, estimating sunrise and sunset from date and GPS using the **General Solar Position algorithm**. Second, it removes **indoor images** using a **Places365-pretrained CNN classifier**. The rationale is that artificial lighting, night-vision artifacts, and indoor environments weaken visual time-of-capture cues.

Training details are explicit. GT-Loc uses **two image augmentations per sample**, random resized crop to **224**, random horizontal flip, and normalization. It adds **GPS noise: 150 m** for in-batch GPS, **1500 m** for queue GPS, and **time noise: 0.15 months** and **0.15 hours**. Optimization uses **Adam** with $\beta_1=0.9$, $\beta_2=0.999$, weight decay $1\times10^{-6}$, batch size **512**, cosine learning-rate decay from $3\times10^{-5}$ to $3\times10^{-7}$ over **20 epochs**, and hardware based on an **RTX A6000 GPU**.

At inference, GT-Loc precomputes galleries offline. A query image is embedded once, then compared to all gallery entries with cosine similarity. The paper uses a **100k time gallery** for SkyFinder evaluation, a **100k GPS gallery** for Im2GPS3k, and a **500k GPS gallery** for GWS15k. The retrieval overhead is reported as **0.105 TFLOPs for 100k gallery**, compared with a base forward cost of **159.41 TFLOPs**, indicating that gallery search is minor relative to feature extraction.

| Dataset or gallery | Role | Scale |
|---|---|---|
| MP-16 | geo-localization training support | 4.72M images |
| CVT | geotemporal training | 206k YFCC100M + 98k SkyFinder |
| SkyFinder subset | zero-shot time evaluation | unseen cameras |
| Im2GPS3k | geo-localization evaluation | 100k GPS gallery |
| GWS15k | geo-localization evaluation | 500k GPS gallery |

This training and inference pipeline reflects the method’s retrieval orientation. Improvements in gallery coverage can improve prediction resolution without altering the model architecture.

## 5. Evaluation, capabilities, and empirical profile

GT-Loc evaluates time prediction with **mean absolute ToY error** $E_{ToY}$, **mean absolute ToD error** $E_{ToD}$, and a combined **Time Prediction Score (TPS)**:
$$
TPS = 1 - \sqrt{\frac{\widetilde{E}_{ToY}^2 + \widetilde{E}_{ToD}^2}{2}}.
$$
Geo-localization is evaluated by geodesic distance and the ratio of samples predicted within a radius threshold, with the main table reporting **1 km** accuracy [2507.10473].

On zero-shot timestamp prediction over unseen SkyFinder cameras, GT-Loc reports **month error 1.40**, **hour error 2.72**, and **TPS 77.00**, improving over the paper’s image-time-only ablation **TimeLoc** at **1.52**, **2.84**, and **75.49**. The paper highlights that GT-Loc surpasses prior timestamp-prediction methods **even though those methods receive ground-truth geo-location as input at inference time**, whereas GT-Loc uses only the image.

On geo-localization, GT-Loc reaches **14.41** at **1 km** on **Im2GPS3k** and **0.88** on **GWS15k**, slightly exceeding **GeoCLIP** on the benchmarks reported in the paper. This is notable because GT-Loc is not a specialized geo-localizer alone; it jointly optimizes time and location.

The paper also evaluates compositional and text-based retrieval. For a composed query formed by averaging time and location embeddings, GT-Loc reports **R@1 6.69**, **R@5 24.58**, and **R@10 38.54** for the task $T + L \rightarrow I$. Because the image encoder is CLIP-based, the paper also replaces the image backbone with the pretrained CLIP text encoder and demonstrates meaningful **text $\rightarrow$ location** and **text $\rightarrow$ time** retrieval, with prompts such as “winter” and “evening” yielding plausible distributions.

| Evaluation | Result |
|---|---|
| SkyFinder zero-shot time prediction | Month 1.40, Hour 2.72, TPS 77.00 |
| Im2GPS3k geo-localization | 14.41 at 1 km |
| GWS15k geo-localization | 0.88 at 1 km |
| Compositional retrieval | R@1 6.69, R@5 24.58, R@10 38.54 |

The ablation studies clarify GT-Loc’s empirical profile. **TML (Cyclic)** is stronger than conventional contrastive losses for time prediction. Performance degrades only moderately with reduced training data, remaining at **TPS 72.07** with **5%** of training data, and remains relatively stable under temporal label noise up to $\sigma=2$. Backbone ablations show **CLIP ViT-L/14** is stronger than **DINOv2-L** and **OpenCLIP-G** in this setting, and time-encoder ablations show **RFF** outperforms **Circular decomposition** and **Time2Vec** in overall TPS.

## 6. Scope, limitations, and disambiguation within localization research

GT-Loc is specifically a **joint image-time-location retrieval** method for outdoor imagery. It is not a pose-estimation system, not a correspondence-based 3D camera registration method, and not a graph-based robotics localizer. This distinction matters because several similarly named systems address different localization problems entirely. **TrafficLoc** performs image-to-point-cloud registration for traffic surveillance cameras [2412.10308]; **G-Loc** is a topo-metric factor-graph localization system using LiDAR, IMU, and GNSS [2405.05059]; **CLIP-Loc** is a monocular relocalization method in object-based maps using CLIP-guided landmark association [2402.06092]; **GSLoc** performs dense camera alignment against a 3D Gaussian Splatting map [2410.06165]; **GroundLoc** is a LiDAR-only BEV localization pipeline against raster priors [2510.24623]; **Graph-Loc** is a graph-based LiDAR pose tracker against compact structural priors [2602.08417]; and **GTI**, sometimes confused with “GT-Loc,” is a language-guided video tracking framework named “Grounding-Tracking-Integration” [1912.06316].

Within its own scope, GT-Loc has clear limitations. The paper filters out **nighttime** and **indoor** images during training, which indicates restricted applicability in those settings. It predicts **month** and **hour**, not full date or year. It depends on gallery construction and therefore on gallery coverage and sampling density. Geolocation performance on difficult benchmarks remains limited in absolute terms—for example, **0.88** at **1 km** on GWS15k—despite being competitive within the paper’s comparison set. The paper also notes that several formulas in the published version are typeset imperfectly, though their intended meaning is recoverable.

A plausible implication is that GT-Loc is best understood as a **geotemporal retrieval model** rather than a general-purpose localization engine. Its contribution is to show that geo-location and capture time can be learned jointly in a single embedding space, and that respecting the cyclical topology of time materially improves timestamp prediction. In that sense, GT-Loc occupies a distinctive position in the localization literature: it localizes not cameras in 3D geometry, but images in a joint **where–when** manifold [2507.10473].

Source: https://www.emergentmind.com/topics/gt-loc