CrackEvo · UNet-ResNet34 crack segmentation (protocol A baseline)
Single-frame crack segmentation for laboratory fracture images: concrete and cement-mortar cubes
under uniaxial compression, coal / sandstone Brazilian discs under SHPB impact. Trained on the
CrackEvo benchmark (China University of Mining and Technology-Beijing laboratory experiments) plus
public crack datasets (CFD, CrackTree, DeepCrack, 40k) used for training only.
| file |
format |
input |
output |
crackevo_unet_r34_A.onnx |
ONNX opset 17, CPU-friendly |
image float32 [N,3,512,512], ImageNet-normalised RGB |
logit [N,1,512,512], sigmoid > 0.5 = crack |
crackevo_unet_r34_A.pt |
PyTorch state_dict for segmentation_models_pytorch.Unet("resnet34", classes=1) |
same |
same |
Large images are processed with 512-px sliding windows (stride 384, logits averaged). About 45 ms per
tile on a desktop CPU with ONNX Runtime.
Results (sequence-level held-out test split, protocol A)
| metric |
value |
| pixel IoU |
0.453 |
| pixel F1 |
0.623 |
| boundary-tolerant F1 (2 px) |
0.834 |
| clDice |
0.690 |
| sequence-mean IoU (95 % CI) |
0.571 [0.500, 0.638] |
Exact-pixel IoU is limited by centre-line ground truth on two of the sources; tolerant F1 reflects
localisation quality. Cross-material generalisation (unseen sandstone) drops to IoU 0.429; cross
loading-rate generalisation is unaffected (0.456).
Usage
import numpy as np, onnxruntime as ort, cv2
sess = ort.InferenceSession("crackevo_unet_r34_A.onnx", providers=["CPUExecutionProvider"])
img = cv2.cvtColor(cv2.imread("frame.jpg"), cv2.COLOR_BGR2RGB)[:512, :512] # tile
x = (img.astype(np.float32) / 255 - [0.485, 0.456, 0.406]) / [0.229, 0.224, 0.225]
logit = sess.run(None, {"image": x.transpose(2, 0, 1)[None].astype(np.float32)})[0]
mask = logit[0, 0] > 0
Research model; no guarantee for field inspection use. Part of the CrackEvo project (code, benchmark
and demo links will be added here).