scripts.postprocessing.consolidate_results

Consolidate Pipeline Results Script

Creates a single JSON file that links all per-label results across the pipeline (detection → classification → rotation → OCR → post‑processing).

Supports both the traditional (TensorFlow-based) pipeline and the Gemini pipeline. Output is a flat list of per-label entries, each containing: source_image, label_filename, label_index, category, bounding-box coordinates, rotation_angle, and ocr (method, text, confidence).

Functions

consolidate_results(output_dir)

Auto-detect pipeline type and consolidate all results.

main()

Main entry point.

parse_arguments()

Parse command-line arguments.