Markr β€” NEU-DET steel surface-defect detector

A Faster R-CNN (ResNet50-FPN) detector fine-tuned on the NEU-DET steel surface-defect dataset. It was trained inside Markr, an AI-assisted image annotation platform (source code), as the project's model-training case study β€” the open-vocabulary and segmentation assists in Markr use pretrained models as-is, while this detector is fine-tuned from the user's own labels.

Results (held-out test set, pycocotools)

metric value
mAP@0.5 0.778
mAP@0.5:0.95 0.418

The COCO-pretrained baseline scores 0.000 mAP@0.5 on defects (the defect classes are not COCO categories), so fine-tuning is what makes detection possible.

Per-class AP@0.5: scratches 0.96 Β· patches 0.92 Β· inclusion 0.86 Β· pitted_surface 0.83 Β· rolled-in_scale 0.67 Β· crazing 0.44. Crazing β€” a faint, low-contrast network of hairline cracks β€” is by far the hardest class.

Classes

crazing, inclusion, patches, pitted_surface, rolled-in_scale, scratches

How to load

import torch, torchvision

ckpt = torch.load("neu_det.pth", map_location="cpu")   # {"model": state_dict, "class_names": [...]}
n = len(ckpt["class_names"]) + 1                        # +1 for background
model = torchvision.models.detection.fasterrcnn_resnet50_fpn(weights=None, num_classes=n)
model.load_state_dict(ckpt["model"])
model.eval()

The same loader lives in model/app/detector.py in the repo.

Training

  • Backbone: torchvision Faster R-CNN ResNet50-FPN, COCO-pretrained; classification head replaced for 6 defect classes + background.
  • Data: NEU-DET (1,800 images, 6 classes), split 1,440 train / 360 holdout.
  • Pipeline & scripts: markr-annotate β€” scripts/train_detector.py, evaluated with scripts/per_class_ap.py.

Limitations

Trained only on NEU-DET hot-rolled steel; it is not expected to generalise to other materials, surfaces or imaging conditions. Diffuse defects (crazing, rolled-in scale) are detected less reliably than well-bounded ones.

Citation

NEU-DET: K. Song and Y. Yan, "A noise robust method based on completed local binary patterns for hot-rolled steel strip surface defects," Applied Surface Science, 2013.

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support