Darkflow Inference and Export
Use this sub-skill when the user wants to run a trained Darkflow model, return predictions, save annotated images or JSON, demo a camera/video stream, or export/load a frozen graph.
Inputs you should collect
- A Darkflow-compatible
.cfgmodel file or a.pb/.metapair. - A
.weightsfile, checkpoint step, or existing.pb/.metapair. - Image folder, video file, or
camerademo source. - Optional labels file for custom, non-VOC, non-COCO model names.
- Optional threshold, GPU fraction, batch size, JSON-output, or save-video choices.
First checks
- If the environment is not already proven, run
../../scripts/check_install.py. - Use
../../references/model-overview.mdto select a model family and label source. - Use
../../references/cli-reference.mdwhen building aflowcommand. - Use
references/troubleshooting.mdbefore retrying failed inference or export runs.
Route by task
- Image folder inference: Use
references/workflows.md#image-folder-prediction. - JSON output: Use
references/workflows.md#json-output. - Python API predictions: Use
references/workflows.md#python-api-predictionand../../references/api-reference.md. - Camera or video demo: Use
references/workflows.md#camera-or-video-demo. - Frozen graph export / load: Use
references/workflows.md#protobuf-export-and-load.
Outputs to expect
- Annotated images or JSON files are written under the selected image directory's
out/folder. return_predict()returns a list of dictionaries withlabel,confidence,topleft, andbottomright.--savepbwrites a.pbgraph and a.metaJSON metadata file.--saveVideowritesvideo.avifrom demo mode.
Boundaries
This sub-skill does not own dataset annotation cleanup, custom-class config editing, or checkpoint training loops. Route those to ../training/SKILL.md, then return here for prediction or export after a trained model exists.
Quality checks before claiming success
- The CLI command or Python options include a valid model source and a valid weight/checkpoint/graph source.
- If JSON output is requested, the user knows to inspect the image directory's
out/folder. - If using
return_predict(), the input is already anumpy.ndarrayimage array. - If using GPU flags, the user has a GPU-enabled TensorFlow 1.x stack; otherwise prefer CPU mode.