Skip to content
ResearchResearchAI & agents

Physics-Guided ML for Fabric GSM

Predicting the weight of knitted fabric from machine settings — accurately, and in a way textile engineers can check.

Knitting production dataPhysics features70 / 15 / 15 split22 regressorsSearch & stabilitySHAPLIMEPhysics check
Role
Co-author (2nd of 6), presenting author
Team
6 authors — Fab Lab IUB
Timeline
Feb 2026 – Sep 2026
Organisation
Independent University, Bangladesh
Code
Private repository
Reading time
3 min

Research paper accepted at IEEE ICACT 2026. On 5,648 production samples, an Extra Trees model reached a test RMSE of 4.10 g/m² (R² 0.952, MAPE under 0.5%) after adding a physics-derived tightness factor; SHAP and LIME confirmed the model learned textile physics.

Overview

In knitwear factories, GSM — grams per square metre — drives quality control, costing and production planning. It is usually measured after knitting, when fixing a wrong setting means wasted fabric. We asked whether it can be predicted reliably from the machine and yarn settings before production — and whether the predictions make physical sense.

The problem

  • Individual features correlate only weakly with GSM, so naive models struggle.
  • Black-box accuracy is not enough: engineers need to see why a prediction was made before trusting it on the factory floor.

Context & constraints

We used the Single Jersey subset (5,648 samples, GSM roughly 115–260 g/m²) of a 12,569-sample structured knitting dataset collected from a Bangladeshi textile mill. The work began as a group project in the Artificial Intelligence course (CSE425) and was preceded by a 50-page systematic literature review.

Approach

  • Physics-guided features — alongside yarn count (tex), stitch length, machine diameter, gauge and feeders, we added the tightness factor K = √tex / stitch length from Pierce's fabric geometry.
  • Broad benchmark — 22 regression models, from interpretable (OLS, ridge, lasso, polynomial ridge, GAM, decision trees) to ensembles (random forest, Extra Trees, gradient boosting, XGBoost, LightGBM, CatBoost) and stacking/voting.
  • Honest evaluation — a 70/15/15 split with a fixed seed, scaling only for non-tree models, randomised search with cross-validation, and stability checks across seeds.
  • Explainability — SHAP (global and local) and LIME (local), plus partial-dependence checks against textile theory.

Key capabilities

  • Tightness-factor feature from Pierce’s geometry
  • 22-model benchmark with tuned and untuned variants
  • Interpretable baseline (degree-3 polynomial ridge) alongside the best black box
  • SHAP and LIME explanations validated against physics

Architecture

  1. Data

  2. Modelling

  3. Explainability

A reproducible modelling pipeline from factory data to physically checked explanations. Select a component to trace its connections.

Key decisions

Challenges

Weak individual correlations

Problem. No single setting predicts GSM well on its own.

Solution. Combining physics-derived interactions with non-linear ensembles recovered strong accuracy.

Quality & delivery

Testing

Five-fold cross-validation put Extra Trees at 2.81 ± 0.47 g/m² RMSE, confirming robustness beyond a single split. Tuning did not beat the default Extra Trees (4.33 vs 4.10), which we report rather than hide.

Outcome

Test RMSE (Extra Trees)
4.10 g/m²
R² 0.952, MAPE 0.467%
Cross-validated RMSE
2.81 ± 0.47
g/m²
Models benchmarked
22
Interpretable to ensembles
Importance in 3 features
>86%
Yarn count, tightness, stitch length

Accepted at the 2026 IEEE 3rd International Conference on Advanced Computing Technologies (ICACT 2026) and presented in the session on Explainable & Trustworthy AI Across Domains. Limitation: Single Jersey fabric from one manufacturer — generalising across fabric types is the next step.

Lessons

  • A single well-chosen physical feature can beat a lot of hyper-parameter tuning.
  • Explanations are a validation tool: when SHAP agrees with textile theory, engineers start to trust the model.

Building something similar?

Tell me what you’re working on — I reply to every serious message.

Related work

ESP32 sensor nodesActuatorsFirebaseLightGBMDigital twinReact dashboard
Research2025Independent University, Bangladesh

Smart Aquaponics with a Digital Twin

A course research paper (3rd of 4 authors) designing ESP32 sensor nodes for water quality, a Firebase telemetry backbone, a React monitoring and control dashboard, a digital twin for scenario testing and LightGBM-based anomaly prediction.

  • Python
  • C / C++
  • React
  • Firebase & Firestore
  • ESP32