Шпаргалка по инференсу на С++

Если ты только погружаешься в работу с инференсом на C++ и тебе интересно получить представление о том, как можно собирать и запускать популярные ML-библиотеки, то я рад поделиться базой, которую я использую в своих проектах. Здесь ты найдёшь простые проекты, решающие основные ML-задачи, и немного теории к этому коду. Надеюсь, что приведённый код может стать первой рабочей версией для новых фич в твоих проектах.

https://habr.com/ru/articles/986204/

#C++ #Inference #ML #OpenCV #mediapipe #ocr #yolo #triton #onnxruntime #pybind11

Шпаргалка по инференсу на С++

План курса про инференс ML-моделей на C++ Оглавление Введение OpenCV CMake Conan MediaPipe MediaPipe С++ MediaPipe Pybind11 YOLO ONNX Runtime Triton Inference Server OCR Tesseract Введение Я 5 лет...

Хабр

Are you one of the 10'000s of #CXX #Python developers using #pybind11? Do you care about great #autodocs and #autocompletion in #interactive workflows?

The pybind11-stubgen project seeks support in #maintaining it! We #pybind11 maintainers would move it to the #pybind mainline org, but we need a community to help support the .pyi stub generator <3

Chime in here:
https://github.com/sizmailov/pybind11-stubgen/issues/244

#opensource #sustainability #CallForMaintainers

Call for maintainers · Issue #244 · sizmailov/pybind11-stubgen

I've started pybind11-stubgen when there were no good alternatives to make good enough stubs for pybind modules. As of today I don't have a C++ project that needs python bindings, so I'm a bit out ...

GitHub

Does anyone know of a good overview how much overhead using ctypes to call functions from a dynamic library adds to #python code instead of building a native extension e.g via #cython #pybind11 or #nanobind ?

A blog post with some statistics would be perfect but just ballpark figures from anyone who knows what they are talking about is fine

📣 New tutorial at #EuroSciPy2025:
“Using Cython and C++ Kernels to Speed Up Python Libraries”
💻 With Anatoly Volkov & David Cortes

🧠 Learn where Python hits performance bottlenecks
⚙️ Implement linear regression kernels in Cython & C++
🔗 Use pybind11 to bridge C++ with Python
📊 Benchmark and compare performance

Walk away ready to build or contribute to faster, open-source scientific libraries.

📅 https://euroscipy.org/schedule
#Cython #Cpp #OpenSource #Pybind11 #ScientificComputing

Sponsoring

The EuroSciPy meeting is a cross-disciplinary gathering focused on the use and development of the Python language in scientific research.

專注在學習的時候,
我們常會為了紀錄與分享而書寫,
不帶其它目的。
學到一項新事物,找到一個新工具,
覺得好方便、好有趣,
趕快寫一篇推文脆文,讓大家都知道。
這是很多程式員的心情寫照。

寫了幾十年程式以後,雖然這種分享的心情還在,
但不得不承認淡了一點。

最近被問到一個 #pybind11 caster 的問題,
比手畫腳地講了半天以後,
才猛然想起三年多前有寫過一篇筆記:
https://yyc.solvcon.net/en/latest/writing/2021/pyboost11/pyboost11.html
這或許是最近一次稍微基於分享的心態寫的紀錄,
雖然分享只佔了一小部分的目的。

寫下來的主要原因是怕自己忘記。
當時為了研究 pybind11 和 boost.python 的四向轉換,
追了不少程式,
我有自信不寫下來的話,一定會忘記細節。
現在一看,果不其然,
還好當年未雨綢繆,有寫清楚範例程式。

活得愈久,生活愈忙碌。
需要毅力才能找回單純為了書寫而作的書寫。

Interoperation between pybind11 and Boost.Python - Yung-Yu's Notes

Pybind11 is pretty cool. If you need to use a Python library a lot for like finding icons or something, you can just start the interpreter when your program starts and not have it restart every time that code runs.

#programming #pybind11 #python

@cdavies I really really want to hate #python sometimes but can't. The darn thing is so useful. Nothing beats it for anything <1k loc! And no matter what you want to do, it is second or third best choice available.

But as a language for developing systems, it sucks! C-API is terrible (shoutout to #pybind11 and #maturin). Dynamic typing becomes a bane (#mypy helps). For last two days, I am tweaking a #fastapi, I miss rust type safety when refactoring.

#FOSDEM Could anyone recommend a useful resource for learning pybind11, in complement of the docs (https://pybind11.readthedocs.io/en/stable/index.html  ?

#Science #Python #Cpp #pybind11 #Physics #Research #Climate #FOSDEM24

pybind11 documentation

I am once again delving into the world of #meta-meta #programming..

Generate a #Python binding (#pybind11) for a C++ #binding which you generate from a #WSDL/ #XSD #SOAP service definition given you have only the WSDL at hand to start with.

I was aware this project wasn't exactly small but it's growing further. Glad my boss nodded it off as a “that's quick and easy and cheaper than licensing gSOAP!” thing.

Fun adventure profiling showed strange overhead in #pybind11.

Did a dig in and found https://github.com/pybind/pybind11/blob/48949222c637da9fc72b0ed6526ae1b40bb55237/include/pybind11/detail/internals.h#L111-L142

They are hashing and comparing strings from type_index's name if you use libc++ !?!?!

Changing to libstdc++ removed this overhead.

#cplusplus #cpp #programming #performance

pybind11/internals.h at 48949222c637da9fc72b0ed6526ae1b40bb55237 · pybind/pybind11

Seamless operability between C++11 and Python. Contribute to pybind/pybind11 development by creating an account on GitHub.

GitHub