From Tokens to Pixels: Training-Free Guided Upsampling of Frozen CARL Features for Hyperspectral Imaging

Dominik Fromme, Ellen Markowski, Tim Streckert, Jörg ThiemarXiv 2026

Imagine you’ve just spent a fortune on a high-end hyperspectral camera—a device that sees hundreds of "colors" far beyond the red, green, and blue our eyes can perceive. You feed this rich data into a state-of-the-art "foundation model" like CARL to help identify tissues or materials. But there’s a catch: the model hands you back a map that looks like it was made in Minecraft. Because the model processes images in 8x8 "tokens," your high-res data is suddenly a blurry, blocky mess.

This paper shows that you don't need to retrain the model to fix this. By using some clever, "training-free" classical image processing, you can sharpen those blocky tokens back into crisp pixels, recovering the spatial detail you thought you’d lost.

TL;DR

Hyperspectral foundation models provide powerful features but suffer from "token blur," reducing spatial resolution by a factor of eight. This research demonstrates that image-guided upsampling—using the original high-res image to "steer" the low-res features—can recover sharp boundaries without any additional training, improving boundary accuracy from 13% to 67%.

What Problem Does This Paper Address?

The current trend in AI is "Foundation Models"—massive neural networks trained on huge datasets that you can use for almost anything. In the world of spectral imaging, a model called CARL is a favorite because it’s "camera-agnostic"; it doesn't care if your camera has 10 bands or 100.

However, CARL (like most Vision Transformers) is a bit of a "near-sighted" giant. It breaks images into 8x8 pixel blocks called tokens. When it outputs its analysis, it gives you one feature per token. If you try to blow that back up to full resolution using standard methods (like bilinear interpolation), the edges of objects get smeared across 40 pixels or more. In medical fields—where you need to know exactly where a tumor ends and healthy tissue begins—that blur is a dealbreaker.

The authors wanted to see if they could sharpen these "frozen" features without the massive headache (and data requirements) of retraining the model.

Methods

The authors tested a "guided" approach. Think of it like this: the foundation model provides the "what" (the spectral features), and the original high-resolution image provides the "where" (the sharp edges).

They compared three main "training-free" upsamplers:

  1. Joint Bilateral Upsampling (JBU): A classic technique that weights neighboring tokens based on how close they are in space and how similar they look in the high-res "guide" image.
  2. Guided Filter: A method that assumes a local linear relationship between the guide image and the features.
  3. AnyUp: A more modern, pretrained (but still frozen) neural upsampler designed to be "plug-and-play."

Crucially, they tested using both a standard RGB rendering and the full Hyperspectral (HSI) cube as the guide to see if those extra spectral bands actually helped define edges better.

The pipeline: CARL generates coarse features, which are then sharpened by a guided upsampler using the original image as a reference.

Datasets

  • New HSI ColorChecker Dataset: The authors created a custom benchmark using a standard X-Rite ColorChecker. They measured the geometry of the 24 color patches to sub-pixel precision, providing a "perfect" ground truth to measure exactly how much blur was introduced.
  • Medical Images: To see how this works in the real world, they applied the methods to images of placenta and the oral cavity (mouth), where identifying precise tissue boundaries is critical.
Figure 3. Dataset and reference. (a, b) Both recordings as pseudo-RGB with measured patch outlines (white dashed) and model-placed, cut-off patches (white dotted). (c) Measured reflectance spectra of selected patches (mean over the patch interior, upright recording) and, dashed, the BabelColor average of the same patches [16], tabulated from 380 to 730 nm. (d) SNR per band in the white and the neutral 5 patch. Bands below 400 nm (gray) are not used. Blue ticks mark the 32 CARL bands.

Key Insights and Ideas

  • The "Free" Lunch: You can get a massive jump in resolution without training a single new parameter. This is huge for medical researchers who often have very little labeled data to work with.
  • HSI vs. RGB Guides: For most things, an RGB guide is fine. But when two materials look identical in RGB but different in the infrared (like dark skin against a black background), the hyperspectral guide is a lifesaver.
  • JBU is the "Sharp" Choice: For high-contrast, clear boundaries, the old-school Joint Bilateral Upsampling actually outperformed more complex methods. It reduced the "edge width" from a blurry 38 pixels down to just 4 pixels.
  • AnyUp for "Soft" Edges: While JBU won on the ColorChecker, AnyUp produced qualitatively better results on organic tissues (like blood vessels in a placenta), likely because it handles soft, textured transitions more gracefully than a rigid mathematical filter.
Visualizing the weights: JBU (columns i-k) uses the guide image to "snap" the features to the correct edge, unlike the blurry default (column h).

Key Results

  • Boundary IoU (Intersection over Union): A measure of how well the predicted edge matches the real one. The default method scored a dismal 13%. JBU with a hyperspectral guide boosted this to 67%.
  • Effective Resolution: The "contamination width" (how far an edge blurs into a patch) dropped from 38 pixels (nearly a whole token) to just 4 pixels.
  • Speed: JBU is incredibly efficient, taking only about 40ms per image on a modern GPU.

Limitations and Future Work

  • Small Sample Size: The quantitative results are based on 24 patches of a ColorChecker. While the results are statistically significant, a larger variety of materials would be better.
  • Qualitative Medical Results: For the medical images, the authors could only say the edges looked sharper, as they didn't have sub-pixel ground truth for the tissue margins.
  • The "Head" Problem: This study focused on the features themselves. The next step is to see if this sharpening actually makes a final classification "head" (the part of the AI that says "this is a tumor") more accurate in practice.

In short: If you're using foundation models for imaging, stop using bilinear upsampling. A little bit of classical guidance goes a long way.

Summary updated

Abstract

Camera-agnostic foundation models such as CARL map spectral images from arbitrary sensors into a shared feature space, but deliver their features only on a token grid at one eighth of the input resolution. The usual bilinear interpolation blurs material boundaries over about one token and rounds off corners. We investigate how much spatial accuracy image-guided upsampling recovers for frozen CARL features without training the encoder or the upsampler. We compare joint bilateral upsampling (JBU), a guided filter and the pretrained AnyUp, each with the hyperspectral image or an RGB rendering as the guide. A hyperspectral ColorChecker dataset acquired specifically for this study, with model-independent reference geometry measured to sub-pixel precision, serves as the evaluation benchmark. JBU with the hyperspectral guide raises the Boundary IoU from 13 to 67 % and reduces the effective edge width of the features from 38 to 4 px, close to the resolution of the raw spectra. The effect occurs in all 24 patches of the ColorChecker and replicates on an additional recording. On placenta and oral cavity images, the feature edges also become markedly qualitatively sharper. For sharp, high-contrast boundaries, JBU is the most accurate and most economical method. On tissue with softer transitions, the pretrained AnyUp yields qualitatively sharper contours. An analysis of 78 simulated band configurations shows that the gain persists in every configuration as long as the head matches the configuration. Image-guided upsampling is thus a simple, training-free step for applications that use CARL frozen with linear heads.
BibTeX
@misc{fromme2026from,
  author = {Dominik Fromme and Ellen Markowski and Tim Streckert and Jörg Thiem},
  title = {{From Tokens to Pixels: Training-Free Guided Upsampling of Frozen CARL Features for Hyperspectral Imaging}},
  year = {2026},
  eprint = {2611.27541},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.27541},
}
Figure