Dataset Viewer
Duplicate
The dataset viewer is not available for this split.
Cannot load the dataset split (in streaming mode) to extract the first rows.
Error code:   StreamingRowsError
Exception:    CastError
Message:      Couldn't cast
n_max: int64
n_max_observed: int64
n_graphs: int64
gnn_input_dim: int64
gnn_input_feature_names: list<item: string>
  child 0, item: string
side_feature_names: list<item: string>
  child 0, item: string
note: string
to
{'n_max': Value('int64'), 'n_graphs': Value('int64'), 'gnn_input_dim': Value('int64'), 'gnn_input_feature_names': List(Value('string')), 'side_feature_names': List(Value('string')), 'note': Value('string')}
because column names don't match
Traceback:    Traceback (most recent call last):
                File "/src/services/worker/src/worker/utils.py", line 149, in get_rows_or_raise
                  return get_rows(
                      dataset=dataset,
                  ...<4 lines>...
                      column_names=column_names,
                  )
                File "/src/libs/libcommon/src/libcommon/utils.py", line 274, in decorator
                  return func(*args, **kwargs)
                File "/src/services/worker/src/worker/utils.py", line 129, in get_rows
                  rows_plus_one = list(itertools.islice(safe_iter(ds, dataset=dataset), rows_max_number + 1))
                File "/src/services/worker/src/worker/utils.py", line 544, in safe_iter
                  yield from ds.decode(False) if ds.features else ds
                File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 3074, in __iter__
                  for key, example in ex_iterable:
                                      ^^^^^^^^^^^
                File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 2578, in __iter__
                  for key, pa_table in self._iter_arrow():
                                       ~~~~~~~~~~~~~~~~^^
                File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 2603, in _iter_arrow
                  for key, pa_table in self.ex_iterable._iter_arrow():
                                       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
                File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 577, in _iter_arrow
                  for key, pa_table in iterator:
                                       ^^^^^^^^
                File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 459, in _iter_arrow
                  for key, pa_table in self.generate_tables_fn(**gen_kwags):
                                       ~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^
                File "/usr/local/lib/python3.14/site-packages/datasets/packaged_modules/json/json.py", line 373, in _generate_tables
                  self._cast_table(pa_table, json_field_paths=json_field_paths),
                  ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                File "/usr/local/lib/python3.14/site-packages/datasets/packaged_modules/json/json.py", line 132, in _cast_table
                  pa_table = table_cast(pa_table, self.info.features.arrow_schema)
                File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 2394, in table_cast
                  return cast_table_to_schema(table, schema)
                File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 2322, in cast_table_to_schema
                  raise CastError(
                  ...<3 lines>...
                  )
              datasets.table.CastError: Couldn't cast
              n_max: int64
              n_max_observed: int64
              n_graphs: int64
              gnn_input_dim: int64
              gnn_input_feature_names: list<item: string>
                child 0, item: string
              side_feature_names: list<item: string>
                child 0, item: string
              note: string
              to
              {'n_max': Value('int64'), 'n_graphs': Value('int64'), 'gnn_input_dim': Value('int64'), 'gnn_input_feature_names': List(Value('string')), 'side_feature_names': List(Value('string')), 'note': Value('string')}
              because column names don't match

Need help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.

LEGO2HERO — fragmented brick mosaics for the reassembly of heritage fragments

200,000 instances. 5,000 paintings turned into brick mosaics, cut into fragments and scattered, under 8 configurations × 5 levels of difficulty. Every label — fragment masks, adjacency between fragments, pose — is derived from the brick grid, not annotated.

The dataset is a test bench, not a simulation of frescoes: it lets one property of a reassembly problem vary while the others are held fixed, with the same paintings recurring in every setting.

  • Paper: From LEGO to HERO: A Difficulty-Controlled Synthetic Dataset for Reassembling Fragmented Heritage (short paper proposal, DH2027).
  • Generator (MIT): https://github.com/icimathieu/forge_LAR_YOLO_lego2hero
  • Authors: Mathias Garnier, Charles Planque, Marisol de Nazelle, Manon Remot, Mathieu Rivière — École nationale des chartes – PSL University.

Layout

poly_balanced/     tiles of 1×1 to 2×6 studs, fragments grown to equal size
mono_compact/      1×1 tiles, band-shaped fragments
  └─ k02 · k03 · k05 · k10-15            number of fragments per mosaic
       └─ L0_explode.tar.gz … L4_strong.tar.gz     one archive per level
          L0_explode.gnn_meta.json …               array sizes of that archive
provenance.csv     mosaic → WikiArt source image (index, artist, genre, style)
LEGACY_DO_NOT_USE/ v1 (June 2026), withdrawn: faulty outline encoding, kept for the record only

40 archives, 222 GB in total: download only the cells you need.

from huggingface_hub import hf_hub_download
path = hf_hub_download("icimathieu/lego2hero", "poly_balanced/k10-15/L2_rotation.tar.gz", repo_type="dataset")
# extract with:  tar --exclude='._*' -xzf <path>     (see "Known issues")

The three axes

Axis Values
A — fragments per mosaic k02 · k03 · k05 · k10-15
B — cut pattern poly_balanced: variable tiles, fragments of equal size, cuts depend on the image · mono_compact: 1×1 tiles, vertical bands with nearly straight edges, cuts independent of the image
C — level see below
Level Placement Rotation Erosion Holes Missing fragments
L0_explode exploded view (relative positions kept) – – – –
L1_translation random scatter – – – –
L2_rotation random scatter quarter-turn ± 5° – – –
L3_light random scatter quarter-turn ± 5° 1–2 px 0–1 –
L4_strong random scatter quarter-turn ± 5° 2–6 px 1–3 (≤ 10 % of area) up to 15 % of k

