# MCFR: A Mask-Guided Coarse-to-Fine Regression Framework for Robust Multi-Variant Board-to-Board Connector Assembly

Robotics.world

> Automated insertion of BTB connectors is hard because the parts come in many variants with large morphological and appearance differences, are miniature, and must be mated within roughly ±0.2 mm and…

**arXiv**: 2610.09327 · accepted · IROS

**Published**: 2026-10-07

**Authors**: Guanghui Shen, Song Wang, Dan Wu

## In plain words

Automated insertion of BTB connectors is hard because the parts come in many variants with large morphological and appearance differences, are miniature, and must be mated within roughly ±0.2 mm and ±1.5°.

## AI summary

## Overview

**Research area:** Robotics — vision-based relative pose detection for high-precision robotic assembly, specifically within 3C manufacturing (computers, communications, and consumer electronics).

**Technical level:** Advanced. The paper assumes familiarity with Vision Transformers, the Segment Anything Model, image warping and photometric optimization, and standard pose-regression evaluation metrics.

**Scope:** The paper proposes and validates MCFR, a three-stage mask-guided coarse-to-fine framework that estimates the planar relative pose of multi-variant board-to-board (BTB) connectors at a fixed inspection station so a robot can correct grasp-induced misalignment before insertion.

## What This Paper Is About

Automated insertion of BTB connectors is hard because the parts come in many variants with large morphological and appearance differences, are miniature, and must be mated within roughly ±0.2 mm and ±1.5°. The authors argue that a hidden flaw in current end-to-end regression pipelines is that training data are collected by moving the grasped part with the robot, so the object and background move together in the image, while in real deployment the background is static and only the grasp error moves the part — a mismatch the authors call "background spurious correlation." The goal is a pose detector that both generalizes across connector variants and keeps its accuracy when the deployment background no longer behaves like the training background.

## Key Contributions

1. **A three-stage pose regression framework (MCFR)** that replaces black-box end-to-end regression with object-aware mask generation, mask-guided cross-attention coarse regression, and explicit photometric refinement, targeting cross-variant generalization plus deployment robustness.
2. **Identification of background spurious correlation** as a task-specific form of shortcut learning under distribution shift in fixed-viewpoint relative pose detection, together with a mask prior designed to remove that shortcut at the input level.
3. **A robust photometric refinement module** that uses SE(2) image warping and a normalized cross-correlation objective to polish the coarse pose estimate, chosen for tolerance to global illumination shifts and local contrast changes.
4. **Systematic validation** on a self-constructed multi-variant dataset (4500 samples), a BTB mating testbed with 10 sockets, and a real smartphone camera-module assembly task, reporting 99.25% average insertion success over 8 connector variants.

## Main Findings

- **Best mean accuracy on both validation and test sets.** MCFR reaches a validation Trans. MAE of 0.013 mm and Rot. MAE of 0.015°, and a test Trans. MAE of 0.027 mm and Rot. MAE of 0.126°. The strongest end-to-end baseline, ResNet50+LSTM, degrades to 1.062 mm and 1.335° on the test set; YOLO+LDA reaches 0.094 mm and 0.142°.
- **Smallest maximum translation error.** MCFR records 0.064 mm on validation and 0.196 mm on test. One exception to MCFR's dominance appears on validation maximum rotation error, where the full model reports 0.498° versus 0.213° for MCFR w/o OAMG and 0.245° for MCFR w/o RPR.
- **The mask prior is the dominant robustness factor.** Removing object-aware mask generation raises test Trans. MAE from 0.027 mm to 0.793 mm, showing the model becomes highly sensitive to the fixed-background deployment setting without it.
- **Photometric refinement adds measurable precision.** Removing it degrades test Trans. MAE from 0.027 mm to 0.052 mm and test Rot. MAE from 0.126° to 0.257°.
- **Attention shifts as intended.** Occlusion sensitivity maps show the masked model concentrates its highest contribution on the connector body and pin region, whereas the unmasked model relies on image boundaries and the circular outer contour of the gripper in the background.
- **Large real-world success gap.** Over 8 BTB connector variants with 50 full trials each, average insertion success rates are 22% for ResNet50+LSTM, 94% for MCFR w/o RPR, and 99.25% for the complete MCFR. A trial counts as successful if the connector is fully assembled before contact force along the insertion direction reaches 25 N.
- **Baseline failure scales with pin count.** ResNet50+LSTM performs worse across all variants and drops more noticeably on connectors with larger pin counts, which are more slender and more prone to jamming under slight alignment error.

## Methodology in Plain English

The task is deliberately reframed. Rather than estimating where a connector is in absolute terms, the system compares two images taken at the same fixed inspection camera: a reference image captured after a demonstrated successful grasp, and the current image after the robot picks up a new part. The output is the planar offset between them (two translations and one rotation), which becomes a correction command before mating. This sidesteps the fact that the robot's absolute positioning error (±0.1 mm) is already comparable to the mating tolerance (±0.2 mm), while its repeatability (±0.03 mm) is much better.

