A high-performance C++ core connected with Python-based Artificial Intelligence engines using pybind11.
AI Bridge is a modern integration framework that combines the speed and efficiency of C++ with the flexibility and ecosystem of Python Artificial Intelligence libraries.
The project demonstrates how a C++ application can directly communicate with Python AI modules using pybind11 embedding technology.
This architecture is commonly used in:
- 🤖 Robotics systems
- 🧠 Artificial Intelligence engines
- 🚗 Autonomous systems
- 🎮 Game AI
- 🏭 Industrial automation
- 🖥️ Edge AI applications
- 🔬 Scientific computing
┌──────────────────┐
│ │
│ C++ Engine │
│ │
└────────┬─────────┘
│
│ pybind11
│
┌────────▼─────────┐
│ │
│ Python AI Layer │
│ │
└────────┬─────────┘
│
│
┌────────▼─────────┐
│ Machine Learning │
│ Models / Logic │
└──────────────────┘
- Native C++ execution speed
- C++17 modern architecture
- Low latency AI communication
- Use Python machine learning libraries
- Easily integrate:
- TensorFlow
- PyTorch
- NumPy
- Scikit-learn
- OpenCV
Powered by:
- pybind11
- Python C API
- Embedded Python interpreter
ai-bridge/
├── cpp/
│ ├── main.cpp
│ ├── ai_bridge.cpp
│ ├── ai_bridge.h
│ ├── CMakeLists.txt
│ └── pybind11/
│
├── python/
│ ├── ai_model.py
│ ├── requirements.txt
│ └── init.py
│
├── build.sh
├── README.md
└── .gitignore
Tested on:
- Ubuntu Linux
- Debian-based systems
Install:
sudo apt install build-essential
## cMake
sudo apt install cmakesudo apt install python3-devVerify:
python3 --version
## Example
Python 3.13.xClone repository:
git clone --recursive https://github.com/bundlab/ai-bridge.gitThe --recursive flag downloads the pybind11 dependency.
If already cloned:
git submodule update --init --recursiveCreate virtual environment:
python3 -m venv venvActivate:
source venv/bin/activateInstall dependencies:
pip install -r python/requirements.txtMake build script executable:
chmod +x build.shBuild:
./build.shSuccessful output:
[100%] Built target ai_appVersion 1.0
✅ C++ / Python bridge
✅ pybind11 integration
✅ Embedded Python runtime
Version 2.0
Planned:
- TensorFlow inference
- PyTorch model loading
- GPU acceleration
- CUDA support
- Async AI execution
- REST API interface
Version 3.0
Advanced AI Platform:
- Distributed AI inference
- Model management system
- Edge AI deployment
- Robotics integration
Robotics
C++ Hardware Control
+
Python AI Vision
Autonomous Systems:
Sensors
|
C++ Processing
|
Python Decision Model
AI Applications
Fast C++ Runtime
+
Python Intelligence
Contributions are welcome.
This project is licensed under the MIT License.
See:
LICENSE
for details
bundlab
Building modern systems with:
- C++
- Python
- Artificial Intelligence
- Robotics
- Edge Computing
⭐ If this project helps you, consider giving it a star on GitHub.