Views
No views yet
1CATA-Final
2├── Visual encoder: pretrained frozen ViT/timm backbone
3├── Language model: Qwen2.5-3B-Instruct
4├── Parameter-efficient tuning: QLoRA, r=16, alpha=32, dropout=0.05
5├── Visual TDA fusion: patch-level TDA descriptors fused into visual features
6├── Decoder adaptation: gated TDA TopoAdapter in the last 8 Qwen decoder layers
7└── TDA condition vector: 36 dimensions from patch-level mean/std/max statisticsvision_pretrained=True is enabled.q_proj and v_proj.| Model | BLEU | ROUGE-1 | ROUGE-2 | ROUGE-L | METEOR |
|---|---|---|---|---|---|
| CATA-Final, Epoch 5 | 0.4763 | 0.7153 | 0.5301 | 0.6882 | 0.6934 |
| Model | BLEU | ROUGE-1 | ROUGE-2 | ROUGE-L | METEOR | chrF++ | BERTScore-F1 |
|---|---|---|---|---|---|---|---|
| Baseline, ViT + Qwen | 0.354 | 0.613 | 0.410 | 0.570 | 0.586 | 0.565 | 0.942 |
| Visual TDA only | 0.373 | 0.646 | 0.442 | 0.604 | 0.620 | 0.587 | 0.947 |
| TDA Adapter only | 0.447 | 0.701 | 0.513 | 0.673 | 0.683 | 0.647 | 0.956 |
| Visual TDA + TDA Adapter | 0.451 | 0.706 | 0.518 | 0.677 | 0.687 | 0.651 | 0.956 |
1cata_multitask_final/
2├── README.md
3├── requirements.txt
4├── submission_task1.py # Task 1 inference script
5├── submission_task2.py # Task 2 metadata for organizers
6├── generate_task2_cata_final.py # Regenerates Task 2 JSONL + visual evidence
7├── validate_task2_submission.py # Validates Task 2 JSONL format and paths
8├── submission_task2.jsonl # Submitted Task 2 explanation file
9├── visuals/ # Heatmaps and evidence JSON files
10├── checkpoints/
11│ └── last.pt # CATA-Final checkpoint
12└── src/ # Model, topology, data, and runtime codepip install -r requirements.txtpython submission_task1.pycheckpoints/last.ptpredictions_1.json1Runtime config: Pure Cubical TDA | topo_mode=tda_only topo_dim=36 visual_structural_mode=tda_only use_global_structural_token=False use_ot=False use_ot_fusion=False use_topological_loss=False use_patch_topo_loss=False
2Installed 8 TopoAdapters / 36 decoder layers | hidden=2048 topo_dim=36
3Loaded checkpoint successfully. Status: OK
4submission_task2.jsonl1python generate_task2_cata_final.py \
2 --checkpoint checkpoints/last.pt \
3 --output-jsonl submission_task2.jsonl \
4 --visual-dir visuals \
5 --batch-size 4 \
6 --overwrite-visuals true1python generate_task2_cata_final.py \
2 --checkpoint checkpoints/last.pt \
3 --output-jsonl debug_task2.jsonl \
4 --visual-dir visuals_debug \
5 --limit 2 \
6 --batch-size 1--batch-size 1.1from datasets import Image as HfImage, load_dataset
2
3ds = load_dataset("SimulaMet/Kvasir-VQA-x1")["test"]
4val_set_task2 = (
5 ds.filter(lambda x: x["complexity"] == 1)
6 .shuffle(seed=42)
7 .select(range(1500))
8 .add_column("val_id", list(range(1500)))
9 .remove_columns(["complexity", "answer", "original", "question_class"])
10 .cast_column("image", HfImage())
11)val_idimg_idquestionanswertextual_explanationvisual_explanationconfidence_scorevisuals/.python validate_task2_submission.py --submission submission_task2.jsonl1python validate_task2_submission.py \
2 --submission submission_task2.jsonl \
3 --skip-dataset-checkpredictions_1.json is available, answer consistency can also be checked:1python validate_task2_submission.py \
2 --submission submission_task2.jsonl \
3 --task1-predictions predictions_1.json1{
2 "val_id": "0",
3 "img_id": "...",
4 "question": "...",
5 "answer": "CATA-Final prediction",
6 "textual_explanation": "Clinician-oriented explanation based on the answer, visual evidence, and self-probes.",
7 "visual_explanation": [
8 {
9 "type": "heatmap",
10 "data": "visuals/0000_heatmap.png",
11 "description": "CATA heatmap highlighting visually relevant regions."
12 }
13 ],
14 "confidence_score": 0.67
15}