The pipeline then runs in three steps. First, SAM is run with uniformly distributed grid prompts and no task-specific fine-tuning to produce candidate target probability maps; candidates are filtered by a rectangularity score (contour area divided by minimum-area bounding-rectangle area) because connector localization cues sit in an approximately rectangular region, and the survivors are summed and passed through a tanh normalization to form a mask. Second, this mask is multiplied into the image to suppress background, the masked image is encoded by a ViT-Base backbone pretrained with Masked Autoencoder self-supervision, and a mutual cross-attention module compares reference and current features before an MLP head regresses an initial pose. Third, that coarse pose initializes an explicit optimization: the current image is warped by the candidate pose and scored against the reference using normalized cross-correlation, with a 1 − NCC loss minimized to produce the final pose.

The dataset is built by grasping each part and randomly perturbing its pose within [±4.5 mm, ±3 mm, ±10°], using robot relative motion as ground truth. It contains 10 BTB connector variants and 3 smartphone camera modules at 300 image pairs each, plus 300 weak-lighting and 300 strong-lighting pairs for a yellow-plated 24-pin connector with 0.35 mm pin pitch, for 4500 samples split 8:1:1. To probe the background problem, a simulated deployment test set is built by segmenting the connector from each test image and compositing it onto a separately captured empty background of the fixed station. Training uses shared encoder weights, an MSE loss, 100 epochs, and roughly 22 minutes on an RTX 4080 Super; SAM runs offline only, with masks saved as RGB images.

## Why This Matters

**Impact on research.** The paper names a concrete, testable failure mode — training data where object and background move together, deployment where they do not — and shows a purely architectural fix (a visual prior) that removes it. That framing is transferable to other fixed-camera manipulation tasks, and the ablation (0.027 mm to 0.793 mm test Trans. MAE) gives a clean quantification of how much a shortcut can distort reported performance.

**Real-world applications:**

- Assembly of BTB connectors in smartphones and other intelligent terminals, where mating tolerances are on the order of ±0.2 mm.
- Camera-module insertion, demonstrated on a Redmi K40 smartphone and camera modules in the paper.
- Flexible production lines that must handle many connector variants on one station, since the mask generation requires no per-variant retraining.
- Other miniature part mating where grasp error, not absolute localization, is the dominant source of misalignment.

**Industry relevance.** The 22% versus 99.25% gap between an end-to-end baseline and MCFR is the kind of difference that decides whether a line can run unattended, and it is attributed to a distribution mismatch that would be easy to overlook in offline benchmarking. The framework also fits existing deployment patterns: SAM is used offline, so inference needs only the ViT-based regression network plus a fast image-domain refinement.

## Future Directions

- **Zero-shot initialization on unseen variants.** The authors state explicitly that this is not addressed and is an important direction for future work.
- **Closing the train/deploy data gap directly.** The paper treats the mismatch with data post-processing and a mask prior; collecting training data with a static background, or otherwise matching deployment conditions, is an alternative the results invite.
- **Extending beyond BTB connectors.** The authors claim the framework transfers to other object categories without architectural modification, but this is argued rather than demonstrated across unrelated part types.
- **Replacing SAM for online use.** Because SAM runs offline to save GPU memory, whether a lighter or online mask generator could match these results without the preprocessing pass is left open.

## Target Audience

Robotics and machine vision engineers working on high-precision assembly and micro-assembly; researchers studying shortcut learning and distribution shift in embodied perception; and industrial automation teams evaluating pose-estimation approaches for multi-variant part feeding. Readers without a background in Vision Transformers or photometric optimization will need to consult the cited work on MAE, SAM, and NCC alignment to follow the method section in detail.

## Authors’ abstract

Automated insertion of board-to-board (BTB) connectors in 3C manufacturing requires both high visual accuracy and strong deployment robustness. This problem remains challenging because multi-variant connectors exhibit significant morphological and appearance variations, making stable cross-variant generalization difficult, while the mismatch between training and deployment under fixed-view inspection settings induces background spurious correlation and degrades real-world…

[The full abstract on arXiv](https://arxiv.org/abs/2610.09327)

[Read the original paper](https://arxiv.org/abs/2610.09327)

## Related papers

- [VLAQuantBench: Closed-Loop Evaluation of Post-Training Quantization for Vision-Language-Action Models](https://robotics.world/paper/vlaquantbench-closed-loop-evaluation-of-post-training-quantization-for-2609.25376) 2026-09-21 · cs.RO · Also by Song Wang
- [Quantize by Doing: Task-Guided Mixed-Precision Quantization of Vision-Language-Action Models](https://robotics.world/paper/quantize-by-doing-task-guided-mixed-precision-quantization-of-vision-2610.38661) 2026-10-28 · cs.RO · Also by Song Wang
- [Bridging Language and Physics: Automated Design of Continuum Robots with Large Language Models](https://robotics.world/paper/bridging-language-and-physics-automated-design-of-continuum-robots-with-2609.08220) 2026-09-08 · cs.RO · Also by Song Wang
- [DailyBrick: Language-Guided Synthesis of Brick Assembly Instructions](https://robotics.world/paper/dailybrick-language-guided-synthesis-of-brick-assembly-instructions-2611.22132) 2026-11-17 · cs.RO · Key terms of the title in common
- [SAGP: Semantic Affordance-Guided Grasp Planning via Coarse-Zone VLM Reasoning](https://robotics.world/paper/sagp-semantic-affordance-guided-grasp-planning-via-coarse-zone-vlm-2607.29374) 2026-07-31 · cs.RO · Key terms of the title in common

---

Canonical: https://robotics.world/paper/mcfr-a-mask-guided-coarse-to-fine-regression-framework-for-robust-multi-2610.09327
