Skip to main content
Version: 0.10.x [Latest Beta]

Classification

A classification pipeline returns a scalar result per class on each InferenceResult. See SimplifiedPipeline for the shared setup and Interpreting results for the result model.

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")

for image_result in results:
for r in image_result.results:
if r.scalar:
print(f"{r.scalar.class_label.name}: {r.scalar.value:.2f}")