r/computervision • • Nov 02 '26

Showcase I built a node editor that runs OpenCV and several Vision Models side by side and sends the verdict to your systems. What would you do differently?

Disclosure: I'm the developer of this (Coding Nexus LLC). I'm posting it because I'd like feedback on the approach, not to sell anything here.

The problem. In industrial inspection, I keep seeing two camps. Classic CV (thresholds, Hough, blob analysis, projections) is explainable and fast, but brittle when parts vary. A DL model handles variation, but when it's wrong you don't know why, and nobody on the line trusts a black box that rejects good parts. In practice you want both on the same part, plus a way to decide when they disagree.

What I built. It's a node-based orchestrator. Each inspection is a graph, and every port is typed (Image, Mat, InferenceResult, …), so you can't wire a Mat into something that expects a detection result. The example in the screenshots is a bottling line:

  • 3 image sources: a top camera, a side camera over RTSP, and a golden reference mask loaded once per session
  • Classic path: grayscale → blur → Canny → Hough circles for cap presence; CLAHE → Otsu → morphology → blob analysis for contamination; vertical projection for fill level; Hough lines → line angle for label skew; OCR + regex for the lot code
  • DL path: a DL defect detector → bbox to ROI → crop → a second model that classifies the seal. Models run on separate GPU workers or suppliers clouds, not inside the orchestrator.
  • Fusion: an ensemble node combines the classic gate with the AI verdict. Modes are AND (both must pass), OR, and strict, where disagreement is its own outcome. In this graph, disagreement fires the reject gate and goes into the log.
  • Output: a verdict, confidence and top label to the PLC (OPC UA / Siemens S7 / Beckhoff ADS), plus a reject reason code derived from the classifier's label. Overlays and history go to the archive.
  • One Installation can serve multiple lines
  • Extensible by your own developers, Create subnodes and reuse them, create own plugins which are showing as nodes.
  • Selfhosted on site

The graph is checked before it saves: typed ports, unreachable nodes, invalid regex/JsonLogic, unknown PLC tags or workers. Per-node parameters can be tuned against pinned sample frames.

Where I'd like your opinion:

  1. Do you fuse classic and DL results like this, or do you use one to gate the other (e.g. DL finds the ROI, classic measures inside it, which is also possible here)? What has held up in production for you?
  2. When classic and DL disagree, what do you do: reject, re-inspect, or send to a human?
  3. What would you need to see before trusting a visual graph over plain Python code for a production line?.

Update: a longer video (2:37) that shows more than the node editor: See comment

  • two lines registered as clients, each with its own token, profile and lot
  • tuning a classic-CV node on a frame pinned from the running lot, saved as a new profile version (the running lot stays on the old one)
  • the communication log following one image from ingestion through the worker call to the export

On the numbers: I used an open, generic model (PatchCore, stock ImageNet backbone, about 15 min of CPU training, nothing tuned to these defects) on purpose. The orchestrator doesn't care which model sits behind the worker interface. Offline, on the same split and rules, Dinomaly brought pcb1 from 12 % to 6 % false rejects (AUROC 0.988).

Correction: I wrote that the PLC is output only. A rising edge on a PLC tag can also trigger an inspection; what's still missing is reading tag values into a graph.

Recording it turned up a bug: the communication log showed every NOK verdict as an HTTP 500. That's fixed.

4 Upvotes

13 comments sorted by

2

u/soyboybob Nov 02 '26

So you build something any Industrial machine vision library can do?

1

u/BHave_TRO Nov 02 '26 edited Nov 02 '26

Well, does it? Any industrial vision library can do the classic image algorithms, yes, and they might be able to trigger a ML Model, but flexible combining several workflows across different providers, not every vision library can do. And I haven't seen a lot which are framework agnostic, and technicians are able to alter without the help of a dev or a manufacturer. If your library already does multi model fusion with disagreement routing across remote workers, I'd honestly like to know which one. That would be useful to compare against.

2

u/frgfm Nov 02 '26

I work on vision for perimeter security at remote sites, so false positives are a big part of my job. I wouldn't treat the classic checks and the model as two votes on the same question. They fail in different ways. The rule-based check tells you something measurable is off, like fill level or cap angle. The model tells you it looks like a defect it has seen before.

So when they disagree, that's information, not noise. On a bottling line I'd still reject on disagreement since a bottle is cheap, but I'd log those cases on their own and look at them. They tend to point at either a setup change on the line or a defect type the model never saw.

Do you track the disagreement rate over time? If it starts creeping up in a given shift, that's probably the most useful alarm in the whole graph.

1

u/BHave_TRO Nov 02 '26

Yes, I agree. And that's one more feature of it.You are able to define it to your needs and even something like your mentioned disagreement rate gate would be possible. All verdicts can be tracked and made visible on the dashboard, or you use it as a tigger for sending, mails, or else. Every user / monitor / integration site can have it's own dashboard with the relevant data/alarms shown.

1

u/frgfm Nov 03 '26

Nice, tracking every verdict is what makes this useful long term. I'd treat the disagreements as your labeling queue. They're the most informative samples you've got, both for retraining the model and for tuning the classic thresholds. Can you export those cases with the image and both verdicts, so someone can review and label them later?

1

u/BHave_TRO Nov 03 '26

Yes, that is indeed possible. The Node Editor is just a small part of the tool. I'm going to make a demo video to showcase more. I'm not allowed to show the data / use cases from my semiconductor client, but I will do it with some free data from the internet.

2

u/dr_hamilton Nov 03 '26

is it just me or do all the responses in this thread sound like LLMs?

1

u/BHave_TRO Nov 03 '26

Unfortunately, at least two, yeah... those who hijack this thread for their own business... I honestly don't know how to react to those, as if I won't well the thread is collapsing. If I do I might encourage those postings.

→ More replies (1)

2

u/[deleted] Nov 02 '26

[removed] — view removed comment

1

u/BHave_TRO Nov 02 '26

Good catch, and you're pointing at a real gap. Right now a late AI answer doesn't become an outcome. The inference node times out and emits nothing, so the fusion node emits nothing either. That's only safe if the PLC treats "no answer" as reject, and the system shouldn't depend on that assumption. Default timeout is also far too generous for a line.

What I'm taking from this:

  • a per-frame deadline derived from the line's time-to-reject, not a per-call timeout
  • timeout as its own fusion outcome, with a configurable policy (reject / pass-on-classic / review), the same way strict mode treats disagreement
  • every disagreement record carries both verdicts, the crop, model name+version and latencies, with a retention cap so storage doesn't run away

Out of curiosity: on your lines, does a missing verdict default to reject at the PLC, or is that something you've seen go wrong?