Source-linked AI summary

An Invariant Tangent-Angle Descriptor and a Band U-Net for 2D Fragment Adjacency Prediction

Guillaume Brouillette, Alain Goupil, Pierre-Olivier Parisé, Fadel Touré

arXiv:2610.09459v1cs.CVcs.LG

TL;DR

Predicting whether two 2D fragments share a fracture, and locating that shared contour arc, is a pairwise reassembly problem. This paper replaces local image-window scoring with invariant tangent-angle comparisons and adds matrix read-outs that return the arc with the adjacency decision. The pipeline reports 98% accuracy against 93% to 95% for the corrected original method, and transfers to PairingNet’s real fragments with AUC 0.93.

  • Problem

    Pairwise fragment reassembly must determine whether two fragments share a fracture and, if so, which contour portions meet, while existing approaches use geometric signatures or learned fragment representations.

    Source: §1 · p. 1
  • Method

    The paper retains the adjacency matrix, fills it with invariant tangent-angle comparisons from contour windows, and reads it with a band U-Net or anti-diagonal run to return adjacency and the shared arc.

    Source: §1 · pp. 1–2, §5 · p. 12
  • Results

    The tangent pipeline reaches 98% accuracy versus 93% to 95% for the corrected original method, and obtains AUC 0.93 on PairingNet’s real fragments.

    Source: §1 · p. 2, §5 · p. 12
  • Takeaways & Limitations

    The band U-Net segments the shared anti-diagonal band while classifying the pair, returning the shared arc with the decision.

    Source: §1 · p. 2, §5 · p. 12

    PairingNet’s real fragments are complementary and not weathered, so they test transfer to scanned contours rather than robustness to erosion.

    Source: §4.8.2 · p. 12

Abstract

from arXiv · show

This paper addresses the prediction of adjacency between pairs of 2D fragments based on their contours. We improved the two-stage architecture proposed in Beaulac's thesis, in which a rotation-equivariant Siamese convolutional neural network scores pairs of local image windows along the two contours of two fragments. The scores are gathered in an adjacency matrix in which a ResNet detects the partial anti-diagonal band that reveals the adjacency of two fragments. In the current work, we keep the pipeline and replace the local score by a comparison of tangent-angle profiles of contour windows, making it, by construction, invariant to fragment rotation and agnostic to the selected contour-starting point. These adaptations may be either a training-free likelihood ratio or a small one-dimensional convolutional model trained on corresponding points. We also replaced the final classifier by a band U-Net that segments the band and classifies the pair, so that the shared arc is obtained along with the decision. In the synthetic data set of the original thesis, the tangent descriptor performs as well as or better than the image-window approach in all tested configurations. The proposed pipeline reaches an accuracy of 98%, vs 93% to 95% for the original approach once its evaluation is corrected. We tested our pipeline, with models trained only on synthetic data, on the PairingNet benchmark, and obtained an AUC of 0.93. Furthermore, under the PairingNet pair-searching protocol conditions, our learned descriptor obtains a Recall@10 of 0.82 on the real set against 0.56 from the best model of the original paper.

1 Introduction

This paper revises a contour-adjacency pipeline for reassembling 2D fragments, replacing local image-window scoring and matrix classification while retaining the adjacency matrix. Its tangent descriptor matches or exceeds the image-window approach on the synthetic benchmark, and the full pipeline reports improved results on Beaulac’s data and PairingNet.

Prior pipeline

  • Beaulac’s pipeline scores local image windows into an adjacency matrix, where shared fractures appear as anti-diagonal bands for a ResNet18 to classify.The thesis reports 72.45% accuracy but does not use the matrix to locate the shared arc.Source: §1 · p. 1

Contributions

  • The paper replaces image-window scores with rotation-, translation-, and start-point-invariant tangent-angle profiles, using either a training-free likelihood ratio or a learned comparison.A band U-Net segments the anti-diagonal band and classifies the pair; both proposed read-outs return the shared arc.Source: §1 · pp. 1–2

Evaluation scope

  • The evaluation covers a regenerated synthetic benchmark, Beaulac’s published data, and PairingNet, including comparisons with the original pipeline and published models.The authors also rerun Beaulac’s original code.Source: §1 · p. 2

