Datasets:

Modalities:
Image
Text
Formats:
parquet
Languages:
English
Size:
< 1K
ArXiv:
License:
Pretext-270K / README.md
kuvvi's picture
Card: arXiv 2611.32183, code and project links, citation
8fa43e6 verified
|
Raw History Blame Contribute Delete
7.58 kB
---
license: other
license_name: per-source-terms
pretty_name: Pretext-270K
language:
- en
size_categories:
- 100K<n<1M
task_categories:
- image-to-image
- any-to-any
configs:
- config_name: jigsaw
data_files:
- split: train
path: preview/jigsaw.parquet
- config_name: orthogonal_transform
data_files:
- split: train
path: preview/orthogonal_transform.parquet
- config_name: deformation_recovery
data_files:
- split: train
path: preview/deformation_recovery.parquet
- config_name: super_resolution
data_files:
- split: train
path: preview/super_resolution.parquet
- config_name: colorization
data_files:
- split: train
path: preview/colorization.parquet
- config_name: denoising
data_files:
- split: train
path: preview/denoising.parquet
- config_name: masked_inpainting
data_files:
- split: train
path: preview/masked_inpainting.parquet
---
# Pretext-270K
<p>
<a href="https://arxiv.org/abs/2611.32183"><img src="https://img.shields.io/badge/arXiv-2611.32183-b31b1b?logo=arxiv&logoColor=white" alt="arXiv 2611.32183"/></a>
<a href="https://github.com/ThinkMorph/ThinkMorph-SSL"><img src="https://img.shields.io/badge/Code-GitHub-181717?logo=github" alt="Code on GitHub"/></a>
<a href="https://thinkmorph.github.io/ssl/"><img src="https://img.shields.io/badge/Project-Page-13898a" alt="Project page"/></a>
</p>
Pretext-270K is the first-stage training data of
[ThinkMorph-SSL-Base](https://huggingface.co/ThinkMorph/ThinkMorph-SSL-Base). It holds 270,896 training traces
and 1,600 validation traces. Each trace starts from a corrupted input image. A description
follows, then the restored image, then a further description. There is no question and no
answer.
The traces are grouped into seven tasks, one per corruption that the model undoes.
## Tasks
| Task | Input image | Restored image | Train rows | Val rows | Of these, text only |
| --- | --- | --- | ---: | ---: | ---: |
| `jigsaw` | shuffled tiles: one image cut into tiles, or separate tile images | reassembled image | 52,975 | 571 | 10,266 |
| `orthogonal_transform` | rotated or flipped image | upright image | 36,763 | 183 | — |
| `deformation_recovery` | geometrically warped image | unwarped image | 36,672 | 189 | — |
| `super_resolution` | low-resolution image | high-resolution image | 36,409 | 179 | — |
| `colorization` | grayscale image | colored image | 36,104 | 168 | — |
| `denoising` | noisy image | clean image | 36,023 | 155 | — |
| `masked_inpainting` | image with masked regions | completed image | 35,950 | 155 | — |
| **Total** | | | **270,896** | **1,600** | **10,266** |
Stage 1 trained on the train rows only. Choose a task in the Dataset Viewer to see examples.
## Files
| Path | Content |
| --- | --- |
| `shards/annotations.tar` | `MANIFEST.json` and every task file: all rows, no images |
| `shards/data-*.tar` | the 533,366 images (141 GB) in 133 tar shards |
| `shards/SHARDS.json` | size and SHA256 of every shard |
| `text_only/` | 10,266 rows whose images (Matterport3D) are not distributed here; see [Rows without images](#rows-without-images) |
| `preview/` | the Dataset Viewer examples, one file per task |
## Download
```bash
hf download ThinkMorph/Pretext-270K --repo-type dataset --include "shards/*" --local-dir Pretext-270K
mkdir -p data
for f in Pretext-270K/shards/*.tar; do tar -xf "$f" -C data; done
```
- `shards/SHARDS.json` gives each shard's SHA256, and `MANIFEST.json` each extracted file's.
- To read the rows without the images, download and extract `shards/annotations.tar` only.
## Layout and row format
After extracting the shards:
```text
data/
MANIFEST.json
images/<sha256>.<ext> shared by all tasks
colorization/train.jsonl
colorization/val.jsonl
... one folder per task
```
```json
{"id": "<sha256>", "task": "colorization", "images": ["../images/<sha256>.jpg"],
"reasoning_thought_0": "...", "reasoning_image_0": "../images/<sha256>.jpg",
"reasoning_thought_1": "..."}
```
- `images` is the corrupted input. `reasoning_image_0` is the restored image.
- Image paths are relative to the row's file. `id` is a stable public id.
## Reading the data
A trace reads in this order: the input images, then
`reasoning_thought_0`, `reasoning_image_0`, `reasoning_thought_1`, and so on.
```python
import json
from pathlib import Path
from PIL import Image
folder = Path("data/colorization") # one task folder of the extracted release
with open(folder / "train.jsonl") as f:
row = json.loads(next(f))
inputs = [Image.open(folder / p) for p in row["images"]]
steps, i = [], 0
while f"reasoning_thought_{i}" in row:
image = row.get(f"reasoning_image_{i}")
steps.append((row[f"reasoning_thought_{i}"], Image.open(folder / image) if image else None))
i += 1
print(row["task"], len(steps), "steps")
```
## Rows without images
`text_only/` holds the rows of the `jigsaw` task whose images come from Matterport3D. It has the same task folders as the main release.
The terms of their image sources do not allow us to redistribute the images.
- `text_only/images.jsonl` names every image. For each one it gives the upstream identifiers,
how the image was derived, and the size and MD5 of the file used in training.
- Put the images you obtain in `text_only/images/`; the rows refer to them as `../images/<name>`.
To obtain the source data:
- **Matterport3D:** sign the Matterport3D Terms of Use. The form is at
<https://niessner.github.io/Matterport/>; send it to matterport3d@googlegroups.com.
## Sources and licenses
Images keep the terms of the dataset they come from; check them before you use the data.
Several sources allow non-commercial research use only. Licenses below are as stated by each
source.
| Image source | Tasks | Terms |
| --- | --- | --- |
| [SA-1B](https://ai.meta.com/datasets/segment-anything/) | all seven | SA-1B Dataset Research License |
| [PixMo-Cap](https://huggingface.co/datasets/allenai/pixmo-cap) | all seven | ODC-BY 1.0; the images are web images under their own terms |
| [VSI-590K](https://huggingface.co/datasets/nyu-visionx/VSI-590K), [LLaVA-OneVision-1.5](https://huggingface.co/datasets/mvp-lab/LLaVA-OneVision-1.5-Instruct-Data), [DeepVision-103K](https://huggingface.co/datasets/skylenage-ai/DeepVision-103K) | all seven | Apache-2.0, Apache-2.0, MIT; their images keep the terms of the original datasets (for example YouTube room tours, Hypersim: CC BY-SA 3.0, ScanNet and ARKitScenes: their terms of use, COCO: Flickr terms) |
| [Realsee3D](https://doi.org/10.5281/zenodo.17826243), [360+x](https://x360dataset.github.io/) | `jigsaw` | CC BY 4.0; CC BY-NC-SA 4.0 |
| [Matterport3D](https://niessner.github.io/Matterport/) (text only) | `jigsaw` | Matterport3D Terms of Use |
The reasoning text, the intermediate images and the release layout are ours. There is no
blanket license over the images.
## Citation
```bibtex
@article{gu2026thinkmorphssl,
title = {ThinkMorph-SSL: Scaling Interleaved Multimodal Reasoning with Pretext Tasks},
author = {Gu, Jiawei and Li, Linjie and Liu, Yiming and Hao, Yunzhuo and Wang, Huichen and
Chen, Guanzheng and Peng, Zhichao and Xu, Luxin and Zhang, Xinyu and Luo, Li and
Lan, Disen and Hu, Zican and Song, Mingyang and Valente, David and Wang, Alex Jinpeng and
Li, Yafu and Cui, Ganqu and Yang, Zhengyuan and Xie, Qizhe and Choi, Yejin and
Krishna, Ranjay and Cheng, Yu},
journal = {arXiv preprint arXiv:2611.32183},
year = {2026}
}
```