Add industrial surface defect detection example using NEU dataset #12378
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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:
configs/defect/
for training Faster R-CNN on the NEU dataset (6 defect types).convert_annotations.py
tool for converting NEU images into COCO format (train/val/test).app.py
with a Streamlit example to test inference interactively.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:
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.**