Components
- Base VLM:
Qwen/Qwen2.5-VL-7B-Instruct
- Language adapter:
adapter_model.safetensors (the stable RC3 adapter retained for label proposals)
- RC4 detector:
point_detector.safetensors with point_detector_config.json (Faster R-CNN ResNet50 FPN v2)
- OCR engine: Tesseract 5.3.4, modes 3/6/11/12
- Output:
legend_detected, nullable legend_bbox, and point entries with label, feature_type, and symbol_bbox
Verified Results
Table with columns: Split, Matched / Gold, Precision, Valid JSON, Empty-Gold FP| Split | Matched / Gold | Precision | Valid JSON | Empty-Gold FP |
|---|
| publichard | 20 / 20 | 1.000 | 1.000 | 0 |
| b961 | 2 / 2 | 1.000 | 1.000 | 0 |
| eval5 | 25 / 25 | 1.000 | 1.000 | 0 |
| eval15 |
Six-split preservation recall is 159/167 (0.952096). Blind-1 improves RC3 from 41/106 at 0.394 precision to 58/106 at 0.563. Blind-2 improves RC3 from 23/100 to 45/100 at 0.584.
Direct detector/OCR output, before model-label union, reaches 47/106 on Blind-1 and 22/100 on Blind-2 with valid JSON rates 1.000 and 1.000.
Requirements
Install Python dependencies from requirements.txt and Tesseract 5.x from your operating system. The published quality claim is for the bundled hybrid pipeline, not the LoRA by itself.
Run The Pipeline
python scripts/run_cartolegend_rc4_hybrid.py \
--input INPUT.jsonl --out-dir OUTPUT
Pass --model-predictions predictions.jsonl to reuse Qwen proposals, or --trust-model-predictions only for an independently validated upstream package. The default mode requires exact OCR support for model labels.
Stage Reproduction
The bundled scripts expose each stage and produce hashed JSONL artifacts:
python scripts/predict_cartolegend_point_detector.py \
--checkpoint point_detector.safetensors --input INPUT.jsonl --output detector.jsonl
python scripts/extract_cartolegend_ocr.py \
--input INPUT.jsonl --output ocr.jsonl --psm 3 --psm 6 --psm 11
python scripts/extract_cartolegend_ocr.py \
--input INPUT.jsonl --output ocr_psm12.jsonl --psm 4 --psm 12
Generate Qwen label proposals with the adapter, then combine them with scripts/build_cartolegend_rc4_ocr_hybrid.py. pipeline_config.json records the exact thresholds and component hashes. Run the independent verifier before relying on bundled metrics:
python scripts/verify_cartolegend_rc4_hybrid_release_bundle.py \
--release-dir . --require-pass
Training Data
The detector was trained on 488 unique public map-legend images with 1,259 reviewed point boxes and 53 empty negatives. Source groups are disjoint from Blind-1, Blind-2, eval15, Unseen5, and post60. The exact training verifier and dataset manifest are bundled.
Intended Use
Research and human-audited extraction of visible point-symbol legend rows from geologic and resource maps.
Not for autonomous geologic interpretation, legal boundary decisions, navigation, or safety-critical mapping. OCR and symbol boxes remain imperfect; see both failure taxonomies. Source-map redistribution rights are not granted by this weights-and-evidence bundle.