Live data from Hacker News

Meta's Segment Anything written with C++ / GGML

github.com

11–20 of 34 posts

Re: Meta's Segment Anything written with C++ / GGML

#11

While I love the efficiency from these Python to C++ ports I can't stop thinking about the long tail of subtle bugs that will likely infest these libraries forever but then the Python versions also sit atop C/C++ cores

Good news! Deep learning inherently has a long tail of subtle bugs (SolidGoldMagikarp anyone?) so no one will care if C++ introduces a few more.

Re: Meta's Segment Anything written with C++ / GGML

#13

I'm so glad the AI community is finally starting to ditch Python. It has held progress back for far too long.

How has Python held it back? Most of the heavy computation lifting is done by C extensions/bindings and the models are compiled to run on CUDA, etc. What am I missing?

Re: Meta's Segment Anything written with C++ / GGML

#14

I'm so glad the AI community is finally starting to ditch Python. It has held progress back for far too long.

The AI community is nowhere close to ditching Python. Most model development and training still use python based toolchains (torch, tf...). The new trends is for popular and useful models to be ported to more efficient stack like C++/GGML for easier usage and inference speed on consumer hardware.

Another popular optimisation is to port models to WASM + GPU because it makes them easy to support a variety of platforms (desktop, mobile...) with a single API and it can still offer great performance (see Google's mediapipe as an exemple of that).

Re: Meta's Segment Anything written with C++ / GGML

#15

While I love the efficiency from these Python to C++ ports I can't stop thinking about the long tail of subtle bugs that will likely infest these libraries forever but then the Python versions also sit atop C/C++ cores

Just because Python silently ignores the bugs doesn't mean they're not there.

Re: Meta's Segment Anything written with C++ / GGML

#16

Big fan of your work GGML friends

Another GGML model port that I'm pretty excited about is https://github.com/PABannier/bark.cpp.

The Bark python model is very compute intensive and require a powerful GPU to get bearable inference speed. I really hope that bark.cpp with GPU/Metal support and quanticized model can bring useful inference speed on a laptop in the near future.

Re: Meta's Segment Anything written with C++ / GGML

#17
post #8

Earlier quoted context omitted.

Yes, GroundingDINO is an open set object detector. There are some others (eg DETIC and OWL-ViT) as well. We’ve been working on using them (often in conjunction with SAM) for auto-labeling datasets to train smaller faster models that can run in real-time at the edge: https://github.com/autodistill/autodistill

Would this be suitable for labeling images to search by keyword (think Apple Photos-like “car” searches to pull up photos of cars)

I think you would want to use something like CLIP embeddings for image search.

Really enjoyed using this app for iOS: https://github.com/mazzzystar/Queryable HN discussion: https://news.ycombinator.com/item?id=34686947

Or explore the dataset stable diffusion was trained on: https://news.ycombinator.com/item?id=32655497

Re: Meta's Segment Anything written with C++ / GGML

#18

I'm so glad the AI community is finally starting to ditch Python. It has held progress back for far too long.

I’d say discovery and innovation would be slower in a less relaxed language. And speed end up comparable thanks to the compiled parts of python

Re: Meta's Segment Anything written with C++ / GGML

#19

I'm so glad the AI community is finally starting to ditch Python. It has held progress back for far too long.

In general if you don't know what you are doing, it's much faster to first figure out a good strategy for a solution in a language that does not suffer from all of the encumbrance C++ brings in.

Python is really great for fast prototyping. It can be argued most AI products so far are result of fast prototyping. So not sure if there is anything wrong with that.

As practical models emerge, at that point it indeed makes sense to port them to C++. But I would not in my wildest dreams suggest prototyping a data model in C++ unless absolutely necessary.

Re: Meta's Segment Anything written with C++ / GGML

#20
post #13

I'm so glad the AI community is finally starting to ditch Python. It has held progress back for far too long.

How has Python held it back? Most of the heavy computation lifting is done by C extensions/bindings and the models are compiled to run on CUDA, etc. What am I missing?

Presumably what you're missing is that it's that IshKebab probably doesn't work in AI/ML at all (no links in his profile, but you can judge his post history yourself). Anyone can have voice opinion, but that doesn't mean it's particularly well informed.
Post reply on HN