Main findings

  • 98% accuracy for the tangent pipeline versus 93% to 95% for the corrected original method on Beaulac’s data, with AUC 0.93 on PairingNet’s real fragments.The learned descriptor also reaches Recall@10 of 0.82 on the real set against 0.56 for PairingNet.Source: §1 · p. 2
  • The tangent descriptor performs as well as or better than the image-window approach across every tested synthetic benchmark configuration.The band U-Net is best or tied for best in 14 of 16 configurations.Source: §1 · p. 2

2 Related work

Contour matching commonly uses curve signatures, pairwise score matrices, and a diagonal read-out; learned fragment-matching methods also use image, contour, and sequence representations. This paper’s approach belongs to that matching tradition while introducing a rotation-invariant tangent descriptor and matrix segmentation read-out.

2.1 Curve matching approaches

  • Curve-matching methods compare contour signatures through pairwise score matrices and diagonal read-outs; the proposed likelihood ratio and anti-diagonal run fit this pattern.Earlier approaches include curvature and turning-function matching, including Smith–Waterman alignment.Source: §2.1 · p. 2

2.2 Learning-based approaches

  • Learning-based fragment matching spans image networks, contour methods, and Transformers, while the paper’s stated novelty is a rotation-invariant tangent descriptor and a segmentation read-out that returns the fracture.PairingNet uses image-patch features and a separate pair-searching decision; its matrix registers retrieved pairs.Source: §2.2 · pp. 2–3

2.3 Datasets

  • Synthetic fragmentation generators provide training labels, while PairingNet supplies scanned fragments and RePAIR supplies eroded fresco fragments with pairwise ground truth.DAFNE addresses placement on a known fresco, and square-grid puzzles fall outside this paper’s free-form contour adjacency task.Source: §2.3 · pp. 3–4

3 Methods

The methods retain Beaulac’s adjacency matrix but change how contour windows fill it and how the matrix is read. The resulting tangent-angle descriptors support a training-free likelihood-ratio score or a learned comparison, while a band U-Net or anti-diagonal run returns the shared arc.

3.1 The adjacency-matrix pipeline of Beaulac

  • Beaulac’s pipeline scores sampled contour-window pairs into a matrix whose anti-diagonal high-value band marks a shared fracture, then applies a ResNet18 to classify adjacency.Pairs are adjacent when the shared cut is at least 10% of both perimeters; shorter cuts are near misses.Source: §3.1 · p. 4

3.2 The tangent-angle descriptor

  • Because a shared cut traversed backward has the same tangent-angle sequence up to a constant, windows can be compared through their relative angle profiles.This comparison removes the constant angle offset associated with relative fragment rotation.Source: §3.2 · p. 4, §3.2.1 · p. 4

3.2.1 Tangent angle

  • The contour is periodically smoothed before central differences approximate its tangent; reversing traversal reverses point order and changes tangent direction by π.Tangent angles along a shared cut match in reverse order up to a constant.Source: §3.2.1 · p. 4

3.2.2 Training-free score

  • The training-free score uses a log-likelihood ratio based on angle-difference variation and window informativeness, assigning little evidence to straight windows.Its specified window uses h = 4, ∆ = 4, σ = 2, and ε = 0.003, and the score requires no training.Source: §3.2.2 · pp. 4–5

3.2.3 Learned descriptor

  • The learned descriptor embeds three-scale, centre-relative tangent-angle windows with a 129,249-parameter 1-D CNN and scores pairs through their embedding dot product.Training uses true point correspondences, shifted hard negatives, and contour-point jitter augmentation.Source: §3.2.3 · p. 5

3.3.1 Band U-Net

  • The band U-Net jointly predicts adjacency and a per-cell band map, from which thresholded cells are projected onto the two contours to obtain the shared arc.Its training loss combines adjacency classification with band-map binary cross-entropy and Dice loss.Source: §3.3.1 · p. 6

