Tasks
Tasks transform artefacts. Choose a task class in pipeline.yaml, give it a
name, and connect its input and output artefact nodes. Commands use the
configured name, not the class name:
collectra --pipeline pipeline.yaml task --help
collectra --pipeline pipeline.yaml task detect_lines --help
collectra --pipeline pipeline.yaml task detect_lines run --help
Command overview
Task class |
Commands |
|---|---|
ObjectDetectionYOLO |
|
ObjectDetectionRFDETR |
|
ObjectDetectionDETR |
|
ImageSegmentationSam3 |
|
LineDetectorRLSA |
|
LineDetectorSurya |
|
ImageClassifierYOLO |
|
ImageClassifierTorchvision |
|
ImageClassifierHuggingFace |
|
OCRSuraya |
|
LLM |
|
LLMCanonicaliser |
|
IRNResolver |
|
ImageOrienter |
|
ConcatenateText |
|
Running tasks
Every task supports run INPUTS... and run --help. Shared options are
--output, --verbose, --usage, and --render. --usage records
LLM token usage when supported, and --render requires Graphviz.
Task-level run executes only the selected task. Its input artefacts must be
present in the supplied results, or be the root image supplied as a raw file.
To execute a task and then its downstream tasks, use the pipeline command:
collectra --pipeline pipeline.yaml run results/page001.collectra --task detect_lines
Training tasks
Only the detection and classification tasks listed above expose train.
Training consumes annotated Collectra result directories. Options differ by
backend; use the particular task’s train --help. Torchvision and Hugging Face
classifiers support opt-in experiment logging with --wandb. RF-DETR exposes
--no-wandb to disable its default logging.
Training updates the task’s model in the pipeline and retains training logs by default. See Quickstart for preparing annotations and a complete training example. Evaluation and image extraction are artefact commands, not task commands.