Back

NeXtract Lab: Automated Microstructure Analytics

National University of Singapore
2024/2025
Thesis

Overview

NeXtract Lab represents a significant step in industrial quality control. By combining the visual acuity of modern Computer Vision with the reasoning capabilities of Large Language Models (LLMs), we created a system that doesn't just 'see' defects but 'understands' them contextually. This project was validated on real-world datasets from the Advanced Remanufacturing and Technology Centre (ARTC).

The Challenge

In the field of Additive Manufacturing (AM), metallography is the gold standard for quality control. However, the current workflow is plagued by tribal knowledge gaps and subjective interpretation. Interpreting defects often depends on the specific experience of the metallurgist, leading to critical lab-to-lab variability. Furthermore, senior engineers spend valuable hours translating raw visual data into structured ASTM/ISO reports—a reporting bottleneck that slows down production.

  • Subjectivity in manual defect interpretation leading to inconsistent quality standards.
  • Scarcity of labelled metallurgical datasets for training robust models.
  • The reporting bottleneck: Experts wasting time on repetitive documentation.

The Solution

NeXtract Lab is an end-to-end AI pipeline designed to act as an AI research assistant for metallurgists. Moving beyond simple defect detection, it provides full semantic understanding of the microstructure. The system acts as a force multiplier, allowing junior technicians to produce expert-level analysis by codifying heuristic knowledge into a deterministic workflow.

System Architecture

The architecture was designed to be modular and scalable, separating the vision components from the language components. This decoupled approach allows for independent upgrades—for example, upgrading the LLM from Llama 3 to GPT-5 without retraining the vision encoder.

01
Module 1

Intake & Quality Gate

FastAPI intake. Automated brightness/contrast checks (CLAHE) and edge-artifact detection to reject poor samples.

02
Module 2

Visual Intelligence

MatSAM (Segment Anything) performs zero-shot extracted of diverse grains. ResNet50 classifies defect morphology.

03
Module 3

Data Serialization

Visual features are vectorized and converted into a structured JSON payload describing the 'scene'.

04
Module 4

Semantic Synthesis

Groq-hosted Llama 3 generates the engineering narrative, referencing ASTM E112 standards.

The Advantage

Traditional Workflow

  • Subjective analysis dependent on operator fatigue.
  • 3-4 hours per sample for full ASTM reporting.
  • Data trapped in PDF reports, hard to query.
  • New hires need 6 months shadowing to learn defect types.

Proposed Solution

  • Consistent, deterministic outputs (91.9% accuracy).
  • < 30 seconds generation time per sample.
  • Structured JSON data ready for Big Data analytics.
  • System acts as an 'AI Tutor', flagging unknown defects.

Key Features

Zero-Shot Segmentation

Adapts to new alloys without retraining using MatSAM.

Semantic Report Generation

Writes paragraphs describing grain structure and defect density.

Human-in-the-Loop Strategy

distinct interface for engineers to verify and edit AI findings.

Impact & Outcomes

The system represents a move towards autonomic manufacturing. By automating the cognitive load of analysis, metallurgists are freed to focus on root-cause problem solving rather than data entry. The solution is currently TRL 4 (Technology Readiness Level) and demonstrated a 100% success rate in generating valid report syntax.

91.9%Classification Accuracy
90%Time Saved
100%Automated Reporting

Technologies Used

PythonPyTorchMatSAMLlama 3FastAPIReact