"<!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>Defect Spectrum: A Granular Look of Large-Scale\nDefect Datasets with Rich Semantics\nShuai Yang1,2⋆ , Zhifei Chen1⋆ , Pengguang Chen3 , Xi Fang3 , Yixun Liang1 , Shu\nLiu3 , and Yingcong Chen1,2,4\n\narXiv:2310.17316v5 [cs.CV] 19 Jul 2024\n\n1\n\nHong Kong University of Science and Technology, Guangzhou\n2\nHKUST(GZ) - SmartMore Joint Lab\n3\nSmartMore. Corp\n4\nHong Kong University of Science and Technology\n\nAbstract. Defect inspection is paramount within the closed-loop manufacturing system. However, existing datasets for defect inspection often lack the precision and semantic granularity required for practical\napplications. In this paper, we introduce the Defect Spectrum, a comprehensive benchmark that offers precise, semantic-abundant, and\nlarge-scale annotations for a wide range of industrial defects. Building\non four key industrial benchmarks, our dataset refines existing annotations and introduces rich semantic details, distinguishing multiple defect\ntypes within a single image. With our dataset, we were able to achieve\nan increase of 10.74% in the Recall rate, and a decrease of 33.10%\nin the False Positive Rate (FPR) from the industrial simulation experiment. Furthermore, we introduce Defect-Gen, a two-stage diffusion-based\ngenerator designed to create high-quality and diverse defective images,\neven when working with limited defective data. The synthetic images\ngenerated by Defect-Gen significantly enhance the performance of defect\nsegmentation models, achieving an improvement in mIoU scores up to\n9.85 on Defect-Spectrum subsets. Overall, The Defect Spectrum dataset\ndemonstrates its potential in defect inspection research, offering a solid\nplatform for testing and refining advanced models. Our project page is\nin https://envision-research.github.io/Defect_Spectrum/.\n\n1\n\nIntroduction\n\nIndustrial manufacturing is a cornerstone of modern society. In an environment\nwhere minute imperfections can result in significant failures, ensuring top-tier\nquality is imperative. Manufacturing predominantly relies on a closed-loop system, encompassing production, defect inspection, filtering, and analysis, as illustrated in Figure 1.\nWithin this system, defect inspection plays a pivotal role, interfacing with\nmost stages and ultimately determining product quality. Striking the right balance between identifying defective items and acknowledging sub-optimal ones,\n⋆\n\nThese authors contributed equally to this work.\n\n\f2\n\nS. Yang, Z. Chen et al.\nDefect Inspection\n\nProduction\n\nAnalysis\nRework\n\n“Broken teeth”\n“Broken fabric”,\nArea&gt;4cm\n\n“Improve teeth”\n“Improve fabric”\n\n“Broken fabric”,\nArea&lt;1cm\n\n“Acceptable”\n\nNo defect\n\n“Good”\n\nProduction\nAcceptable\n\nGood\n\nDistribute\n\n“NG9”\n[no mask]\n\n“scratch”\n\nThe image shows a pill,\nspecifically a capsule, with\na white and red color.\nThere are many scratch\ndefects on the right part\nunder the “zeros”.\n\nOur\nannotation\n\nSource\nannotation\n\nImage\n\n(a) Manufacturing Loop\n\n(b) Precision\n\n(c) Semantic Abundance\n\nFig. 1: (a) Identifying the size, position, and type of defects is essential for quality\ncontrol, as it guides the post-processing of products. Major issues, such as misaligned\nzipper teeth, necessitate factory rework, whereas minor problems, like fabric snags,\ncan lead to different distribution strategies. This approach ensures the maintenance\nof product quality and enhances the distribution process. (b) Shows our annotation\nis finer, and includes those that are omitted in the source annotation. (c) Source annotation [1, 3, 46] ignores multiple defective classes within a single image, while ours\nprovides annotation for each distinct class, shown in different colors. Best viewed in\ncolor.\n\nbased on defect size, position, and type, becomes critical [42]. Taking the \"zipper\" defect as an illustrative case. A garment zipper where the teeth are misaligned, as depicted in Figure 1 (a). This type of defect, although it might seem\nminor in terms of size or visibility, critically impacts the garment’s functionality,\nnecessitating its return to the factory for correction. However, defects located on\nthe fabric, such as minor snags or slight color variations, require careful consideration of their size and impact. Small-scale fabric defects could be classified within\nan acceptable range, allowing for differentiated distribution strategies that might\ninclude selling these products at a discount, thereby maintaining product flow\nwithout compromising overall quality standards. Additionally, documenting the\ncategory and location of defects can pave the way for predictive maintenance\nand provide valuable insights for refining product repair processes [29].\nHowever, current datasets struggle to meet the intricate practical needs of\nindustrial defect inspection. One notable limitation is the insufficient granularity\nconcerning defect types and locations. For instance, anomaly detection datasets\n\n\fDefect Spectrum\n\n3\n\nlike MVTEC [3] and AeBAD [51] give pixel-level annotations but are restricted\nto binary masks. Meanwhile, datasets like VISION [1], though more detailed,\noccasionally miss or misclassify defect instances.\nTo address these gaps, we introduce the Defect Spectrum, aiming to offer\nsemantics-abundant, precise, and large-scale annotations for a broad spectrum of\nindustrial defects. This empowers practical defect inspection systems to furnish\na more thorough and precise analysis, bolstering automated workflows. Building\non four key industrial benchmarks, Defect Spectrum offers enhanced annotations\nthrough a rigorous labeling endeavor. We have re-evaluated and refined existing\ndefect annotations to ensure a holistic representation. For example, contours of\nsubtle defects, like scratches and pits, are carefully refined for better precision,\nand missing defects are carefully filled with the help of specialists. Beyond that,\nour dataset stands out by providing annotations with rich semantics details,\ndistinguishing multiple defect types even within a single image. Lastly, we have\nincorporated descriptive captions for each sample, aiming to integrate the use of\nVision Language Models (VLMs) in upcoming studies. During this endeavor, we\nemploy our innovative annotation tool, Defect-Click. It has largely accelerated\nour labeling process, emphasizing its utility and efficiency, ensuring meticulous\nlabeling even with the extensive scope of our dataset.\nAnother palpable challenge is the limited number of defective samples in\ndatasets. For instance, in DAGM, there are only 900 defective images. In MVTEC,\nalthough it has 5354 total images, the defectives among them are merely 1258.\nAnd even the extensive VISION dataset falls short in comparison to natural\nimage datasets like ImageNet [11] (1 million images) and ADE20k [53, 54] (20k\nimages). To address this, we harness the power of generative models, proposing\nthe “Defect-Gen”, a two-stage diffusion-based generator. Our generator exhibits\npromising performance in image diversity and quality even with a limited number of training data. We show that these generated data could largely boost the\nperformance of existing models in our Data Spectrum benchmark.\nTo summarize, our contributions are listed as follows.\n– We introduce the Defect Spectrum dataset, designed to enhance defect inspection with its semantics-abundant, precise, and large-scale annotations. Unlike existing datasets, we not only refine existing annotations for\na more holistic representation but also introduce rich semantics details. This\ndataset, building on four key industrial benchmarks, goes beyond binary\nmasks to provide more detailed and precise annotations.\n– We propose the Defect-Gen, a two-stage diffusion-based generator, to\ntackle the challenges associated with the limited availability of defective\nsamples in datasets. This generator is shown to boost the performance of\nexisting models, by enhancing image diversity and quality even with a limited\ntraining set.\n– We conducted a comprehensive evaluation on our Defect Spectrum dataset,\nhighlighting its versatility and application across various defect inspection\nchallenges. By doing so, we provide a foundation for researchers to evalu-\n\n\f4\n\nS. Yang, Z. Chen et al.\n\nate and develop state-of-the-art models tailored for the intricate needs of\nindustrial defect inspection.\n\n2\n\nRelated Work\n\nIndustrial Datasets There are several well-used datasets for Industrial Defect\nInspection: DAGM2007 [46], AITEX [36], AeBAD [51], BeanTech [27], CottonSFDG [20] and KoektorSDD [39] offer commonly seen images that cover a wide\narray of manufacturing materials; MVTEC [2, 3] is a dataset for benchmarking\nanomaly detection methods with a focus on industrial inspection; VISION V1\n[1] includes a collection of 14 industrial inspection datasets containing multiple\nobjects. A notable shortcoming in the aforementioned industrial datasets is they\noften lack specificity regarding the defect’s type or its precise location. Aiming\nto refine these issues, we introduce the Defect Spectrum datasets. Further details\nwill be explained in Section 3.\nDefect-mask Generation Defect inspection plays a vital role in various industries, including manufacturing, healthcare, and transportation. Previous attempts based on the traditional computer vision method [37] have proven to be\nrobust for detecting small defects, but they all suffer from detecting defects in\ntextures-rich patterns. In recent years, Convolutional Neural Networks(CNNs) [15,\n16, 28] based models are commonly used for defect inspection, but limited availability of real-world defect samples remains a challenge. To mitigate such datainsufficiency issue, traditional methods for synthesizing defect images manually\ndestroy normal samples [26] or adopt Computer-Aided Drawing (CAD) [19, 25].\nDeep learning-based approaches are generally effective, but they require large\namounts of data. GAN-based methods [14, 31, 45, 50] are adopted to perform\ndefect sample synthesis for data augmentation. DefectGAN adopts an encoderdecoder structure to synthesize defects by mimicking defacement and restoration\nprocesses. However, it is important to note that GAN-based methods typically\nrequire a substantial quantity of real defect data in order to achieve effective\nresults. Recent advancements in Diffusion models [12, 18, 30] demonstrated a\nsuperior performance in image generation. However, they tend to reproduce existing samples when trained with scarce data, leading to a lack of diversity. Stable\nDiffusion [32] is one of the most prevailing methods in this field. Nonetheless,\nit is not applicable to use a pre-trained stable diffusion model when generating\nmasks. Our proposed approach, on the other hand, is capable of generating defective image-mask pairs with both diversity and high quality, even when trained\non limited datasets.\n\n3\n\nDataset\n\n3.1\n\nDatasets Analysis\n\nIn Table 1, we present an analysis of the Defect Spectrum datasets in comparison\nwith other prevalent industrial datasets. Notably, the DAGM2007 and Cotton-\n\n\fDefect Spectrum\n\n5\n\nFabric datasets originally lacked pixel-wise labels, making them less suitable for\ndetailed defect inspection. While datasets like AITEX, AeBAD, BeanTech, and\nKoektorSDD offer defect masks, they only focus on a limited range of products,\noffering a restricted number of annotated images and defect categories.\nWhile some high-quality datasets offer a significant volume of images with\npixel-level annotations, they are not without their limitations. For instance, there\nare cases where MVTEC and VISION annotations either miss defects or provide\nimprecise, coarse labels, as illustrated in Figure 1(b). Additionally, these datasets\ncommonly merge various defect classes into a single homogeneous category. This\nshortcoming is particularly apparent in the “pill” and “capacitor” examples in\nFigure 1(c), where the original annotations provide only binary masks that do\nnot differentiate between defects such as “scratch”, “crack”, and “color point”. This\napproach fails to reflect real-world scenarios, where industrial images frequently\nexhibit multiple types of defects simultaneously.\nTo enhance the capabilities for defect detection, Defect Spectrum datasets\nintroduce a comprehensive collection of 3518 high-quality, high-resolution images derived from the aforementioned datasets. These selected images feature\na wide variety of objects and defects, ensuring extensive variance and coverage\nfor improved analysis. This curated dataset offers detailed, precise, and diverse\ncategory annotations for each image and enriches the data with comprehensive\ncaptions to facilitate better contextual understanding. For every product type\nfeatured, the Defect Spectrum datasets extend their utility by incorporating realistic synthetic data and their accurate masks, ensuring a thorough and versatile\ntesting ground.\nTable 1: Comparison with real-world manufacturing datasets. Defect Spectrum\ndatasets are the second largest one even though excluding our synthetic data. Defect\nSpectrum is also the most diverse, semantics-abundant, and precise manufacturing\nbenchmark datasets to date. We use * to represent the amount of synthetic data.\nAnnotated\nMultiple\nDefect Pixel-wise\nDetailed\nDefective\nDefective\nType\nLabel\nCaption\nImages\nLabel\nAITEX [36]\n105\n12\n✓\nAeBAD [51]\n346\n4\n✓\nBeanTech [27]\n290\n3\n✓\nCotton-Fabric [20]\n89\n1\nDAGM2007 [46]\n900\n6\nKolektorSDD2 [39]\n356\n1\n✓\nMVTec [3]\n1258\n69\n✓\nVISION V1 [1]\n4165\n44\n✓\n✓\nVisA [56]\n1200\n75\n✓\nDefect Spectrum 3518+1920* 125\n✓\n✓\n✓\n\n\f6\n\n3.2\n\nS. Yang, Z. Chen et al.\n\nAnnotation Improvements\n\nOur improvements in annotations are mainly in three aspects: precision, semanticsabundance, and detailed caption.\nPrecision For datasets that were not annotated or merely had image-wise annotations, we have elevated them to meet our standards. We have enriched these\ndatasets with meticulous pixel-level annotations, delineating defect boundaries\nand assigning a distinct class label to each type of defect. For those datasets that\nalready possessed pixel-wise masks, we enhanced their precision and rectified any\nimperfections. We undertook efforts to account for any overlooked defects, ensuring exhaustive coverage. For nuanced defects, such as scratches and pits, we\nrefined the contours to achieve heightened accuracy.\nSemantics Abundance In contrast to datasets that only offer binary defective\nmasks, Defect Spectrum furnishes annotations with more semantic details, identifying multiple defect types within a single image. We identify that there are\n552 multiple defective images and provide their multi-class labels. Moreover, we\nhave re-assessed and fine-tuned the existing defect classes, guaranteeing a more\ngranular and precise categorization. In total, we offer 125 distinct defect classes.\nDetailed Caption With the evolution of Vision Language Models (VLMs), we\nhave equipped our datasets by integrating exhaustive captions. It’s worth noting that current captioning models, such as BLIP2 [22] and LLaVa [23], often\noverlook defect information. As a remedy, we manually refined the captions from\nVLMs and furnished detailed descriptions. These narratives not only identify the\nobjects but also elucidate their specific defects. We anticipate that this enhancement will inspire researchers to increasingly leverage VLMs for defect inspection\nin forthcoming studies.\n3.3\n\nDefect Generation\n\nTo tackle the issue of defects scarcity, we turn to the burgeoning field of generative models. By using the limited available data, we propose a two-staged\ndiffusion-based generator, called the “Defect-Gen”.\nBackground Given a set of defective imagemask pairs, we aim to learn a generative model\nthat captures the true data distribution, so that\nit can generate more pairs to augment the\ntraining set. We denote the dataset as D =\n{(I1 , M1 ), (I2 , M2 ), . . . , (IN , MN )}, where the image Ii ∈ Rh×w×3 and the mask Mi ∈ {0, n}h×w×n\nrefer to the defect image and its corresponding\ndefect mask respectively. N is the number of samples in the training set, which is small in practice.\n\nFig. 2: DDPM predicts high\ndensity around training samples and fails to capture the\ntrue data distribution.\n\n\fDefect Spectrum\n\n7\n\nn denotes the number of defective types in the mask images. Specifically, we\nconvert the mask into a one-hot encoding scheme for each channel separately.\nWe show that with a very small modification, it can generate images with corresponding labels. We perform a channel-wise concatenation between I with the\nM , i.e., x = I ⊕ M , where ⊕ means concatenation and x ∈ Rh×w×ntotal , and\nntotal = ndef ect + 3. We then treat the x as the input to train the generator.\nThis improves the usability of the generative model with negligible computational overhead. In the following, we term x as “image” instead of “image with\nlabel” for convenience.\nStage One\n\n𝒙𝑻\n\n𝒑𝜽 𝒙𝑻#𝟏 𝒙𝑻 )\n\nStage Two\n\n𝒙𝑻#𝟏 … 𝒙𝒕\n\nLarge-RF\nModel\n\n𝒙𝒕#𝟏 …\n\n𝒙𝟏\n\n𝒑𝝋 (𝒙𝟎 |𝒙𝟏 )\n\n𝒙𝟎\n\nSmall-RF\nModel\n\nFig. 3: The inference process of the two staged diffusion models. The input to the large\nmodel pθ is gaussian noise, after the optimal step is reached, the intermediate results\ncontaining global information will be used as the input to the small model pϕ .\n\nFew-shot Challenges Note that defect images are difficult to collect in practice, and thus, models have to be trained with very few samples. Under this\nsituation, we observe that the generated results lack diversity. To be specific,\nmodels tend to memorize the training set. The reason could be that the generative models such as Diffusion models tend to predict high density around\ntraining samples and fail to capture the true data distribution, as depicted in\nFigure 2.\nOverfitting Issue The limitation\ndiscussed above is not surprising. In\nstatistical learning theory, it is wellknown that the generalization capacity of a classification model is positively related to the sample size and\nnegatively related to the dimension.\nWe can reasonably hypothesize that\na similar trend also holds in the diffusion model according to the Vapnik–Chervonenkis theory [41]. In this\nsense, as the data dimension (h × w ×\nntotal ) is much larger than the sample\n\nFig. 4: The visual cases in (a) demonstrate a lack of diversity in using DDPMs.\nCases in (b) demonstrated excessive diversity. (c) shows the generated samples using\nour framework. we maintained the global\nstructure while introducing local variance.\n\n\f8\n\nS. Yang, Z. Chen et al.\n\nsize (N = 25 in our setting), the vanilla diffusion model suffers severe overfitting. As shown in Figure 4 (a), DDPM replicates training cases, leading to low\ndiversity generation.\nModeling the Patch-level Distribution To alleviate the aforementioned\nproblem, we propose to model the patch-level distribution instead of the imagelevel distribution. By treating a patch as one sample, the data dimension (hpatch ×\nwpatch × ntotal ) is largely reduced, while the sample size (Npatch )is significantly\nincreased. This reduces the risk of overfitting. Figure 5. demonstrates the effectiveness of our strategy.\nRestraining the Receptive Field Although we can naively replace x with\ncropped image patches to achieve patch-level modeling, it is hard to use learned\npatches to reconstruct into a whole image during inference. In other words, if\nexplicitly train a patched generator, we would have to introduce a reconstruction\nterm to merge these patches. Alternatively, we leverage the network architecture\nto restrain the size of the receptive field to achieve this. Standard U-Net is used\nin the vanilla diffusion model [18]. It is composed of a series of down-sampling\nlayers. With the reduced number of down-sampling layers, the output receptive\nfields gradually decrease. This allows the model to only be visible to small patches\non the original images. This strategy does not change the position of each patch\nin one image and thus has the potential to maintain the whole image. Thus, by\nusing a smaller receptive field, patch-level modeling is achieved.\nHandling the Global Distortion\nWhile patch-level modeling is effective in overcoming overfitting, it falls\nshort of representing the global structure of the entire image, leading to\nunrealistic results. This is shown in\nFigure 4(b). To address this issue, we\npropose a two-stage diffusion process\nas depicted in Figure 3. Our approach Fig. 5: The property of patch-level modis inspired by [9], which reveals that eling. The right image is generated from\ndifferent time steps in the diffusion the small-receptive-field model, and the two\nleft images are the two most similar images\nprocess correspond to distinct levels\nfrom the training set.\nof information. In the early stages,\ncoarse geometry information is generated, while in later stages, finer information is produced.\nSpecifically, we train two models: one with a small receptive field, which we\nintroduced previously, and another with a larger receptive field. During inference, we use the large-receptive-field model to capture the geometry structure\nin the early steps, and then switch to the small-receptive-field model to generate\n\n\fDefect Spectrum\n\n9\n\ndiverse local patches in the remaining steps. The effectiveness of this strategy\nis demonstrated in Figure 4 (c). Our model has two key hyper-parameters: the\nswitch timestep u and the receptive field of the small model. Both of them can\ncontrol the trade-off between fidelity and diversity. We use FID to measure the\ngeneration fidelity. LPIPS was originally used for measuring the similarity between two images, the lower score indicates a higher similarity and vice versa.\nIn this scenario, to achieve a higher generation diversity with fidelity, we want\nto maintain a higher LPIPS score with a similar FID score. Due to the page\nlimits, the detailed selection of the switch timestep u and the receptive field of\nthe small model can be found in the Sec.B of the Appendix.\n3.4\n\nAuxiliary Annotation Tool\n\nSegment\nAnything\nDefect\nClick\n\nFig. 6: Comparison between Defect Click and Segment Anything [21]. Progressively\nannotating a scratched capsule with human clicks: With our “Defect-Click” tool, we\ncan swiftly pinpoint the two scratches. However, when using “Segment Anything”, it\nbecomes challenging to accurately identify the defects, as shown in the red box. Best\nviewed in color.\n\nAnnotating pixel masks is an exceptionally demanding task in the labeling\ndomain, especially under the stringent standards of Defect Spectrum. It is not\nfeasible to perform such a task from scratch. To alleviate this challenge, we\nintroduce an auxiliary annotation tool, “Defect-Click,” designed to conserve the\nefforts of our specialists.\nDefect-Click is an advanced interactive annotation tool designed to automatically segment defect areas based on a user’s click point. Distinct from traditional\ninteractive segmentation methods, Defect-Click utilizes its pretrained knowledge\nof industrial defects to adeptly pinpoint irregular defective regions. Built upon\nthe Focal-Click framework [6,7], we tailored Defect-Click for the industrial defect\ndomain by integrating 21 proprietary labeled datasets, introducing multi-level\ncrop training for small defects, and incorporating edge-sensitive losses during\ntraining. The 21 proprietary labeled datasets consist of defective image-mask\npairs for industrial inspection. Multi-level crop training means we rescale the\ntraining samples randomly to a resolution of [512, 1024, 1536, 2048, 2560, 3072]\nand then crop 512×512 patches for training. Edge-sensitive losses denote the loss\nfunction in Mask2Former [8]. We use the losscls : lossmask : lossdice = 2 : 5 : 5\n\n\f10\n\nS. Yang, Z. Chen et al.\n\nin practice. These specialized approaches ensure that Defect-Click significantly\noutperforms other annotation tools in the industrial dataset domain, as showcased in Figure 6. Segment Anything [21] struggles to identify the scratch defect,\nwhile Defect-Click clearly delineates the defect’s contour.\nWith the assistance of Defect-Click, we can initially obtain a rough defect\nmask with merely several clicks and subsequently refine its imperfections. On\naverage, this approach has resulted in a time-saving of about 60%. Even though,\nthis comprehensive annotation project still spans a total of 580 working hours.\n\n4\n\nExperiments\n\n4.1\n\nBenchmarking existing methods\n\nIn the realm of industrial defect inspection, there are three primary tasks: defect detection (determining if an image contains a defect), defect classification\n(identifying the type of defect), and defect segmentation (pinpointing both the\nboundaries and the type of the defect in the image) [4, 24, 40]. Typical defect\ndetection methods such as Patchcore [34], PADIM [10], and BGAD [48] emphasize identifying the presence of defects but fall short in discerning defect types.\nDefect classification methods can determine the type of defect but do not provide information about its location or size. Our Defect Spectrum dataset come\nwith detailed and comprehensive annotations, aiming to solve the most complex\ntask. Consequently, we focus on methods that excel in defect segmentation.\nAdditionally, due to the confidential nature of many industrial products,\ntransferring data externally is often prohibited. This necessitates models that\ncan operate efficiently on local devices. With this in mind, we have handpicked\nseveral SOTA segmentation methods and adapted them to a lightweight version.\nOur baseline includes UNet - small [33], ResNet18 [17] - PSPNet [52], ResNet18\n- DeepLabV3+ [5], HRNetV2W18 - small [43], BiseNetV2 [49], ViT - Tiny [13]Segmenter [38], Segformer - MiT - B0 [47], and HRNet - Mask2Former [8]. The\nmodels are abbreviated as follows: UNet (UNet - small), PSP (ResNet18 - PSPNet), DL (ResNet18 - DeepLabV3+), HR (HRNetw18small), Bise (BiseNetV2),\nV-T (ViT-Tiny - Segmenter), M-B0 (Segformer - MiT-B0), and M2F (HRNet Mask2Former).\nWe present a comprehensive evaluation of the above methods on each sub-set\nof our Defect Spectrum benchmark. For the performance metric, we choose the\nmean Intersection over Union (mIoU). Results are shown in Table 2. The consistent performance of DeepLabV3+ across multiple datasets suggests that it’s\na robust model for various types of defect segmentation tasks. The Transformerbased models seem to be particularly effective for Cotton-Fabric. This might be\ndue to the inherent advantages of Transformers in capturing long-range semantic\ninformation, which could be commonly found in “Cotton-Fabric”. Performance\nvaries across models for different categories, suggesting no universal solution.\nModel selection should consider dataset specifics. Some datasets challenge all\nmodels, highlighting a need for more research.\n\n\fDefect Spectrum\n\n11\n\nTable 2: Quantitative comparison of various defect segmentation methods across different Defect Spectrum reannotated datasets. Results reflect the mIoU. We highlight\nthe best mIoU of each dataset with red color. “DS” is abbreviated for Defect Spectrum.\nCNNs\nTransformers\nUNet PSP DL\nHR Bise V-T M-B0 M2F\nbottle 43.44 50.20 56.53 45.02 44.92 69.71 40.88 53.20\ncable 47.95 52.50 52.59 50.39 45.24 54.51 58.31 49.72\ncapsule 28.05 29.59 35.49 34.02 28.30 33.94 38.95 26.91\ncarpet 50.91 53.76 53.75 47.28 44.52 43.70 38.45 47.34\ngrid\n37.06 42.86 41.18 30.97 33.89 40.08 18.86 24.81\nh_nut 58.84 56.87 61.78 59.31 57.53 55.07 59.60 56.72\nDefect leather 57.56 61.42 54.56 55.45 57.89 47.85 50.80 53.96\nSpectrum m_nut 49.18 46.99 51.08 48.76 55.51 54.68 48.89 39.43\n(MVTec)\npill\n35.81 36.38 33.83 29.30 27.23 42.65 46.35 27.14\nscrew 31.87 38.77 33.36 29.66 19.01 22.54 19.26 21.89\ntile\n85.49 82.51 83.02 85.66 84.21 78.29 79.14 83.04\nt_brush 23.96 25.25 25.16 26.25 25.58 33.30 32.22 28.26\ntran. 40.37 44.02 58.23 44.50 45.97 53.60 41.13 50.87\nwood 72.69 67.93 68.21 69.00 67.81 62.62 73.02 59.66\nzipper 54.83 60.95 58.03 55.87 47.15 51.69 60.12 49.47\nmean 49.88 51.41 51.58 47.99 45.40 49.31 46.45 45.70\nCapa. 57.04 54.01 52.75 54.56 54.36 56.30 59.29 57.27\nDefect Console 35.32 30.77 32.67 31.70 30.45 22.48 25.64 32.50\nSpectrum Ring 52.37 56.16 56.97 60.17 54.06 44.27 52.21 62.09\n(VISION) Screw 53.13 53.91 55.20 52.46 51.76 36.87 47.54 52.05\nWood 64.75 66.80 66.72 66.79 67.40 53.34 63.43 66.70\nmean 52.52 52.33 52.86 53.14 51.61 42.65 49.62 54.12\nDS-DAGM2007 85.89 85.14 86.82 84.02 83.14 52.42 83.06 85.56\nDS-Cotton-Fabric 39.03 48.73 47.55 41.13 46.82 51.29 50.52 64.09\n\n4.2\n\nGeneration Quality\n\nFigure 7 provides a qualitative comparison between our generation results and\nthose from other synthesis methods. On the left-hand side, we present different objects to demonstrate the high fidelity of our method. On the right-hand\nside, we used the two images shown in the “Real defect” to generate samples to\ndemonstrate our high diversity. We observe that the generated models from CycleGAN [55] and DDPM [18] completely failed to learn a diverse defect pattern\nand thus failed to generate samples with diversity by producing mere duplicates\nof the training set. On the other hand, sinDiffusion [44] and SinGAN [35] can\nproduce diverse samples but are not visually realistic. More visual cases, including other classes, can be found in the supplementary file. Figure 8 displays\nthe image-mask pairs we generated. Our images are of high quality, and the\ncorresponding masks align well with them.\n\n\f12\n\nS. Yang, Z. Chen et al.\n\nReal Defect\n\nDDPM\n\nSinDiffusion\n\nSinGAN\n\nCycleGAN\n\nOurs\n\nReal Defect CycleGAN\n\nDDPM\n\nSinDiffusion\n\nSinGAN\n\nOurs\n\nFig. 7: Qualitative comparison of our method with other image synthesis methods. On\nthe left-hand side, we compared different objects across different datasets to demonstrate the high fidelity of our generation method. On the right-hand side, we show our\nmethod can exhibit diversity while maintaining high quality. Best viewed in color.\n\nFig. 8: Qualitative results of our proposed defect generation method. Generated images demonstrated rich semantics, exhibiting high quality. Generated masks precisely\nreflected defect areas. Best viewed in color.\n\n4.3\n\nSynthetic Data for Performance Boost\n\nBoosting SOTA methods with Synthetic Data Results in Table 3 show\na large performance increase in both DS-MVTec and DS-Cotton datasets, the\nincrease is comparatively smaller in the DS-VISION dataset, however, such increase is demonstrated in each of the sub-classes. We do not generate extra data\nfor DS-DAGM2007, since it is already a synthetic dataset. The result demonstrates the effectiveness of our synthetic data. We also compared with other\ngeneration methods in the ability to boost performance. Detailed comparisons\ncan be found in the supplementary file.\n\nTable 3: Performance (mIoU) comparison between models trained with and without\nsynthetic data. The bolded text indicates results with synthetic data. “DS” is abbreviated for Defect Spectrum.\nDS-MVTec DS-VISION DS-Cotton\nDeepLabV3+ 51.58/55.55 52.33/53.46 48.73/58.58\nMask2Former 45.70/50.16 54.12/55.47 64.09/65.39\nMiT-B0\n46.45/56.21 49.62/50.75 50.52/55.86\n\n\fDefect Spectrum\n\n13\n\nImpact of Synthetic Data In Figure 9, we delve deeper into the impact of\nvarying the quantity of our synthetic data on model performance. Figure 9 (a)\nshows the performance improvement over different quantities of synthetic data\nusing DeepLabV3+. Interestingly, we found that the transformer-based model\n(MiT-B0) benefits much more with synthetic data than CNN-based models, as\nshown in Figure 9 (b).\nmIoU Improvement with different proportion of synthetic data\n\n(a)\n\n(b)\n\nFig. 9: Improvement in mIoU with different proportions of synthetic Data. This experiment is done on Defect Spectrum (MVTec) with DeeplabV3+ and MiT-B0 shown\nas (a) and (b) respectively.\n\nWhen using synthetic data that is 20% of the size of the original training\nset, there is an enhancement in the results. Additionally, it’s worth noting that\nthe optimal amount of synthetic data required can vary based on the specific\ncategory of images. When using synthetic data that is 200% of the size of the\noriginal training set, there is an enhancement in the performance, but results in\ngreater variance. Additionally, the performance starts to decrease after reaching\nthe 300%. On a holistic scale, integrating 100% of the synthetic data appears to\nbe a reasonable choice.\n\n4.4\n\nComparison between original and Defect Spectrum dataset\n\nTable 4: The quality control benchmark for the objects to be inspected. We show\nZipper, pill, and wood as example classes.\nExample classes\nStandard For Benign Products\nZipper\nNo defect on teeth; Fabric defect &lt; 4800 pixels\nPill\nNo cracks; Contamination &lt; 4000 pixels; Color stains &lt; 300 pixels\nWood\nNo scratch; No dent; Impurities &lt; 250 pixels; Stain &lt; 1000 pixels\n\n\f14\n\nS. Yang, Z. Chen et al.\n\nThe enhancement of Table 5: Comparison of original annotation and deour dataset contains two fect spectrum annotation in the simulation experiment\nsignificant modifications: of manufacturing production. Metrics are reported in im1) the expansion to in- age level recall rate and false positive rate (FPR).\nclude more defect classes,\nMethod\n↑ Recall (%) ↓ FPR (%)\nand 2) the improvement\nOriginal\n85.33\n49.60\nof annotation accuracy in\nDefect Spectrum (DS)\n96.07\n16.50\nboth training and validation sets. Given these significant changes, it becomes impractical to directly assess the performance (like\ncomputing mIoU) of our refined model on the original ground truth, and vice\nversa.\nTo objectively assess our dataset’s superiority, we design a simulation experiment that mirrors real-world manufacturing processes. Manufacturing experts\nare invited to set a quality control benchmark for the inspected items, as detailed\nin Table 4. This benchmark specifies unacceptable critical defects and establishes\na threshold for minor defects—for instance, any teeth defect in a zipper is intolerable, whereas only extensive fabric defects in a zipper are considered detrimental.\nFollowing these criteria, we classify the validation samples as either benign or\ndefective. We then train two segmentation models of the same architecture: one\non our refined dataset and the other on the original dataset. Utilizing these\nsegmentation results and the established criteria, we calculated the image-level\nFP\nP\nrecall rate ( F NT+T\nP ) and the false positive rate ( T N +F P ). A superior recall rate\ndenotes more effective defective product identification, whereas a reduced false\npositive rate indicates fewer benign products mistakenly flagged as defective. As\nshown in Table 5, the model trained with our refined annotations outperforms\nthe one trained with the original dataset in terms of recall rate and false positive\nrate, thus enhancing product profitability without compromising quality.\nFurthermore, we conducted qualitative comparisons across all subsets within\nthe Defect Spectrum. We compared the annotations from the original dataset\nwith those from our refined dataset. Additionally, we evaluated the segmentation\nmodel’s masks based on the original dataset annotations against those derived\nfrom our refined dataset. Both the masks and the annotations exhibit greater\naccuracy and improved differentiation among defect types in comparison to the\noriginal dataset. Visual examples of these annotations and segmentation masks\nare included in the appendix for further reference.\n\n5\n\nConclusion\n\nIn conclusion, our Defect Spectrum dataset, complemented by the Defect-Gen\ngenerator, addresses critical gaps in industrial defect inspection. By providing\nSemantics-abundant, precise, and large-scale annotations, our contributions will\nfoster advancements in defect inspection methodologies. The potential integration of Vision Language Models, the practical value of labeling assistant DefectClick, coupled with the Defect-Gen’s capability to mitigate data scarcity, sets\nthe stage for more robust defect inspection systems in the future.\n\n\fDefect Spectrum\n\n15\n\nReferences\n1. Bai, H., Mou, S., Likhomanenko, T., Cinbis, R.G., Tuzel, O., Huang, P., Shan, J.,\nShi, J., Cao, M.: Vision datasets: A benchmark for vision-based industrial inspection. arXiv preprint arXiv:2306.07890 (2023)\n2. Bergmann, P., Batzner, K., Fauser, M., Sattlegger, D., Steger, C.: The mvtec\nanomaly detection dataset: a comprehensive real-world dataset for unsupervised\nanomaly detection. International Journal of Computer Vision 129(4), 1038–1059\n(2021)\n3. Bergmann, P., Fauser, M., Sattlegger, D., Steger, C.: Mvtec ad–a comprehensive real-world dataset for unsupervised anomaly detection. In: Proceedings of the\nIEEE/CVF conference on computer vision and pattern recognition. pp. 9592–9600\n(2019)\n4. Carvalho, P., Durupt, A., Grandvalet, Y.: A Review of Benchmarks for Visual Defect Detection in the Manufacturing Industry, p. 1527–1538. Springer International\nPublishing (Sep 2022). https://doi.org/10.1007/978- 3- 031- 15928- 2_133,\nhttp://dx.doi.org/10.1007/978-3-031-15928-2_133\n5. Chen, L.C., Zhu, Y., Papandreou, G., Schroff, F., Adam, H.: Encoder-decoder with\natrous separable convolution for semantic image segmentation. In: Proceedings of\nthe European conference on computer vision (ECCV). pp. 801–818 (2018)\n6. Chen, X., Zhao, Z., Yu, F., Zhang, Y., Duan, M.: Conditional diffusion for interactive segmentation. In: ICCV (2021)\n7. Chen, X., Zhao, Z., Zhang, Y., Duan, M., Qi, D., Zhao, H.: Focalclick: Towards\npractical interactive image segmentation (2022)\n8. Cheng, B., Misra, I., Schwing, A.G., Kirillov, A., Girdhar, R.: Masked-attention\nmask transformer for universal image segmentation (2022)\n9. Choi, J., Lee, J., Shin, C., Kim, S., Kim, H., Yoon, S.: Perception prioritized\ntraining of diffusion models. In: Proceedings of the IEEE/CVF Conference on\nComputer Vision and Pattern Recognition (2022)\n10. Defard, T., Setkov, A., Loesch, A., Audigier, R.: Padim: a patch distribution modeling framework for anomaly detection and localization (2020)\n11. Deng, J., Dong, W., Socher, R., Li, L.J., Li, K., Fei-Fei, L.: Imagenet: A largescale hierarchical image database. In: Computer Vision and Pattern Recognition,\n2009. CVPR 2009. IEEE Conference on. pp. 248–255. IEEE (2009), https://\nieeexplore.ieee.org/abstract/document/5206848/\n12. Dhariwal, P., Nichol, A.: Diffusion models beat gans on image synthesis. Advances\nin neural information processing systems 34, 8780–8794 (2021)\n13. Dosovitskiy, A., Beyer, L., Kolesnikov, A., Weissenborn, D., Zhai, X., Unterthiner,\nT., Dehghani, M., Minderer, M., Heigold, G., Gelly, S., Uszkoreit, J., Houlsby, N.:\nAn image is worth 16x16 words: Transformers for image recognition at scale (2021)\n14. Du, Z., Gao, L., Li, X.: A new contrastive gan with data augmentation for surface\ndefect recognition under limited data. IEEE Transactions on Instrumentation and\nMeasurement (2022)\n15. Faghih-Roohi, S., Hajizadeh, S., Núñez, A., Babuska, R., De Schutter, B.: Deep\nconvolutional neural networks for detection of rail surface defects. In: 2016 International joint conference on neural networks (IJCNN). pp. 2584–2589 (2016)\n16. Guo, J., Wang, Q., Li, Y.: Semi-supervised learning based on convolutional neural\nnetwork and uncertainty filter for façade defects classification. Computer-Aided\nCivil and Infrastructure Engineering pp. 302–317 (2021)\n\n\f16\n\nS. Yang, Z. Chen et al.\n\n17. He, K., Zhang, X., Ren, S., Sun, J.: Deep residual learning for image recognition. In:\nProceedings of the IEEE conference on computer vision and pattern recognition.\npp. 770–778 (2016)\n18. Ho, J., Jain, A., Abbeel, P.: Denoising diffusion probabilistic models. Advances in\nNeural Information Processing Systems 33, 6840–6851 (2020)\n19. Huang, Q., Wu, Y., Baruch, J., Jiang, P., Peng, Y.: A template model for defect\nsimulation for evaluating nondestructive testing in x-radiography. IEEE Transactions on Systems, Man, and Cybernetics-Part A: Systems and Humans 39, 466–475\n(2009)\n20. Incorporated, C.: Standard fabric defect glossary (2023), uRL: https : / /\nwww.cottoninc.com/quality- products/textile- resources/fabric- defectglossary\n21. Kirillov, A., Mintun, E., Ravi, N., Mao, H., Rolland, C., Gustafson, L., Xiao, T.,\nWhitehead, S., Berg, A.C., Lo, W.Y., Dollár, P., Girshick, R.: Segment anything.\narXiv:2304.02643 (2023)\n22. Li, J., Li, D., Savarese, S., Hoi, S.: BLIP-2: bootstrapping language-image pretraining with frozen image encoders and large language models. In: ICML (2023)\n23. Liu, H., Li, C., Wu, Q., Lee, Y.J.: Visual instruction tuning (2023)\n24. Lu, F., Yao, X., Fu, C.W., Jia, J.: Removing anomalies as noises for industrial\ndefect localization. In: Proceedings of the IEEE/CVF International Conference on\nComputer Vision. pp. 16166–16175 (2023)\n25. Mery, D., Hahn, D., Hitschfeld, N.: Simulation of defects in aluminium castings\nusing cad models of flaws and real x-ray images. Insight-Non-Destructive Testing\nand Condition Monitoring pp. 618–624 (2005)\n26. Mery, D., Filbert, D.: Automated flaw detection in aluminum castings based on the\ntracking of potential defects in a radioscopic image sequence. IEEE Transactions\non Robotics and Automation 18(6), 890–901 (2002)\n27. Mishra, P., Verk, R., Fornasier, D., Piciarelli, C., Foresti, G.L.: VT-ADL: A vision transformer network for image anomaly detection and localization. In: 30th\nIEEE/IES International Symposium on Industrial Electronics (ISIE) (June 2021)\n28. Mundt, M., Majumder, S., Murali, S., Panetsos, P., Ramesh, V.: Meta-learning\nconvolutional neural architectures for multi-target concrete defect classification\nwith the concrete defect bridge image dataset. In: Proceedings of the IEEE/CVF\nConference on Computer Vision and Pattern Recognition. pp. 11196–11205 (2019)\n29. Ni, C., Yang, K., Xia, X., Lo, D., Chen, X., Yang, X.: Defect identification, categorization, and repair: Better together (2022)\n30. Nichol, A.Q., Dhariwal, P.: Improved denoising diffusion probabilistic models. In:\nInternational Conference on Machine Learning. pp. 8162–8171. PMLR (2021)\n31. Niu, S., Li, B., Wang, X., Lin, H.: Defect image sample generation with gan for\nimproving defect recognition. IEEE Transactions on Automation Science and Engineering 17(3), 1611–1622 (2020)\n32. Rombach, R., Blattmann, A., Lorenz, D., Esser, P., Ommer, B.: High-resolution\nimage synthesis with latent diffusion models (2021)\n33. Ronneberger, O., Fischer, P., Brox, T.: U-net: Convolutional networks for biomedical image segmentation (2015)\n34. Roth, K., Pemula, L., Zepeda, J., Schölkopf, B., Brox, T., Gehler, P.: Towards total\nrecall in industrial anomaly detection (2022)\n35. Rott Shaham, T., Dekel, T., Michaeli, T.: Singan: Learning a generative model\nfrom a single natural image. In: Computer Vision (ICCV), IEEE International\nConference on (2019)\n\n\fDefect Spectrum\n\n17\n\n36. Silvestre-Blanes, J., Albero-Albero, T., Miralles, I., Pérez-Llorens, R., Moreno, J.:\nA public fabric database for defect detection methods and results. Autex Research\nJournal 19(4), 363–374 (2019). https://doi.org/doi:10.2478/aut-2019-0035,\nhttps://doi.org/10.2478/aut-2019-0035\n37. Song, W., Chen, T., Gu, Z., Gai, W., Huang, W., Wang, B.: Wood materials defects\ndetection using image block percentile color histogram and eigenvector texture feature. In: Proceedings of the First International Conference on Information Sciences,\nMachinery, Materials and Energy. Atlantis Press (2015). https://doi.org/10.\n2991/icismme-15.2015.163, https://doi.org/10.2991/icismme-15.2015.163\n38. Strudel, R., Garcia, R., Laptev, I., Schmid, C.: Segmenter: Transformer for semantic segmentation. In: Proceedings of the IEEE/CVF international conference on\ncomputer vision. pp. 7262–7272 (2021)\n39. Tabernik, D., Šela, S., Skvarč, J., Skočaj, D.: Segmentation-based deep-learning\napproach for surface-defect detection. Journal of Intelligent Manufacturing 31(3),\n759–776 (2020)\n40. Tang, J., Lu, H., Xu, X., Wu, R., Hu, S., Zhang, T., Cheng, T.W., Ge, M., Chen,\nY.C., Tsung, F.: An incremental unified framework for small defect inspection. In:\n18th European Conference on Computer Vision (ECCV) (2024), https://github.\ncom/jqtangust/IUF\n41. Vapnik, V.N., Chervonenkis, A.Y.: On the uniform convergence of relative frequencies of events to their probabilities. Measures of complexity: festschrift for alexey\nchervonenkis (2015)\n42. Wagner, S.: A literature survey of the quality economics of defect-detection techniques. CoRR abs/1612.04590 (2016), http://arxiv.org/abs/1612.04590\n43. Wang, J., Sun, K., Cheng, T., Jiang, B., Deng, C., Zhao, Y., Liu, D., Mu, Y., Tan,\nM., Wang, X., et al.: Deep high-resolution representation learning for visual recognition. IEEE transactions on pattern analysis and machine intelligence 43(10),\n3349–3364 (2020)\n44. Wang, W., Bao, J., Zhou, W., Chen, D., Chen, D., Yuan, L., Li, H.: Sindiffusion: Learning a diffusion model from a single natural image. arXiv preprint\narXiv:2211.12445 (2022)\n45. Wei, J., Zhang, Z., Shen, F., Lv, C.: Mask-guided generation method for industrial\ndefect images with non-uniform structures. Machines 10(12), 1239 (2022)\n46. Wieler, M., Hahn, T.: Weakly supervised learning for industrial optical inspection.\nIn: DAGM symposium in. vol. 6 (2007)\n47. Xie, E., Wang, W., Yu, Z., Anandkumar, A., Alvarez, J.M., Luo, P.: Segformer:\nSimple and efficient design for semantic segmentation with transformers (2021)\n48. Yao, X., Li, R., Zhang, J., Sun, J., Zhang, C.: Explicit boundary guided semipush-pull contrastive learning for supervised anomaly detection (2023), https:\n//arxiv.org/abs/2207.01463\n49. Yu, C., Gao, C., Wang, J., Yu, G., Shen, C., Sang, N.: Bisenet v2: Bilateral network\nwith guided aggregation for real-time semantic segmentation. International Journal\nof Computer Vision 129, 3051–3068 (2021)\n50. Zhang, G., Cui, K., Hung, T.Y., Lu, S.: Defect-gan: High-fidelity defect synthesis\nfor automated defect inspection. In: Proceedings of the IEEE/CVF Winter Conference on Applications of Computer Vision. pp. 2524–2534 (2021)\n51. Zhang, Z., Zhao, Z., Zhang, X., Sun, C., Chen, X.: Industrial anomaly detection\nwith domain shift: A real-world dataset and masked multi-scale reconstruction.\narXiv preprint arXiv:2304.02216 (2023)\n\n\f18\n\nS. Yang, Z. Chen et al.\n\n52. Zhao, H., Shi, J., Qi, X., Wang, X., Jia, J.: Pyramid scene parsing network. In:\nProceedings of the IEEE conference on computer vision and pattern recognition.\npp. 2881–2890 (2017)\n53. Zhou, B., Zhao, H., Puig, X., Fidler, S., Barriuso, A., Torralba, A.: Scene parsing\nthrough ade20k dataset. In: Proceedings of the IEEE Conference on Computer\nVision and Pattern Recognition (2017)\n54. Zhou, B., Zhao, H., Puig, X., Xiao, T., Fidler, S., Barriuso, A., Torralba, A.: Semantic understanding of scenes through the ade20k dataset. International Journal\nof Computer Vision 127(3), 302–321 (2019)\n55. Zhu, J.Y., Park, T., Isola, P., Efros, A.A.: Unpaired image-to-image translation\nusing cycle-consistent adversarial networks. In: Computer Vision (ICCV), 2017\nIEEE International Conference on (2017)\n56. Zou, Y., Jeong, J., Pemula, L., Zhang, D., Dabeer, O.: Spot-the-difference selfsupervised pre-training for anomaly detection and segmentation (2022)\n\n\fSupplementary Material for Defect Spectrum: A\nGranular Look of Large-Scale Defect Datasets\nwith Rich Semantics\nShuai Yang1,2⋆ , Zhifei Chen1⋆ , Pengguang Chen3 , Xi Fang3 , Shu Liu3 , and\nYingcong Chen1,2,4\n1\n\nHong Kong University of Science and Technology, Guangzhou\n2\nHKUST(GZ) - SmartMore Joint Lab\n3\nSmartMore. Corp\n4\nHong Kong University of Science and Technology\n\nIn this supplementary, we extended our experiment to incorporate more annotation comparisons with existing datasets in Sec. 1. The detailed generation\nsettings and more quantitative analysis are discussed in Sec. 2. We also include\nmore visual cases in Sec. 3 to demonstrate the capacity of our framework to\nmaintain both fidelity and diversity.\n\n1\n\nVisual Comparison between Original and Defect\nSpectrum Dataset\n\nIn this section, we first present a visual comparison between ours (the last row)\nand the original datasets’ annotation. Figure 1, 2, 3 shows the comparison of\nthe MVTec dataset, we re-classify the defects based on their type and enabled\nmore semantic abundance. As for Figure 4 of the VISION dataset, we refined\nthe original annotation for more granularity. The original DAGM and Cotton\ndatasets contained no pixel-level annotation, thus we provide our annotation as\nshown in Figure 5, 6. We also demonstrate the efficacy of our refined annotations for defect inspection by employing a segmentation model. As illustrated in\nFigure 7, 8 and Figure 9, the segmentation model trained on our refined dataset\ndemonstrates enhanced precision and an improved capability to differentiate between various types of defects, compared to its performance when trained on the\noriginal dataset.\n\n⋆\n\nThese authors contributed equally to this work.\n\n\f20\n\nS. Yang, Z. Chen et al.\n\nFig. 1: The annotation comparison of the “cable\" and “capsule\" class in MVTec dataset.\nThe first row shows the defect image. Rows 2 and 3 show the original annotation and\nour improved annotation. Best viewed in color.\n\nFig. 2: The annotation comparison of the “toothbrush\" and “hazelnut\" class in MVTec\ndataset. The first row shows the defect image. Rows 2 and 3 show the original annotation and our improved annotation. Best viewed in color.\n\n\fDefect Spectrum\n\n21\n\nFig. 3: The annotation comparison of the “wood\" and “pill\" class in MVTec dataset.\nThe first row shows the defect image. Row 2 and 3 show the original annotation and\nour improved annotation. Best viewed in color.\n\nFig. 4: The annotation comparison of the “capacitor\" and “ring\" class in VISION\ndataset. The first row shows the defect image. Rows 2 and 3 show the original annotation and our improved annotation. Best viewed in color.\n\n\f22\n\nS. Yang, Z. Chen et al.\n\nFig. 5: The annotation comparison of the “cotton fabric\" class in the COTTON\ndataset. The first row shows the defect image. Row 2 shows our improved annotation. Best viewed in color.\n\nFig. 6: The annotation comparison of the “texture surface\" in DAGM dataset. The\nfirst row shows the defect image. Row 2 shows our improved annotation. Best viewed\nin color.\n\n\fDefect Spectrum\n\n23\n\nImage\n\nOriginal\n\nRefined\n\nFig. 7: Segmentation result comparison between model trained on our refined dataset\nand the original dataset of the “cable\" and “capsule\" class in MVTec dataset. “Original”\ndenotes the segmentation masks produced by the model trained on the original dataset.\n“Refined” denotes the segmentation masks produced by the model trained on our refined\ndataset. We show the model trained with our dataset exhibits improved granularity\nand high quality. Best viewed in color.\n\n2\n\nDefect Generation\n\nImplementation details In this section, we will first elaborate on the architecture of Defect-Gen. Then we will go over the dataset and training settings of our\nmodel. Lastly, we quantitatively compared it with other methods to demonstrate\nthe superiority of our method.\nExperimental Settings Since there was no train-test split in MVTec AD\ndataset, to train both large and small diffusion models, we employed 5 images\nfor each defective type per object, which is the same as our segmentation training setting. For VISION, DAGM2007, and Cotton-Fabric, we use the pre-split\n\n\f24\n\nS. Yang, Z. Chen et al.\n\nImage\n\nOriginal\n\nRefined\n\nFig. 8: Segmentation result comparison between model trained on our refined dataset\nand the original dataset of the “hazelnut\" and “wood\" class in MVTec dataset. “Original” denotes the segmentation masks produced by the model trained on the original\ndataset. “Refined” denotes the segmentation masks produced by the model trained on\nour refined dataset. We show the model trained with our dataset exhibits improved\ngranularity and high quality. Best viewed in color.\n\nImage\n\nOriginal\n\nRefined\n\nFig. 9: Segmentation result comparison between model trained on our refined dataset\nand the original dataset of the “Capacitor\" and “Wood\" class in the VISION dataset.\n“Original” denotes the segmentation masks produced by the model trained on the\noriginal dataset. “Refined” denotes the segmentation masks produced by the model\ntrained on our refined dataset. We show the model trained with our dataset exhibits\nimproved granularity and high quality. Best viewed in color.\n\n\fDefect Spectrum\n\n25\n\ntraining set. Table 1 to 4 show the architectures of the large and small-receptivefield models. The training of diffusion models is performed on four 3090 GPUs,\nwith a batch size of 2, a learning rate of 1e − 4, and a training iteration number\nof 150,000. We utilize the Adam optimizer with a weight decay of 2e − 3.\n\nTable 1: Upsampling Block\n\nLayer Type Input size Output size Norm Activation\nResBlock × 2 H × W × C H × W × C GN\nSiLU\nC\nNone\nInterpolation H × W × C 2H × 2W × 2 None\n\nTable 2: Downsampling Block\n\nLayer Type\nInput size Output size Norm Activation\nResBlock × 2 H × W × C H × W × C GN\nSiLU\nH\nW\nNone\nAvg_pool 2 × 2 H × W × C 2 × 2 × 2C None\n\nParameter analysis As we discuss in Sec.3.4.2, our model has two key hyperparameters: the switch timestep u and the receptive field of the small model.\nBoth of them can control the trade-off between fidelity and diversity. We use\nFID to measure the generation fidelity. Since there is no existing metric to effectively measure the generation diversity, we used LPIPS score to indicate such.\nA higher LPIPS score with a similar FID score demonstrated a higher diversity\nin the dataset. Table 5 shows the FID and LPIPS for different u and receptive\nfields. As shown, when u increases, fidelity increases while diversity decreases.\nSimilarly, when the receptive field switches from small to large, the same trend\noccurs. Empirically, we use u=50 and the medium receptive field to achieve a\ngood trade-off between FID and LPIPS.\n\n\f26\n\nS. Yang, Z. Chen et al.\n\nTable 3: Architecture for Large receptive fields model.\n\nLayer Type\nResolution # of Channels Norm Activation\nInConv\n256\n4\nGN\nSiLU\nDownSampleBlock\n256\n192\nNone\nNone\nDownSampleBlock\n128\n384\nNone\nNone\nDownSampleBlock\n64\n768\nNone\nNone\nDownSampleBlock\n16\n1536\nNone\nNone\nUpSampleBlock\n16\n768\nNone\nNone\nUpSampleBlock\n64\n384\nNone\nNone\nUpSampleBlock\n128\n192\nNone\nNone\nUpSampleBlock\n256\n96\nNone\nNone\nOutConv\n256\n4\nGN\nSiLU\nTable 4: Architecture for Small receptive fields model.\n\nLayer Type\nResolution # of Channels Norm Activation\nInConv\n256\n4\nGN\nSiLU\nDownSampleBlock\n256\n192\nNone\nNone\nDownSampleBlock\n128\n384\nNone\nNone\nUpSampleBlock\n128\n192\nNone\nNone\nUpSampleBlock\n256\n96\nNone\nNone\nOutConv\n256\n4\nGN\nSiLU\nTable 5: The table shows the trade-off between diversity and image quality of the\ncapsule class. The column represents 3 different receptive field sizes, large, medium,\nand small, and the respective down-sampling blocks are 6, 3, 2. The row represents the\ntimesteps(v) used for the small receptive field model.\n\nu\n25\n50\n75\n100\n400\n700\nFID ↓ 115.2754 93.2839 80.8040 79.6411 82.5127 78.4115\nLPIPS ↑ 0.3981 0.3666 0.3537 0.3523 0.3467 0.3460\nMedium FID ↓ 69.9419 57.5374 57.3961 57.8977 57.426 57.006\nLPIPS ↑ 0.3473 0.3458 0.3450 0.3417 0.3392 0.3381\nLarge\nFID ↓ 59.085 56.6246 56.7247 56.2493 55.7226 54.0529\nLPIPS ↑ 0.2914 0.2870 0.2866 0.2853 0.2832 0.2814\nSmall\n\n\fDefect Spectrum\n\n27\n\nQuantitative Evaluation We have compared the segmentation performance\nboost across different methods on the original MVTec dataset. GAN-based methods were excluded since they hardly generate realistic images, further disrupting\nthe original data distribution. Results for defect segmentation are shown in Table. 6. The first column shows the defect segmentation mIoU score with only the\noriginal training data. The rest of each column presents defect segmentation performance with original training data pairs and the augmented pairs generated\nby different synthesis methods. SinDiffusion dropped the mIoU score, due to\nthe incorrectly structured output images and mislabeled masks. However, it can\nslightly improve the segmentation performance for certain classes like “Carpet\",\n“Grid\", “Leather\", “Tile\" and “Wood\". Since those classes do not contain any\nindustrial parts and thus do not require any global structure information during\nsynthesizing. DDPM-generated samples can boost the performance score, however, due to the lack of diversity during generation, the increase in performance\nis limited.\n\nTable 6: Quantitative comparison on segmentation performance between sinDiffusion,\nDDPM, and our method. To demonstrate the effectiveness of our method on other\ndataset besides Defect Spectrum, the comparison was made on the original MVTec\ndataset\n\ncapsule\nbottle\ncarpet\nscrew\ngrid\ncable\nhazelnut\nleather\nmetal_nut\npill\ntile\ntoothbrush\ntransistor\nwood\nzipper\nmean\n\nw/o any AUG sinDiffusion DDPM Ours\n75.47\n76.25\n79.21 82.20\n67.54\n70.52\n67.32 73.75\n67.33\n72.89\n68.94 74.27\n53.12\n49.66\n60.12 58.78\n59.68\n61.59\n60.68 62.14\n46.28\n41.75\n48.28 49.14\n69.25\n65.65\n69.25 71.46\n66.39\n66.91\n66.39 66.80\n69.56\n63.5\n68.57 74.4\n69.71\n66.75\n70.14 73.19\n70.33\n72.43\n71.23 73.58\n68.26\n64.26\n68.09 70.14\n44.31\n47.16\n44.37 47.47\n65.33\n70.25\n64.93 68.55\n67.62\n63.12\n68.61 70.48\n64.01\n63.51\n65.07 67.76\n\n\f28\n\n3\n\nS. Yang, Z. Chen et al.\n\nVisual Generation Results\n\nWe have included more defect generation results along with their masks as shown\nin Figure 10 to 15 below.\n\nFig. 10: The generated images and masks of the “bottle\" and “capsule\" class. Best\nviewed in color.\n\n\fDefect Spectrum\n\n29\n\nFig. 11: The generated images and masks of the “carpet\" and “grid\" class. Best\nviewed in color.\n\nFig. 12: The generated images and masks of the “pill\" and “ring\" class. Best viewed\nin color.\n\nFig. 13: The generated images and masks of the “screw\" and “tile\" class. Best viewed\nin color.\n\n\f30\n\nS. Yang, Z. Chen et al.\n\nFig. 14: The generated images and masks of the “wood\" and “toothbrush\" class. Best\nviewed in color.\n\nFig. 15: The generated images and masks of the “wood-surface\" and “zipper\" class.\nBest viewed in color.\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"