executing-plans
executing-plans
Use when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available
inferenceGuides agents through tensorflow-yolov3 frozen .pb image and video inference, tensor contract checks, preprocessing, postprocessing, NMS, and empty-detection troubleshooting.
Independent GitHub snapshot · Automated classification · Original documentation governs
Use this sub-skill when the user wants to run, adapt, debug, or explain frozen .pb image/video inference for this TensorFlow 1.x YOLOv3 implementation. Trigger phrases include image demo, video demo, camera inference, frozen graph, yolov3_coco.pb, PB tensor names, preprocessing, postprocessing, NMS, empty detections, and bounding-box output format.
Do not use this sub-skill to create the PB or checkpoint files; route checkpoint conversion and graph freezing to the conversion skill. Do not use it for long training or mAP evaluation, except to explain the inference outputs that feed later evaluation.
The original demo workflow uses these defaults:
./yolov3_coco.pb./docs/images/road.jpeg./docs/images/road.mp4; camera mode is selected by using video path 0./data/classes/coco.names./data/anchors/basline_anchors.txtinput_size = 416num_classes = 800.30.45input/input_data:0pred_sbbox/concat_2:0pred_mbbox/concat_2:0pred_lbbox/concat_2:0[xmin, ymin, xmax, ymax, score, class] in original image coordinates.Before writing or running an inference script, check the contract safely without model execution. From the working directory that contains the PB/media/data paths, run the bundled checker by path:
python sub-skills/inference/scripts/pb_inference_contract.py \
--pb ./yolov3_coco.pb \
--image ./docs/images/road.jpeg \
--classes ./data/classes/coco.names \
--anchors ./data/anchors/basline_anchors.txt \
--input-size 416 \
--num-classes 80
If the sub-skill has been exported elsewhere, replace the script path with that exported location. The checker validates paths, class count, anchor shape, and PB tensor names without running a TensorFlow session.
(height, width), letterbox-resize to [416, 416], normalize to [0, 1], and add a batch dimension.(-1, 5 + num_classes), concatenate all scales, run postprocessing at score threshold 0.3, and run class-wise NMS at IoU threshold 0.45.[xmin, ymin, xmax, ymax, score, class]. Convert class to int before indexing class names.Image.show() or cv2.imshow().core.utils reads the class file during import through the default argument of draw_bbox; importing it outside a working directory where ./data/classes/coco.names exists can fail before inference starts.image_preporcess and performs a BGR-to-RGB conversion internally; avoid accidental double channel swaps when refactoring.