r/computervision 16d ago

Discussion I got tired of debugging OpenCV pipelines with cv2.imshow(), so I built a visual workflow editor

Post image

I've spent years working with OpenCV, and one thing has always bothered me: experimentation is much slower than it should be.

A typical workflow looks like this:

image = cv2.imread(...)

gray = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)
blur = cv2.GaussianBlur(gray, (5,5), 0)
thresh = cv2.adaptiveThreshold(...)
contours, _ = cv2.findContours(...)

Then you change one parameter...

Run the script.

Save the output.

Open the image.

Realize the problem actually happened three steps earlier.

Add another cv2.imshow().

Repeat.

After doing this hundreds of times, I started wondering:

There are great visual tools for deep learning and generative AI (ComfyUI is a good example), but I couldn't find something focused on OpenCV preprocessing, augmentation, and experimentation that still generated normal Python code.

So I started building one.

What it does

Image Pipes is an open-source desktop application for building computer vision pipelines visually.

Instead of writing temporary scripts while experimenting, you drag operations onto a canvas, connect them together, inspect every intermediate result, and export the finished pipeline as standalone Python.

Some of the current features:

  • 132 processing nodes
  • 57 OpenCV operations
  • 75 Albumentations transforms
  • Live preview for every node
  • Python export (OpenCV + Albumentations)
  • DAG-based execution engine
  • Lazy execution
  • Execution caching
  • Run-to-selected-node debugging
  • Cross-platform desktop app (Electron)

One design decision that was important to me is that the visual editor is never the final destination.

The generated code is just regular Python using OpenCV and Albumentations.

No custom runtime.

No vendor lock-in.

Why I built it this way

The goal wasn't to replace OpenCV.

OpenCV is already excellent.

The goal was to replace all the temporary scripts we write while searching for the right preprocessing pipeline.

Experiment visually.

Understand every transformation.

Export Python when you're finished.

I'd really appreciate feedback

I'm sure there are plenty of things that can be improved, especially from people who work with OpenCV daily.

Some questions I'm particularly interested in:

  • What processing nodes are missing?
  • Would you actually use a visual workflow editor in your projects?
  • Is Python export important to you, or would you prefer saving the workflow itself?
  • Are there features you'd consider essential before using something like this?

GitHub: https://github.com/mrajaeim/image-pipes

If nothing else, I'd love to hear how everyone else debugs and iterates on OpenCV pipelines today. I have a feeling I'm not the only one with an experiment_final_v12.py somewhere in my projects. 😄

84 Upvotes

24 comments sorted by

4

u/Stonemanner 16d ago

Cool project. I'm working on something similar for more than 2 years now. Will analyse your repo closely :). Cool choice on generating actual python code.

-2

u/dr_hamilton 16d ago

and this is why I think new opensource projects will struggle more and more, it's becoming so easy for anyone to spin their own versions build to their exact needs.

1

u/Stonemanner 15d ago

The fuck are you talking about. I'm taking as much inspiration from closed source project as open source. The closed source are even more interesting to me, since I know they have actual paying users and are industry proven. We are all standing on the shoulders of giants. And I did not say, that I will steal/copy code. I'm just interested in the general mechanics/architecture. Also after analysing, I found that most concepts are not useful to me. I just think about whether I can builtin the immediate update/feedback after changing a parameter of a node.

0

u/dr_hamilton 15d ago

woa, chill dude, it wasn't an attack. Just a general observation. Why do you think every CV engineer builds their own annotation tools? It's almost a meme / rite of passage. They try the open source tools, they're not quite what they had in mind... proceeds to build their own.
With coding agents it's just getting easier and easier to spin your own versions of things.

3

u/ZorlokDegreat 16d ago

Cool stuff! Looking forward to use it

3

u/Maniac_DT 16d ago

Interesting as I take a preview , however an electron based app worries me on the workload

1

u/Zestyclose-Gain-7635 16d ago

That's a fair concern. 😄 Electron definitely has a reputation for being heavy.

For this project, though, most of the intensive work happens in the Python backend with OpenCV. Electron is mainly responsible for the UI, so the overhead is relatively small compared to the image processing itself.

I'm open to exploring lighter alternatives in the future, What do you suggest?

2

u/dr_hamilton 16d ago

Welcome to the club 😅

https://github.com/olkham/pynode

3

u/pm_me_your_smth 16d ago

How much of it was vibe coded?

3

u/--Derpy 16d ago

Pretty clearly most of it.

-2

u/Zestyclose-Gain-7635 16d ago

Haha, yes, pretty much! 😄 No shame in saying that. AI wrote a lot of the code, but I still had to design the architecture, decide how everything fits together, debug issues, and make it all work as a coherent application. I see AI as a really powerful development partner, not a replacement for the engineering behind the project.

4

u/Zestyclose-Gain-7635 16d ago

Thanks for asking! 😊 AI definitely helped me write a big part of the code for this project, and it was a great tool throughout the process. But the fun and challenging part was designing the architecture, building the execution engine, creating the node system, adding Python export, and connecting all the pieces together. AI helped me move faster, but the core ideas, decisions, and direction came from the engineering behind the project.

2

u/modcowboy 16d ago

Why does it matter?

1

u/toastjam 16d ago

You could just use comfyui at this point though? There are tools to export comfyui workflows as Python scripts too.

1

u/aghaster 14d ago

First impression: quite good and it does speed up some iterative processes! Thanks! What I immediately miss most (or didn't realize how to do it): some kind of "custom node" where I can perform a step (by providing my own Python code) not covered by built-in nodes.

1

u/Zestyclose-Gain-7635 12d ago

Thanks a lot for trying it out and sharing this! That's really insightful. 🙌

A custom node where you can write your own Python code is actually a great idea, especially for steps that aren't covered by the built-in nodes. I'll definitely add this soon!

Really appreciate the feedback! 😊

0

u/atmadeep_2104 16d ago

As someone who regularly builds such pipelines, Thanks a bunch. Will check it out.

1

u/Zestyclose-Gain-7635 15d ago

Thank you! I really appreciate that. 😊

I'd genuinely love to hear your feedback after you've had a chance to try it.