Pretext-270K / README.md
kuvvi's picture
Dataset card organized by task
765260b verified
|
Raw History Blame Contribute Delete
4.62 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
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.
## 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.
## License
The images come from several public datasets, and each keeps its own terms. There is no blanket
license for the images. A list of the image sources per task will be added with the paper.