validation¶
training.validation
¶
extract_json(text)
¶
Strictly extracts JSON, failing over to ERROR if the model disobeys formatting.
Source code in ground_segment/training/validation.py
17 18 19 20 21 22 23 24 25 26 27 | |
print_confusion_matrix(truths, preds, condition_name)
¶
Prints a per-class Recall and Precision breakdown, plus an aggregate total.
Source code in ground_segment/training/validation.py
54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 | |
run_inference(model, processor, image, prompt)
¶
Runs a single image+prompt through the VLM and returns parsed JSON + raw text.
Source code in ground_segment/training/validation.py
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 | |