IDEAS home Printed from https://ideas.repec.org/a/plo/pone00/0359400.html

A prototype-aligned multi-scale attention network for few-shot industrial surface defect detection

Author

Listed:
  • Rubing Huang
  • Lianyi Zhao

Abstract

Few-shot industrial surface defect detection remains challenging because annotated defect images are scarce, defect scales vary considerably, and textured backgrounds can cause false responses. This study proposes a Prototype-Aligned Multi-Scale Attention Network (PA-MSAN) that integrates multi-receptive-field feature extraction, spatial-channel attention, and region of interest (RoI)-level prototype matching within a two-stage detector. Experiments are conducted on NEU-DET under 1-shot, 3-shot, and 5-shot episode settings, with 5-shot cross-domain evaluation on GC10-DET using target-domain support prototypes. Multi-scale feature-pyramid fusion represents local textures and broader defect morphology, while attention weighting enhances defect-sensitive regions and channels before region proposal network (RPN) proposal generation and RoI Align. Few-shot classification is performed by cosine similarity between RoI features and class prototypes, and training jointly optimizes detection classification, bounding-box regression, region proposal, and Prototype Alignment Loss (PAL). Under the 5-shot NEU-DET setting, PA-MSAN achieves 92.2 ± 0.4% mean average precision (mAP)@0.5, 88.7 ± 0.4% small-object average precision (APsmall), 0.89 ± 0.01 average intersection over union (IoU), and a 4.1 ± 0.2% background false response rate, with 23.4 ms detection time and 18.7 × 10⁶ parameters. Compared with Faster R-CNN, PA-MSAN improves mAP@0.5 by 2.9 percentage points and APsmall by 3.9 percentage points while reducing the background false response rate by 1.7 percentage points. Under the 5-shot target-domain support setting, PA-MSAN achieves 86.4 ± 0.4% mAP@0.5 on GC10-DET, 5.8 percentage points (6.3%) below the corresponding NEU-DET result. The results support region-level prototype alignment for limited-label metallic surface inspection under the evaluated datasets and two-stage configuration.

Suggested Citation

  • Rubing Huang & Lianyi Zhao, 2026. "A prototype-aligned multi-scale attention network for few-shot industrial surface defect detection," PLOS ONE, Public Library of Science, vol. 21(9), pages 1-31, September.
  • Handle: RePEc:plo:pone00:0359400
    DOI: 10.1371/journal.pone.0359400
    as

    Download full text from publisher

    File URL: https://journals.plos.org/plosone/article?id=10.1371/journal.pone.0359400
    Download Restriction: no

    File URL: https://journals.plos.org/plosone/article/file?id=10.1371/journal.pone.0359400&type=printable
    Download Restriction: no

    File URL: https://libkey.io/10.1371/journal.pone.0359400?utm_source=ideas
    LibKey link: if access is restricted and if your library uses this service, LibKey will redirect you to where you can use your library subscription to access this item
    ---><---

    More about this item

    Statistics

    Access and download statistics

    Corrections

    All material on this site has been provided by the respective publishers and authors. You can help correct errors and omissions. When requesting a correction, please mention this item's handle: RePEc:plo:pone00:0359400. See general information about how to correct material in RePEc.

    If you have authored this item and are not yet registered with RePEc, we encourage you to do it here. This allows to link your profile to this item. It also allows you to accept potential citations to this item that we are uncertain about.

    We have no bibliographic references for this item. You can help adding them by using this form .

    If you know of missing items citing this one, you can help us creating those links by adding the relevant references in the same way as above, for each refering item. If you are a registered author of this item, you may also want to check the "citations" tab in your RePEc Author Service profile, as there may be some citations waiting for confirmation.

    For technical questions regarding this item, or to correct its authors, title, abstract, bibliographic or download information, contact: plosone (email available below). General contact details of provider: https://journals.plos.org/plosone/ .

    Please note that corrections may take a couple of weeks to filter through the various RePEc services.

    IDEAS is a RePEc service. RePEc uses bibliographic data supplied by the respective publishers.