BIPS/Examples/C++ to Python: Difference between revisions
No edit summary |
|||
(2 intermediate revisions by one other user not shown) | |||
Line 1: | Line 1: | ||
<noinclude> | <noinclude> | ||
{{BIPS/Head|previous=|next=}} | {{BIPS/Head|previous=Examples/Python|next=Examples/Docker Containers}} | ||
</noinclude> | </noinclude> | ||
<seo title="BIPS/BIPS Examples C++ to Python | RidgeRun" titlemode="replace" metakeywords="GStreamer, NVIDIA, Jetson, TX1, TX2, Jetson AGX Xavier, Xavier, AI, Deep Learning, Machine Learning, Jetson TX1, Jetson TX2, Jetson Xavier, NVIDIA Jetson Xavier, NVIDIA Jetson Orin, Jetson Orin, Orin, NVIDIA Orin, NVIDIA Jetson AGX Orin, Jetson AGX Orin, Assembly Line, Assembly Line Activity, activity recognition, machine learning activity recognition, Exploratory Data Analysis, EDA" description="This RidgeRun wiki page provides more information on the RidgeRun Buffer Interprocess Sharing (BIPS) examples for C++ to Python."></seo> | |||
== Introduction == | == Introduction == | ||
BIPS was conceived with the idea of communicating C++-based video capture applications communicating with AI algorithms in Python. For instance, using GStreamer to capture video from a sensor in a Jetson platform and consuming the video feed in a PyTorch application. | BIPS was conceived with the idea of communicating C++-based video capture applications communicating with AI algorithms in Python. For instance, using GStreamer to capture video from a sensor in a Jetson platform and consuming the video feed in a PyTorch application. | ||
<br> | |||
[[File:Bips-usecase1.png|640px|frameless|center]] | [[File:Bips-usecase1.png|640px|frameless|center]] | ||
<br> | |||
Considering the examples provided in [[BIPS/Examples/C++|C++]] and [[BIPS/Examples/Python|Python]], the use case will be | Considering the examples provided in [[BIPS/Examples/C++|C++]] and [[BIPS/Examples/Python|Python]], the use case will be | ||
Line 39: | Line 42: | ||
=== One-to-one example === | === One-to-one example === | ||
1. Open two different terminals: one for producer and another for consumer. | 1. Open two different terminals: one for the producer and another for the consumer. | ||
2. In terminal 1, execute the producer: | 2. In terminal 1, execute the producer: | ||
Line 55: | Line 58: | ||
<noinclude> | <noinclude> | ||
{{BIPS/Foot||}} | {{BIPS/Foot|Examples/Python|Examples/Docker Containers}} | ||
</noinclude> | </noinclude> |
Latest revision as of 21:04, 27 August 2024
Buffer Interprocess Sharing | |
---|---|
BIPS Basics | |
|
|
Getting Started | |
|
|
User Manual | |
|
|
Examples | |
|
|
Performance | |
|
|
Contact Us | |
|
Introduction
BIPS was conceived with the idea of communicating C++-based video capture applications communicating with AI algorithms in Python. For instance, using GStreamer to capture video from a sensor in a Jetson platform and consuming the video feed in a PyTorch application.
Considering the examples provided in C++ and Python, the use case will be
- One-to-one communication
The example binaries are compiled after building. If the build directory is build
:
├── python | └── examples | └── one-to-one | ├── consumer.py | └── producer.py └── src └── examples └── one-to-one ├── consumer └── producer
Executable options
Consider the examples provided before:
Running the examples
One-to-one example
1. Open two different terminals: one for the producer and another for the consumer.
2. In terminal 1, execute the producer:
./producer
3. In terminal 2, execute the consumer (be sure of being in the python/examples/one-to-one
directory:
python3 consumer.py