Skip to content

Conversation

farquardsolve
Copy link

Hi team,

I’m submitting this PR to contribute an end-to-end working example for industrial surface defect detection using MMDetection and the NEU Surface Defect Database.

I work with industrial manufacturing data, and I noticed there isn’t an out-of-the-box config showing how to adapt MMDetection for tasks like inspecting surface flaws on metal sheets or other products. So I’ve put together a simple pipeline that others can pick up quickly.


This PR adds:

  • A new config under configs/defect/ for training Faster R-CNN on the NEU dataset (6 defect types).
  • A convert_annotations.py tool for converting NEU images into COCO format (train/val/test).
  • An optional app.py with a Streamlit example to test inference interactively.
  • Minor tweaks to base configs where needed.

Why this is useful:

Factories and students working on quality inspection often ask how to adapt COCO configs to their own datasets. This example shows how to structure a small industrial dataset in COCO format and train a detector without needing custom code from scratch.

My goal is to help bridge the gap between MMDetection’s research focus and day-to-day practical use cases in manufacturing and visual QA.


Tested:

  • Trained on a local NEU split.
  • Ran inference using the new config and image_demo.py.

**Happy to adjust this if you’d like it moved into projects/ or somewhere else — open to any suggestions.

Thanks for maintaining this great framework.**

@CLAassistant
Copy link

CLAassistant commented Jul 5, 2025

CLA assistant check
All committers have signed the CLA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants