Dataset Viewer
Auto-converted to Parquet Duplicate
The dataset viewer is not available for this split.
Server error while post-processing the rows. Please report the issue.
Error code:   RowsPostProcessingError

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.

FillRule

FillRule is a synthetic image classification dataset for reasoning about how a shape would be filled. Each image shows a fill rule, one or more closed outlines, arrows indicating the direction of each outline, and a purple query dot. Will the dot lie in a painted region if the displayed rule is applied? The answer is either filled or empty.

All input diagrams show unfilled outlines. For a filled example, the label means painting the shape would cover the dot. The arrows and dot are visible cues in the input.

The v1.0 release contains 12,000 RGB PNGs at 256 × 240 pixels. The ZIP is approximately 22.7 MB. FillRule was created and curated by Bodhisatta Maiti and is released under CC BY 4.0.

Dataset Details

How to read a diagram

  • evenodd fills the region at the dot when an odd number of outlines enclose it. Arrow directions have no effect on this rule.
  • nonzero counts enclosing outlines with a sign, using +1 for clockwise and −1 for counterclockwise. The region at the dot is filled when the sum is nonzero.
  • Disjoint distractors are extra outlines drawn away from the dot. They have their own arrows and contribute zero at the query point. They appear in 1,177 of the 3,000 groups.

For the simple, closed outlines in this dataset, counting enclosing outlines gives the same answer as applying the SVG fill-rule specification.

Outlines enclosing the dot evenodd nonzero
One clockwise outline filled filled
Two clockwise outlines empty filled
One clockwise and one counterclockwise outline empty empty

Uses

FillRule supports image classification and controlled evaluation of visual reasoning. Its matched examples let users test whether a model responds correctly when the printed rule or a single arrow changes.

The release focuses on clean synthetic diagrams with nested or disjoint outlines and dots away from boundaries. Evaluating arbitrary SVG paths, self-intersecting outlines, or handwritten diagrams requires additional data.

Dataset Structure

FillRule-12K.zip contains an images/ directory and one metadata.csv file. Each CSV row corresponds to one PNG.

Column Description
file_name Relative PNG path, such as images/001ec91002adc9860e5b-0855b93eb3447e12c3c2.png.
label filled if applying the displayed rule would paint the region containing the purple dot, or empty otherwise.
Fill rule filled empty Total
nonzero 4,000 2,000 6,000
evenodd 2,000 4,000 6,000
Total 6,000 6,000 12,000

The release is unsplit. Each of the 3,000 four-image groups holds the outlines and query dot fixed. It combines both fill rules with two versions of the same diagram that differ by the direction of one arrow. The part of each image filename before the first hyphen is the group ID. If you create train, validation, and test sets, keep all four variants of each group in the same split.

Dataset Creation

Curation Rationale

The task tests whether a model can locate the query dot, determine which outlines enclose it, and apply the displayed rule. Four-image groups isolate the effect of changing a rule or reversing an arrow. Reversing the selected arrow changes the nonzero label in 1,600 pairs and the evenodd label in zero pairs.

Source Data and Annotations

A deterministic generator produced all diagrams from polygonal geometry. It varied contour shape, nesting depth, position, direction, and visual styling. Ground-truth labels were computed from the vector geometry using parity or signed winding. The dataset consists entirely of synthetic geometry and contains no personal records.

Quality Checks

The exported PNGs were checked separately from label generation. The checker decoded each displayed rule, recovered the arrows and dot, tested which rasterized outlines enclosed the dot, and recomputed the answer. It also verified that matched variants changed only in the intended regions.

The final ZIP was reopened and all 12,000 images were audited. The audit found zero label mismatches, invalid images, duplicate images, or unmatched files. The pilot checker caught all 10 deliberately injected faults, and an independent SVG renderer agreed on all 64 spot checks.

Bias, Risks, and Limitations

  • The images share a consistent layout, arrow style, and palette. Performance on this release does not establish performance on different diagram styles or arbitrary vector artwork.
  • Labels are balanced overall, but their distribution differs by rule. Predicting the majority label for each rule gives 66.7% accuracy using only the rule name.
  • Report performance separately for each rule and on matched pairs. In particular, check whether predictions stay the same when an arrow reverses under evenodd and whether both predictions are correct on pairs where a reversal changes the nonzero answer.

Citation

@dataset{maiti2026fillrule,
  author = {Maiti, Bodhisatta},
  title = {FillRule},
  year = {2026},
  version = {1.0},
  publisher = {Hugging Face},
  url = {https://huggingface.co/datasets/bodhisattamaiti/FillRule}
}

Dataset Card Contact

For questions or corrections, open a discussion in the FillRule dataset repository.

Downloads last month
23