Welcome to the CoreFlow sample applications! This collection demonstrates the power and flexibility of our graph-based execution runtime with built-in AI extensions. Whether you're building computer vision pipelines, deploying machine learning models, or creating custom AI workflows, these samples showcase how CoreFlow can accelerate your development and deployment.
This section provides sample applications that showcase potential usage or may used as reference to develop your own products.
🌍 Hello World
Start your CoreFlow journey with our Hello World sample. This demonstrates graph loading and execution - perfect for understanding the basics.
auto graphs = xml::Import::importFromXML(context, argv[1]);
for (auto graph : graphs) {
std::cout << "Graph processed successfully" << std::endl;
}
}
@ VX_SUCCESS
No error.
Definition vx_types.h:543
Key Features:
- XML graph definition
- Simple execution model
- Multiple graph support
Perfect for: Learning CoreFlow basics, prototyping, simple automation
Run the hello world sample
./bin/examples/hello_world ../data/graph.xml
🤖 AI Chatbot Sample
Experience the power of AI integration with our interactive chatbot sample. This demonstrates how CoreFlow seamlessly integrates AI models into your applications with just a few lines of code.
Key Features:
- Interactive command-line interface
- Real-time AI responses
- Continuous operation
Perfect for: Customer service bots, interactive applications, AI-powered assistants
Pre-requisites
- Model server – Ollama used in this sample
Run the AI chatbot sample
./bin/examples/chatbot_sample
AI Chatbot - Type 'q' or 'quit' or 'exit' to stop
==========================================
You: hi
AI: How can I assist you today?
You: tell me about yourself
AI: I'm an artificial intelligence model known as Llama.
Llama stands for "Large Language Model Meta AI."
You: what is the preamble to the US constition ?
AI: The preamble to the United States Constitution is:
"We the People of the United States, in Order to form a more perfect Union, establish
Justice, insure domestic Tranquility, provide for the common defence, promote the general
Welfare, and secure the Blessings of Liberty to ourselves and our Posterity, do ordain
and establish this Constitution for the United States of America."
🔢 Digit Classification with ONNX-RT
Dive into machine learning with our interactive MNIST digit classification sample. This showcases ONNX Runtime integration and demonstrates how to build intelligent ML-powered systems.
Key Features:
- Interactive digit pattern generation
- Real-time classification results
- Confidence scoring
- Multiple pattern types (0-9)
Perfect for: lightweight ML enabled pipelines or workflows
Run the digit classification using ONNX-RT sample
./bin/examples/ort_classification_sample
Interactive MNIST Digit Classification Using ONNX RT
===================================================
Enter single digit (0-9) (or type 'auto' to auto-generate digit, 'quit' to exit): auto
Auto-generating digit: 1
Digit Pattern (28x28):
=====================
............................
............................
............................
............................
.............##.............
.............##.............
.............##.............
.............##.............
..............#.............
..............#.............
..............#.............
..............#.............
..............#.............
..............#.............
..............#.............
..............#.............
..............#.............
..............#.............
..............#.............
..............#.............
..............#.............
..............#.............
..............#.............
..............#.............
............................
............................
............................
............................
Processing digit classification...
Classification Results:
======================
Digit 0: -3.0747
Digit 1: 8.6244 <-- PREDICTED
Digit 2: -3.4604
Digit 3: -2.2309
Digit 4: 2.1414
Digit 5: -1.1872
Digit 6: -1.5213
Digit 7: 0.1319
Digit 8: -2.3113
Digit 9: -3.9702
Predicted digit: 1 (confidence: 862.44%)
==================================================
🖼️ Image Processing Pipeline
Explore traditional computer vision with our image processing pipeline. This sample demonstrates how CoreFlow handles complex multi-stage image transformations efficiently.
Key Features:
- Color space conversion
- Gaussian blur processing
- Memory-efficient operations
- Pipeline optimization
Perfect for: Image preprocessing, computer vision pipelines, real-time video processing
Run the image processing sample
./bin/examples/blur_pipeline
auto gray = Image::createImage(context, width, height,
VX_DF_IMAGE_U8);
auto blur = Image::createImage(context, width, height,
VX_DF_IMAGE_U8);
@ VX_DF_IMAGE_RGB
A single plane of 24-bit pixel as 3 interleaved 8-bit units of R then G then B data....
Definition vx_types.h:816
@ VX_DF_IMAGE_U8
A single plane of unsigned 8-bit data. The range of data is not specified, as it may be extracted fro...
Definition vx_types.h:855
@ VX_DF_IMAGE_YUV4
A 3 plane of 8 bit 4:4:4 sampled Y, U, V planes. This uses the BT709 full range by default.
Definition vx_types.h:845
🔧 Custom Kernel Development
Learn how to extend CoreFlow with your own custom processing code on the fly. This sample shows the complete workflow from kernel creation to graph integration.
auto add_kernel = Kernel::registerCustomKernel(
context,
"example.scalar_add",
{
},
(void)node;
(void)num;
scalar_a->readValue(&a);
scalar_b->readValue(&b);
c = a + b;
scalar_out->writeValue(&c);
});
uint32_t vx_uint32
A 32-bit unsigned value.
Definition vx_types.h:85
vx_enum vx_status
A formal status type with known fixed size.
Definition vx_types.h:550
@ VX_TYPE_INT32
A vx_int32.
Definition vx_types.h:440
struct Node * vx_node
An opaque reference to a kernel node.
Definition vx_types.h:253
@ VX_OUTPUT
The parameter is an output only.
Definition vx_types.h:720
@ VX_INPUT
The parameter is an input only.
Definition vx_types.h:718
@ VX_PARAMETER_STATE_REQUIRED
Default. The parameter must be supplied. If not set, during Verify, an error is returned.
Definition vx_types.h:1436
signed int int32_t
Definition stdint.h:42
struct Reference * vx_reference
Definition vx_types.h:173
struct Scalar * vx_scalar
Definition vx_types.h:208
Key Features:
- Custom kernel implementation
- Graph integration
- Parameter handling
Perfect for: Custom algorithms, specialized processing, domain-specific solutions
Run the custom code sample
./bin/examples/custom_code
Result: 7 + 5 = 12