3.3.2 Anti-diagonal run

  • The training-free anti-diagonal read-out finds the maximum-sum contiguous run of threshold-adjusted matrix scores, using its sum for adjacency and its extent for the arc.A drift-tolerant variant permits movement to a neighbouring anti-diagonal at a small penalty.Source: §3.3.2 · p. 6

3.3.3 Invariances and cost

  • Both descriptors are invariant to rotation, translation, and contour start point, and both read-outs are start-point invariant; the training-free descriptor uses no neural network.The original local model is equivariant only to the eight rotations of C8 and relies on augmentation for intermediate angles.Source: §3.3.3 · p. 6

4 Experiments and results

The experiments use synthetic fragment benchmarks, Beaulac’s published data, and the PairingNet real-fragment set. They describe training and evaluation protocols for the adjacency pipelines and the metrics used to compare them.

4.1.1 Synthetic benchmark

  • The synthetic benchmark uses exact polygon fragments from recursive, noise-perturbed cuts, with known shared arcs, boundary masks, and point correspondences.Images contain 16 or 26 fragments and are 1000×1000 pixels.Source: §4.1.1 · p. 6
  • Four benchmark designs vary frame handling and fracture diversity, with disjoint seed ranges for training, validation, and testing.The frame-free designs use 1 200, 300, and 300 images for those splits; Original and Frame kept use 400, 100, and 100.Source: §4.1.1 · p. 6

4.1.2 Data of Beaulac

  • Beaulac’s published images contain 16 fragments at 400 pixels, with 2 488 labeled adjacent training pairs and 373 validation pairs.The experiments run the author’s code end to end and also test the port using his negative examples and 224-pixel matrix size.Source: §4.1.2 · p. 6

4.1.3 PairingNet

  • PairingNet’s real set contains 320 scanned fragments from 34 hand-cut images, with 202 annotated pairs, of which 199 can be scored.Its generated test set has 3 279 fragments and 2 370 pairs, or 5.4 million candidate pairs; contours are rescaled for comparison with synthetic contours.Source: §4.1.3 · pp. 6–7

4.2.1 Pipelines

  • The local stage trains on 2 400 window pairs, while the global stage trains on 2 400 matrices and selects checkpoints using validation accuracy.Synthetic pipelines use one seed; the 26-fragment test split is not scored, so validation values are reported instead.Source: §4.2.1 · p. 7

4.2.2 Evaluation on PairingNet

  • PairingNet evaluation measures zero-shot adjacency with AUC and pair searching by whether the target ranks within the top k candidates.The protocol uses one query per annotated pair, the whole split as the candidate pool, and counts unscored pairs as misses; ties are resolved against the method.Source: §4.2.2 · p. 7

4.2.3 Metrics

  • The reported metrics include accuracy at 0.5, AUC, interior-pair AUC, median arc IoU, and PairingNet Recall@k and NDCG@k.Interior-pair AUC excludes pairs where either fragment touches the image frame.Source: §4.2.3 · p. 7

4.3 Reproduction of Beaulac and results on his data

Correcting an evaluation-labeling error raises the reproduced performance of Beaulac’s original method substantially. On the same published images, the tangent descriptor also outperforms the image-window port.

4.3 Reproduction of Beaulac and results on his data

  • 0.93–0.95 is the corrected accuracy range for Beaulac’s default method, rather than the reported 72% that resulted from the evaluation script.The script labeled every row of the pair table as adjacent, producing 373 wrong labels among 1 492 validation matrices and limiting accuracy to 75%.Source: §4.3 · pp. 7–8
  • The corrected results call into question the thesis conclusion that Beaulac’s global stage does not generalize.With corrected labels, the same classifier gives 0.939 ±0.010 with roll augmentation and 0.916 ±0.014 without it.Source: §4.3 · pp. 7–8
  • 0.977–0.981 accuracy for the tangent descriptor exceeds the port’s 0.936–0.950 on Beaulac’s images, while the band U-Net is best for image windows and within 0.003 of the best tangent read-out.The corrected released code reaches 0.906–0.950 across three seeds, with and without roll augmentation.Source: §4.3 · p. 8

4.4 Synthetic benchmark

