"<!DOCTYPE html>\n<html lang=\"zh\" data-theme=\"light\">\n<head>\n<meta charset=\"utf-8\">\n<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n<title>fulltext.txt — Vercel Design System</title>\n<link rel=\"preconnect\" href=\"https://fonts.googleapis.com\">\n<link rel=\"preconnect\" href=\"https://fonts.gstatic.com\" crossorigin>\n<link href=\"https://fonts.googleapis.com/css2?family=Geist:wght@400;500;600;700&family=Geist+Mono:wght@400;500;600&display=swap\" rel=\"stylesheet\">\n<link rel=\"stylesheet\" href=\"https://cdn.jsdelivr.net/npm/katex@0.16.8/dist/katex.min.css\">\n<style>\n\n:root {\n  /* Vercel Palette */\n  --geist-foreground: #171717;\n  --geist-background: #ffffff;\n  --geist-secondary: #4d4d4d;\n  --geist-tertiary: #666666;\n  --geist-quaternary: #808080;\n  --geist-border: #ebebeb;\n  --geist-surface-tint: #fafafa;\n  \n  /* Workflow Accents */\n  --develop-blue: #0a72ef;\n  --preview-pink: #de1d8d;\n  --ship-red: #ff5b4f;\n  \n  /* Interactive & Status */\n  --link-blue: #0072f5;\n  --ds-focus-color: hsla(212, 100%, 48%, 1);\n  --badge-blue-bg: #ebf5ff;\n  --badge-blue-text: #0068d6;\n  \n  /* Shadow-as-Border Philosophy */\n  --shadow-border: rgba(0, 0, 0, 0.08) 0px 0px 0px 1px;\n  --shadow-border-hover: rgba(0, 0, 0, 0.16) 0px 0px 0px 1px;\n  --shadow-card: rgba(0, 0, 0, 0.08) 0px 0px 0px 1px, rgba(0, 0, 0, 0.04) 0px 2px 2px, #fafafa 0px 0px 0px 1px;\n  --shadow-card-hover: rgba(0, 0, 0, 0.12) 0px 0px 0px 1px, rgba(0, 0, 0, 0.06) 0px 4px 6px, #fafafa 0px 0px 0px 1px;\n  --shadow-card-full: rgba(0, 0, 0, 0.08) 0px 0px 0px 1px, rgba(0, 0, 0, 0.04) 0px 2px 2px, rgba(0, 0, 0, 0.04) 0px 8px 8px -8px, #fafafa 0px 0px 0px 1px;\n  --shadow-ring: rgb(235, 235, 235) 0px 0px 0px 1px;\n  \n  /* Radius Scale */\n  --radius-xs: 2px;\n  --radius-sm: 4px;\n  --radius-md: 6px;\n  --radius-lg: 8px;\n  --radius-xl: 12px;\n  --radius-pill: 9999px;\n}\n\n[data-theme=\"dark\"] {\n  --geist-foreground: #ededed;\n  --geist-background: #000000;\n  --geist-secondary: #a1a1a1;\n  --geist-tertiary: #888888;\n  --geist-quaternary: #666666;\n  --geist-border: #222222;\n  --geist-surface-tint: #0a0a0a;\n  \n  --shadow-border: rgba(255, 255, 255, 0.14) 0px 0px 0px 1px;\n  --shadow-border-hover: rgba(255, 255, 255, 0.28) 0px 0px 0px 1px;\n  --shadow-card: rgba(255, 255, 255, 0.12) 0px 0px 0px 1px, rgba(0, 0, 0, 0.4) 0px 2px 4px, #111111 0px 0px 0px 1px;\n  --shadow-card-hover: rgba(255, 255, 255, 0.2) 0px 0px 0px 1px, rgba(0, 0, 0, 0.5) 0px 6px 12px, #111111 0px 0px 0px 1px;\n  --shadow-card-full: rgba(255, 255, 255, 0.12) 0px 0px 0px 1px, rgba(0, 0, 0, 0.5) 0px 8px 16px -4px, #111111 0px 0px 0px 1px;\n  --shadow-ring: rgb(40, 40, 40) 0px 0px 0px 1px;\n  \n  --badge-blue-bg: rgba(10, 114, 239, 0.15);\n  --badge-blue-text: #70b5ff;\n}\n\n* { box-sizing: border-box; }\nhtml { scroll-behavior: smooth; }\nbody {\n  margin: 0;\n  font-family: \"Geist\", Arial, -apple-system, BlinkMacSystemFont, \"Segoe UI\", sans-serif;\n  background-color: var(--geist-background);\n  color: var(--geist-foreground);\n  font-feature-settings: \"liga\" 1;\n  -webkit-font-smoothing: antialiased;\n  min-height: 100vh;\n}\n\na {\n  color: inherit;\n  text-decoration: none;\n  transition: color 0.15s ease;\n}\n\n/* 导航栏 (Vercel Clean Sticky Nav) */\n.vercel-nav {\n  position: sticky;\n  top: 0;\n  background-color: var(--geist-background);\n  box-shadow: var(--shadow-border);\n  z-index: 100;\n  padding: 0 24px;\n  height: 64px;\n  display: flex;\n  align-items: center;\n  justify-content: space-between;\n}\n.nav-brand {\n  display: flex;\n  align-items: center;\n  gap: 12px;\n}\n.vercel-triangle {\n  width: 22px;\n  height: 19px;\n  fill: var(--geist-foreground);\n}\n.nav-title {\n  font-size: 16px;\n  font-weight: 600;\n  letter-spacing: -0.32px;\n  color: var(--geist-foreground);\n}\n.nav-badge-pill {\n  font-family: \"Geist Mono\", ui-monospace, monospace;\n  font-size: 11px;\n  font-weight: 500;\n  text-transform: uppercase;\n  background: var(--badge-blue-bg);\n  color: var(--badge-blue-text);\n  padding: 2px 8px;\n  border-radius: var(--radius-pill);\n}\n\n.nav-links {\n  display: flex;\n  align-items: center;\n  gap: 24px;\n}\n.nav-link {\n  font-size: 14px;\n  font-weight: 500;\n  color: var(--geist-secondary);\n  text-decoration: none;\n  transition: color 0.15s;\n}\n.nav-link:hover, .nav-link.active {\n  color: var(--geist-foreground);\n}\n.nav-link.active {\n  font-weight: 600;\n}\n\n.nav-actions {\n  display: flex;\n  align-items: center;\n  gap: 12px;\n}\n\n/* 按钮规范 */\n.btn-primary-dark {\n  background: var(--geist-foreground);\n  color: var(--geist-background);\n  border: none;\n  padding: 8px 16px;\n  border-radius: var(--radius-md);\n  font-size: 14px;\n  font-weight: 500;\n  cursor: pointer;\n  text-decoration: none;\n  display: inline-flex;\n  align-items: center;\n  gap: 6px;\n  transition: opacity 0.15s;\n}\n.btn-primary-dark:hover {\n  opacity: 0.9;\n}\n.btn-secondary-white {\n  background: var(--geist-background);\n  color: var(--geist-foreground);\n  box-shadow: var(--shadow-border);\n  border: none;\n  padding: 8px 16px;\n  border-radius: var(--radius-md);\n  font-size: 14px;\n  font-weight: 500;\n  cursor: pointer;\n  text-decoration: none;\n  display: inline-flex;\n  align-items: center;\n  gap: 6px;\n  transition: background 0.15s, box-shadow 0.15s;\n}\n.btn-secondary-white:hover {\n  background: var(--geist-surface-tint);\n  box-shadow: var(--shadow-border-hover);\n}\n.theme-toggle-btn {\n  background: transparent;\n  border: none;\n  box-shadow: var(--shadow-border);\n  border-radius: var(--radius-md);\n  width: 36px;\n  height: 36px;\n  cursor: pointer;\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  color: var(--geist-foreground);\n}\n\n/* 核心容器 */\n.vercel-container {\n  max-width: 1200px;\n  margin: 0 auto;\n  padding: 56px 24px 100px;\n}\n\n/* Hero Section (Gallery Emptiness + Negative Letter-spacing) */\n.vercel-hero {\n  text-align: center;\n  max-width: 860px;\n  margin: 0 auto 56px;\n}\n.hero-stage-badge {\n  display: inline-flex;\n  align-items: center;\n  gap: 8px;\n  background: var(--geist-surface-tint);\n  box-shadow: var(--shadow-border);\n  padding: 4px 14px;\n  border-radius: var(--radius-pill);\n  font-size: 13px;\n  font-weight: 500;\n  color: var(--geist-secondary);\n  margin-bottom: 24px;\n}\n.stage-dot {\n  width: 7px;\n  height: 7px;\n  border-radius: 50%;\n}\n.vercel-hero h1 {\n  font-size: 48px;\n  font-weight: 600;\n  line-height: 1.05;\n  letter-spacing: -2.4px;\n  color: var(--geist-foreground);\n  margin: 0 0 16px;\n}\n.vercel-hero p {\n  font-size: 20px;\n  font-weight: 400;\n  line-height: 1.80;\n  color: var(--geist-secondary);\n  margin: 0 auto 28px;\n}\n\n/* Workflow Pipeline (Develop -> Preview -> Ship) */\n.workflow-pipeline {\n  display: grid;\n  grid-template-columns: repeat(3, 1fr);\n  gap: 16px;\n  margin-bottom: 48px;\n}\n@media (max-width: 768px) {\n  .workflow-pipeline { grid-template-columns: 1fr; }\n}\n.workflow-step {\n  background: var(--geist-background);\n  box-shadow: var(--shadow-card);\n  border-radius: var(--radius-lg);\n  padding: 20px 22px;\n  transition: box-shadow 0.2s;\n}\n.workflow-step:hover {\n  box-shadow: var(--shadow-card-hover);\n}\n.step-mono-label {\n  font-family: \"Geist Mono\", monospace;\n  font-size: 12px;\n  font-weight: 500;\n  text-transform: uppercase;\n  letter-spacing: 0.5px;\n  margin-bottom: 8px;\n  display: flex;\n  align-items: center;\n  gap: 6px;\n}\n.step-title {\n  font-size: 20px;\n  font-weight: 600;\n  letter-spacing: -0.96px;\n  color: var(--geist-foreground);\n  margin-bottom: 6px;\n}\n.step-desc {\n  font-size: 14px;\n  color: var(--geist-secondary);\n  line-height: 1.5;\n}\n\n/* Metric Cards (Section 4 Spec) */\n.metric-grid {\n  display: grid;\n  grid-template-columns: repeat(4, 1fr);\n  gap: 16px;\n  margin-bottom: 48px;\n}\n@media (max-width: 900px) {\n  .metric-grid { grid-template-columns: repeat(2, 1fr); }\n}\n.metric-card {\n  background: var(--geist-background);\n  box-shadow: var(--shadow-card);\n  border-radius: var(--radius-lg);\n  padding: 20px;\n}\n.metric-number {\n  font-size: 40px;\n  font-weight: 600;\n  line-height: 1.0;\n  letter-spacing: -2.4px;\n  color: var(--geist-foreground);\n  margin-bottom: 8px;\n  font-feature-settings: \"tnum\" 1;\n}\n.metric-label {\n  font-size: 14px;\n  color: var(--geist-secondary);\n  line-height: 1.4;\n}\n\n/* VAD 专栏 Banner (Ship Red & Vercel Clean) */\n.vad-showcase {\n  background: var(--geist-background);\n  box-shadow: var(--shadow-card-full);\n  border-radius: var(--radius-xl);\n  padding: 32px;\n  margin-bottom: 48px;\n  position: relative;\n}\n.vad-header-row {\n  display: flex;\n  align-items: baseline;\n  justify-content: space-between;\n  flex-wrap: wrap;\n  gap: 12px;\n  margin-bottom: 12px;\n}\n.vad-header-row h2 {\n  font-size: 32px;\n  font-weight: 600;\n  letter-spacing: -1.28px;\n  color: var(--geist-foreground);\n  margin: 0;\n}\n.vad-pillars-grid {\n  display: grid;\n  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));\n  gap: 14px;\n  margin-top: 24px;\n}\n.vad-pillar-item {\n  background: var(--geist-surface-tint);\n  box-shadow: var(--shadow-border);\n  border-radius: var(--radius-md);\n  padding: 14px 16px;\n}\n.vad-pillar-title {\n  font-size: 14px;\n  font-weight: 600;\n  color: var(--ship-red);\n  margin-bottom: 4px;\n}\n.vad-pillar-text {\n  font-size: 13px;\n  color: var(--geist-secondary);\n  line-height: 1.5;\n}\n.vad-filter-bar {\n  display: flex;\n  flex-wrap: wrap;\n  align-items: center;\n  justify-content: space-between;\n  gap: 12px;\n  margin: 24px 0 16px;\n  padding: 12px 16px;\n  background: var(--geist-surface-tint);\n  border-radius: var(--radius-md);\n  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.06);\n}\n.vad-filter-btn {\n  font-family: 'Geist', sans-serif;\n  font-size: 13px;\n  font-weight: 500;\n  padding: 6px 14px;\n  border-radius: 9999px;\n  border: none;\n  background: transparent;\n  color: var(--geist-secondary);\n  cursor: pointer;\n  transition: all 0.15s ease;\n}\n.vad-filter-btn:hover {\n  color: var(--geist-foreground);\n  background: rgba(0,0,0,0.05);\n}\n.vad-filter-btn.active {\n  background: #171717;\n  color: #ffffff;\n}\n.vad-search-input {\n  font-family: 'Geist', sans-serif;\n  font-size: 13px;\n  padding: 7px 12px;\n  border-radius: 6px;\n  border: 1px solid var(--geist-border);\n  background: #ffffff;\n  color: var(--geist-foreground);\n  width: 280px;\n  outline: none;\n  transition: border-color 0.15s, box-shadow 0.15s;\n}\n.vad-search-input:focus {\n  border-color: #0a72ef;\n  box-shadow: 0 0 0 2px rgba(10, 114, 239, 0.2);\n}\n\n/* 控制栏：搜索、视图、筛选 */\n.control-bar {\n  display: flex;\n  align-items: center;\n  justify-content: space-between;\n  gap: 16px;\n  margin-bottom: 24px;\n  flex-wrap: wrap;\n}\n.search-input-wrap {\n  position: relative;\n  flex: 1;\n  max-width: 480px;\n}\n.search-input {\n  width: 100%;\n  height: 40px;\n  padding: 0 38px 0 14px;\n  font-family: \"Geist\", sans-serif;\n  font-size: 14px;\n  color: var(--geist-foreground);\n  background: var(--geist-background);\n  box-shadow: var(--shadow-border);\n  border: none;\n  border-radius: var(--radius-md);\n  outline: none;\n  transition: box-shadow 0.15s;\n}\n.search-input:focus {\n  outline: 2px solid var(--ds-focus-color);\n  box-shadow: none;\n}\n.search-kbd {\n  position: absolute;\n  right: 12px;\n  top: 50%;\n  transform: translateY(-50%);\n  font-family: \"Geist Mono\", monospace;\n  font-size: 11px;\n  color: var(--geist-quaternary);\n  background: var(--geist-surface-tint);\n  box-shadow: var(--shadow-border);\n  padding: 2px 6px;\n  border-radius: var(--radius-sm);\n}\n\n.view-switcher {\n  display: flex;\n  box-shadow: var(--shadow-border);\n  border-radius: var(--radius-md);\n  background: var(--geist-background);\n  padding: 2px;\n}\n.view-btn {\n  background: transparent;\n  border: none;\n  font-size: 13px;\n  font-weight: 500;\n  color: var(--geist-tertiary);\n  padding: 6px 12px;\n  border-radius: var(--radius-sm);\n  cursor: pointer;\n  transition: color 0.15s, background 0.15s;\n}\n.view-btn.active {\n  background: var(--geist-surface-tint);\n  color: var(--geist-foreground);\n  font-weight: 600;\n}\n\n/* 筛选芯片行 (Filter Pill Strip) */\n.filter-group-strip {\n  display: flex;\n  flex-direction: column;\n  gap: 12px;\n  margin-bottom: 28px;\n  padding: 16px 20px;\n  background: var(--geist-surface-tint);\n  box-shadow: var(--shadow-border);\n  border-radius: var(--radius-lg);\n}\n.filter-row {\n  display: flex;\n  align-items: center;\n  gap: 8px;\n  flex-wrap: wrap;\n}\n.filter-label-mono {\n  font-family: \"Geist Mono\", monospace;\n  font-size: 11px;\n  font-weight: 500;\n  text-transform: uppercase;\n  color: var(--geist-quaternary);\n  min-width: 68px;\n}\n.pill-badge {\n  background: var(--geist-background);\n  color: var(--geist-secondary);\n  box-shadow: var(--shadow-border);\n  border: none;\n  padding: 3px 12px;\n  border-radius: var(--radius-pill);\n  font-size: 12px;\n  font-weight: 500;\n  cursor: pointer;\n  transition: all 0.15s;\n  display: inline-flex;\n  align-items: center;\n  gap: 6px;\n}\n.pill-badge:hover {\n  color: var(--geist-foreground);\n  box-shadow: var(--shadow-border-hover);\n}\n.pill-badge.active {\n  background: var(--geist-foreground);\n  color: var(--geist-background);\n  font-weight: 600;\n  box-shadow: none;\n}\n.pill-badge.active-blue {\n  background: var(--develop-blue);\n  color: #ffffff;\n  box-shadow: none;\n}\n.pill-badge.active-red {\n  background: var(--ship-red);\n  color: #ffffff;\n  box-shadow: none;\n}\n\n/* Bento Grid Cards (Section 4 & 6 Spec) */\n.card-grid-bento {\n  display: grid;\n  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));\n  gap: 16px;\n}\n.vercel-card {\n  background: var(--geist-background);\n  box-shadow: var(--shadow-card);\n  border-radius: var(--radius-lg);\n  padding: 20px;\n  display: flex;\n  flex-direction: column;\n  justify-content: space-between;\n  transition: box-shadow 0.2s, transform 0.2s;\n  text-decoration: none;\n  color: inherit;\n  overflow: hidden;\n  min-width: 0;\n  word-break: break-word;\n}\n.vercel-card:hover {\n  box-shadow: var(--shadow-card-hover);\n  transform: translateY(-2px);\n}\n.card-top {\n  display: flex;\n  align-items: center;\n  justify-content: space-between;\n  margin-bottom: 12px;\n  gap: 8px;\n}\n.card-tag-mono {\n  font-family: \"Geist Mono\", monospace;\n  font-size: 11px;\n  font-weight: 500;\n  text-transform: uppercase;\n  color: var(--geist-quaternary);\n  letter-spacing: 0.5px;\n}\n.status-pill-badge {\n  padding: 2px 8px;\n  border-radius: var(--radius-pill);\n  font-size: 11px;\n  font-weight: 500;\n  flex-shrink: 0;\n}\n.pub-accepted { background: #ebfdf2; color: #027a48; }\n.pub-workshop { background: #eff8ff; color: #175cd3; }\n.pub-submitted { background: #fff8e6; color: #b54708; }\n.pub-preprint { background: #f2f4f7; color: #475467; }\n.pub-other { background: #f9f5ff; color: #6941c6; }\n\n[data-theme=\"dark\"] .pub-accepted { background: rgba(2, 122, 72, 0.2); color: #32d583; }\n[data-theme=\"dark\"] .pub-workshop { background: rgba(23, 92, 211, 0.2); color: #84caff; }\n[data-theme=\"dark\"] .pub-submitted { background: rgba(181, 71, 8, 0.2); color: #fec84b; }\n[data-theme=\"dark\"] .pub-preprint { background: rgba(71, 84, 103, 0.2); color: #98a2b3; }\n[data-theme=\"dark\"] .pub-other { background: rgba(105, 65, 198, 0.2); color: #d6bbfb; }\n\n/* 必读标杆徽章 (Vercel Amber Accent) */\n.milestone-badge {\n  display: inline-flex;\n  align-items: center;\n  gap: 3px;\n  padding: 2px 7px;\n  border-radius: var(--radius-pill);\n  font-size: 11px;\n  font-weight: 600;\n  white-space: nowrap;\n  flex-shrink: 0;\n  transition: all 0.15s ease;\n}\n.milestone-badge.ms-idea, .milestone-badge:not([class*=\"ms-\"]) {\n  color: #b54708;\n  background: #fff8e6;\n  border: 1px solid rgba(247, 144, 9, 0.35);\n  box-shadow: 0 1px 2px rgba(181, 71, 8, 0.05);\n}\n[data-theme=\"dark\"] .milestone-badge.ms-idea, [data-theme=\"dark\"] .milestone-badge:not([class*=\"ms-\"]) {\n  color: #fec84b;\n  background: rgba(181, 71, 8, 0.22);\n  border-color: rgba(254, 200, 75, 0.35);\n}\n.milestone-badge.ms-writing {\n  color: #6941c6;\n  background: #f9f5ff;\n  border: 1px solid rgba(105, 65, 198, 0.3);\n  box-shadow: 0 1px 2px rgba(105, 65, 198, 0.05);\n}\n[data-theme=\"dark\"] .milestone-badge.ms-writing {\n  color: #d6bbfb;\n  background: rgba(105, 65, 198, 0.22);\n  border-color: rgba(214, 187, 251, 0.35);\n}\n.milestone-badge.ms-value {\n  color: #027a48;\n  background: #ebfdf2;\n  border: 1px solid rgba(2, 122, 72, 0.3);\n  box-shadow: 0 1px 2px rgba(2, 122, 72, 0.05);\n}\n[data-theme=\"dark\"] .milestone-badge.ms-value {\n  color: #32d583;\n  background: rgba(2, 122, 72, 0.22);\n  border-color: rgba(50, 213, 131, 0.35);\n}\n\n/* 论文正文图表与插图卡片样式 (Geist Design) */\n.paper-figure, .article-body figure {\n  margin: 32px auto;\n  text-align: center;\n  max-width: 100%;\n}\n.paper-figure img, .article-body img {\n  max-width: 96%;\n  height: auto;\n  border-radius: var(--radius-md);\n  border: 1px solid var(--geist-border);\n  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);\n  background: #ffffff;\n  transition: transform 0.2s ease, box-shadow 0.2s ease;\n  display: block;\n  margin: 0 auto;\n}\n.paper-figure img:hover, .article-body img:hover {\n  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);\n}\n.paper-figure figcaption, .article-body figcaption {\n  font-size: 13px;\n  color: var(--geist-secondary);\n  margin-top: 10px;\n  line-height: 1.6;\n  font-style: italic;\n  max-width: 850px;\n  margin-left: auto;\n  margin-right: auto;\n}\n\n/* VAD 视图切换器 View Switcher */\n.vad-view-switcher {\n  display: inline-flex;\n  padding: 3px;\n  background: var(--geist-secondary-bg);\n  border: 1px solid var(--geist-border);\n  border-radius: 8px;\n  margin-bottom: 20px;\n  gap: 2px;\n}\n.view-switch-btn {\n  display: inline-flex;\n  align-items: center;\n  gap: 6px;\n  padding: 6px 14px;\n  font-size: 13px;\n  font-weight: 500;\n  color: var(--geist-secondary);\n  border-radius: 6px;\n  text-decoration: none;\n  transition: all 0.15s ease;\n}\n.view-switch-btn:hover {\n  color: var(--geist-foreground);\n  background: rgba(0, 0, 0, 0.04);\n}\n[data-theme=\"dark\"] .view-switch-btn:hover {\n  background: rgba(255, 255, 255, 0.06);\n}\n.view-switch-btn.active {\n  background: var(--geist-background);\n  color: var(--geist-foreground);\n  font-weight: 600;\n  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);\n}\n\n/* 关系图谱 Graph View Styles */\n.graph-container {\n  position: relative;\n  width: 100%;\n  height: 720px;\n  background: var(--geist-background);\n  border: 1px solid var(--geist-border);\n  border-radius: var(--radius-lg);\n  overflow: hidden;\n  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.04);\n  margin-bottom: 40px;\n}\n.graph-toolbar {\n  position: absolute;\n  top: 14px;\n  left: 14px;\n  right: 14px;\n  z-index: 10;\n  display: flex;\n  justify-content: space-between;\n  align-items: center;\n  background: var(--geist-background);\n  border: 1px solid var(--geist-border);\n  padding: 8px 14px;\n  border-radius: 8px;\n  box-shadow: 0 4px 16px rgba(0,0,0,0.06);\n  flex-wrap: wrap;\n  gap: 8px;\n}\n.graph-tool-title {\n  font-size: 13px;\n  font-weight: 700;\n  display: flex;\n  align-items: center;\n  gap: 6px;\n  color: var(--geist-foreground);\n}\n.graph-filter-group {\n  display: flex;\n  gap: 6px;\n  align-items: center;\n  flex-wrap: wrap;\n}\n.graph-chip {\n  font-size: 11px;\n  padding: 3px 8px;\n  border-radius: 4px;\n  border: 1px solid var(--geist-border);\n  background: var(--geist-background);\n  color: var(--geist-foreground);\n  cursor: pointer;\n  transition: all 0.15s ease;\n}\n.graph-chip:hover { background: var(--geist-secondary-bg); }\n.graph-chip.active {\n  background: var(--geist-foreground);\n  color: var(--geist-background);\n  border-color: var(--geist-foreground);\n}\n.graph-search-input {\n  padding: 3px 8px;\n  font-size: 11px;\n  border-radius: 4px;\n  border: 1px solid var(--geist-border);\n  background: var(--geist-background);\n  color: var(--geist-foreground);\n  outline: none;\n  width: 150px;\n}\n#vad-graph-svg {\n  width: 100%;\n  height: 100%;\n  cursor: grab;\n}\n#vad-graph-svg:active { cursor: grabbing; }\n.graph-legend {\n  position: absolute;\n  bottom: 14px;\n  left: 14px;\n  background: var(--geist-background);\n  border: 1px solid var(--geist-border);\n  border-radius: 8px;\n  padding: 10px 14px;\n  font-size: 11px;\n  box-shadow: 0 4px 16px rgba(0,0,0,0.06);\n  z-index: 10;\n  line-height: 1.6;\n  pointer-events: none;\n}\n.graph-legend-row { display: flex; align-items: center; gap: 8px; }\n.graph-legend-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }\n.graph-info-drawer {\n  position: absolute;\n  top: 66px;\n  right: 14px;\n  width: 310px;\n  max-height: 620px;\n  background: var(--geist-background);\n  border: 1px solid var(--geist-border);\n  border-radius: 8px;\n  box-shadow: 0 8px 30px rgba(0,0,0,0.12);\n  z-index: 10;\n  padding: 16px;\n  overflow-y: auto;\n  display: none;\n  backdrop-filter: blur(10px);\n  transition: transform 0.2s ease, opacity 0.2s ease;\n}\n.graph-drawer-close {\n  position: absolute;\n  top: 10px;\n  right: 12px;\n  cursor: pointer;\n  font-size: 16px;\n  color: var(--geist-tertiary);\n}\n.graph-drawer-badge {\n  display: inline-block;\n  padding: 2px 6px;\n  border-radius: 4px;\n  font-size: 10px;\n  font-weight: 600;\n  margin-bottom: 6px;\n}\n.graph-drawer-title {\n  font-size: 13px;\n  font-weight: 700;\n  line-height: 1.4;\n  margin-bottom: 8px;\n  color: var(--geist-foreground);\n}\n.graph-drawer-meta {\n  font-size: 11px;\n  color: var(--geist-secondary);\n  margin-bottom: 12px;\n}\n.graph-drawer-core {\n  font-size: 12px;\n  line-height: 1.6;\n  color: var(--geist-foreground);\n  background: var(--geist-secondary-bg);\n  padding: 8px 10px;\n  border-radius: 6px;\n  margin-bottom: 12px;\n  border: 1px solid var(--geist-border);\n}\n.graph-drawer-link {\n  display: block;\n  text-align: center;\n  padding: 7px 12px;\n  background: var(--geist-foreground);\n  color: var(--geist-background);\n  border-radius: 6px;\n  font-size: 12px;\n  font-weight: 600;\n  text-decoration: none;\n  transition: opacity 0.15s ease;\n  margin-bottom: 6px;\n}\n.graph-drawer-link:hover { opacity: 0.85; }\n.graph-drawer-pdf-link {\n  display: block;\n  text-align: center;\n  padding: 6px 12px;\n  background: var(--geist-secondary-bg);\n  color: var(--geist-foreground);\n  border: 1px solid var(--geist-border);\n  border-radius: 6px;\n  font-size: 11px;\n  font-weight: 500;\n  text-decoration: none;\n  transition: all 0.15s ease;\n}\n.graph-drawer-pdf-link:hover { background: var(--geist-border); }\n.node-circle {\n  cursor: pointer;\n  transition: r 0.2s, stroke-width 0.2s;\n}\n.node-label {\n  font-size: 10px;\n  font-weight: 600;\n  fill: var(--geist-foreground);\n  pointer-events: none;\n  text-shadow: 0 1px 2px var(--geist-background);\n}\n.link-line {\n  stroke: var(--geist-border);\n  stroke-opacity: 0.6;\n  stroke-width: 1.2;\n  transition: stroke 0.2s, stroke-width 0.2s, stroke-opacity 0.2s;\n}\n.link-label {\n  font-size: 9px;\n  fill: var(--geist-tertiary);\n  pointer-events: none;\n  text-anchor: middle;\n}\n\n/* 引用框与警示框 Alerts */\n.callout-alert {\n  margin: 20px 0;\n  padding: 14px 18px;\n  border-radius: var(--radius-md);\n  transition: all 0.15s ease;\n}\n.callout-important, .callout-idea {\n  border-left: 4px solid #b54708;\n  background: rgba(181, 71, 8, 0.06);\n  box-shadow: inset 0 0 0 1px rgba(247, 144, 9, 0.3);\n}\n[data-theme=\"dark\"] .callout-important, [data-theme=\"dark\"] .callout-idea {\n  border-left-color: #fec84b;\n  background: rgba(181, 71, 8, 0.18);\n  box-shadow: inset 0 0 0 1px rgba(254, 200, 75, 0.25);\n}\n.callout-writing {\n  border-left: 4px solid #6941c6;\n  background: rgba(105, 65, 198, 0.06);\n  box-shadow: inset 0 0 0 1px rgba(105, 65, 198, 0.3);\n}\n[data-theme=\"dark\"] .callout-writing {\n  border-left-color: #d6bbfb;\n  background: rgba(105, 65, 198, 0.18);\n  box-shadow: inset 0 0 0 1px rgba(214, 187, 251, 0.25);\n}\n.callout-value {\n  border-left: 4px solid #027a48;\n  background: rgba(2, 122, 72, 0.06);\n  box-shadow: inset 0 0 0 1px rgba(2, 122, 72, 0.3);\n}\n[data-theme=\"dark\"] .callout-value {\n  border-left-color: #32d583;\n  background: rgba(2, 122, 72, 0.18);\n  box-shadow: inset 0 0 0 1px rgba(50, 213, 131, 0.25);\n}\n\n.card-title {\n  font-size: 16.5px;\n  font-weight: 600;\n  line-height: 1.42;\n  letter-spacing: -0.4px;\n  color: var(--geist-foreground);\n  margin: 0 0 10px;\n  word-break: break-word;\n  overflow-wrap: anywhere;\n  hyphens: auto;\n}\n.card-title a {\n  color: var(--geist-foreground);\n  text-decoration: none;\n  display: inline;\n  transition: color 0.15s ease;\n}\n.card-title a:hover {\n  color: var(--develop-blue);\n  text-decoration: none;\n}\n.card-id-mono {\n  font-family: \"Geist Mono\", monospace;\n  font-size: 13px;\n  font-weight: 500;\n  color: var(--geist-quaternary);\n  margin-right: 5px;\n}\n.card-meta-row {\n  display: flex;\n  gap: 6px;\n  flex-wrap: wrap;\n  margin-bottom: 12px;\n}\n.meta-token {\n  font-size: 12px;\n  color: var(--geist-tertiary);\n  background: var(--geist-surface-tint);\n  box-shadow: var(--shadow-ring);\n  padding: 2px 7px;\n  border-radius: var(--radius-sm);\n  white-space: nowrap;\n}\n.card-body-text {\n  font-size: 13.5px;\n  color: var(--geist-secondary);\n  line-height: 1.6;\n  margin-bottom: 16px;\n  flex-grow: 1;\n  word-break: break-word;\n  overflow-wrap: anywhere;\n}\n.card-body-text strong {\n  color: var(--geist-foreground);\n  font-weight: 600;\n}\n\n.card-footer {\n  display: flex;\n  align-items: center;\n  justify-content: space-between;\n  border-top: 1px solid var(--geist-border);\n  padding-top: 14px;\n}\n.card-link-action {\n  font-size: 13.5px;\n  font-weight: 500;\n  color: var(--link-blue);\n  display: inline-flex;\n  align-items: center;\n  gap: 4px;\n  text-decoration: none;\n  transition: all 0.15s ease;\n}\n.card-link-action:hover {\n  opacity: 0.85;\n  transform: translateX(2px);\n}\na.meta-token {\n  transition: all 0.15s ease;\n  cursor: pointer;\n  text-decoration: none;\n}\na.meta-token:hover {\n  background: var(--geist-selection);\n  color: var(--geist-foreground);\n  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.15);\n}\n\n/* 紧凑列表视图 (List View) */\n.card-list-view {\n  display: flex;\n  flex-direction: column;\n  gap: 8px;\n}\n.list-row-item {\n  background: var(--geist-background);\n  box-shadow: var(--shadow-card);\n  border-radius: var(--radius-md);\n  padding: 12px 18px;\n  display: flex;\n  align-items: center;\n  justify-content: space-between;\n  gap: 16px;\n  transition: box-shadow 0.15s;\n}\n.list-row-item:hover {\n  box-shadow: var(--shadow-card-hover);\n}\n\n/* 阅读详情页 (Report Detail) */\n.reading-container {\n  display: grid;\n  grid-template-columns: minmax(0, 1fr) 260px;\n  gap: 40px;\n  align-items: start;\n}\n@media (max-width: 960px) {\n  .reading-container { grid-template-columns: 1fr; }\n  .reading-sidebar { display: none; }\n}\n\n.report-header-card {\n  background: var(--geist-background);\n  box-shadow: var(--shadow-card);\n  border-radius: var(--radius-lg);\n  padding: 28px 32px;\n  margin-bottom: 28px;\n}\n.crumb-bar {\n  font-size: 13px;\n  color: var(--geist-tertiary);\n  margin-bottom: 10px;\n}\n.report-title {\n  font-size: 32px;\n  font-weight: 600;\n  letter-spacing: -1.28px;\n  margin: 0 0 16px;\n  color: var(--geist-foreground);\n}\n.report-action-buttons {\n  display: flex;\n  align-items: center;\n  gap: 10px;\n  flex-wrap: wrap;\n  border-top: 1px solid var(--geist-border);\n  padding-top: 16px;\n  margin-top: 16px;\n}\n\n.article-body {\n  background: var(--geist-background);\n  box-shadow: var(--shadow-card-full);\n  border-radius: var(--radius-lg);\n  padding: 36px 42px 80px;\n  font-size: 16px;\n  line-height: 1.75;\n  color: var(--geist-foreground);\n}\n.article-body h1, .article-body h2, .article-body h3 {\n  color: var(--geist-foreground);\n  scroll-margin-top: 80px;\n}\n.article-body h1 { font-size: 28px; font-weight: 600; letter-spacing: -1.28px; border-bottom: 1px solid var(--geist-border); padding-bottom: 8px; margin-top: 32px; }\n.article-body h2 { font-size: 24px; font-weight: 600; letter-spacing: -0.96px; border-bottom: 1px solid var(--geist-border); padding-bottom: 6px; margin-top: 36px; }\n.article-body h3 { font-size: 18px; font-weight: 600; letter-spacing: -0.32px; margin-top: 26px; }\n.article-body table {\n  width: 100%;\n  border-collapse: collapse;\n  margin: 24px 0;\n  font-size: 14px;\n  box-shadow: var(--shadow-border);\n  border-radius: var(--radius-md);\n  overflow: hidden;\n}\n.article-body th, .article-body td {\n  padding: 10px 14px;\n  text-align: left;\n  border-bottom: 1px solid var(--geist-border);\n}\n.article-body th {\n  background: var(--geist-surface-tint);\n  font-weight: 600;\n  color: var(--geist-foreground);\n}\n.article-body blockquote {\n  border-left: 2px solid var(--geist-foreground);\n  margin: 20px 0;\n  padding: 8px 18px;\n  color: var(--geist-secondary);\n  font-style: normal;\n}\n.article-body code {\n  font-family: \"Geist Mono\", monospace;\n  font-size: 13.5px;\n  box-shadow: var(--shadow-ring);\n  background: var(--geist-surface-tint);\n  padding: 2px 6px;\n  border-radius: var(--radius-sm);\n}\n.article-body pre {\n  position: relative;\n  background: #000000;\n  color: #ededed;\n  box-shadow: var(--shadow-border);\n  border-radius: var(--radius-md);\n  padding: 18px;\n  margin: 24px 0;\n  overflow-x: auto;\n}\n.article-body pre code {\n  background: transparent;\n  box-shadow: none;\n  padding: 0;\n  color: inherit;\n  font-size: 13px;\n}\n.copy-code-btn {\n  position: absolute;\n  top: 8px;\n  right: 10px;\n  font-family: \"Geist Mono\", monospace;\n  font-size: 11px;\n  background: #171717;\n  color: #ffffff;\n  border: 1px solid #333333;\n  padding: 3px 8px;\n  border-radius: var(--radius-sm);\n  cursor: pointer;\n}\n\n/* 侧边大纲 (TOC) */\n.reading-sidebar {\n  position: sticky;\n  top: 80px;\n  background: var(--geist-background);\n  box-shadow: var(--shadow-card);\n  border-radius: var(--radius-lg);\n  padding: 20px;\n  max-height: calc(100vh - 100px);\n  overflow-y: auto;\n}\n.sidebar-toc-title {\n  font-family: \"Geist Mono\", monospace;\n  font-size: 12px;\n  font-weight: 500;\n  text-transform: uppercase;\n  letter-spacing: 0.5px;\n  color: var(--geist-quaternary);\n  margin-bottom: 12px;\n}\n.reading-sidebar ul {\n  list-style: none;\n  padding-left: 0;\n  margin: 0;\n  font-size: 13px;\n}\n.reading-sidebar li {\n  margin: 6px 0;\n}\n.reading-sidebar ul ul {\n  padding-left: 14px;\n}\n.reading-sidebar a {\n  color: var(--geist-secondary);\n  text-decoration: none;\n  transition: color 0.15s;\n}\n.reading-sidebar a:hover, .reading-sidebar a.active {\n  color: var(--geist-foreground);\n  font-weight: 600;\n}\n\n/* 后台管理 (/admin) */\n.admin-card-container {\n  background: var(--geist-background);\n  box-shadow: var(--shadow-card-full);\n  border-radius: var(--radius-lg);\n  padding: 32px;\n  margin-bottom: 32px;\n}\n.form-row-2 {\n  display: grid;\n  grid-template-columns: 1fr 1fr;\n  gap: 16px;\n  margin-bottom: 16px;\n}\n@media (max-width: 600px) {\n  .form-row-2 { grid-template-columns: 1fr; }\n}\n.form-field {\n  display: flex;\n  flex-direction: column;\n  gap: 6px;\n  margin-bottom: 16px;\n}\n.form-field label {\n  font-size: 13px;\n  font-weight: 500;\n  color: var(--geist-foreground);\n}\n.form-field input, .form-field select, .form-field textarea {\n  font-family: \"Geist\", sans-serif;\n  font-size: 14px;\n  padding: 9px 12px;\n  background: var(--geist-background);\n  box-shadow: var(--shadow-border);\n  border: none;\n  border-radius: var(--radius-md);\n  color: var(--geist-foreground);\n  outline: none;\n}\n.form-field input:focus, .form-field select:focus, .form-field textarea:focus {\n  outline: 2px solid var(--ds-focus-color);\n  box-shadow: none;\n}\n\n/* 语法高亮 (Console Blue / Purple / Pink) */\n.codehilite .k, .codehilite .kd, .codehilite .kn { color: #eb367f; font-weight: 500; }\n.codehilite .s, .codehilite .s1, .codehilite .s2 { color: #0070f3; }\n.codehilite .nf, .codehilite .na { color: #7928ca; font-weight: 500; }\n.codehilite .c, .codehilite .c1 { color: #666666; font-style: italic; }\n.codehilite .mi, .codehilite .mf { color: #ff5b4f; }\n\n</style>\n\n</head>\n<body>\n\n    <nav class=\"vercel-nav\">\n      <div class=\"nav-brand\">\n        <a href=\"/\" style=\"display:flex;align-items:center;gap:10px;text-decoration:none\">\n          <svg class=\"vercel-triangle\" viewBox=\"0 0 76 65\" fill=\"none\">\n            <path d=\"M37.5274 0L75.0548 65H0L37.5274 0Z\" fill=\"currentColor\"/>\n          </svg>\n          <span class=\"nav-title\">Agent Harness KB</span>\n        </a>\n        <span class=\"nav-badge-pill\">Geist 2.0</span>\n      </div>\n\n      <div class=\"nav-links\">\n        <a class=\"nav-link \" href=\"/\">全景总览</a>\n        <a class=\"nav-link \" href=\"/vad\" style=\"color:var(--ship-red)\">🎯 VAD 专栏 (144)</a>\n        <a class=\"nav-link\" href=\"https://m0rtzz.github.io/paper-notes/\" target=\"_blank\" rel=\"noopener\">顶会 669 篇 ↗</a>\n        <a class=\"nav-link\" href=\"/download/all\">整库打包</a>\n        \n      </div>\n\n      <div class=\"nav-actions\">\n        \n        <button class=\"theme-toggle-btn\" id=\"theme-toggle-btn\" onclick=\"toggleTheme()\" title=\"切换亮暗主题\">🌙</button>\n      </div>\n    </nav>\n    \n<main class=\"vercel-container\">\n\n        <div class=\"report-header-card\">\n          <div class=\"crumb-bar\"><a href=\"/\">Home</a> / <b>fulltext.txt</b></div>\n          <h1 class=\"report-title\">fulltext.txt</h1>\n          <div class=\"report-action-buttons\">\n            <a class=\"btn-primary-dark\" href=\"?dl=1\">Download Text</a>\n          </div>\n        </div>\n        <article class=\"article-body\"><pre><code>This CVPR paper is the Open Access version, provided by the Computer Vision Foundation.\nExcept for this watermark, it is identical to the accepted version;\nthe final published version of the proceedings is available on IEEE Xplore.\n\nDefect Cue-Preserved Structural Feature Refinement for Few-Shot\nAnomaly Detection\nLe Jiang1 , Yan Huang1, *, Zhen Xu1 , Yong Xu1,2,3 , Hau-San Wong4 , Si Wu1, *\n1\nSouth China University of Technology, China\n2\nGuangdong Provincial Key Laboratory of Multimodal Big Data Intelligent Analysis, China\n3\nState Key Laboratory of Advanced Papermaking and Paper-based Materials, China\n4\nCity University of Hong Kong, China\n{csjiangle@mail., aihuangy@, csxuzhen@mail., yxu@}scut.edu.cn,\ncshswong@cityu.edu.hk, cswusi@scut.edu.cn\n\nAbstract\n\nInput\n\nAPRIL-GAN\n\nAnomalyDINO\n\nDCP-SFR\n\nGround Truth\n\nMissed minor\nanomalies\n\nModern industrial quality control heavily relies on automated anomaly detection. While few-shot anomaly detection addresses the challenge of limited labeled data, realworld inspection faces a vast diversity of anomaly types,\nsizes, and shapes. We identify the primary cause for the\nanomaly detection difficulty as the progressive loss of detect\ncues as they pass through deep feature extraction pipelines.\nTo counteract the defect cue fading, we propose a Defect\nCue-Preserved Structural Feature Refinement model, referred to as DCP-SFR. Recognizing that early-stage cues\nare paramount, we design a conditional anomaly cue amplification module to produce an initial anomaly score map,\nwhich is then enhanced to increase the contrast between\nanomalous and normal regions. The amplified cues is subsequently used for reconstruction-based anomaly localization, by anchoring attention on true anomaly regions to preserve spatial integrity and prevent drift. Further, we incorporate a structure-aware segmentation refinement stage\nto improve anomaly segmentation in terms of edge alignment, thereby significantly improve boundary accuracy. On\nthe MVTec AD and VisA benchmarks, DCP-SFR achieves\nstate-of-the-art performance, with an image-level AUROC\nof 97.3% and a pixel-level AUROC of 98.2%, demonstrating strong cross-domain generalization performance.\n\nAmbiguous\nsegmentation\nboundaries\n\nMisclassified\nbackground\nregions\n\nFigure 1. Image examples of the three key FSAD challenges.\nCompared with the leading FSAD models, the proposed DCP-SFR\nachieves superior performance in focusing more on anomalous regions and localizing defect boundaries.\n\n1. Introduction\n\nzero-shot anomaly detection (ZSAD) removes such a dependency [1, 4, 6, 12, 23, 28, 47], an absence of reference images makes it difficult to reliably localize defects\nthat lack strong, explicit visual cues. By contrast, few-shot\nanomaly detection (FSAD) offers a more practical solution,\nleveraging a small set of reference images to enable rapid\ndeployment across diverse products [13, 16, 17, 35, 48].\nThe main challenge for real-world FSAD lies in contending with a wide variety of defect types, scales and unseen\npatterns. The variety and complexity of defects underscores\nthe critical importance of subtle, anomaly-related cues for\naccurate detection. On the other hand, the signal loss inherent in multi-stage feature extraction pipelines leads to\ndefect cue fading, a phenomenon manifesting as mislocalized anomalous regions and compromised boundary precision. Therefore, preserving the vital defect cues is of great\nsignificance to precise anomaly detection.\nExisting FSAD models can be broadly categorized into\nthree categories. The methods of the first category aim to\nmodel the normality, often through a reconstruction strat-\n\nAutomated anomaly detection (AD) is a foundational technology for controlling industrial product quality. Conventional AD is often constrained by a reliance on substantial\nannotated data [15, 21, 22, 30, 32, 37, 39, 40, 43]. While\n* Corresponding authors.\n\n35607\n\n\fegy, like FastRecon [13]. Reconstruction-based models detect anomalies as the regions with high reconstruction error\nbut can misclassify normal samples in complex scenes due\nto limited reference coverage. The methods of the second\ncategory are developed to synthesizes anomalies to augment\ntraining data, such as SPD [48], AnomalyDiffusion [16] and\nAnomalyAny [35]. However, synthetic defects are always\naccompanied by the domain discrepancy that confuses defect representation learning. The methods of the third category perform the comparison between the features extracted\nfrom the local regions of a target image and normal references. A critical prerequisite for a meaningful comparison\nis ensuring that the features are spatially aligned, as addressed by early methods like RegAD [17] which focused\non feature-level alignment. Subsequently, the focus of research shifted toward leveraging powerful pretrained models, such as CLIP [33] and DINOv2 [31], to extract rich\nsemantic and structural features. State-of-the-art methods\nlike PatchCore [34], AnomalyGPT [14], WinCLIP [18], and\nAnomalyDINO [8] operate by matching the features in a\nwell-established embedding space to compute discrepancy\nscores. However, there is a lack of effective mechanism to\ncounteract the progressive fading of defect cues during processing, which significantly limits the reliability of existing\napproaches, as shown in Figure 1.\nIn this work, we propose DCP-SFR, a framework designed to counteract progressive defect cue fading. The proposed approach is built on a multi-stage information preservation strategy, aiming to consistently enhance defectrelevant structural information from initial extraction to final prediction. Specifically, we incorporate a conditional\nanomaly cue amplification module, which leverages multilevel features and learnable prompts to perform an initial\ndifferentiation between normal and anomalous regions. The\nresulting prediction scores are then amplified to produce\nhigh-contrast anomaly cues that robustly preserves initial\ndefect indication. Guided by the amplified cues, anomaly\ncue-guided localization module achieves more precise defect localization. By reconstructing the query features from\nnormal references, the resulting residual map, derived from\nthe difference between the original and reconstructed features, effectively pinpoints defect locations. Structureaware segmentation refinement module by fusing the localization map with a regularization map computed from visual feature similarity. A dedicated edge alignment regularization is imposed to ensure that the segmentation result has\nsharp and precise boundaries. Extensive experiments on the\nMVTec AD and VisA datasets demonstrate that DCP-SFR\nis able to achieves superior performance. The main contributions of this work are summarized as follows:\n\ning to superior performance in both segmentation and\nimage-level classification.\n• To preserve defect cues, we design a conditional amplification module to enhance subtle initial signals, and the\namplified cues are leveraged to guide defect localization,\nachieving high-precision anchoring on anomalous regions\nand effectively preventing drift.\n• We further impose structural alignment regularization,\nwhich significantly enhances the contour fidelity of\nanomaly segmentation, leading to the superior performance of DCP-SFR over the existing FSAD methods.\n\n2. Related Work\nTo provide an overview of FSAD, we categorize existing methods based on the adopted strategies: (1)\nreconstruction-based methods, (2) anomaly generation\nmethods, and (3) feature comparison-based methods.\n\n2.1. Reconstruction-based Methods\nThere are a number of FSAD methods [41, 42], which operate on a core assumption that the representation learnt exclusively from normal samples can be used to exactle reconstruct the normal regions but will fail to reconstruct anomalous ones. Anomaly detection is performed by subtracting\nthe reconstructed image from the query image, and the resulting significant discrepancies indicate defects. FastRecon [13] leverages a limited amount of normal references to\nreconstruct query images via a specialized regression model\nwith distribution regularization, and identity defects according to reconstruction errors. However, due to the limited\nreferences, the feature space learned by the reconstructionbased methods provides inadequate coverage of normal patterns, leading to a high rate of false positives.\n\n2.2. Anomaly Generation Methods\n\n• To address defect cue fading in FSAD, a problem largely\noverlooked by prior works, we propose DCP-SFR to preserve and refine defect cues throughout the pipeline, lead-\n\nTo address the data imbalance inherent in anomaly detection, another category of FSAD methods focuses on augmenting training datasets by generating synthetic anomalies. Early approaches relied on manually crafted defects.\nFor instance, SPD [48] performs self-supervised contrastive\nlearning by using non-generative anomalies, while Wang et\nal. [36] proposed an energy-based model that reconstructs\nthe images with manually injected random noise.\nA significant drawback of handcrafted anomalies is the\nlack of realism. To overcome the issue, recent works leverage powerful generative models. AnomalyDiffusion [16]\nand AnomalyAny [35] utilize diffusion models to generate defects that more closely match real-world distributions,\nthereby partially alleviating the scarcity of real anomaly\nsamples. However, a challenge for the above generative\nmethods is the potential domain gap between synthetic and\nreal defects, which can cause the decision boundaries learnt\nby the models deviate from the ground-truth regions.\n\n35608\n\n\f2.3. Feature Comparison-based Methods\nFeature comparison-based methods detect anomalies by\nmeasuring the similarity between features extracted from\nquery samples and those of normal references, leveraging\nmulti-scale or semantic correlations to highlight deviations\nfrom learned normal patterns. SPADE [7], for instance,\nperforms a training-free kNN-based [11] feature comparison between query and reference images, where kNN retrieves the most similar features to assess normality. PaDiM\n[9] models the normal feature distribution with multivariate Gaussians from pretrained CNN embeddings and incorporates inter-level correlations to improve defect localization. However, spatial misalignment between query and\nreference features can hinder accurate anomaly detection.\nTo address spatial misalignment, RegAD [17] introduces a\ngeneralizable feature alignment model, alleviating the misalignment problem. Several more recent and influential\nmethods focuses on memory-bank-based feature matching.\nPatchCore [34] constructs a coreset of representative normal patch features for efficient similarity scoring. Building on the memory bank, GraphCore [38] aims to learn a\nvisual isometric invariant features as an anomaly measurement feature for more precise detection.\nAnother research line leverages the pre-trained crossmodal model like CLIP [33]. WinCLIP [18] implemented a\ntraining-free, multi-scale feature comparison between query\nand reference images, demonstrating the potential of visionlanguage models for industrial inspection. Li et al. [26]\nproposed a transformation to warp query features closer to\nthe normal manifold, improving similarity matching.\nIn addition, it is an effective way to fine-tune or adapt\nCLIP for FSAD, typically by learning effective textual\nprompts or image patch representations. APRIL-GAN [5]\nremaps image features into a joint embedding space to improve text-image alignment. Similarly, SimCLIP [10] incorporates adapters and prompt tuning to enhance crossmodal synergy for effective ZSAD. SimCLIP is further extended to FSAD in SimCLIP+ via relational modeling over\nvisual embeddings. On the other hand, PromptAD [25] constructs a large number of negative samples used to guide\nprompt learning in one-class setting. InCTRL [46] trains a\ngeneralist anomaly detection model using in-context residual learning with normal prompts, enabling cross-domain\nanomaly detection without target-specific fine-tuning.\nBeyond the CLIP-centric paradigm, researchers have\nalso leveraged other powerful pretrained Large Language\nModels (LLMs) for FSAD. AnomalyGPT [14] couples visual encoders with LLMs to allow for multi-turn interactive querying for defect analysis. ADFormer [45], which\nfuses CNN features with transformer layers to capture both\nlocal textures and long-range dependencies. The DINOv2\n[31] model has emerged as a popular visual backbone, and\nAnomalyDINO [8] directly leverages it for feature compar-\n\nison. LogSAD [44] adopts a hybrid strategy to integrate\nDINOv2 with the Segment Anything Model (SAM) [20] to\nenhance final mask prediction. INP-Former [29] extracts\nan intrinsic normal prototype from the query image and reconstructs only normal tokens, with reconstruction errors\nserving as the anomaly indicator.\nDifference from the existing methods: The above methods treat few-shot anomaly detection as a static, one-shot\nmatching problem, and overlook the progressive nature of\ndefect cue fading within deep feature extraction pipelines.\nCompared with prevalent feature-matching methods that\ncompute discrepancy scores with a fixed feature representation, we propose DCP-SFR, which leverages dynamic\nanomaly cues to refine the entire detection process. Toward\nthis end, we design a conditional amplification module to\nenhance weak defect signals, and then use the resulting cues\nto guide a reconstruction-based localization process.\n\n3. Methodology\nTo address the progressive fading of anomaly signals across\nthe detection pipeline, we propose DCP-SFR, a unified\nframework for few-shot anomaly detection, as illustrated in\nFigure 2. DCP-SFR is designed to address the two subtasks:\nimage segmentation and anomaly segmentation. There are\na Conditional Anomaly Cue Amplification module (CACA)\nand an Anomaly Cue-guided Localization module (ACL),\nbuilt on top of pretrained models, which form a shared\nprocessing core that is applied to both subtasks. For the\nsegmentation task, a Structure-aware Segmentation Refinement module (SSR) is appended to enhance boundary precision. The primary distinction lies in the features they process: the segmentation task operates on spatial patch features that preserve locational information, while the classification task operates on the global class token that aggregates overall image context. We will first detail the core\nmodules from the perspective of the segmentation task (Sec.\n3.1-3.3). Subsequently, we will describe how the classification task leverages a parallel processing stream with a similar logic and conclude with the overall model optimization\nstrategy (Sec. 3.4).\n\n3.1. Conditional Anomaly Cue Amplification\n\n35609\n\nA primary challenge in AD is the fading of subtle defect\ncues, which are often overshadowed by background noise.\nTo tackle the issue, we design an effective module to conditionally amplify potential anomaly signals based on the\nsemantic guidance from learnable prompts, preserving subtle defect cues from early feature extraction layers.\nSpecifically, we leverage two pretrained models as backbones: a CLIP [33] model, comprising an image encoder\nEI and a text encoder ET ; and a DINOv2 [31] image encoder ED . Given a query image x and K reference normal\nimages {x′k |k = 1, ..., K}, we extract features using these\n\n\fImage classification\n\n𝒇𝒄\n\nLearnable prompts 𝒑𝒄\n\n𝑦ො𝑔𝑙𝑜𝑏𝑎𝑙\n\nCACA\n\n𝑝𝑛𝑜𝑟𝑚𝑎𝑙\nPretrained\nEncoders\n\nෝ\nPredict Score 𝒚\n𝑦ො𝑙𝑜𝑐𝑎𝑙\n\nAnomaly segmentation\n\n𝒇𝒄𝒍𝒔 / 𝒈𝒄𝒍𝒔\n\n𝑝𝑎𝑛𝑜𝑚𝑎𝑙𝑦\n\nACL\n\nCACA\n\nACL\n\np% pixel\n\n+\n\n𝐴𝑑𝑎𝑝𝑡𝑒𝑟 ∁\n\n𝒇𝒑 /𝒈𝒑\n\n𝒇′𝒄𝒍𝒔,𝒌 / 𝒈′𝒄𝒍𝒔,𝒌\nSSR\n\nQuery\nimage 𝒙\n\n𝒇′𝒑,𝒌 / 𝒈′𝒑,𝒌\n\nK-shot reference\nimages 𝒙′𝒌\n\nFeature Comparison\n\nConditional Anomaly Cue Amplification(CACA)\n\nAnomaly Cue-guided Localization(ACL)\n𝒈′𝒑,𝒌\n\n𝒈′𝒑,𝒌\n\n𝒈𝒑\n\n𝒇𝒄\n\n𝑊𝐾𝑧\n\nStructure-aware Segmentation Refinement\n(SSR)\n\n…\nEdge\nExtractor Ο\n\n*\n\nSigmoid\n\nEqualConv2d\n\nLeakyReLU\n\n𝑠amp\nEqualConv2d\n\nGround truth\nsegmentation result 𝒔\n\n𝑊𝑉𝑧\n\n𝑆𝑜𝑓𝑡𝑚𝑎𝑥\n\nsinit\n\nPredicted\nsegmentation result 𝒔ො\n\nPredicted\nsegmentation result 𝒔ො\n\n𝒇𝒑\n𝑊𝑄𝑧\n\n𝑠𝑐𝑜𝑠\n\n𝒇𝒛𝒓𝒆𝒄\n∗ 𝑁Υ\n\n1 − 𝑠amp\n𝒈𝒑\n\n-\n\n𝑵\n\n𝛿𝑟𝑒𝑐\n\n𝚼\n𝒇𝒓𝒆𝒄\n\n𝑠Ƹ 𝑒𝑑𝑔𝑒\n\n𝑠𝑒𝑑𝑔𝑒\n\nFigure 2. Overview of the DCP-SFR framework. The architecture comprises a CACA Module and an ACL Module, forming a shared core\nbuilt on pretrained features for both segmentation and classification subtasks. Besides, the SSR maintains geometric accuracy and edge\nsharpness of segmentation result.\n\nbackbones. To preserve early-stage defect cues that might\nfade in deeper layers, we extract patch features from multiple intermediate layers of EI :\n{fcls , fp } = EI (x),\n(1)\n′\n′\n{fcls,k , fp,k\n} = EI (x′k ),\nwhere fcls is the class token and fp is a set of multi-level\npatch features from the query image x. Specifically, fp is\ndenoted as {fp,j |j = 1, ..., m}, where m = 4 and each element fp,j corresponds to the features from the 6th, 12th,\n′\n18th, and 24th layers, respectively. Analogously, fcls,k\ndenotes the class token from the k-th reference image x′k ,\n′\n′\nand fp,k\nrepresents the set of patch features, {fp,k,j\n|j =\n1, ..., m}. In addition, we adopt ED to extract features that\nare more attentive to fine-grained details:\n{gcls , gp } = ED (x),\n(2)\n′\n′\n{gcls,k , gp,k\n} = ED (x′k ),\nwhere gcls and gp are the class token and patch features\n′\n′\nfrom the query image, gcls,k\nand gp,k\nare the corresponding\nfeatures from the reference images.\nWe utilize learnable prompts to guide our model toward\nprecise anomaly detection. We define the set of class categories as C = {normal, anomaly}. For each category c ∈ C,\nwe design a corresponding learnable prompt pc with the following structure:\npnormal = [U1 ][U2 ] . . . [Un ],\n(3)\npanomaly = [T1 ][T2 ] . . . [Tn ][damaged],\n\nwhere [U1 ]...[Un ] and [T1 ]...[Tn ] are randomly initialized\nsequences of learnable vectors, and n is the specified length.\nIn this design, we use the word ‘[damaged]’ as a semantic\nanchor for the anomaly prompt. This anchor provides the\nmodel with a generic prior about the concept of anomaly.\nThe associated learnable vectors, [T1 ]...[Tn ], are then responsible for capturing and adapting to the diverse and subtle defect patterns specific to each task during training. The\npretrained text encoder ET maps these class prompts pc into\ntheir corresponding embedding vectors: fc = ET (pc ).\nWe interact the learned prompt embeddings fc with the\npreserved multi-level image patch features fp,j to generate\nan initial anomaly score map, denoted as sinit :\nm\n1 X exp (&lt; fanomaly , fp,j &gt; /τ )\nP\n,\nsinit =\n(4)\nm j=1 c∈C exp (&lt; fc , fp,j &gt; /τ )\n\n35610\n\nwhere &lt; ·, · &gt; represents the cosine similarity operation\nand τ is a temperature hyperparameter. For each patch feature fp,j from the m different layers, the above formula\naims to compute the probability of belonging to the anomaly\nclass. sinit is obtained by averaging the resulting probability\nmaps from the multiple layers, resulting in a more robust estimation. As a result, we effectively translate the preserved\nearly-stage cues into an initial anomaly map that pinpoints\nregions semantically aligned with the concept of anomaly,\nproviding critical guidance for the subsequent stages.\nTo enhance the contrast of the initial anomaly score map\n\n\fsinit , we perform refinement by learning a non-linear transformation A as follows:\n1\n(5)\n,\nsamp =\n1 + e−A(sinit )\nwhere A functions to amplify even faint anomaly responses\nwhile suppressing the signal values in normal regions. The\namplified anomaly score map samp leads to a clearer separation between anomalous and normal areas. The highcontrast map serves as a critical spatial signal to guide\nthe subsequent module to focus more on high-probability\nanomaly regions.\n\nreconstruction-based residual map δrec is then derived by\ncomputing the L1 distance between the original and reconstructed features:\n\n3.2. Anomaly Cue-guided Localization\n\nConsidering that residual map δrec may still contain false\npositives caused by normal texture variations, and exhibit\ncoarse boundaries. We introduce a further refinement strategy designed to simultaneously enhance the structural accuracy of the segmentation result. Toward this end, we perform a non-parametric cosine similarity matching to filter\nfalse positives and impose structural alignment regularization to obtain precise anomaly contours.\nWe treat the feature map gp as a set of spatial feature vectors (tokens), denoted as gp = {gp (l)}L\nl=1 , where L denotes\nthe number of vectors. Our strategy involves the comparison of each query token gp (l) against a comprehensive feature memory bank M, which aggregates all normal patterns\nfrom the K reference images as follows:\nK\n[\n′\n(9)\nM=\n{gp,k\n(l)}L\nl=1 .\n\nNr\n(8)\nδrec = ||gp − frec\n||1 ,\nThe residual map δrec pinpoints the precise locations of defects. The anomaly cue-guided reconstruction strategy ensures that the localization is not only accurate by learning\nthe deep structure of normal patterns but also robust against\nbackground noise.\n\nWhile the previous stage amplifies and highlights potential\ndefect cues, a more specific module is required for precise localization. Our Anomaly Cue-guided Localization\nmodule achieves the goal by leveraging the amplified cue\nmap to guide a reconstructive process. The main idea behind the module is to reconstruct an anomaly-free version of\nthe query features, conditioned on the spatial guidance provided by the anomaly cue samp . By computing the residual\nbetween the original features and the reconstructed features,\nwe can precisely identify and localize defects that cannot be\nreconstructed by normal patterns.\nWe reconstruct the anomaly-free query features using a\nmodule of stacked cross-attention layers. The initial recon0\nis generated by using the fine-grained\nstructed feature frec\nfeatures gp of the query image as the query:\n\n3.3. Structure-aware Segmentation Refinement\n\nk=1\n\nThe comparison yields a similarity map Ψ, where each\nvalue represents the maximum cosine similarity between a\nquery token and all the tokens within the memory bank as\nfollows:\n\n0\n0 ′\nfrec\n= Υ(WQ0 gp , WK\nḡp , WV0 ḡp′ )\n\n!\n0 ′ T\n(6)\nḡp )\n(WQ0 gp )(WK\n√\n(WV0 ḡp′ ),\n= Softmax\ndk\n0\n,\nwhere Υ represents the cross-attention operation, WQ0 , WK\n0\nand WV are learnable linear projection matrices for the initial layer, and dk is the dimension of the key vectors. In the\nabove equation, ḡp′ denotes the mean of all K reference im′\nage features {gp,k\n}, providing a stable reference of normal\npatterns as the key and value.\n0\nis fed into Nr stacked cross-attention\nNext, the frec\nblocks for layer-wise refinement. In the z-th layer, the out(z−1)\nput from the previous layer frec\nis spatially modulated by\nthe anomaly cue samp and then used as the new query:\n\nΨ(l) = max &lt; gp (l), t &gt; .\n\n(10)\nA regularization map is derived from this similarity map by\ninversion: scos = 1 − Ψ, where the regions highly similar to\nnormal patterns will have scores close to zero and are thus\neffectively suppressed.\nWe obtain the segmentation result ŝ by a weighted fusion\nof the residual map δrec and the regularization map scos :\nt∈M\n\n(z−1)\n(z−1)\nfˆrec\n= frec\n⊙ (1 − samp ),\n(7)\nz ′\nz\nz ˆ(z−1)\nfrec = Υ(WQ frec , WK\nḡp , WVz ḡp′ ),\nwhere ⊙ denotes element-wise multiplication, and the proz\njection matrices WQz , WK\n, and WVz are unique to each refinement layer z ∈ {1, ..., Nr }. The (1 − samp ) suppresses\nthe features in the regions marked by the anomaly cue, compelling the current layer to rely more on the normal reference features ḡp′ . After the refinement with Nr stacked layNr\ners, the final reconstructed feature frec\nis obtained, and the\n\nŝ = δrec + λscos ,\n(11)\nwhere λ is weighting factor. This fusion strategy brings two\nadvantages: δrec derived from reconstruction residuals, offers high sensitivity in detecting all potential anomalous regions, while at the same time scos provides high precision\nby rejecting false positives.\nTo address the issues of diffuse segmentation boundaries\nand spurious predictions on isolated background regions,\nwe impose structural alignment regularization to enhance\ncontour fidelity and improve boundary precision, and the\ncorresponding loss function LC measures the edge consistency between our final predicted segmentation map ŝ\n\n35611\n\n\fand the ground-truth s. We adopt an edge extractor, denoted as O(·), to obtain the edge maps: sedge = O(s) and\nŝedge = O(ŝ), and LC is defined as follows:\n#\n\"\nP\nedge\n+\nζ\ns\n2 i ŝedge\n, (12)\nLC = Ex 1 − P edge i Pi edge\n)2 + i (si )2 + ζ\ni (ŝi\nwhere ζ is a smoothing factor to prevent division by zero. i\nindicates the i-th query image in the training data.\nThe cosine similarity matching strategy reduces false\npositives in the segmentation result, while the structural\nalignment enhances boundary fidelity. Minimizing LC\nleads to the final segmentation map ŝ becomes reliable in\nterms of content and structure.\n\nwhere ŝ is the final segmentation map, s is the ground truth,\nγ is the focus factor used to adjust the weight of difficult and\neasy samples. In the above equation, α is the balance factor\nused to adjust the influence between positive and negative\nsamples. We also employ LDice to directly optimize the\nspatial overlap of the segmentation\nP masks as follows:\n2 i sˆi si + ζ\n],\n(16)\nLDice = Ex [1 − P 2 P 2\ni sˆi +\ni si + ζ\nwhere ζ is a very small number used to prevent the denominator from being zero.\nBy integrating the above loss functions, the optimization\nformulation of our proposed model is expressed as follows.\nmin LCE + LF ocal + LDice + βLC ,\n(17)\n\n3.4. Model Optimization\n\nwhere Θ represents all the trainable parameters in our\nmodel, β is the weighting factor for LC . It is worth noting that we train all the trainable components from scratch.\n\nImage classification via global-local prediction fusion. To perform image-level binary classification (normal/anomaly), our model combines global information derived from class tokens with local cues from the segmentation map.\nAnalogous to Eq. (4), the class token fcls is compared\nwith the learned prompt embeddings fc to obtain an initial\nglobal anomaly score. Additionally, a reconstruction module, logically identical to the one in Sec. 3.2, takes the class\n′\ntoken gcls and its reference ḡcls\nas input to produce a recon′′\n′′\nstructed token gcls . The residual, ηrec = ||gcls − gcls\n||1 ,\ncaptures the deviation of the global features from the normal prototype and is fed into a lightweight adapter network C to generate the final global classification score,\nŷglobal = C(ηrec ).\nOn the other hand, the model extracts local criteria directly from the final segmentation map, ŝ. We design another lightweight network, κ(·), which takes the segmentation map ŝ as input and predicts a sampling percentage,\np = κ(ŝ), and we select the top-p% of pixels from ŝ. The\nmean value of these pixel scores constitutes the classification score ŷlocal based on local cues. The final image-level\nclassification result is a weighted fusion of the global and\nlocal scores as follows:\n\nΘ\n\nŷ = ŷglobal + µŷlocal ,\n\n4. Experiments\nWe conduct comprehensive experiments on MVTec AD [2]\nand VisA [48] to evaluate the performance of our proposed\nframework. We begin by detailing the datasets, competitive\nmethods, and implementation details. Subsequently, We\npresent and analyze the main quantitative and qualitative\nresults. Finally, a series of ablation studies are presented to\ninvestigate the contributions of individual components.\n\n4.1. Experimental Settings\n\n(13)\n\nDatasets. We evaluated the effectiveness of DCP-SFR on\ntwo public industrial datasets: MVTec AD and VisA, which\ncontain non-overlapping object categories and distinct defect types. The datasets comprise images representing 27\ncategories of industrial products, such as candle, bottle, zipper, pill and printed circuit board (PCB). Both datasets provide high-resolution images with pixel-level annotations of\ncommon objects, which are 7002 to 10242 for MVTec AD\nand about 1500 ∗ 1000 for VisA.\nEvaluation metrics and comparison methods. We\nevaluate the performance of methods on both image-level\nclassification and pixel-level segmentation tasks. For classification, the metrics are the image-level Area Under the Receiver Operating Characteristic curve (i-AUROC), the Area\nUnder the Precision-Recall curve (i-AUPR), and the maximum F1-score (i-F1-max). For segmentation, we report\nthe pixel-wise AUROC (p-AUROC), the Per-Region Overlap score (p-PRO) [3], the pixel-wise maximum F1-score\n(p-F1-max), and the pixel-level Average Precision (p-AP).\nWe conduct a comparative analysis against representative\nFSAD methods: WinCLIP [18], APRIL-GAN [5], AnomalyGPT [14], PromptAD [25], InCTRL [46], and AnomalyDINO [8]. For a fair comparison, the competing methods\nare implemented using the publicly available source codes.\nImplementation details. DCP-SFR is implemented in\n\nwhere µ is weighting factor and ŷ represents the predicted\nlabel. In the process of model training, we establish clear\nobjectives tailored to anomaly classification, and the crossentropy loss function LCE is defined as follows:\nLCE = Ex [−(y log(ŷ) + (1 − y) log(1 − ŷ))],\n(14)\nwhere y represents the ground truth label.\nAnomaly Segmentation. Anomaly areas are typically\nmuch smaller than normal areas and we thus adopt a combination of focal loss function LF ocal [27] and dice Loss\nfunction LDice [24] to optimize the model as follows:\nLF ocal =Ex [−α(1 − ŝ)γ (s log(ŝ)\n(15)\n+ (1 − α)ŝγ (1 − s) log(1 − ŝ))],\n\n35612\n\n\fTable 1. Quantitative comparison between DCP-SFR and the competing methods on industrial datasets. Boldface indicates the best results\nand underline indicates suboptimal results.\nSetup\n\nMethod\n\nPublic\n\ni-AUROC\n\nMVTec AD\nClassification\ni-AUPR\n\ni-F1-max\n\np-AUROC\n\nMVTec AD\nSegmentation\np-PRO\n\np-F1-max\n\np-AP\n\ni-AUROC\n\nVisA\nClassification\ni-AUPR\n\ni-F1-max\n\np-AUROC\n\nVisA\nSegmentation\np-PRO\n\np-F1-max\n\np-AP\n\n1-shot\n\nWinCLIP+\nAPRIL-GAN\nAnomalyGPT\nPromptAD\nInCTRL\nAnomalyDINO\nDCP-SFR\n\nCVPR’2023\nCVPR’2023\nAAAI’2024\nCVPR’2024\nCVPR’2024\nWACV’2025\n-\n\n93.1\n92.0\n94.1\n94.6\n94.1\n96.6\n97.3\n\n96.5\n95.8\n93.7\n96.1\n96.9\n98.2\n98.8\n\n93.7\n92.4\n92.5\n94.2\n94.0\n95.8\n96.7\n\n95.2\n95.1\n95.3\n95.9\n96.8\n96.9\n\n87.1\n90.6\n86.9\n90.1\n92.7\n92.7\n\n55.9\n54.2\n50.8\n56.0\n60.2\n60.7\n\n47.3\n51.8\n47.5\n53.9\n56.5\n61.2\n\n83.8\n91.2\n87.4\n86.9\n86.6\n87.4\n92.0\n\n85.1\n93.3\n80.0\n86.9\n87.4\n89.0\n93.7\n\n83.1\n86.9\n80.2\n81.4\n84.4\n84.3\n87.8\n\n96.4\n96.0\n96.2\n96.7\n97.8\n98.2\n\n85.1\n90.0\n88.6\n91.5\n92.5\n93.3\n\n41.3\n38.5\n37.7\n40.7\n45.1\n44.9\n\n33.0\n30.9\n29.1\n33.1\n40.1\n40.4\n\n2-shot\n\nWinCLIP+\nAPRIL-GAN\nAnomalyGPT\nPromptAD\nInCTRL\nAnomalyDINO\nDCP-SFR\n\nCVPR’2023\nCVPR’2023\nAAAI’2024\nCVPR’2024\nCVPR’2024\nWACV’2025\n-\n\n94.4\n92.4\n95.5\n95.7\n95.1\n96.9\n97.7\n\n97.0\n96.0\n94.9\n96.3\n97.8\n98.2\n98.9\n\n94.4\n92.6\n92.8\n94.1\n94.8\n96.1\n97.0\n\n96.0\n95.5\n95.6\n96.2\n97.0\n97.1\n\n88.4\n91.3\n88.1\n90.3\n93.1\n93.3\n\n58.4\n55.9\n53.1\n56.4\n61.0\n61.6\n\n49.3\n53.4\n49.2\n55.0\n61.1\n61.7\n\n84.6\n92.2\n88.6\n88.3\n88.0\n89.7\n92.5\n\n85.8\n94.2\n82.1\n87.5\n88.6\n90.7\n94.2\n\n83.0\n87.7\n83.4\n82.9\n86.0\n86.3\n88.0\n\n96.8\n96.2\n96.4\n97.1\n98.0\n98.4\n\n86.2\n90.1\n89.9\n91.8\n93.4\n93.8\n\n43.5\n39.3\n37.8\n40.7\n46.6\n46.9\n\n34.6\n31.6\n29.0\n34.2\n40.3\n40.6\n\n4-shot\n\nWinCLIP+\nAPRIL-GAN\nAnomalyGPT\nPromptAD\nInCTRL\nAnomalyDINO\nDCP-SFR\n\nCVPR’2023\nCVPR’2023\nAAAI’2024\nCVPR’2024\nCVPR’2024\nWACV’2025\n-\n\n95.2\n92.8\n96.3\n96.6\n95.1\n97.7\n98.0\n\n97.3\n96.3\n95.1\n96.5\n97.6\n98.7\n98.9\n\n94.7\n92.8\n92.9\n94.2\n95.1\n96.6\n96.8\n\n96.2\n95.9\n96.2\n96.5\n97.2\n97.5\n\n89.0\n91.8\n88.5\n90.3\n93.4\n93.5\n\n59.5\n56.9\n54.9\n56.6\n61.8\n61.9\n\n50.7\n54.5\n51.1\n55.3\n61.5\n61.8\n\n87.3\n92.6\n90.6\n89.1\n89.3\n92.6\n92.8\n\n88.8\n94.5\n82.6\n87.8\n90.4\n92.9\n94.7\n\n84.2\n88.4\n83.7\n83.6\n86.4\n88.8\n88.9\n\n97.2\n96.2\n96.7\n97.4\n98.2\n98.6\n\n87.6\n90.2\n90.4\n91.8\n94.1\n94.2\n\n47.0\n40.0\n38.4\n40.9\n46.4\n47.1\n\n34.9\n32.2\n30.8\n34.4\n40.5\n40.6\n\nClass\n/Anomaly\n\nInput\n\nWinCLIP+\n\nAPRIL-GAN\n\nAnomalyGPT\n\nPromptAD\n\nAnomalyDINO\n\nDCP-SFR\n\nGround Truth\n\nCapsule\n/faulty_imprint\n\nHazelnut\n/hole\n\nPill\n/contamination\n\nFigure 3. Qualitative comparison of segmentation results between DCP-SFR and the competing methods. The results demonstrate that\nDCP-SFR accurately detects minor anomalies, minimizes background false positives, and preserves sharp segmentation edges.\n\nPyTorch and trained on a single NVIDIA GeForce RTX\n3090. We employ the ViT-L/14@336px variant of the CLIP\nmodel and the DINOv2 as backbones, both of which remain\nfrozen during training. The length of the learnable prompt\nvectors is set to 12, following AnomalyCLIP. The model\nis trained for 25 epochs using a batch size of 8. We use\nthe Adam optimizer [19] with a learning rate of 0.01. The\nweighting factors are set as follows: λ in Eq. (11) is 1.0, µ\nin Eq. (13) is 2.0, α in Eq. (15) is 0.9, and β in Eq. (17) is\n2.0. We find that our model converges effectively without\nheavy tuning. For the cross-domain evaluation, we train the\nmodels on MVTec AD and test on VisA, and vice versa.\n\nrobustness with extremely limited references. As the number of reference images increases, the performance of DCPSFR steadily improves, while at the same time achieving\nstate-of-the-art results across the board. Notably, in the\nVisA segmentation task, the F1-max score of DCP-SFR\ndramatically increases from a suboptimal 44.9% in the 1shot setting to a state-of-the-art 47.1% in the 4-shot setting.\nThe results demonstrate that DCP-SFR is able to effectively\nleverage the reference data, leading to a more precise and\nreliable final segmentation.\n\n4.2. Quantitative Comparison\n\nWe visualize the segmentation outputs of competing methods on representative samples, and Figure 3 clearly demonstrates the superior capability of DCP-SFR in handling diverse and subtle defect types. In the ‘Capsule’ case, either\nAnomalyGPT and PromptAD either produce diffuse, noisy\nheatmaps or fail to capture the full extent of the faint imprint\ndefect. In contrast, DCP-SFR is able to generate a clean and\nprecise result that closely matches the ground truth. Similarly, for the ‘Hazelnut’ example, WinCLIP+ and Promp-\n\nWe conducted experiments across 1-, 2-, and 4-shot settings. As shown in Table 1, DCP-SFR demonstrates almost consistent superiority across all evaluated scenarios on\nboth datasets. Even in the challenging 1-shot setting, DCPSFR maintains exceptional performance. On the MVTec\nAD segmentation task, our model surpasses AnomalyDINO\nby about 5 points in terms of AP, showcasing our model’s\n\n4.3. Qualitative Comparison\n\n35613\n\n\f𝓛𝑭𝒐𝒄𝒂𝒍 + 𝓛𝑫𝒊𝒄𝒆\n\nPerformance Gain\n\n5\n4.5\n\nPrompt-guided Anomaly Amplification\nMask-guided Localization\nStructure-Aware Segmentation Refinement\n\n4\n3.5\n\n7\n\n6\n\n3\n\n5\n\n2.5\n\n4\n\n2\n\nDCP-SFR\nDCP-SFR w/o SSR\n\n8\n\n3\n\n1.5\n\n2\n\n1\n\n1\n\n0.5\n0\ni-AUROC\n\ni-AUPR\n\ni-F1-max\n\np-AUROC\n\np-PRO\n\np-F1-max\n\n0\n\np-AP\n\n1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30\n\nMetric\n\nEpoch\n\nFigure 4. Performance gains from proposed modules.\nInput\n\nInput features\nof CACA\n\nOutput features\nof CACA\n\nFigure 7. The impact of SSR on the training dynamic.\n\nGround Truth\n\nFigure 5. Visualization of CACA input and output features. The\nresults show that CACA effectively amplifies of subtle anomalies\n(row 1) and suppresses of background noise (row 2).\n\nby disabling one module at a time: ‘DCP-SFR w/o CACA’,\n‘DCP-SFR w/o ACL’ and ‘DCP-SFR w/o SSR’. The results\nare summarized in Table 2 and visualized in Figure 4.\nRemoving CACA leads to a significant degradation in\nsegmentation performance. As shown in Table 2, the p-F1max score drops sharply from 44.6% to 43.2%, indicating\nthat without initial cue amplification, the model struggles\nwith small or low-contrast anomalies, and this can be visually confirmed in Figure 5. The absence of ACL results\nin the most substantial performance drop, with the p-AP\nscore decreasing from 39.9% to 37.7%. The results highlight the ACL’s crucial role in accurate anomaly localization\nand background suppression. The PCA projections in Figure 6 further reveals that while the pre-localization features\nof normal and anomaly samples are heavily mixed, the postlocalization features show a distinct separation: normal features collapse into a tight cluster near the origin, while\nanomaly features remain scattered, evidencing the powerful capability of ACL in learning a discriminative feature\nspace. Disabling SSR also causes a notable decline in segmentation performance, with the p-AUROC score falling\nfrom 98.2% to 97.1%. The impact of SSR on the training\ndynamic is illustrated in Figure 7, and we can observe that\nthe full model only converges to a better solution but also\nexhibits a faster convergence speed.\n\nInput features of anomaly images\nInput features of normal images\n\nOutput features of anomaly images\nOutput features of normal images\n\nFigure 6. PCA visualization of ACL input and output features.\n\ntAD tend to produce overly large and unfocused activation\nareas around the small hole, while our method provides a\ncompact and accurately bounded heatmap. Finally, in the\ncomplex ‘Pill’ case with multiple small defects, DCP-SFR\nsuccessfully identifies all distinct contaminated spots with\nsharp boundaries, whereas other methods often merge them\ninto a single, blurry region or miss some of them. The results demonstrate the superior capability of DCP-SFR in\nproducing precise segmentation maps with sharp boundaries, underscoring the effectiveness of our proposed defect\ncue-preservation and refinement strategies.\n\n5. Conclusion\n\nTable 2. Ablation study on the VisA under the 1-shot setting.\n\nWe presented DCP-SFR, a few-shot anomaly detection\nframework to address the issue of defect cue fading in deep\nfeature extraction. By incorporating a conditional amplification module, the defect cues are enhanced in the initial\nsignals derived from learnable prompts. Built on the defect cues, a reconstruction-based localization module is employed to further distinguish anomalous regions from normal ones. By performing a structure-aware segmentation\nrefinement, DCP-SFR outperforms state-of-the-art methods\nin the subtasks of image classification and anomaly segmentation. Extensive experiments demonstrate the model’s generalization capabilities across diverse object categories and\nanomaly types, confirming its potential as a scalable and\nflexible solution for diverse few-shot learning tasks.\n\nDCP-SFR\nw/o SSR\nw/o ACL\nw/o CACA\n\ni-AUROC\n\nVisA\nClassification\ni-AUPR\n\ni-F1-max\n\np-AUROC\n\nVisA\nSegmentation\np-PRO\n\np-F1-max\n\np-AP\n\n92.0\n91.1\n89.7\n91.5\n\n93.7\n93.1\n92.3\n93.2\n\n87.8\n87.3\n86.8\n87.2\n\n98.2\n97.1\n96.7\n97.4\n\n93.3\n91.7\n91.2\n92.5\n\n44.6\n41.0\n41.3\n43.2\n\n39.9\n35.0\n37.7\n39.0\n\n4.4. Ablation Study\nTo validate the contribution of core components in DCPSFR, we conduct a series of ablation studies on the VisA\ndataset under the 1-shot setting. We create three variants\n\n35614\n\n\fAcknowledgement\nThis work was supported in part by TCL Science and\nTechnology Innovation Fund (Project No. 20231752),\nin part by the National Key Research and Development\nProgram of China (Grant No. 2024YFE0105400), in\npart by National Natural Science Foundation of China\n(Grants No. 62372186 and No. 62472179), in part by\nthe Research Grants Council of the Hong Kong Special\nAdministration Region (Project No. CityU 11206622),\nin part by the Guangdong Provincial Science and Technology Program (Project No.2025A050508003 and No.\n2025A0505020016),in part by the GuangDong Basic\nand Applied Basic Research Foundation (Project No.\n2024A1515011437), in part by State Key Laboratory of\nAdvanced Papermaking and Paper-based Materials (Project\nNo. 2025PT09 and No. 2024ZD08).\n\n[9] Thomas Defard, Aleksandr Setkov, Angelique Loesch, and\nRomaric Audigier. Padim: A patch distribution modeling\nframework for anomaly detection and localization. In International Conference on Pattern Recognition International,\n2021. 3\n[10] Chenghao Deng, Haote Xu, Xiaolu Chen, Haodi Xu, Xiaotong Tu, Xinghao Ding, and Yue Huang. Simclip: Refining\nimage-text alignment with simple prompts for zero-/few-shot\nanomaly detection. In Proceedings of ACM International\nConference on Multimedia, 2024. 3\n[11] Eleazar Eskin, Andrew Arnold, Michael Prerau, Leonid\nPortnoy, and Sal Stolfo. A Geometric Framework for Unsupervised Anomaly Detection: Detecting Intrusions in Unlabeled Data. 2002. 3\n[12] Sepideh Esmaeilpour, Bing Liu, Eric Robertson, and Lei\nShu. Zero-shot out-of-distribution detection based on the\npre-trained model clip. In Proceedings of the AAAI Conference on Artificial Intelligence, 2022. 1\n[13] Zheng Fang, Xiaoyang Wang, Haocheng Li, Jiejie Liu, Qiugui Hu, and Jimin Xiao. Fastrecon: Few-shot industrial anomaly detection via fast feature reconstruction. In\nIEEE/CVF International Conference on Computer Vision,\n2023. 1, 2\n[14] Zhaopeng Gu, Bingke Zhu, Guibo Zhu, Yingying Chen,\nMing Tang, and Jinqiao Wang. Anomalygpt: detecting industrial anomalies using large vision-language models. In\nProceedings of the AAAI Conference on Artificial Intelligence, 2024. 2, 3, 6\n[15] Denis Gudovskiy, Shun Ishizaka, and Kazuki Kozuka.\nCflow-ad: Real-time unsupervised anomaly detection with\nlocalization via conditional normalizing flows. In IEEE/CVF\nWinter Conference on Applications of Computer Vision,\n2022. 1\n[16] Teng Hu, Jiangning Zhang, Ran Yi, Yuzhen Du, Xu Chen,\nLiang Liu, and Yabiao Wang et al. Anomalydiffusion: Fewshot anomaly image generation with diffusion model. In\nAAAI Conference on Artificial Intelligence, 2023. 1, 2\n[17] Chaoqin Huang, Haoyan Guan, Aofan Jiang, Ya Zhang,\nMichael W. Spratling, and Yanfeng Wang. Registration\nbased few-shot anomaly detection. European Conference on\nComputer Vision, 2022. 1, 2, 3\n[18] Jongheon Jeong, Yang Zou, Taewan Kim, Dongqing Zhang,\nAvinash Ravichandran, and Onkar Dabeer. Winclip: Zero/few-shot anomaly classification and segmentation. In\nIEEE/CVF Conference on Computer Vision and Pattern\nRecognition, 2023. 2, 3, 6\n[19] Diederik P. Kingma and Jimmy Ba. Adam: A method\nfor stochastic optimization. arXiv e-prints, abs/1412.6980,\n2014. 7\n[20] Alexander Kirillov, Eric Mintun, Nikhila Ravi, Hanzi Mao,\nChloe Rolland, Laura Gustafson, Tete Xiao, Spencer Whitehead, Alexander C. Berg, Wan-Yen Lo, Piotr Dollár, and\nRoss Girshick. Segment anything. In IEEE/CVF International Conference on Computer Vision, 2023. 3\n[21] Sungwook Lee, Seunghyun Lee, and Byung Cheol Song.\nCfa: Coupled-hypersphere-based feature adaptation for\ntarget-oriented anomaly localization. IEEE Access, 10:\n78446–78454, 2022. 1\n\nReferences\n[1] Toshimichi Aota, Lloyd Teh Tzer Tong, and Takayuki\nOkatani. Zero-shot versus many-shot: Unsupervised texture\nanomaly detection. In IEEE/CVF Winter Conference on Applications of Computer Vision, 2023. 1\n[2] Paul Bergmann, Michael Fauser, David Sattlegger, and\nCarsten Steger. Mvtec ad — a comprehensive real-world\ndataset for unsupervised anomaly detection. In IEEE/CVF\nConference on Computer Vision and Pattern Recognition,\n2019. 6\n[3] Paul Bergmann, Michael Fauser, David Sattlegger, and\nCarsten Steger. Uninformed students: Student-teacher\nanomaly detection with discriminative latent embeddings.\nIn IEEE/CVF Conference on Computer Vision and Pattern\nRecognition, 2020. 6\n[4] Yunkang Cao, Jiangning Zhang, Luca Frittoli, Yuqi Cheng,\nWeiming Shen, and Giacomo Boracchi. Adaclip: Adapting\nclip with hybrid learnable prompts for zero-shot anomaly detection. In European Conference on Computer Vision, 2024.\n1\n[5] Xuhai Chen, Yue Han, and Jiangning Zhang. April-gan:\nA zero-/few-shot anomaly classification and segmentation\nmethod for cvpr 2023 vand workshop challenge tracks 12:\n1st place on zero-shot ad and 4th place on few-shot ad. arXiv\ne-prints, abs/2305.17382, 2023. 3, 6\n[6] Xuhai Chen, Jiangning Zhang, Guanzhong Tian, Haoyang\nHe, Wuhao Zhang, Yabiao Wang, Chengjie Wang, and\nYong Liu. Clip-ad: A language-guided staged dual-path\nmodel for zero-shot anomaly detection. arXiv e-prints,\nabs/2311.00453, 2023. 1\n[7] Niv Cohen and Yedid Hoshen. Sub-image anomaly detection with deep pyramid correspondences. arXiv e-prints,\nabs/2005.02357, 2020. 3\n[8] Simon Damm, Mike Laszkiewicz, Johannes Lederer, and\nAsja Fischer. Anomalydino: Boosting patch-based few-shot\nanomaly detection with dinov2. In IEEE/CVF Winter Conference on Applications of Computer Vision, 2025. 2, 3, 6\n\n35615\n\n\f[22] Jiarui Lei, Xiaobo Hu, Yue Wang, and Dong Liu. Pyramidflow: High-resolution defect contrastive localization using pyramid normalizing flow. In IEEE/CVF Conference on\nComputer Vision and Pattern Recognition, 2023. 1\n[23] Aodong Li, Chen Qiu, Marius Kloft, Padhraic Smyth, Maja\nRudolph, and Stephan Mandt. Zero-shot anomaly detection\nvia batch normalization. In Advances in Neural Information\nProcessing Systems, 2023. 1\n[24] Xiaoya Li, Xiaofei Sun, Yuxian Meng, Junjun Liang, Fei\nWu, and Jiwei Li. Dice loss for data-imbalanced nlp tasks.\narXiv e-prints, abs/1911.02855, 2019. 6\n[25] Xiaofan Li, Zhizhong Zhang, Xin Tan, Chengwei Chen, and\nYanyun Qu et al. Promptad: Learning prompts with only normal samples for few-shot anomaly detection. In IEEE/CVF\nConference on Computer Vision and Pattern Recognition,\n2024. 3, 6\n[26] Yiyue Li, Shaoting Zhang, Kang Li, and Qicheng Lao. Oneto-normal: Anomaly personalization for few-shot anomaly\ndetection. In Advances in Neural Information Processing\nSystems, 2024. 3\n[27] Tsung-Yi Lin, Priya Goyal, Ross Girshick, Kaiming He, and\nPiotr Dollár. Focal loss for dense object detection. In IEEE\nInternational Conference on Computer Vision, 2017. 6\n[28] Philipp Liznerski, Lukas Ruff, Robert A. Vandermeulen,\nBilly Joe Franks, and Klaus-Robert Müller et al. Exposing\noutlier exposure: What can be learned from few, one, and\nzero outlier images. Transactions on Machine Learning Research, 2022. 1\n[29] Wei Luo, Yunkang Cao, Haiming Yao, Xiaotian Zhang,\nJianan Lou, Yuqi Cheng, Weiming Shen, and Wenyong Yu.\nExploring intrinsic normal prototypes within a single image\nfor universal anomaly detection. In IEEE/CVF Conference\non Computer Vision and Pattern Recognition, 2025. 3\n[30] Shancong Mou, Xiaoyi Gu, Meng Cao, Haoping Bai, Ping\nHuang, Jiulong Shan, and Jianjun Shi. Rgi: Robust ganinversion for mask-free image inpainting and unsupervised\npixel-wise anomaly detection. In International Conference\non Learning Representations, 2023. 1\n[31] Maxime Oquab, Timothée Darcet, Théo Moutakanni,\nHuy Q. Vo, Marc Szafraniec, Vasil Khalidov, Pierre Fernandez, Daniel Haziza, Francisco Massa, and Alaaeldin ElNouby et al. Dinov2: Learning robust visual features without\nsupervision. arXiv e-prints, abs/2304.07193, 2023. 2, 3\n[32] Jonathan Pirnay and Keng Yip Chai. Inpainting transformer\nfor anomaly detection. In International Conference on Image\nAnalysis and Processing, 2021. 1\n[33] Alec Radford, Jong Wook Kim, Chris Hallacy, Aditya\nRamesh, and Gabriel Goh et al. Learning transferable visual\nmodels from natural language supervision. In International\nConference on Machine Learning, 2021. 2, 3\n[34] Karsten Roth, Latha Pemula, Joaquin Zepeda, Bernhard\nScholkopf, Thomas Brox, and Peter Gehler. Towards total\nrecall in industrial anomaly detection. IEEE/CVF Conference on Computer Vision and Pattern Recognition, 2022. 2,\n3\n[35] Han Sun, Yunkang Cao, Hao Dong, and Olga Fink. Anomaly\nanything: Promptable unseen visual anomaly generation. In\n\n35616\n\nIEEE/CVF Computer Vision and Pattem Recognition Conference, 2025. 1, 2\n[36] Ze Wang, Yipin Zhou, Rui Wang, Tsung-Yu Lin, Ashish\nShah, and Ser-Nam Lim. Few-shot fast-adaptive anomaly\ndetection. In Proceedings of the 36th International Conference on Neural Information Processing Systems, 2022. 2\n[37] Julian Wyatt, Adam Leach, Sebastian M. Schmon, and\nChris G. Willcocks. Anoddpm: Anomaly detection with denoising diffusion probabilistic models using simplex noise.\nIn IEEE/CVF Conference on Computer Vision and Pattern\nRecognition Workshops, 2022. 1\n[38] Guoyang Xie, Jingbao Wang, Jiaqi Liu, Feng Zheng, and\nYaochu Jin. Pushing the limits of fewshot anomaly detection\nin industry vision: Graphcore. In The International Conference on Learning Representations, 2023. 3\n[39] Xudong Yan, Huaidong Zhang, Xuemiao Xu, Xiaowei Hu,\nand Pheng-Ann Heng. Learning semantic context from normal samples for unsupervised anomaly detection. In AAAI\nConference on Artificial Intelligence, 2021. 1\n[40] Jihun Yi and Sungroh Yoon. Patch svdd: Patch-level svdd\nfor anomaly detection and segmentation. In Proceedings of\nthe Asian Conference on Computer Vision, 2020. 1\n[41] Zhiyuan You, Lei Cui, Yujun Shen, Kai Yang, Xin Lu,\nYu Zheng, and Xinyi Le. A unified model for multi-class\nanomaly detection. The Thirty-Ninth Annual Conference on\nNeural Information Processing Systems, 2022. 2\n[42] Vitjan Zavrtanik, Matej Kristan, and Danijel Skoaj. Draem –\na discriminatively trained reconstruction embedding for surface anomaly detection. In IEEE/CVF International Conference on Computer Vision, 2021. 2\n[43] Vitjan Zavrtanik, Matej Kristan, and Danijel Skočaj. Reconstruction by inpainting for visual anomaly detection. Pattern\nRecognition, 112:107706, 2021. 1\n[44] Jinjin Zhang, Guodong Wang, Yizhou Jin, and Di Huang.\nTowards training-free anomaly detection with vision and language foundation models. In IEEE/CVF Conference on\nComputer Vision and Pattern Recognition, 2025. 3\n[45] Bingke Zhu, Zhaopeng Gu, Guibo Zhu, Yingying Chen,\nMing Tang, and Jinqiao Wang. Adformer: Generalizable\nfew-shot anomaly detection with dual cnn-transformer architecture. IEEE Transactions on Instrumentation and Measurement, 74:1–16, 2025. 3\n[46] Jiawen Zhu and Guansong Pang. Toward generalist anomaly\ndetection via in-context residual learning with few-shot sample prompts. In IEEE/CVF Conference on Computer Vision\nand Pattern Recognition, 2024. 3, 6\n[47] Jiawen Zhu, Yew Soon Ong, Chunhua Shen, and Guansong\nPang. Fine-grained abnormality prompt learning for zeroshot anomaly detection. In IEEE/CVF International Conference on Computer Vision, 2025. 1\n[48] Yang Zou, Jongheon Jeong, Latha Pemula, Dongqing Zhang,\nand Onkar Dabeer. Spot-the-difference self-supervised pretraining for anomaly detection and segmentation. In European Conference on Computer Vision, 2022. 1, 2, 6\n\n\f</code></pre></article>\n        \n</main>\n\n<script src=\"https://cdn.jsdelivr.net/npm/katex@0.16.8/dist/katex.min.js\"></script>\n<script src=\"https://cdn.jsdelivr.net/npm/katex@0.16.8/dist/contrib/auto-render.min.js\"></script>\n<script>\n\nfunction initTheme() {\n  const saved = localStorage.getItem('kb-theme') || 'light';\n  document.documentElement.setAttribute('data-theme', saved);\n  updateThemeIcon(saved);\n}\nfunction toggleTheme() {\n  const cur = document.documentElement.getAttribute('data-theme') || 'light';\n  const next = cur === 'light' ? 'dark' : 'light';\n  document.documentElement.setAttribute('data-theme', next);\n  localStorage.setItem('kb-theme', next);\n  updateThemeIcon(next);\n}\nfunction updateThemeIcon(t) {\n  const btn = document.getElementById('theme-toggle-btn');\n  if (btn) btn.innerHTML = t === 'dark' ? '☀️' : '🌙';\n}\ndocument.addEventListener('DOMContentLoaded', initTheme);\n\nfunction setViewMode(m) {\n  const grid = document.getElementById('bento-grid-view');\n  const list = document.getElementById('list-table-view');\n  const bGrid = document.getElementById('view-grid-btn');\n  const bList = document.getElementById('view-list-btn');\n  if (m === 'list') {\n    if (grid) grid.style.display = 'none';\n    if (list) list.style.display = 'flex';\n    if (bGrid) bGrid.classList.remove('active');\n    if (bList) bList.classList.add('active');\n  } else {\n    if (grid) grid.style.display = 'grid';\n    if (list) list.style.display = 'none';\n    if (bGrid) bGrid.classList.add('active');\n    if (bList) bList.classList.remove('active');\n  }\n  localStorage.setItem('kb-view', m);\n}\ndocument.addEventListener('DOMContentLoaded', () => {\n  const s = localStorage.getItem('kb-view') || 'grid';\n  setViewMode(s);\n});\n\ndocument.addEventListener('DOMContentLoaded', () => {\n  document.querySelectorAll('pre').forEach(pre => {\n    const b = document.createElement('button');\n    b.className = 'copy-code-btn';\n    b.innerText = 'Copy';\n    b.onclick = () => {\n      const c = pre.querySelector('code') ? pre.querySelector('code').innerText : pre.innerText;\n      navigator.clipboard.writeText(c).then(() => {\n        b.innerText = 'Copied!';\n        setTimeout(() => { b.innerText = 'Copy'; }, 2000);\n      });\n    };\n    pre.appendChild(b);\n  });\n});\n\nwindow.addEventListener('keydown', (e) => {\n  if ((e.key === '/' || (e.metaKey && e.key === 'k')) && document.activeElement.tagName !== 'INPUT' && document.activeElement.tagName !== 'TEXTAREA') {\n    e.preventDefault();\n    const q = document.getElementById('global-search-input');\n    if (q) q.focus();\n  }\n});\n\n// Scrollspy for TOC\nwindow.addEventListener('scroll', () => {\n  const headers = document.querySelectorAll('.article-body h1, .article-body h2, .article-body h3');\n  const scrollPos = window.scrollY + 100;\n  headers.forEach(h => {\n    if (h.offsetTop <= scrollPos) {\n      const id = h.getAttribute('id');\n      if (id) {\n        document.querySelectorAll('.reading-sidebar a').forEach(a => {\n          a.classList.toggle('active', a.getAttribute('href') === '#' + id);\n        });\n      }\n    }\n  });\n});\n\ndocument.addEventListener(\"DOMContentLoaded\", function() {\n  if (window.renderMathInElement) {\n    renderMathInElement(document.body, {\n      delimiters: [\n        {left: '$$', right: '$$', display: true},\n        {left: '$', right: '$', display: false},\n      ],\n      throwOnError : false\n    });\n  }\n});\n</script>\n\n</body>\n</html>\n"