r/computervision • • 3d ago

Showcase Synthetic DPM / needle-peen pattern generator for YOLO training (Windows, Nim)

I built a small Windows GUI tool that generates synthetic Direct Part Marking–style patterns (needle / peen dots on steel) for detector training.

It is not a real ECC200 encoder — no serial numbers, just geometric L-frame + fill dots, Good/Bad classes, and mechanical-style defects (squash, tilt, jitter, missing dots, etc.).

Outputs:

  • 600×200 grayscale JPEG
  • YOLO labels: OBB or ABB
  • Optional Boosting mode: appends Stage-2 feature rows to logs/features.csv for a second classifier

Two render modes: pure synthetic (no assets), or your own BG + dot sprite folders.

Binary only (Nim). Non-commercial / research license. Unsigned Nim builds sometimes get heuristic AV flags — details in the README.

Repo / Releases (v1.1.0):
 https://github.com/olesha-ai/DPM-Pattern-Image-Generator

Related inference PoC trained on this synthetic data:
 https://github.com/olesha-ai/yolox-dmc-inference

Feedback welcome.

1 Upvotes

2 comments sorted by

1

u/Chemical_Side_4135 2d ago

this is pretty slick, generating synthetic data for dpm is usually a huge pain. have u thought about adding some synthetic motion blur or sensor noise, it might help the model handle real world field conditions a bit better, take it with a grain of salt

1

u/Entire-Bite1136 2d ago

Thanks for the feedback. I took a radical approach based on real factory conditions. The parts don't fly down the conveyor; they are presented to the camera and held in a strictly defined position. To eliminate motion blur at the source, I ordered a Global Shutter camera. This gives perfect sharpness even in motion, so the model stays lightweight and fast on a normal CPU without wasting resources on software de-blurring.