Quick start
This is the fastest way to run a first exported .denkflow pipeline.
What is needed
- a
.denkflowexport from the Vision AI Hub - a valid personal access token (PAT)
- a test image
- a Python environment or a C/C++ build environment
Step 1: Install the SDK
Follow the matching section in the Installation guide:
- Python: wheel installation from the DENKweit package registry
- C/C++:
denkflow.hplus the shared library package for the target platform
Step 2: Run an exported pipeline
An exported .denkflow is run through SimplifiedPipeline, which initializes the pipeline and returns structured results in absolute pixel coordinates.
- Python
- C / C++
import denkflow
pipeline = denkflow.Pipeline.from_denkflow("path/to/model.denkflow", pat="YOUR-PAT")
simplified = denkflow.SimplifiedPipeline(pipeline)
results = simplified.run("path/to/image.jpg", confidence_threshold=0.5)
for image_result in results:
for r in image_result.results:
if r.bounding_box:
print(r.bounding_box.class_label.name, r.bounding_box.confidence)
#include <stdio.h>
#include <stdlib.h>
#include "denkflow.h"
static void handle_error(enum DenkflowResult code, const char* fn) {
printf("%s: %d", fn, (int)code);
if (code != DenkflowResult_Ok) {
char* buffer = (char*)malloc(DENKFLOW_ERROR_BUFFER_SIZE);
denkflow_get_last_error(buffer);
printf(" (%s)\n", buffer);
free(buffer);
exit(EXIT_FAILURE);
}
printf("\n");
}
int main(void) {
DenkflowPipeline* pipeline = NULL;
DenkflowSimplifiedPipeline* simplified = NULL;
DenkflowImageInferenceResults* results = NULL;
DenkflowHubLicenseSource* license_source = NULL;
handle_error(
denkflow_hub_license_source_from_pat(&license_source, "YOUR-PAT", NULL, NULL),
"denkflow_hub_license_source_from_pat"
);
handle_error(
denkflow_pipeline_from_denkflow(&pipeline, "path/to/model.denkflow", (void*)license_source),
"denkflow_pipeline_from_denkflow"
);
handle_error(denkflow_simplified_pipeline_new(&simplified, &pipeline), "denkflow_simplified_pipeline_new");
handle_error(
denkflow_simplified_pipeline_run_from_file(&results, simplified, "path/to/image.jpg", 0.5f),
"denkflow_simplified_pipeline_run_from_file"
);
for (size_t b = 0; b < results->image_results_length; ++b) {
DenkflowImageInferenceResult* image_result = &results->image_results[b];
for (size_t i = 0; i < image_result->results_length; ++i) {
DenkflowInferenceResult* r = &image_result->results[i];
if (r->bounding_box != NULL) {
printf("%s: %f\n", r->bounding_box->class_label.name, r->bounding_box->confidence);
}
}
}
denkflow_inference_results_free(&results);
denkflow_simplified_pipeline_free(&simplified);
denkflow_free_object((void**)&license_source);
return 0;
}
Step 3: Verify the runtime
A successful run that returns detections confirms the environment is working. If initialization fails, confirm the model file, the PAT or license, and the runtime dependencies, then consult the Troubleshooting guide.
Next steps
- SimplifiedPipeline: input types, result structure, and drawing results
- Authentication and licensing: PATs and offline licensing
- Runtime and device selection: CPU and GPU inference devices
- Docker deployment: production containers