On the synthetic benchmark, the tangent descriptor matches or exceeds the image-window model across configurations, while the band U-Net is generally the strongest read-out. Diverse cuts are hardest, and ablations show that matrix resolution affects ResNets differently from the U-Net.

4.4 Synthetic benchmark

  • The tangent descriptor performs as well as or better than the C8 image-window model in all 32 configurations, with the largest differences when the global classifier is weakest.On frame-free data, the plain ResNet18 scores 0.65 and 0.57 for image windows versus 0.96 and 0.80–0.81 for the tangent pipeline; removing the frame costs 0.29 for that image-window pipeline and 0.03 for the tangent pipeline.Source: §4.4 · p. 8
  • The band U-Net is best or tied in 14 of 16 configurations, and its predicted-arc median IoU is 0.88–0.96 for tangent pipelines versus 0.74–0.93 for image-window pipelines.Interior-pair U-Net AUC is 0.95–1.00 across designs, except Frame kept with image windows at 0.84.Source: §4.4 · p. 8
  • Diverse cuts are the hardest design: U-Net accuracy falls to 0.87–0.93 and arc IoU to 0.74–0.88, as varied fractures and near misses make matching harder.This is the only design reported to transfer to real fragments; validation and test accuracy differ by no more than 0.033 in each configuration.Source: §4.4 · p. 8

4.4.1 Label rule and stride

  • Labeling every contact as adjacent lowers accuracy, while stride-1 matrix filling does not improve learned classifiers on 26-fragment images.Larger matrices improve ResNets, especially the plain ResNet18, from 0.705 at 128 pixels to 0.943 at 384 pixels; the U-Net changes from 0.965 to 0.955.Source: §4.4.1 · p. 8

4.5 Comparison with the contour Transformer

The authors reproduce the contour Transformer’s reported validation result but find its scores sensitive to evaluation conventions. On real fragments, the Transformer is at chance, while the tangent pipeline obtains higher AUCs, though the models were not evaluated on identical pair lists.

4.5 Comparison with the contour Transformer

  • 0.827 validation accuracy reproduced the Transformer’s published-protocol result of 0.822, but swapping fragment order reduced the score to 0.707 and one-at-a-time scoring gave 0.725.Under the authors’ protocol, the Transformer’s interior-pair AUC was 0.751 with specificity 0.51.Source: §4.5 · pp. 8–9
  • Table 3 compares published Transformer weights under two scoring settings with the tangent pipeline on 26-fragment validation images.Its caption identifies interior-pair AUC as an additional metric.Source: Table 3 · p. 9
  • On the authors’ validation images, the published Transformer weights achieved 0.674 accuracy and 0.656 interior-pair AUC; random fragment rotations reduced accuracy to 0.524.The paper notes that the rotational result was not expected from the positional encoding’s described robustness.Source: §4.5 · p. 9
  • 0.49 AUC on real PairingNet fragments was reported for the contour Transformer; tangent pipelines obtained AUCs of 0.73 and 0.89 on real fragments, on non-identical pair lists.The tangent results correspond to the frame-free and diverse-cut designs, respectively.Source: §4.5 · p. 9

4.6 Zero-shot transfer to real fragments

The pipelines were tested on real PairingNet fragments without real-data training. Tangent pipelines transferred well when their global stage was trained on diverse cuts; the real scans are hand-cut prints with complementary edges and no erosion.

4.6 Zero-shot transfer to real fragments

  • Image-window pipelines transferred poorly, with AUCs from 0.57 to 0.82; their predicted arcs had median IoUs from 0.00 to 0.45.The best image-window AUC came from the 26-fragment diverse-cut model.Source: §4.6 · pp. 9–10
  • The pair-search comparison used 199 true pairs against 50,657 cross-puzzle pairs, with the training-free descriptor at scale 0.4 and the Transformer at scale 0.8.Other rows used a 199 + 199 sample at scale 0.8.Source: §4.6 · p. 10
  • 0.93 and 0.89 AUCs were obtained by tangent pipelines whose global stage was trained on diverse cuts, compared with 0.71–0.80 for the other three designs.The diverse-cut pipelines also had median arc IoUs of 0.54 and 0.52.Source: §4.6 · p. 10
  • The real PairingNet scans are hand-cut prints with exactly complementary edges and no erosion, a favorable setting for contour geometry.None of the pipelines in this section was trained on real fragments.Source: §4.6 · pp. 9–10
  • 0.96 median IoU was reached by the drift-tolerant training-free descriptor’s arc predictions on these real scans.The descriptor also estimates the rigid placement of the two fragments.Source: §4.6 · p. 10
  • The diverse-cut pipeline’s U-Net reached 0.933 AUC against 0.921 for the anti-diagonal run when all cross-puzzle pairs were scored.The authors report that the learned read-out improves real-data AUC, but not pair searching.Source: §4.6 · p. 10