One stud is 40 px; a mosaic is 96 × 96 studs (3840 × 3840 px).

Paired design. The 5,000 paintings are the same in all 40 cells, under the same mosaic identifier. For a given configuration, the partition and the adjacency graph of a mosaic are identical at the five levels: only the input changes. Wear is applied to the input only; the ground truth stays on the intact partition.

What one instance holds (mosaic_<uuid>/)

File Content
target.png the assembled mosaic
source.png the fragments scattered on a white ground (the input image)
source_yolo.txt one polygon per fragment, YOLO segmentation format, normalised
fragments/frag_XX.png one RGBA crop per fragment
graph_fragments.json input: nodes only (per-fragment features), no edge, no pose
graph_complete.json ground truth: same nodes + adjacency edges + target-frame information
gt_layout.json ground truth: exact footprint and pose of every fragment, area fraction lost to wear
gnn_ready.npz the node arrays, padded (valid_mask) and ragged (verts_flat, node_offsets)
degradation.md human-readable wear report

Never feed target_info (in graph_complete.json) or gt_layout.json to a model as input: they contain the answer. Field-level documentation: DATASET.md in the generator's repository.

The dataset in numbers (measured on the published archives, level L0)

Configuration k Fragments per level Adjacency edges per mosaic Outline vertices, median (95th pct) Distinct cuts / 5,000 Size, 5 levels
poly_balanced/k02 2 10,000 1.0 73 (111) 4,999 22 GB
poly_balanced/k03 3 15,000 2.9 90 (170) 4,999 24 GB
poly_balanced/k05 5 25,000 7.5 85 (162) 4,999 22 GB
poly_balanced/k10-15 13 (see issues) 65,000 27.1 75 (123) 4,999 29 GB
mono_compact/k02 2 10,000 1.0 4 (124) 13 28 GB
mono_compact/k03 3 15,000 2.4 27 (214) 433 30 GB
mono_compact/k05 5 25,000 5.0 34 (197) 2,935 31 GB
mono_compact/k10-15 10–15 62,395 19.8 32 (119) 5,000 36 GB

227,395 distinct fragments, each rendered at five levels.

Known issues — read before training

  1. poly_balanced was generated with a single random seed. Cuts still differ from one mosaic to the next (they follow the tiles, which depend on the image), but the draws that do not depend on the image are frozen: poly_balanced/k10-15 always has 13 fragments (all 5,000 mosaics), missing fragments at L4 number 0 or 2 and never 1, and rotations follow only a few distinct sequences (6 among the first 401 mosaics of L2_rotation; the commonest is shared by 130 of them). Shuffle node order before using node indices, and do not report rotation accuracy on poly_balanced without that precaution. mono_compact was regenerated on 27–29 July 2026 with one seed per mosaic and is not affected (10 to 15 fragments, every rotation sequence distinct).
  2. mono_compact with few fragments has few distinct cuts (13 at k02, 433 at k03, 2,935 at k05): on a uniform grid, band-shaped fragments leave few possible partitions. k02 and k03 are lower bounds for ablation, not training sets. When splitting train and test, keep mosaics that share a cut on the same side.
  3. With two fragments the adjacency task is trivial: the single possible edge is always present. Only pose can be scored.
  4. poly_balanced archives contain macOS ._* files next to every real file. Extract with tar --exclude='._*'.
  5. source.png is large and of variable size: up to 16,128 × 16,128 px at L0, 4,096 px wide and up to about 15,700 px high at L1–L4. Polygons are normalised by the final canvas size given in gt_layout.json. With Pillow, set Image.MAX_IMAGE_PIXELS = None.
  6. One image occurs twice in the source stream (4,999 distinct brick grids), hence 4,999 distinct cuts in poly_balanced.
  7. Text fields inside the JSON files are in French.

Provenance and licence

The mosaics derive from the first 5,781 images of the huggan/wikiart train split, read in order; 781 were rejected by a filter that discards images in which one palette colour covers more than 55 % of the cells. The generator kept no link to the source image, but it is deterministic: re-quantising the stream reproduces every stored brick grid exactly, which is how provenance.csv was rebuilt. For each mosaic it gives the index of the source image in the stream and its WikiArt artist, genre and style labels.

  • 23 painters, from Dürer to Dalí (plus 32 works of unknown artist). The largest contributors are Roerich (487), Van Gogh (456), Renoir (425) and Monet (380).
  • Styles: Impressionism 32 %, Realism 17 %, Post-Impressionism 10 %, Romanticism 8 %, Symbolism 8 %, Art Nouveau 6 %, eleven others below 5 %.
  • Genres: landscape 25 %, genre painting 15 %, portrait 13 %, cityscape 8 %, study 7 %, religious painting 7 %, others below 5 %; 15 % unlabelled.
  • Rights. 954 mosaics derive from works by five painters who died after 1955 (Konchalovsky, Picasso, Chagall, Saryan, Dalí) and may still be in copyright where you work. Filter on the artist column of provenance.csv to exclude them.

A mosaic is a 96 × 96 grid in 82 colours: it is a coarse derivative of the painting, not a reproduction. WikiArt images may be used for non-commercial research only; the same restriction applies to this dataset. The generator is released under the MIT licence.

Changelog

  • v2.1 — 27–29 July 2026. mono_compact regenerated with one seed per mosaic (the first v2 archives gave all 5,000 mosaics the same cut).
  • v2 — 24–26 July 2026. Eight configurations. Outline encoding now budgets the area lost (1 %) instead of a number of vertices.
  • v1 — June 2026, withdrawn (kept under LEGACY_DO_NOT_USE/). One configuration, 25,000 instances. Its outline encoding discarded a median 21 % of fragment area.
Downloads last month
77