thermal-porosity
Skill16 starsChanged 16 days agoMITView on GitHub
Predict layer-wise porosity in laser powder bed fusion from in-situ thermal (pyrometry) image sequences — empty-frame filtering, CT pore alignment and ESD thresholds, pore-count regression and 16x16 porosity localization with interpretable thermal-history baselines and the paper's CNN / video-transformer models, scored by RMSE, R² and IoU. Based on ThermoPore (Barati Farimani Lab with Sandia). Use for in-situ monitoring data, porosity digital twins, CT-to-thermal correlation, or part-qualification studies.
In this repository34 other files it gives its agents.
- skills/cadsmith-text-to-cad/references/agents.mdAGENTS.md
- agentscad-fdm-dfamSkill
- am-alloy-screeningSkill
- am-literature-ragSkill
- cadsmith-text-to-cadSkill
- cfd-simulation-setupSkill
- design-review-packageSkill
- dfm-reviewSkill
- drawing-gdt-reviewSkill
- engineering-calc-reportSkill
- equation-discoverySkill
- image2gcodeSkill
- lattice-inverse-designSkill
- linkage-synthesisSkill
- llm-3d-print-monitorSkill
- llm-mechanical-designerSkill
- lpbf-defect-predictionSkill
- lpbf-superresSkill
- machine-element-sizingSkill
- material-selectionSkill
- mechanical-teardownSkill
- mechanics-visualsSkill
- meltpool-geometrySkill
- parametric-part-cadSkill
- query2cad-freecadSkill
- quick-feaSkill
- rocketsmithSkill
- sketch-to-cadSkill
- sls-process-optimizationSkill
- stress-field-surrogateSkill
- thermal-fluids-calcSkill
- tolerance-stackupSkill
- worked-problem-generatorSkill
- my-new-skillSkill
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 2 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 20
Use it to check the pipeline and learn the formats.
- Very specific: line 32
Alignment matters most: Check it with map (step 4) on a layer where the whole scan is in view, before training anything.
- Distinctive: line 57
Use the paper's split: 75/25 *within* each process step.
- Distinctive: line 65
If the deep model doesn't beat the baseline, report that.
≈ “Common” is an estimate: at least 1 in 5 of the 372,429 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Thermal-image porosity (ThermoPore)
ThermoPore (Pak et al., Additive Manufacturing 95 (2024) 104503) links every L-PBF build layer's in-situ pyrometry sequence (200 frames, 64 × 64 px at about 21 µm/px) to the pores micro-CT later finds in that layer. It has two tasks:
- count the pores;
- localize them on a 16 × 16 grid.
scripts/thermopore.py covers the whole pipeline. It needs numpy, pandas and scikit-learn; the deep
models also need PyTorch. Paper details and reference numbers are in references/paper-notes.md.
Workflow
- Rehearse (no data needed):
python scripts/thermopore.py synth --out run/.- This builds a synthetic 10-step × 16-layer build with pores tied to cold and hot cells.
- Use it to check the pipeline and learn the formats. It is not evidence of real-world
accuracy, and every result from it carries
"synthetic_data": true. Say so.
- Prepare real data:
python scripts/thermopore.py prepare --frames layers/ --pores ct_pores.csv --out run/ \ --z-offset 5 --xy-offset 120,40 [--min-peak 900] [--voxel-um 3.63]layers/holds one.npyor.tifstack per build layer, sorted by name.- Empty frames are dropped by a threshold on each frame's peak temperature (automatic unless you
pass
--min-peak), then each layer is resampled to 200 frames. ct_pores.csvhaspore_id, layer, x_um, y_um, esd_um, orvoxelsplus--voxel-um. Its coordinates are already in the thermal camera's frame, except for the offsets you pass.- Alignment matters most. Check it with
map(step 4) on a layer where the whole scan is in view, before training anything.
- Baseline first (CPU, seconds):
python scripts/thermopore.py baseline --data run/ --task count [--depth 1|2|3] [--esd-min musigma] python scripts/thermopore.py baseline --data run/ --task localize- The features are thermal-history maps: peak T, min-of-peak, mean T, dwell above a melt threshold and peak-T roughness, pooled to 16 × 16.
- The baseline gives a number to beat and features you can explain: cold cells point to lack of fusion, hot cells to keyholing.
- Look at a layer:
python scripts/thermopore.py map --data run/ --layer 40 --out l40.pngshows one frame, the peak map, the dwell map and the CT pore map. - Deep models (GPU recommended):
python scripts/thermopore.py train --data run/ --task count --epochs 500 [--rotate] --out cnn.pt python scripts/thermopore.py train --data run/ --task localize --epochs 1000 [--rotate] --out vivit.pt- These are the paper's architectures.
--smallshrinks the ViViT and raises learning rates for CPU smoke tests. --rotateapplies one rotation to the whole sequence and its label map, and never changes intensities.
- These are the paper's architectures.
Reporting
- Use the paper's split: 75/25 within each process step. Report the count task as RMSE and R² with predictions rounded to integers; report localization as mean and max IoU at the threshold chosen on the training layers.
- State the ESD threshold.
- With a 100-voxel minimum, gas pores dominate and are hard to predict.
- A μ+σ cut (about 50 µm) keeps keyhole and lack-of-fusion pores, but leaves few positive cells, so IoU becomes noisy.
- Compare with the paper (R² 0.57 best, RMSE 7.84, IoU 0.32 mean), and with your own baseline.
- If the deep model doesn't beat the baseline, report that. The paper notes its dataset was small, and so is most real CT data.
- These models flag regions for CT and inspection; they don't replace qualification.
Cite: Pak et al., ThermoPore, Addit. Manuf. 95 (2024) 104503.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