4.7 Pair searching on PairingNet

Under PairingNet’s pair-searching protocol, the learned descriptor performs strongly on the real set but less strongly on generated pairs, and its learned comparisons are more robust to contour jitter. Synthetic training transfers to real fragments, while the tested pipeline read-outs do not improve pair-search ranking.

4.7 Pair searching on PairingNet

  • Recall@10 0.823 for the learned descriptor versus 0.564 for PairingNet on the real set; learned-descriptor AUC is 0.970 versus 0.491 for the contour Transformer.The learned descriptor’s real-set Recall@5, Recall@20, and NDCG@10 are 0.794, 0.873, and 0.718, respectively.Source: §4.7 · p. 10, Table 5 · p. 11
  • On generated pairs, learned-descriptor Recall@10 is 0.417 versus PairingNet’s 0.608, while exceeding its contour-only variant’s 0.025.The learned descriptor’s AUC is 0.868 versus 0.779 for the training-free descriptor; PairingNet’s texture-only variant has Recall@10 of 0.597.Source: §4.7 · p. 10

4.7.1 Robustness to jitter

  • At 1-pixel jitter, learned-descriptor AUC is 0.91 and Recall@10 is 0.64, versus 0.61 and 0.06 for the training-free descriptor.The learned descriptor was trained with jitter up to 0.8 pixel; its standard deviation is at most 0.05 over three seeds through 1 pixel.Source: §4.7.1 · p. 10

4.7.2 The read-outs of the pipeline as re-rankers

  • Neither pipeline read-out improves pair-search ranking: re-ranking lowers learned-descriptor Recall@10, and the U-Net alone trails the anti-diagonal run on the real set.On the real set, the U-Net’s band-map Recall@10 is 0.698 and its logit Recall@10 is 0.564, versus 0.713 for the anti-diagonal run on the same matrices.Source: §4.7.2 · pp. 10–11

4.7.3 Training on synthetic data

  • On the real PairingNet set, synthetic-diverse-cut training yields Recall@10 0.866 and AUC 0.968, versus 0.823 and 0.970 for PairingNet-split training.The synthetic-trained model’s real-set Recall@10 falls to 0.782 at scale 0.8; both models were trained without scanned fragments.Source: §4.7.3 · p. 11

4.8 Threats to validity

The reported evaluations have internal-validity constraints involving seeds, splits, and parameter selection. External validity is bounded by clean, complementary PairingNet fragments and does not establish robustness to eroded material.

4.8.1 Internal validity

  • Synthetic results use one seed, and no test split was scored for the 26-fragment images; the Beaulac validation split also overlaps this study’s training images.The 50-image validation set includes training images 51–65 from the 100-image set, so held-out splits require care.Source: §4.8.1 · p. 11
  • Figure 4c reports that the learned descriptor keeps its AUC and most of its Recall@10 at 1-pixel contour jitter, while the training-free score degrades quickly.The figure shows robustness on the real set under i.i.d. Gaussian contour-point jitter.Source: Figure 4 · p. 12
  • The training-free descriptor’s parameters were selected using PairingNet data, its fast-window setting was chosen while viewing the real set, and published PairingNet numbers were not rerun.The learned descriptor’s parameters and checkpoint instead use the training and validation splits, respectively.Source: §4.8.1 · p. 12

