File size: 3,134 Bytes
e0bc242 f8913d0 4146ff9 c414faa 4146ff9 cb4ff0a | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 | ---
license: mit
tags:
- positional encoding
- attention
- image classification
- object detection
- semantic segmentation
- 3D understanding
- video classification
- action recognition
- multimodal
datasets:
- ILSVRC/imagenet-1k
---
# Parabolic Positional Encoding: A Vision-Centric, Principled, Extrapolatable, and General Approach
<p align="left">
<a href="https://arxiv.org/abs/2602.01418"><img src="https://img.shields.io/badge/Paper-arXiv-lightblue"></a>
<a href="https://chrisohrstrom.github.io/parabolic-position-encoding/"><img src="https://img.shields.io/badge/Project-Page-blue"></a>
<a href="https://github.com/DTU-PAS/parabolic-position-encoding/"><img src="https://img.shields.io/badge/github-repo-blue?logo=github"></a>
</p>
These are the official weights for the NeurIPS 2026 Spotlight: [**Parabolic Positional Encoding: A Vision-Centric, Principled, Extrapolatable, and General Approach**](https://arxiv.org/abs/2602.01418).
**Citation**
``` bibtex
@inproceedings{ohrstrom2026pape,
author = {Øhrstrøm, Christoffer Koo and I. Cabral Muchacho, Rafael and Dong, Yifei and Moumtzidellis, Filippos and Güldenring, Ronja and T. Pokorny, Florian and Nalpantidis, Lazaros},
title = {Parabolic Positional Encoding: A Vision-Centric, Principled, Extrapolatable, and General Approach},
booktitle = {Advances in {{Neural Information Processing Systems}}},
year = {2026}
}
```
## Usage
Here is an example of how to load the ImageNet-1K checkpoint. See further below for how to load the other datasets.
Download the weights for ImageNet-1K:
```sh
hf download dtu-pcas/parabolic-positional-encoding --include imagenet1k* --local-dir weights
```
Next load the weights like this:
```py
import json
from pathlib import Path
import torch
from pape.configs import Config
from pape.nn.image_classifier import ImageClassifier
dataset = "imagenet1k"
checkpoint_dir = Path("weights") / dataset
config_path = checkpoint_dir / "config.json"
config = Config.from_dict(json.loads(config_path.read_text()))
model = ImageClassifier(config)
state_dict = torch.load(checkpoint_dir / "model.pt")
model.load_state_dict(state_dict)
```
The other models can be loaded as above, but make sure to substitute the dataset download path and model class `ImageClassifier` to match the dataset:
| Dataset | Path | Network |
| ----------- | ---------------------------------------- | ------------------------------------------ |
| COCO | coco | `pape.nn.image_detector.ImageDetector` |
| DvsGesture | dvsgesture | `pape.nn.event_classifier.EventClassifier` |
| GEN1 | gen1 | `pape.nn.event_detector.EventDetector` |
| ImageNet-1K | imagenet1k | `pape.nn.image_classifier.ImageClassifier` |
| UCF101 | ucf101_fold1, ucf101_fold2, ucf101_fold3 | `pape.nn.video_classifier.VideoClassifier` |
NB. UCF101 is evaluated using cross-validation. We provide weights for each of the three folds. |