4.8.2 External validity

  • PairingNet’s real fragments are clean and exactly complementary, so they test transfer from synthetic contours to scans rather than robustness to erosion.The proposed RePAIR evaluation would address eroded fragments; the synthetic Transformer comparison also uses non-identical pair lists.Source: §4.8.2 · p. 12

5 Conclusion and further work

The paper retains the adjacency-matrix pipeline while replacing its local descriptor and global read-out. The resulting method performs well in the reported settings, and the authors identify combined training, added texture, global consistency checks, and eroded-fragment evaluation as future work.

5 Conclusion and further work

  • The tangent-angle descriptor is invariant to rotation and start point by construction, and the band U-Net segments the anti-diagonal band while classifying the pair and returning the shared arc.The descriptor may be a training-free likelihood ratio or a one-dimensional convolutional network trained on point correspondences.Source: §5 · p. 12
  • On the real PairingNet set, learned-descriptor Recall@10 is 0.82 versus 0.56 for the published model; on generated data, it is 0.42 versus 0.03 for the contour-only variant.The learned descriptor tolerates one-pixel jitter and reaches Recall@10 of 0.87 on real fragments when trained on synthetic correspondences only.Source: §5 · p. 12
  • Future work includes combining learned stages, adding texture, using read-out arcs and placements for global consistency checks, and testing eroded RePAIR fragments.The code, synthetic-data seeds, result files, and experiment log will be made publicly available.Source: §5 · p. 12

A Provenance of the training-free parameters

The training-free descriptor’s settings were selected through real-pair inspection and training-split comparisons. Consequently, its real-set results are not blind, unlike its generated-set results and all learned-descriptor results.

A Provenance of the training-free parameters

  • The final training-free configuration used an 18-sample window, spacing of 2, σ = 2, and drift alignment, selected from 11 configurations on 100 true and 400 false training-split pairs.The fast setting used in the pipelines and as the learned descriptor’s read-out was h = 4, 9 samples every 4 points, with no drift; it was the best of three on the real set.Source: A Provenance of the training-free… · p. 14
  • The training-free descriptor’s real-set figures were not blind because its fast setting was selected on the real set, while its generated-set figures were blind.The noise floor ε = 0.003 was motivated by measurements on 60 true real alignments after an initial score inspection on 80 true and 320 false real pairs.Source: A Provenance of the training-free… · p. 14
  • The learned descriptor’s hyperparameters were fixed on the training split, and its checkpoint was selected from four validation evaluations with per-query Recall@10 values of 0.50, 0.51, and 0.52 across three seeds.Source: A Provenance of the training-free… · p. 14

B Hyper-parameters

The hyperparameters specify the synthetic cut generator, local descriptors, global matrix read-outs, and contour scale settings used in the experiments.

Hyper-parameters

  • The generator uses five octaves of 1-D noise, relative amplitude 0.05, initial lacunarity 8, and β = 0.1; diverse cuts vary amplitude, lacunarity, gains, octave count, and endpoint bounds.The side bound is 0.05 for 16 fragments and 0.03 for 26; diverse cuts use smoothstep interpolation with probability 0.5 and bow 0.15.Source: B Hyper-parameters · p. 14
  • The training-free descriptor uses 9 samples every 4 points, σ = 2, ε = 0.003, and clip 2; the learned descriptor uses width 64, dimension 32, cells every 4 points, and 12,000 training steps.The C8 local model uses fields 24-48-48-96-96-64, hidden size 64, and 29 px windows; drift alignment uses 18 samples every 2 points and a 0.5 gap penalty.Source: B Hyper-parameters · p. 14
  • The global stage uses stride 3 and 2,400/800 matrices; ResNet18 and the 16-32-64-channel U-Net are trained for 30 epochs with validation-based checkpoint selection.The U-Net uses positive weight 20 and Dice on the band, with roll augmentation; the matrix size is 128 px, or 224 on Beaulac’s data.Source: B Hyper-parameters · p. 14
  • PairingNet contours are scaled by 0.4 for descriptors and 0.8 for 1,000-px pipelines; the Contour Transformer uses the published weights of.Source: B Hyper-parameters · p. 14
Loading 2610.09459v1…