diff --git a/analyze_answer_bias.py b/analyze_answer_bias.py new file mode 100644 index 0000000000000000000000000000000000000000..479c290a17da35f5b10968921c9561130e891d3a --- /dev/null +++ b/analyze_answer_bias.py @@ -0,0 +1,255 @@ +#!/usr/bin/env python3 +""" +Answer/Prediction Bias 분석 스크립트 + +1. GT Answer Distribution: 정답이 A, B, C, D 중 어디에 편중되어 있는지 +2. Model Prediction Distribution: 모델이 특정 선택지를 더 많이 선택하는지 + +Usage: + python experiments/analyze_answer_bias.py [--subset far_close] + python experiments/analyze_answer_bias.py --compare ... +""" + +import argparse +import sys +import pandas as pd +import numpy as np +from pathlib import Path +from typing import Dict, List +from collections import Counter + + +class TeeWriter: + """stdout을 터미널과 파일에 동시에 출력""" + def __init__(self, filepath): + self.terminal = sys.stdout + self.file = open(filepath, 'w', encoding='utf-8') + + def write(self, message): + self.terminal.write(message) + self.file.write(message) + + def flush(self): + self.terminal.flush() + self.file.flush() + + def close(self): + self.file.close() + return self.terminal + + +def extract_answer_letter(val) -> str: + """예측값에서 A/B/C/D 추출 (예: 'D. basket' -> 'D')""" + if pd.isna(val): + return 'INVALID' + val = str(val).strip() + if len(val) == 0: + return 'INVALID' + first_char = val[0].upper() + if first_char in ['A', 'B', 'C', 'D']: + return first_char + return 'INVALID' + + +def analyze_bias(df: pd.DataFrame, subset_name: str = "ALL") -> Dict: + """ + Answer/Prediction bias 분석 + """ + # GT Answer 분포 (이미 A/B/C/D 형태) + gt_dist = Counter(df['answer']) + gt_total = sum(gt_dist.values()) + + # Prediction 분포 - 첫 글자 추출 + pred_letters = df['prediction'].apply(extract_answer_letter) + pred_dist = Counter(pred_letters) + pred_total = sum(v for k, v in pred_dist.items() if k != 'INVALID') + + # 정답률 by GT position + acc_by_pos = {} + for ans in ['A', 'B', 'C', 'D']: + subset = df[df['answer'] == ans] + if len(subset) > 0: + acc_by_pos[ans] = subset['hit'].mean() * 100 + else: + acc_by_pos[ans] = 0 + + # Prediction이 GT와 일치하는 비율 (hit rate by prediction position) + # prediction에서 첫 글자 추출해서 매칭 + df_with_pred_letter = df.copy() + df_with_pred_letter['pred_letter'] = pred_letters.values + hit_by_pred = {} + for pred in ['A', 'B', 'C', 'D']: + subset = df_with_pred_letter[df_with_pred_letter['pred_letter'] == pred] + if len(subset) > 0: + hit_by_pred[pred] = subset['hit'].mean() * 100 + else: + hit_by_pred[pred] = 0 + + return { + 'subset': subset_name, + 'total': len(df), + 'gt_dist': {k: gt_dist.get(k, 0) for k in ['A', 'B', 'C', 'D']}, + 'gt_pct': {k: gt_dist.get(k, 0) / gt_total * 100 if gt_total > 0 else 0 for k in ['A', 'B', 'C', 'D']}, + 'pred_dist': {k: pred_dist.get(k, 0) for k in ['A', 'B', 'C', 'D']}, + 'pred_pct': {k: pred_dist.get(k, 0) / pred_total * 100 if pred_total > 0 else 0 for k in ['A', 'B', 'C', 'D']}, + 'acc_by_gt_pos': acc_by_pos, + 'hit_by_pred_pos': hit_by_pred, + 'overall_acc': df['hit'].mean() * 100 + } + + +def print_bias_report(xlsx_path: str, results: List[Dict]): + """Bias 분석 리포트 출력""" + model_name = Path(xlsx_path).stem.replace('_EmbSpatialBench_openai_result', '') + # 이름 축약 + if len(model_name) > 50: + model_name = model_name[:47] + "..." + + print(f"\n{'='*80}") + print(f"Model: {model_name}") + print(f"{'='*80}") + + for r in results: + print(f"\n--- {r['subset']} (n={r['total']}) ---") + + # GT Distribution + print(f"\n GT Answer Distribution:") + print(f" {'Pos':<5} {'Count':<8} {'Pct':<8} {'Acc when GT':<12}") + print(f" {'-'*35}") + for pos in ['A', 'B', 'C', 'D']: + print(f" {pos:<5} {r['gt_dist'][pos]:<8} {r['gt_pct'][pos]:.1f}%{'':<4} {r['acc_by_gt_pos'][pos]:.1f}%") + + # Prediction Distribution + print(f"\n Model Prediction Distribution:") + print(f" {'Pos':<5} {'Count':<8} {'Pct':<8} {'Acc when Pred':<12}") + print(f" {'-'*35}") + for pos in ['A', 'B', 'C', 'D']: + print(f" {pos:<5} {r['pred_dist'][pos]:<8} {r['pred_pct'][pos]:.1f}%{'':<4} {r['hit_by_pred_pos'][pos]:.1f}%") + + # Bias 지표 + gt_std = np.std([r['gt_pct'][p] for p in ['A', 'B', 'C', 'D']]) + pred_std = np.std([r['pred_pct'][p] for p in ['A', 'B', 'C', 'D']]) + + print(f"\n Bias Indicators:") + print(f" GT Distribution Std: {gt_std:.2f}%p (uniform=0)") + print(f" Pred Distribution Std: {pred_std:.2f}%p (uniform=0)") + print(f" Overall Accuracy: {r['overall_acc']:.1f}%") + + +def analyze_model(xlsx_path: str, include_subsets: bool = True) -> List[Dict]: + """모델 결과 분석""" + df = pd.read_excel(xlsx_path) + + results = [] + + # 전체 분석 + results.append(analyze_bias(df, "ALL")) + + if include_subsets: + # FAR/CLOSE만 분석 + far_close_df = df[df['category'].isin(['far', 'close'])] + if len(far_close_df) > 0: + results.append(analyze_bias(far_close_df, "FAR+CLOSE")) + + # Category별 분석 + for cat in ['far', 'close']: + cat_df = df[df['category'] == cat] + if len(cat_df) > 0: + results.append(analyze_bias(cat_df, cat.upper())) + + return results + + +def compare_models_bias(xlsx_paths: List[str]): + """여러 모델의 bias 비교 (요약 테이블)""" + + print(f"\n{'='*100}") + print("MODEL BIAS COMPARISON SUMMARY") + print(f"{'='*100}") + + # Header + print(f"\n{'Model':<45} {'Subset':<12} {'GT Std':<10} {'Pred Std':<10} {'Pred Max':<12} {'Acc':<8}") + print("-" * 97) + + for xlsx_path in xlsx_paths: + model_name = Path(xlsx_path).stem.replace('_EmbSpatialBench_openai_result', '') + if len(model_name) > 43: + model_name = model_name[:40] + "..." + + results = analyze_model(xlsx_path, include_subsets=True) + + for r in results: + gt_std = np.std([r['gt_pct'][p] for p in ['A', 'B', 'C', 'D']]) + pred_std = np.std([r['pred_pct'][p] for p in ['A', 'B', 'C', 'D']]) + + # 가장 많이 선택한 position + max_pred_pos = max(r['pred_pct'], key=r['pred_pct'].get) + max_pred_pct = r['pred_pct'][max_pred_pos] + + if r['subset'] == 'ALL': + print(f"{model_name:<45} {r['subset']:<12} {gt_std:.1f}%p{'':<4} {pred_std:.1f}%p{'':<4} {max_pred_pos}({max_pred_pct:.1f}%){'':<2} {r['overall_acc']:.1f}%") + else: + print(f"{'':<45} {r['subset']:<12} {gt_std:.1f}%p{'':<4} {pred_std:.1f}%p{'':<4} {max_pred_pos}({max_pred_pct:.1f}%){'':<2} {r['overall_acc']:.1f}%") + + +EVAL_OUTPUT_DIR = 'VLMEvalKit/outputs' + +DEFAULT_MODELS = [ + # Molmo-7B + 'molmo-7B-O-0924/molmo-7B-O-0924', + 'molmo-7B-O-0924-data_scale_exp_80k/molmo-7B-O-0924-data_scale_exp_80k', + 'molmo-7B-O-0924-data_scale_exp_400k/molmo-7B-O-0924-data_scale_exp_400k', + 'molmo-7B-O-0924-data_scale_exp_800k/molmo-7B-O-0924-data_scale_exp_800k', + 'molmo-7B-O-0924-data_scale_exp_2m/molmo-7B-O-0924-data_scale_exp_2m', + # NVILA-Lite-2B + 'NVILA-Lite-2B/NVILA-Lite-2B', + 'NVILA-Lite-2B-data-scale-exp-80k/NVILA-Lite-2B-data-scale-exp-80k', + 'NVILA-Lite-2B-data-scale-exp-400k/NVILA-Lite-2B-data-scale-exp-400k', + 'NVILA-Lite-2B-data-scale-exp-800k/NVILA-Lite-2B-data-scale-exp-800k', + 'NVILA-Lite-2B-data-scale-exp-2m/NVILA-Lite-2B-data-scale-exp-2m', + 'RoboRefer-2B-SFT/RoboRefer-2B-SFT', + # Qwen2.5-VL-3B + 'Qwen2.5-VL-3B-Instruct/Qwen2.5-VL-3B-Instruct', + 'Qwen2.5-VL-3B-Instruct-data_scale_exp_80k/Qwen2.5-VL-3B-Instruct-data_scale_exp_80k', + 'Qwen2.5-VL-3B-Instruct-data_scale_exp_400k/Qwen2.5-VL-3B-Instruct-data_scale_exp_400k', + 'Qwen2.5-VL-3B-Instruct-data_scale_exp_800k/Qwen2.5-VL-3B-Instruct-data_scale_exp_800k', + 'Qwen2.5-VL-3B-Instruct-data_scale_exp_2m/Qwen2.5-VL-3B-Instruct-data_scale_exp_2m', +] + + +def get_default_xlsx_paths(): + return [f'{EVAL_OUTPUT_DIR}/{m}_EmbSpatialBench_openai_result.xlsx' for m in DEFAULT_MODELS] + + +def main(): + parser = argparse.ArgumentParser(description='Answer/Prediction Bias 분석') + parser.add_argument('xlsx_files', nargs='*', help='Model result xlsx files (없으면 기본 모델 사용)') + parser.add_argument('--compare', action='store_true', help='Compare multiple models (summary only)') + parser.add_argument('--detail', action='store_true', help='Show detailed report for each model') + parser.add_argument('--output', '-o', type=str, help='Save results to file') + + args = parser.parse_args() + + xlsx_files = args.xlsx_files if args.xlsx_files else get_default_xlsx_paths() + + if args.output: + tee = TeeWriter(args.output) + sys.stdout = tee + + if args.compare and not args.detail: + compare_models_bias(xlsx_files) + else: + for xlsx_path in xlsx_files: + results = analyze_model(xlsx_path) + print_bias_report(xlsx_path, results) + + if len(xlsx_files) > 1: + compare_models_bias(xlsx_files) + + if args.output: + sys.stdout = tee.close() + print(f"Results saved to {args.output}") + + +if __name__ == '__main__': + main() diff --git a/analyze_counter_consistent.py b/analyze_counter_consistent.py new file mode 100644 index 0000000000000000000000000000000000000000..ad25dbcc7d5d06ffc1ac026477f7462e138d457d --- /dev/null +++ b/analyze_counter_consistent.py @@ -0,0 +1,627 @@ +#!/usr/bin/env python3 +""" +Counter vs Consistent Example Analysis Script + +2D Heuristic (shared across datasets): + Upper part of image (small y) = farther from camera + Lower part of image (large y) = closer to camera + +Datasets: + embspatial (default): + FAR/CLOSE questions in EmbSpatial-Bench + Consistent: GT answer agrees with the 2D heuristic (Height-Depth Entanglement) + Counter: GT answer contradicts the 2D heuristic + + cvbench3d: + Depth questions: "Which object is closer to the camera?" + Consistent: GT object (closer) has larger center_y (lower in image) + Counter: GT object (closer) has smaller center_y (higher in image) + Distance questions: "Which object is closer to [reference]?" + 2D heuristic: smaller pixel distance to reference = closer in 3D + Consistent: GT candidate has smaller 2D pixel distance to reference + Counter: GT candidate has larger 2D pixel distance to reference + +Usage: + python experiments/analyze_counter_consistent.py [--verbose] + python experiments/analyze_counter_consistent.py --compare ... + python experiments/analyze_counter_consistent.py --dataset cvbench3d + python experiments/analyze_counter_consistent.py --dataset cvbench3d --compare ... +""" + +import argparse +import ast +import pandas as pd +import numpy as np +from datasets import load_dataset +from pathlib import Path +from typing import Dict, List, Tuple, Optional +import json +import sys + + +class TeeWriter: + """Write stdout to both terminal and file simultaneously""" + def __init__(self, filepath): + self.terminal = sys.stdout + self.file = open(filepath, 'w', encoding='utf-8') + + def write(self, message): + self.terminal.write(message) + self.file.write(message) + self.file.flush() + + def flush(self): + self.terminal.flush() + self.file.flush() + + def close(self): + self.file.close() + return self.terminal + + +# ============================================================================= +# EmbSpatial-Bench +# ============================================================================= + +def get_bbox_center_y(bbox: List[int], source: str = None) -> float: + """ + BBox -> center y coordinate, format varies by source: + ScanNet / MP3D : [x1, y1, w, h ] -> y1 + h/2 + AI2Thor : [x1, y1, x2, y2] -> (y1 + y2) / 2 + """ + if source == 'ai2thor': + return (bbox[1] + bbox[3]) / 2 + else: + return bbox[1] + bbox[3] / 2 + + +def classify_sample(relation: str, objects: Dict, gt_answer_idx: int, + answer_options: List[str] = None, + image_height: int = None, threshold_ratio: float = 0.05, + data_source: str = None) -> Tuple[str, Dict]: + """ + Classify a sample as Consistent / Counter / Ambiguous. + + Args: + relation: 'far' or 'close' + objects: {'bbox': [...], 'name': [...]} + gt_answer_idx: GT answer index (0-based, relative to answer_options) + answer_options: list of answer choices (used to match bbox by name) + image_height: image height for threshold normalization (pass PIL image.size[1]) + threshold_ratio: ambiguous decision threshold as a fraction of image height + data_source: 'scannet' | 'mp3d' | 'ai2thor' (selects bbox format) + + Returns: + classification: 'consistent', 'counter', or 'ambiguous' + details: dict with classification details + """ + if relation not in ['far', 'close']: + return 'not_applicable', {} + + bboxes = objects['bbox'] + names = objects['name'] + + if len(bboxes) < 2: + return 'insufficient_objects', {} + + # answer_options and objects['name'] may differ (e.g. 'Unknown') + # resolve GT answer index against objects['name'] + if answer_options is not None and gt_answer_idx < len(answer_options): + gt_answer_name = answer_options[gt_answer_idx] + if gt_answer_name in names: + gt_answer_idx = names.index(gt_answer_name) + elif gt_answer_name == 'Unknown' or gt_answer_idx >= len(bboxes): + return 'unknown_object', {} + + # bounds check + if gt_answer_idx >= len(bboxes): + return 'index_out_of_range', {} + + # compute center y per object using source-specific bbox format + center_ys = [get_bbox_center_y(bbox, source=data_source) for bbox in bboxes] + + # GT object center y + gt_center_y = center_ys[gt_answer_idx] + + # mean center y of all other objects + other_ys = [y for i, y in enumerate(center_ys) if i != gt_answer_idx] + other_avg_y = np.mean(other_ys) + + # y difference + y_diff = gt_center_y - other_avg_y + + # threshold normalized by image height + if image_height: + threshold = image_height * threshold_ratio + else: + threshold = 20 # fallback: 20 pixels + + details = { + 'gt_object': names[gt_answer_idx], + 'gt_center_y': gt_center_y, + 'other_avg_y': other_avg_y, + 'y_diff': y_diff, + 'threshold': threshold, + 'all_objects': list(zip(names, center_ys)) + } + + # ambiguous if difference is too small + if abs(y_diff) < threshold: + return 'ambiguous', details + + # FAR: consistent if GT is higher (smaller y) + if relation == 'far': + if gt_center_y < other_avg_y: + return 'consistent', details + else: + return 'counter', details + + # CLOSE: consistent if GT is lower (larger y) + else: + if gt_center_y > other_avg_y: + return 'consistent', details + else: + return 'counter', details + + +def get_image_height_by_source(data_source: str) -> int: + """Return fallback image height by data source (used when PIL image is unavailable)""" + heights = { + 'ai2thor': 300, + 'mp3d': 480, + 'scannet': 968, + } + return heights.get(data_source, 480) + + +def build_classification_cache(verbose: bool = False) -> Dict[str, Dict]: + """ + Build a counter/consistent classification cache for the full EmbSpatial-Bench dataset. + """ + print("Loading EmbSpatial-Bench dataset...") + ds = load_dataset('FlagEval/EmbSpatial-Bench', split='test') + + cache = {} + stats = {'far': {'consistent': 0, 'counter': 0, 'ambiguous': 0}, + 'close': {'consistent': 0, 'counter': 0, 'ambiguous': 0}} + + for item in ds: + question_id = item['question_id'] + relation = item['relation'] + + if relation not in ['far', 'close']: + cache[question_id] = {'classification': 'not_applicable', 'relation': relation} + continue + + objects = item['objects'] + gt_answer_idx = item['answer'] # 0-based index + answer_options = item['answer_options'] + data_source = item['data_source'] + + # use actual image height from PIL image (image.size -> (width, height)) + pil_image = item.get('image') + if pil_image is not None and hasattr(pil_image, 'size'): + image_height = pil_image.size[1] + else: + image_height = get_image_height_by_source(data_source) + + classification, details = classify_sample( + relation, objects, gt_answer_idx, answer_options, image_height, + data_source=data_source + ) + + cache[question_id] = { + 'classification': classification, + 'relation': relation, + 'data_source': item['data_source'], + 'details': details + } + + if relation in stats and classification in stats[relation]: + stats[relation][classification] += 1 + + if verbose: + print("\n=== Classification Statistics ===") + for rel in ['far', 'close']: + total = sum(stats[rel].values()) + print(f"\n{rel.upper()} (n={total}):") + for cls, cnt in stats[rel].items(): + pct = cnt / total * 100 if total > 0 else 0 + print(f" {cls}: {cnt} ({pct:.1f}%)") + + return cache + + +def analyze_embspatial_results(xlsx_path: str, cache: Dict[str, Dict], + verbose: bool = False) -> Tuple[Dict, List[Dict]]: + """Analyze a model result xlsx file against the EmbSpatialBench classification cache.""" + df = pd.read_excel(xlsx_path) + + results = { + 'far': { + 'consistent': {'correct': 0, 'total': 0}, + 'counter': {'correct': 0, 'total': 0}, + 'ambiguous': {'correct': 0, 'total': 0} + }, + 'close': { + 'consistent': {'correct': 0, 'total': 0}, + 'counter': {'correct': 0, 'total': 0}, + 'ambiguous': {'correct': 0, 'total': 0} + } + } + + counter_examples = [] + + for _, row in df.iterrows(): + question_id = row['question_id'] + category = row['category'] + hit = row['hit'] + + if category not in ['far', 'close']: + continue + + if question_id not in cache: + continue + + info = cache[question_id] + classification = info['classification'] + + if classification not in ['consistent', 'counter', 'ambiguous']: + continue + + results[category][classification]['total'] += 1 + if hit == 1: + results[category][classification]['correct'] += 1 + + if classification == 'counter': + counter_examples.append({ + 'question_id': question_id, + 'relation': category, + 'hit': hit, + 'prediction': row['prediction'], + 'answer': row['answer'], + 'data_source': info['data_source'], + 'details': info.get('details', {}) + }) + + return results, counter_examples + + +# ============================================================================= +# CV-Bench-3D +# ============================================================================= + +# Known image heights per source dataset (used for threshold normalization) +# Omni3D_SUNRGBD has variable sizes; fallback to max bbox y2 estimate. +_CVBENCH3D_SOURCE_HEIGHTS = { + 'Omni3D_Hypersim': 768, + 'Omni3D_nuScenes': 900, +} + + +def classify_cvbench3d_row(row, depth_threshold_ratio: float = 0.05) -> Tuple[str, Dict]: + """ + Classify a single CV-Bench-3D row as consistent / counter / ambiguous. + + Only Depth questions are classified — they share the same height-depth + entanglement heuristic as EmbSpatial-Bench: + 2D heuristic: lower in image (larger center_y) = closer to camera + Consistent: GT object (closer to camera) has larger center_y + Counter: GT object (closer to camera) has smaller center_y + + Distance questions ask "which object is closer to [reference] in 3D real-world + distance?" — this is inter-object 3D distance, not viewer distance. No + equivalent 2D projection heuristic exists (height-depth entanglement does not + apply), so Distance rows are always marked 'not_applicable'. + """ + category = row['category'] + answer_letter = str(row['answer']).strip() + + if category != 'Depth': + return 'not_applicable', {} + + try: + bbox_list = ast.literal_eval(row['bbox']) + except (ValueError, SyntaxError): + return 'invalid_bbox', {} + + if len(bbox_list) != 2: + return 'invalid_bbox', {} + + cy_A = (bbox_list[0][1] + bbox_list[0][3]) / 2 + cy_B = (bbox_list[1][1] + bbox_list[1][3]) / 2 + + gt_y = cy_A if answer_letter == 'A' else cy_B + other_y = cy_B if answer_letter == 'A' else cy_A + y_diff = gt_y - other_y # positive = GT is lower in image + + # Estimate image height: prefer known source height, fall back to max bbox y2 + source_dataset = str(row.get('source_dataset', '')) + known_h = _CVBENCH3D_SOURCE_HEIGHTS.get(source_dataset, 0) + est_h = max(bb[3] for bb in bbox_list) + image_height = max(known_h, est_h) + threshold = image_height * depth_threshold_ratio + + details = { + 'answer': answer_letter, + 'center_y_A': cy_A, + 'center_y_B': cy_B, + 'y_diff': y_diff, + 'threshold': threshold, + 'image_height_est': image_height, + 'source_dataset': source_dataset, + } + + if abs(y_diff) < threshold: + return 'ambiguous', details + # Consistent: GT (closer to camera) is lower in image (larger y) + return ('consistent' if gt_y > other_y else 'counter'), details + + +def analyze_cvbench3d_results(xlsx_path: str, verbose: bool = False, + depth_threshold_ratio: float = 0.05) -> Tuple[Dict, List[Dict]]: + """ + Analyze a CV-Bench-3D result xlsx file. + + Only the Depth category is classified into consistent / counter / ambiguous, + because it shares the height-depth entanglement heuristic with EmbSpatial-Bench. + Distance (inter-object 3D distance) has no analogous 2D projection heuristic + and is excluded from the consistent/counter analysis. + """ + df = pd.read_excel(xlsx_path) + + results = { + 'Depth': { + 'consistent': {'correct': 0, 'total': 0}, + 'counter': {'correct': 0, 'total': 0}, + 'ambiguous': {'correct': 0, 'total': 0}, + }, + # Distance: excluded — no height-depth entanglement heuristic for inter-object distance + } + + counter_examples = [] + + for _, row in df.iterrows(): + category = row['category'] + if category != 'Depth': + continue + + hit = row['hit'] + classification, details = classify_cvbench3d_row(row, depth_threshold_ratio) + + if classification not in ['consistent', 'counter', 'ambiguous']: + continue + + results['Depth'][classification]['total'] += 1 + if hit == 1: + results['Depth'][classification]['correct'] += 1 + + if classification == 'counter': + counter_examples.append({ + 'index': row['index'], + 'category': category, + 'hit': hit, + 'prediction': row['prediction'], + 'answer': row['answer'], + 'source_dataset': row.get('source_dataset', ''), + 'details': details, + }) + + if verbose: + print("\n=== CV-Bench-3D Depth Classification Statistics ===") + total = sum(results['Depth'][c]['total'] for c in ['consistent', 'counter', 'ambiguous']) + print(f"Depth (n={total}):") + for cls in ['consistent', 'counter', 'ambiguous']: + n = results['Depth'][cls]['total'] + pct = n / total * 100 if total > 0 else 0 + print(f" {cls}: {n} ({pct:.1f}%)") + print("(Distance excluded: no 2D heuristic applies for inter-object 3D distance)") + + return results, counter_examples + + +# ============================================================================= +# Generic report / compare (works for both datasets) +# ============================================================================= + +_XLSX_SUFFIXES = { + 'embspatial': [ + '_EmbSpatialBench_openai_result', + '_EmbSpatialBench_exact_matching_result', + ], + 'cvbench3d': [ + '_CV-Bench-3D_chatgpt-0125_result', + '_CV-Bench-3D_exact_matching_result', + ], +} + + +def extract_model_name(xlsx_path: str, dataset: str) -> str: + stem = Path(xlsx_path).stem + for suffix in _XLSX_SUFFIXES.get(dataset, []): + stem = stem.replace(suffix, '') + return stem + + +def print_analysis_report(xlsx_path: str, results: Dict, counter_examples: List[Dict], + dataset: str) -> Dict: + """Print analysis report for a single model (works for any dataset).""" + model_name = extract_model_name(xlsx_path, dataset) + + print(f"\n{'='*70}") + print(f"Model: {model_name}") + print(f"{'='*70}") + + print(f"\n{'Category':<12} {'Type':<12} {'Correct':<10} {'Total':<10} {'Accuracy':<10}") + print("-" * 54) + + total_consistent = {'correct': 0, 'total': 0} + total_counter = {'correct': 0, 'total': 0} + + for category in results: + for cls_type in ['consistent', 'counter', 'ambiguous']: + data = results[category][cls_type] + if data['total'] > 0: + acc = data['correct'] / data['total'] * 100 + print(f"{category:<12} {cls_type:<12} {data['correct']:<10} {data['total']:<10} {acc:.1f}%") + + if cls_type == 'consistent': + total_consistent['correct'] += data['correct'] + total_consistent['total'] += data['total'] + elif cls_type == 'counter': + total_counter['correct'] += data['correct'] + total_counter['total'] += data['total'] + + print("-" * 54) + if total_consistent['total'] > 0: + acc = total_consistent['correct'] / total_consistent['total'] * 100 + print(f"{'TOTAL':<12} {'consistent':<12} {total_consistent['correct']:<10} {total_consistent['total']:<10} {acc:.1f}%") + if total_counter['total'] > 0: + acc = total_counter['correct'] / total_counter['total'] * 100 + print(f"{'TOTAL':<12} {'counter':<12} {total_counter['correct']:<10} {total_counter['total']:<10} {acc:.1f}%") + + if total_consistent['total'] > 0 and total_counter['total'] > 0: + consistent_acc = total_consistent['correct'] / total_consistent['total'] * 100 + counter_acc = total_counter['correct'] / total_counter['total'] * 100 + gap = consistent_acc - counter_acc + print(f"\nAccuracy Gap (Consistent - Counter): {gap:.1f}%p") + print(f" -> Larger gap indicates stronger reliance on the 2D heuristic") + + counter_wrong = [ex for ex in counter_examples if ex['hit'] == 0] + if len(counter_wrong) > 0: + print(f"\n🔍 Counter examples wrong: {len(counter_wrong)} / {len(counter_examples)}") + + return { + 'model_name': model_name, + 'consistent_acc': total_consistent['correct'] / total_consistent['total'] * 100 if total_consistent['total'] > 0 else 0, + 'counter_acc': total_counter['correct'] / total_counter['total'] * 100 if total_counter['total'] > 0 else 0, + 'consistent_total': total_consistent['total'], + 'counter_total': total_counter['total'], + } + + +def _run_analysis(xlsx_path: str, dataset: str, cache: Optional[Dict] = None, + verbose: bool = False, + depth_threshold_ratio: float = 0.05) -> Tuple[Dict, List[Dict]]: + if dataset == 'cvbench3d': + return analyze_cvbench3d_results(xlsx_path, verbose=verbose, + depth_threshold_ratio=depth_threshold_ratio) + else: + return analyze_embspatial_results(xlsx_path, cache, verbose=verbose) + + +def compare_models(xlsx_paths: List[str], dataset: str, cache: Optional[Dict] = None): + """Compare multiple models side by side.""" + summaries = [] + + for xlsx_path in xlsx_paths: + results, counter_examples = _run_analysis(xlsx_path, dataset, cache) + summary = print_analysis_report(xlsx_path, results, counter_examples, dataset) + summaries.append(summary) + + max_name_len = max(len(s['model_name']) for s in summaries) + col_w = max(max_name_len + 2, 40) + total_w = col_w + 12 + 12 + 10 + print(f"\n{'='*total_w}") + print("MODEL COMPARISON") + print(f"{'='*total_w}") + print(f"{'Model':<{col_w}} {'Consistent':<12} {'Counter':<12} {'Gap':<10}") + print("-" * total_w) + + for s in summaries: + gap = s['consistent_acc'] - s['counter_acc'] + print(f"{s['model_name']:<{col_w}} {s['consistent_acc']:.1f}%{'':<6} {s['counter_acc']:.1f}%{'':<6} {gap:+.1f}%p") + + +EVAL_OUTPUT_DIR = 'VLMEvalKit/outputs' + +DEFAULT_MODELS = [ + # Molmo-7B + 'molmo-7B-O-0924/molmo-7B-O-0924', + 'molmo-7B-O-0924-data_scale_exp_80k/molmo-7B-O-0924-data_scale_exp_80k', + 'molmo-7B-O-0924-data_scale_exp_400k/molmo-7B-O-0924-data_scale_exp_400k', + 'molmo-7B-O-0924-data_scale_exp_800k/molmo-7B-O-0924-data_scale_exp_800k', + 'molmo-7B-O-0924-data_scale_exp_2m/molmo-7B-O-0924-data_scale_exp_2m', + # NVILA-Lite-2B + 'NVILA-Lite-2B/NVILA-Lite-2B', + 'NVILA-Lite-2B-data-scale-exp-80k/NVILA-Lite-2B-data-scale-exp-80k', + 'NVILA-Lite-2B-data-scale-exp-400k/NVILA-Lite-2B-data-scale-exp-400k', + 'NVILA-Lite-2B-data-scale-exp-800k/NVILA-Lite-2B-data-scale-exp-800k', + 'NVILA-Lite-2B-data-scale-exp-2m/NVILA-Lite-2B-data-scale-exp-2m', + 'NVILA-Lite-2B-ST-80k-5pct/NVILA-Lite-2B-ST-80k-5pct', + 'NVILA-Lite-2B-ST-400k-5pct/NVILA-Lite-2B-ST-400k-5pct', + 'NVILA-Lite-2B-ST-800k-5pct/NVILA-Lite-2B-ST-800k-5pct', + 'RoboRefer-2B-SFT/RoboRefer-2B-SFT', + # Qwen2.5-VL-3B + 'Qwen2.5-VL-3B-Instruct/Qwen2.5-VL-3B-Instruct', + 'Qwen2.5-VL-3B-Instruct-data_scale_exp_80k/Qwen2.5-VL-3B-Instruct-data_scale_exp_80k', + 'Qwen2.5-VL-3B-Instruct-data_scale_exp_400k/Qwen2.5-VL-3B-Instruct-data_scale_exp_400k', + 'Qwen2.5-VL-3B-Instruct-data_scale_exp_800k/Qwen2.5-VL-3B-Instruct-data_scale_exp_800k', + 'Qwen2.5-VL-3B-Instruct-data_scale_exp_2m/Qwen2.5-VL-3B-Instruct-data_scale_exp_2m', + 'Qwen3-VL-235B-A22B-Instruct/Qwen3-VL-235B-A22B-Instruct' +] + + +def get_default_xlsx_paths(dataset: str) -> List[str]: + if dataset == 'cvbench3d': + return [f'{EVAL_OUTPUT_DIR}/{m}_CV-Bench-3D_chatgpt-0125_result.xlsx' + for m in DEFAULT_MODELS] + else: + return [f'{EVAL_OUTPUT_DIR}/{m}_EmbSpatialBench_openai_result.xlsx' + for m in DEFAULT_MODELS] + + +def main(): + parser = argparse.ArgumentParser(description='Counter vs Consistent Example Analysis') + parser.add_argument('xlsx_files', nargs='*', + help='Model result xlsx files (uses default model list if omitted)') + parser.add_argument('--dataset', choices=['embspatial', 'cvbench3d'], default='embspatial', + help='Benchmark dataset to analyze (default: embspatial)') + parser.add_argument('--compare', action='store_true', help='Compare multiple models') + parser.add_argument('--verbose', '-v', action='store_true', help='Verbose output') + parser.add_argument('--output', '-o', type=str, help='Save results to file') + parser.add_argument('--save-cache', type=str, + help='Save EmbSpatialBench classification cache to JSON') + parser.add_argument('--load-cache', type=str, + help='Load EmbSpatialBench classification cache from JSON') + + args = parser.parse_args() + + # Build/load cache (EmbSpatialBench only; CV-Bench-3D reads bbox from xlsx directly) + cache = None + if args.dataset == 'embspatial': + if args.load_cache and Path(args.load_cache).exists(): + print(f"Loading cache from {args.load_cache}...") + with open(args.load_cache, 'r') as f: + cache = json.load(f) + else: + cache = build_classification_cache(verbose=args.verbose) + + if args.save_cache: + print(f"Saving cache to {args.save_cache}...") + with open(args.save_cache, 'w') as f: + json.dump(cache, f, indent=2) + + xlsx_files = args.xlsx_files if args.xlsx_files else get_default_xlsx_paths(args.dataset) + + tee = None + if args.output: + tee = TeeWriter(args.output) + sys.stdout = tee + + try: + if args.compare or len(xlsx_files) > 1: + compare_models(xlsx_files, args.dataset, cache) + else: + results, counter_examples = _run_analysis( + xlsx_files[0], args.dataset, cache, args.verbose + ) + print_analysis_report(xlsx_files[0], results, counter_examples, args.dataset) + finally: + if tee is not None: + sys.stdout = tee.close() + print(f"Results saved to {args.output}") + + +if __name__ == '__main__': + main() diff --git a/analyze_heuristic_position.py b/analyze_heuristic_position.py new file mode 100644 index 0000000000000000000000000000000000000000..a9ce2e5fce69b92c60671968184607209c553929 --- /dev/null +++ b/analyze_heuristic_position.py @@ -0,0 +1,256 @@ +#!/usr/bin/env python3 +""" +2D Heuristic 답의 선택지 위치(A/B/C/D) 분포 분석 + +가설: FAR 질문에서 2D heuristic 답(이미지 위쪽 = 가장 먼 물체)이 +특정 선택지 위치(예: D)에 편중되어 있으면, D bias를 가진 모델이 +FAR에서 더 강한 bias를 보이는 이유를 설명할 수 있음. + +2D Heuristic 답 정의: +- FAR: center_y가 가장 작은 물체 (이미지 위쪽 = "가장 멀다") +- CLOSE: center_y가 가장 큰 물체 (이미지 아래쪽 = "가장 가깝다") + +Usage: + python experiments/analyze_heuristic_position.py + python experiments/analyze_heuristic_position.py -o experiments/heuristic_position_results.txt +""" + +import argparse +import numpy as np +from datasets import load_dataset +from collections import Counter, defaultdict +import sys + + +class TeeWriter: + """stdout을 터미널과 파일에 동시에 출력""" + def __init__(self, filepath): + self.terminal = sys.stdout + self.file = open(filepath, 'w', encoding='utf-8') + + def write(self, message): + self.terminal.write(message) + self.file.write(message) + + def flush(self): + self.terminal.flush() + self.file.flush() + + def close(self): + self.file.close() + return self.terminal + + +def get_bbox_center_y(bbox): + """BBox [x, y, width, height] -> center y coordinate""" + return bbox[1] + bbox[3] / 2 + + +def find_heuristic_answer(relation, objects, answer_options): + """ + 2D heuristic이 선택할 답을 찾는다. + + FAR: center_y가 가장 작은 물체 (이미지 위쪽 = "가장 멀다") + CLOSE: center_y가 가장 큰 물체 (이미지 아래쪽 = "가장 가깝다") + + Returns: + heuristic_position: 0~3 (A~D), or None if not found + heuristic_name: 물체 이름 + """ + bboxes = objects['bbox'] + names = objects['name'] + + if len(bboxes) < 2: + return None, None + + # 각 물체의 center_y 계산 + center_ys = [(i, names[i], get_bbox_center_y(bboxes[i])) for i in range(len(bboxes))] + + if relation == 'far': + # 가장 작은 center_y (이미지 위쪽) = heuristic이 "가장 멀다"고 판단 + heuristic_obj = min(center_ys, key=lambda x: x[2]) + else: # close + # 가장 큰 center_y (이미지 아래쪽) = heuristic이 "가장 가깝다"고 판단 + heuristic_obj = max(center_ys, key=lambda x: x[2]) + + heuristic_name = heuristic_obj[1] + + # answer_options에서 이 물체의 위치(A/B/C/D) 찾기 + if heuristic_name in answer_options: + position = answer_options.index(heuristic_name) + return position, heuristic_name + + return None, heuristic_name + + +def main(): + parser = argparse.ArgumentParser(description='2D Heuristic 답의 선택지 위치 분포 분석') + parser.add_argument('-o', '--output', type=str, help='Save results to file') + args = parser.parse_args() + + if args.output: + tee = TeeWriter(args.output) + sys.stdout = tee + + print("Loading EmbSpatial-Bench dataset...") + ds = load_dataset('FlagEval/EmbSpatial-Bench', split='test') + + position_labels = ['A', 'B', 'C', 'D'] + + # 전체 통계 + heuristic_pos_far = [] # FAR에서 heuristic 답의 위치 + heuristic_pos_close = [] # CLOSE에서 heuristic 답의 위치 + gt_pos_far = [] # FAR에서 GT 답의 위치 + gt_pos_close = [] # CLOSE에서 GT 답의 위치 + + # heuristic == GT인지 여부 + heuristic_is_gt_far = 0 + heuristic_is_gt_close = 0 + total_far = 0 + total_close = 0 + + # 상세 분석용 + not_found_count = 0 + + for item in ds: + relation = item['relation'] + if relation not in ['far', 'close']: + continue + + objects = item['objects'] + answer_options = item['answer_options'] + gt_answer_idx = item['answer'] + + heuristic_pos, heuristic_name = find_heuristic_answer(relation, objects, answer_options) + + if heuristic_pos is None: + not_found_count += 1 + continue + + if relation == 'far': + total_far += 1 + heuristic_pos_far.append(heuristic_pos) + gt_pos_far.append(gt_answer_idx) + if heuristic_pos == gt_answer_idx: + heuristic_is_gt_far += 1 + else: + total_close += 1 + heuristic_pos_close.append(heuristic_pos) + gt_pos_close.append(gt_answer_idx) + if heuristic_pos == gt_answer_idx: + heuristic_is_gt_close += 1 + + # ===== 결과 출력 ===== + print(f"\n{'='*70}") + print("2D Heuristic 답의 선택지 위치(A/B/C/D) 분포 분석") + print(f"{'='*70}") + print(f"\nHeuristic 정의:") + print(f" FAR: center_y가 가장 작은 물체 (이미지 위쪽 = '가장 멀다')") + print(f" CLOSE: center_y가 가장 큰 물체 (이미지 아래쪽 = '가장 가깝다')") + print(f"\n매칭 실패: {not_found_count}개 (answer_options에 heuristic 물체가 없음)") + + for label, h_positions, g_positions, total, h_is_gt in [ + ('FAR', heuristic_pos_far, gt_pos_far, total_far, heuristic_is_gt_far), + ('CLOSE', heuristic_pos_close, gt_pos_close, total_close, heuristic_is_gt_close), + ('FAR+CLOSE', heuristic_pos_far + heuristic_pos_close, + gt_pos_far + gt_pos_close, total_far + total_close, + heuristic_is_gt_far + heuristic_is_gt_close), + ]: + print(f"\n{'─'*60}") + print(f" {label} (n={total})") + print(f"{'─'*60}") + + # Heuristic 답 위치 분포 + h_counter = Counter(h_positions) + print(f"\n [Heuristic 답의 위치 분포]") + print(f" {'Position':<10} {'Count':<10} {'Ratio':<10}") + for i, pl in enumerate(position_labels): + cnt = h_counter.get(i, 0) + ratio = cnt / total * 100 if total > 0 else 0 + print(f" {pl:<10} {cnt:<10} {ratio:.1f}%") + h_std = np.std([h_counter.get(i, 0) / total * 100 for i in range(4)]) + print(f" Std: {h_std:.1f}%p") + + # GT 답 위치 분포 (참고용) + g_counter = Counter(g_positions) + print(f"\n [GT 답의 위치 분포]") + print(f" {'Position':<10} {'Count':<10} {'Ratio':<10}") + for i, pl in enumerate(position_labels): + cnt = g_counter.get(i, 0) + ratio = cnt / total * 100 if total > 0 else 0 + print(f" {pl:<10} {cnt:<10} {ratio:.1f}%") + g_std = np.std([g_counter.get(i, 0) / total * 100 for i in range(4)]) + print(f" Std: {g_std:.1f}%p") + + # Heuristic == GT 비율 + h_is_gt_total = heuristic_is_gt_far + heuristic_is_gt_close if label == 'FAR+CLOSE' else h_is_gt + print(f"\n Heuristic == GT: {h_is_gt}/{total} ({h_is_gt/total*100:.1f}%)") + print(f" → 이 비율이 Consistent 샘플 비율과 유사해야 함") + + # ===== Heuristic 답 위치 vs GT 답 위치 교차 분석 ===== + print(f"\n{'='*70}") + print("Heuristic 답 위치 vs GT 답 위치 교차 분석") + print(f"{'='*70}") + + for label, h_positions, g_positions, total in [ + ('FAR', heuristic_pos_far, gt_pos_far, total_far), + ('CLOSE', heuristic_pos_close, gt_pos_close, total_close), + ]: + print(f"\n {label}: Heuristic 위치별 GT 위치 분포") + print(f" (행: Heuristic 위치, 열: GT 위치)") + print(f"\n {'Heur\\GT':<10}", end='') + for pl in position_labels: + print(f"{pl:<10}", end='') + print(f"{'Total':<10}") + print(f" {'─'*50}") + + cross = defaultdict(lambda: defaultdict(int)) + for h, g in zip(h_positions, g_positions): + cross[h][g] += 1 + + for hi, hpl in enumerate(position_labels): + row_total = sum(cross[hi].values()) + if row_total == 0: + continue + print(f" {hpl:<10}", end='') + for gi in range(4): + cnt = cross[hi][gi] + pct = cnt / row_total * 100 if row_total > 0 else 0 + print(f"{cnt}({pct:.0f}%){'':<2}", end='') + print(f"{row_total}") + + # ===== 핵심 요약 ===== + print(f"\n{'='*70}") + print("핵심 요약") + print(f"{'='*70}") + + far_h_counter = Counter(heuristic_pos_far) + close_h_counter = Counter(heuristic_pos_close) + + far_max_pos = max(range(4), key=lambda i: far_h_counter.get(i, 0)) + far_max_pct = far_h_counter.get(far_max_pos, 0) / total_far * 100 + close_max_pos = max(range(4), key=lambda i: close_h_counter.get(i, 0)) + close_max_pct = close_h_counter.get(close_max_pos, 0) / total_close * 100 + + print(f"\n FAR heuristic 답 최다 위치: {position_labels[far_max_pos]} ({far_max_pct:.1f}%)") + print(f" CLOSE heuristic 답 최다 위치: {position_labels[close_max_pos]} ({close_max_pct:.1f}%)") + + far_d_pct = far_h_counter.get(3, 0) / total_far * 100 + close_d_pct = close_h_counter.get(3, 0) / total_close * 100 + print(f"\n FAR heuristic 답이 D 위치: {far_h_counter.get(3, 0)}/{total_far} ({far_d_pct:.1f}%)") + print(f" CLOSE heuristic 답이 D 위치: {close_h_counter.get(3, 0)}/{total_close} ({close_d_pct:.1f}%)") + + if far_d_pct > 30: + print(f"\n ⚠ FAR에서 heuristic 답이 D에 {far_d_pct:.1f}% 편중!") + print(f" → D bias 모델이 FAR에서 heuristic에 따라 D를 선택하는 경향 설명 가능") + else: + print(f"\n FAR heuristic 답의 D 위치 비율이 균등({far_d_pct:.1f}%)이므로,") + print(f" D bias가 FAR에서 더 심한 것은 선택지 배치 때문이 아닌 다른 요인일 가능성") + + if args.output: + sys.stdout = tee.close() + print(f"Results saved to {args.output}") + + +if __name__ == '__main__': + main() diff --git a/answer_bias_results.txt b/answer_bias_results.txt new file mode 100644 index 0000000000000000000000000000000000000000..ce65c8947e183384e73f7f94395aa052382f4424 --- /dev/null +++ b/answer_bias_results.txt @@ -0,0 +1,1607 @@ + +================================================================================ +Model: molmo-7B-O-0924 +================================================================================ + +--- ALL (n=3640) --- + + GT Answer Distribution: + Pos Count Pct Acc when GT + ----------------------------------- + A 958 26.3% 68.6% + B 912 25.1% 66.9% + C 852 23.4% 56.7% + D 918 25.2% 50.2% + + Model Prediction Distribution: + Pos Count Pct Acc when Pred + ----------------------------------- + A 1102 30.3% 59.6% + B 1022 28.1% 59.7% + C 798 21.9% 60.5% + D 718 19.7% 64.2% + + Bias Indicators: + GT Distribution Std: 1.04%p (uniform=0) + Pred Distribution Std: 4.32%p (uniform=0) + Overall Accuracy: 60.7% + +--- FAR+CLOSE (n=1206) --- + + GT Answer Distribution: + Pos Count Pct Acc when GT + ----------------------------------- + A 319 26.5% 63.0% + B 290 24.0% 59.7% + C 289 24.0% 54.7% + D 308 25.5% 58.1% + + Model Prediction Distribution: + Pos Count Pct Acc when Pred + ----------------------------------- + A 329 27.3% 61.1% + B 286 23.7% 60.5% + C 274 22.7% 57.7% + D 317 26.3% 56.5% + + Bias Indicators: + GT Distribution Std: 1.05%p (uniform=0) + Pred Distribution Std: 1.85%p (uniform=0) + Overall Accuracy: 59.0% + +--- FAR (n=594) --- + + GT Answer Distribution: + Pos Count Pct Acc when GT + ----------------------------------- + A 159 26.8% 59.1% + B 156 26.3% 62.2% + C 130 21.9% 63.1% + D 149 25.1% 62.4% + + Model Prediction Distribution: + Pos Count Pct Acc when Pred + ----------------------------------- + A 141 23.7% 66.7% + B 146 24.6% 66.4% + C 141 23.7% 58.2% + D 166 27.9% 56.0% + + Bias Indicators: + GT Distribution Std: 1.90%p (uniform=0) + Pred Distribution Std: 1.74%p (uniform=0) + Overall Accuracy: 61.6% + +--- CLOSE (n=612) --- + + GT Answer Distribution: + Pos Count Pct Acc when GT + ----------------------------------- + A 160 26.1% 66.9% + B 134 21.9% 56.7% + C 159 26.0% 47.8% + D 159 26.0% 54.1% + + Model Prediction Distribution: + Pos Count Pct Acc when Pred + ----------------------------------- + A 188 30.7% 56.9% + B 140 22.9% 54.3% + C 133 21.7% 57.1% + D 151 24.7% 57.0% + + Bias Indicators: + GT Distribution Std: 1.79%p (uniform=0) + Pred Distribution Std: 3.46%p (uniform=0) + Overall Accuracy: 56.4% + +================================================================================ +Model: molmo-7B-O-0924-data_scale_exp_80k +================================================================================ + +--- ALL (n=3640) --- + + GT Answer Distribution: + Pos Count Pct Acc when GT + ----------------------------------- + A 958 26.3% 58.7% + B 912 25.1% 51.6% + C 852 23.4% 60.4% + D 918 25.2% 41.2% + + Model Prediction Distribution: + Pos Count Pct Acc when Pred + ----------------------------------- + A 1021 28.0% 55.0% + B 876 24.1% 53.8% + C 1035 28.4% 49.8% + D 708 19.5% 53.4% + + Bias Indicators: + GT Distribution Std: 1.04%p (uniform=0) + Pred Distribution Std: 3.63%p (uniform=0) + Overall Accuracy: 52.9% + +--- FAR+CLOSE (n=1206) --- + + GT Answer Distribution: + Pos Count Pct Acc when GT + ----------------------------------- + A 319 26.5% 58.3% + B 290 24.0% 53.4% + C 289 24.0% 56.4% + D 308 25.5% 52.6% + + Model Prediction Distribution: + Pos Count Pct Acc when Pred + ----------------------------------- + A 315 26.1% 59.0% + B 287 23.8% 54.0% + C 285 23.6% 57.2% + D 319 26.5% 50.8% + + Bias Indicators: + GT Distribution Std: 1.05%p (uniform=0) + Pred Distribution Std: 1.29%p (uniform=0) + Overall Accuracy: 55.2% + +--- FAR (n=594) --- + + GT Answer Distribution: + Pos Count Pct Acc when GT + ----------------------------------- + A 159 26.8% 49.7% + B 156 26.3% 55.8% + C 130 21.9% 53.1% + D 149 25.1% 49.7% + + Model Prediction Distribution: + Pos Count Pct Acc when Pred + ----------------------------------- + A 141 23.7% 56.0% + B 163 27.4% 53.4% + C 128 21.5% 53.9% + D 162 27.3% 45.7% + + Bias Indicators: + GT Distribution Std: 1.90%p (uniform=0) + Pred Distribution Std: 2.48%p (uniform=0) + Overall Accuracy: 52.0% + +--- CLOSE (n=612) --- + + GT Answer Distribution: + Pos Count Pct Acc when GT + ----------------------------------- + A 160 26.1% 66.9% + B 134 21.9% 50.7% + C 159 26.0% 59.1% + D 159 26.0% 55.3% + + Model Prediction Distribution: + Pos Count Pct Acc when Pred + ----------------------------------- + A 174 28.4% 61.5% + B 124 20.3% 54.8% + C 157 25.7% 59.9% + D 157 25.7% 56.1% + + Bias Indicators: + GT Distribution Std: 1.79%p (uniform=0) + Pred Distribution Std: 2.96%p (uniform=0) + Overall Accuracy: 58.3% + +================================================================================ +Model: molmo-7B-O-0924-data_scale_exp_400k +================================================================================ + +--- ALL (n=3640) --- + + GT Answer Distribution: + Pos Count Pct Acc when GT + ----------------------------------- + A 958 26.3% 60.9% + B 912 25.1% 63.4% + C 852 23.4% 68.5% + D 918 25.2% 67.1% + + Model Prediction Distribution: + Pos Count Pct Acc when Pred + ----------------------------------- + A 862 23.7% 67.6% + B 860 23.6% 67.2% + C 968 26.6% 60.3% + D 950 26.1% 64.8% + + Bias Indicators: + GT Distribution Std: 1.04%p (uniform=0) + Pred Distribution Std: 1.36%p (uniform=0) + Overall Accuracy: 64.9% + +--- FAR+CLOSE (n=1206) --- + + GT Answer Distribution: + Pos Count Pct Acc when GT + ----------------------------------- + A 319 26.5% 52.4% + B 290 24.0% 56.6% + C 289 24.0% 61.9% + D 308 25.5% 55.8% + + Model Prediction Distribution: + Pos Count Pct Acc when Pred + ----------------------------------- + A 290 24.0% 57.6% + B 271 22.5% 60.5% + C 344 28.5% 52.0% + D 301 25.0% 57.1% + + Bias Indicators: + GT Distribution Std: 1.05%p (uniform=0) + Pred Distribution Std: 2.22%p (uniform=0) + Overall Accuracy: 56.6% + +--- FAR (n=594) --- + + GT Answer Distribution: + Pos Count Pct Acc when GT + ----------------------------------- + A 159 26.8% 53.5% + B 156 26.3% 53.8% + C 130 21.9% 66.2% + D 149 25.1% 63.1% + + Model Prediction Distribution: + Pos Count Pct Acc when Pred + ----------------------------------- + A 138 23.2% 61.6% + B 129 21.7% 65.1% + C 171 28.8% 50.3% + D 156 26.3% 60.3% + + Bias Indicators: + GT Distribution Std: 1.90%p (uniform=0) + Pred Distribution Std: 2.73%p (uniform=0) + Overall Accuracy: 58.8% + +--- CLOSE (n=612) --- + + GT Answer Distribution: + Pos Count Pct Acc when GT + ----------------------------------- + A 160 26.1% 51.2% + B 134 21.9% 59.7% + C 159 26.0% 58.5% + D 159 26.0% 49.1% + + Model Prediction Distribution: + Pos Count Pct Acc when Pred + ----------------------------------- + A 152 24.8% 53.9% + B 142 23.2% 56.3% + C 173 28.3% 53.8% + D 145 23.7% 53.8% + + Bias Indicators: + GT Distribution Std: 1.79%p (uniform=0) + Pred Distribution Std: 1.98%p (uniform=0) + Overall Accuracy: 54.4% + +================================================================================ +Model: molmo-7B-O-0924-data_scale_exp_800k +================================================================================ + +--- ALL (n=3640) --- + + GT Answer Distribution: + Pos Count Pct Acc when GT + ----------------------------------- + A 958 26.3% 59.3% + B 912 25.1% 63.8% + C 852 23.4% 75.2% + D 918 25.2% 78.9% + + Model Prediction Distribution: + Pos Count Pct Acc when Pred + ----------------------------------- + A 723 19.9% 78.6% + B 769 21.1% 75.7% + C 984 27.0% 65.1% + D 1164 32.0% 62.2% + + Bias Indicators: + GT Distribution Std: 1.04%p (uniform=0) + Pred Distribution Std: 4.85%p (uniform=0) + Overall Accuracy: 69.1% + +--- FAR+CLOSE (n=1206) --- + + GT Answer Distribution: + Pos Count Pct Acc when GT + ----------------------------------- + A 319 26.5% 51.1% + B 290 24.0% 45.5% + C 289 24.0% 61.9% + D 308 25.5% 80.5% + + Model Prediction Distribution: + Pos Count Pct Acc when Pred + ----------------------------------- + A 227 18.8% 71.8% + B 185 15.3% 71.4% + C 302 25.0% 59.3% + D 492 40.8% 50.4% + + Bias Indicators: + GT Distribution Std: 1.05%p (uniform=0) + Pred Distribution Std: 9.76%p (uniform=0) + Overall Accuracy: 59.9% + +--- FAR (n=594) --- + + GT Answer Distribution: + Pos Count Pct Acc when GT + ----------------------------------- + A 159 26.8% 52.8% + B 156 26.3% 41.7% + C 130 21.9% 63.1% + D 149 25.1% 86.6% + + Model Prediction Distribution: + Pos Count Pct Acc when Pred + ----------------------------------- + A 114 19.2% 73.7% + B 81 13.6% 80.2% + C 135 22.7% 60.7% + D 264 44.4% 48.9% + + Bias Indicators: + GT Distribution Std: 1.90%p (uniform=0) + Pred Distribution Std: 11.68%p (uniform=0) + Overall Accuracy: 60.6% + +--- CLOSE (n=612) --- + + GT Answer Distribution: + Pos Count Pct Acc when GT + ----------------------------------- + A 160 26.1% 49.4% + B 134 21.9% 50.0% + C 159 26.0% 61.0% + D 159 26.0% 74.8% + + Model Prediction Distribution: + Pos Count Pct Acc when Pred + ----------------------------------- + A 113 18.5% 69.9% + B 104 17.0% 64.4% + C 167 27.3% 58.1% + D 228 37.3% 52.2% + + Bias Indicators: + GT Distribution Std: 1.79%p (uniform=0) + Pred Distribution Std: 8.10%p (uniform=0) + Overall Accuracy: 59.2% + +================================================================================ +Model: molmo-7B-O-0924-data_scale_exp_2m +================================================================================ + +--- ALL (n=3640) --- + + GT Answer Distribution: + Pos Count Pct Acc when GT + ----------------------------------- + A 958 26.3% 70.9% + B 912 25.1% 72.4% + C 852 23.4% 72.1% + D 918 25.2% 81.8% + + Model Prediction Distribution: + Pos Count Pct Acc when Pred + ----------------------------------- + A 860 23.6% 79.0% + B 824 22.6% 80.1% + C 807 22.2% 76.1% + D 1149 31.6% 65.4% + + Bias Indicators: + GT Distribution Std: 1.04%p (uniform=0) + Pred Distribution Std: 3.83%p (uniform=0) + Overall Accuracy: 74.3% + +--- FAR+CLOSE (n=1206) --- + + GT Answer Distribution: + Pos Count Pct Acc when GT + ----------------------------------- + A 319 26.5% 56.4% + B 290 24.0% 54.5% + C 289 24.0% 59.5% + D 308 25.5% 72.1% + + Model Prediction Distribution: + Pos Count Pct Acc when Pred + ----------------------------------- + A 276 22.9% 65.2% + B 227 18.8% 69.6% + C 276 22.9% 62.3% + D 427 35.4% 52.0% + + Bias Indicators: + GT Distribution Std: 1.05%p (uniform=0) + Pred Distribution Std: 6.23%p (uniform=0) + Overall Accuracy: 60.7% + +--- FAR (n=594) --- + + GT Answer Distribution: + Pos Count Pct Acc when GT + ----------------------------------- + A 159 26.8% 49.7% + B 156 26.3% 53.8% + C 130 21.9% 55.4% + D 149 25.1% 77.2% + + Model Prediction Distribution: + Pos Count Pct Acc when Pred + ----------------------------------- + A 127 21.4% 62.2% + B 119 20.0% 70.6% + C 116 19.5% 62.1% + D 232 39.1% 49.6% + + Bias Indicators: + GT Distribution Std: 1.90%p (uniform=0) + Pred Distribution Std: 8.14%p (uniform=0) + Overall Accuracy: 58.9% + +--- CLOSE (n=612) --- + + GT Answer Distribution: + Pos Count Pct Acc when GT + ----------------------------------- + A 160 26.1% 63.1% + B 134 21.9% 55.2% + C 159 26.0% 62.9% + D 159 26.0% 67.3% + + Model Prediction Distribution: + Pos Count Pct Acc when Pred + ----------------------------------- + A 149 24.3% 67.8% + B 108 17.6% 68.5% + C 160 26.1% 62.5% + D 195 31.9% 54.9% + + Bias Indicators: + GT Distribution Std: 1.79%p (uniform=0) + Pred Distribution Std: 5.07%p (uniform=0) + Overall Accuracy: 62.4% + +================================================================================ +Model: NVILA-Lite-2B +================================================================================ + +--- ALL (n=3640) --- + + GT Answer Distribution: + Pos Count Pct Acc when GT + ----------------------------------- + A 958 26.3% 19.7% + B 912 25.1% 16.9% + C 852 23.4% 14.6% + D 918 25.2% 16.6% + + Model Prediction Distribution: + Pos Count Pct Acc when Pred + ----------------------------------- + A 352 32.0% 53.7% + B 290 26.3% 53.1% + C 210 19.1% 59.0% + D 249 22.6% 61.0% + + Bias Indicators: + GT Distribution Std: 1.04%p (uniform=0) + Pred Distribution Std: 4.77%p (uniform=0) + Overall Accuracy: 17.0% + +--- FAR+CLOSE (n=1206) --- + + GT Answer Distribution: + Pos Count Pct Acc when GT + ----------------------------------- + A 319 26.5% 17.6% + B 290 24.0% 13.8% + C 289 24.0% 11.4% + D 308 25.5% 14.3% + + Model Prediction Distribution: + Pos Count Pct Acc when Pred + ----------------------------------- + A 120 33.0% 46.7% + B 91 25.0% 44.0% + C 71 19.5% 46.5% + D 82 22.5% 53.7% + + Bias Indicators: + GT Distribution Std: 1.05%p (uniform=0) + Pred Distribution Std: 4.99%p (uniform=0) + Overall Accuracy: 14.3% + +--- FAR (n=594) --- + + GT Answer Distribution: + Pos Count Pct Acc when GT + ----------------------------------- + A 159 26.8% 18.2% + B 156 26.3% 12.8% + C 130 21.9% 11.5% + D 149 25.1% 11.4% + + Model Prediction Distribution: + Pos Count Pct Acc when Pred + ----------------------------------- + A 65 36.5% 44.6% + B 37 20.8% 54.1% + C 32 18.0% 46.9% + D 44 24.7% 38.6% + + Bias Indicators: + GT Distribution Std: 1.90%p (uniform=0) + Pred Distribution Std: 7.07%p (uniform=0) + Overall Accuracy: 13.6% + +--- CLOSE (n=612) --- + + GT Answer Distribution: + Pos Count Pct Acc when GT + ----------------------------------- + A 160 26.1% 16.9% + B 134 21.9% 14.9% + C 159 26.0% 11.3% + D 159 26.0% 17.0% + + Model Prediction Distribution: + Pos Count Pct Acc when Pred + ----------------------------------- + A 55 29.6% 49.1% + B 54 29.0% 37.0% + C 39 21.0% 46.2% + D 38 20.4% 71.1% + + Bias Indicators: + GT Distribution Std: 1.79%p (uniform=0) + Pred Distribution Std: 4.31%p (uniform=0) + Overall Accuracy: 15.0% + +================================================================================ +Model: NVILA-Lite-2B-data-scale-exp-80k +================================================================================ + +--- ALL (n=3640) --- + + GT Answer Distribution: + Pos Count Pct Acc when GT + ----------------------------------- + A 958 26.3% 63.9% + B 912 25.1% 69.2% + C 852 23.4% 61.7% + D 918 25.2% 65.5% + + Model Prediction Distribution: + Pos Count Pct Acc when Pred + ----------------------------------- + A 930 25.5% 65.8% + B 1010 27.7% 62.5% + C 786 21.6% 66.9% + D 914 25.1% 65.8% + + Bias Indicators: + GT Distribution Std: 1.04%p (uniform=0) + Pred Distribution Std: 2.21%p (uniform=0) + Overall Accuracy: 65.1% + +--- FAR+CLOSE (n=1206) --- + + GT Answer Distribution: + Pos Count Pct Acc when GT + ----------------------------------- + A 319 26.5% 58.3% + B 290 24.0% 52.8% + C 289 24.0% 43.9% + D 308 25.5% 46.4% + + Model Prediction Distribution: + Pos Count Pct Acc when Pred + ----------------------------------- + A 363 30.1% 51.2% + B 337 27.9% 45.4% + C 234 19.4% 54.3% + D 272 22.6% 52.6% + + Bias Indicators: + GT Distribution Std: 1.05%p (uniform=0) + Pred Distribution Std: 4.24%p (uniform=0) + Overall Accuracy: 50.5% + +--- FAR (n=594) --- + + GT Answer Distribution: + Pos Count Pct Acc when GT + ----------------------------------- + A 159 26.8% 64.8% + B 156 26.3% 58.3% + C 130 21.9% 46.2% + D 149 25.1% 51.0% + + Model Prediction Distribution: + Pos Count Pct Acc when Pred + ----------------------------------- + A 194 32.7% 53.1% + B 171 28.8% 53.2% + C 108 18.2% 55.6% + D 121 20.4% 62.8% + + Bias Indicators: + GT Distribution Std: 1.90%p (uniform=0) + Pred Distribution Std: 5.94%p (uniform=0) + Overall Accuracy: 55.6% + +--- CLOSE (n=612) --- + + GT Answer Distribution: + Pos Count Pct Acc when GT + ----------------------------------- + A 160 26.1% 51.9% + B 134 21.9% 46.3% + C 159 26.0% 42.1% + D 159 26.0% 42.1% + + Model Prediction Distribution: + Pos Count Pct Acc when Pred + ----------------------------------- + A 169 27.6% 49.1% + B 166 27.1% 37.3% + C 126 20.6% 53.2% + D 151 24.7% 44.4% + + Bias Indicators: + GT Distribution Std: 1.79%p (uniform=0) + Pred Distribution Std: 2.78%p (uniform=0) + Overall Accuracy: 45.6% + +================================================================================ +Model: NVILA-Lite-2B-data-scale-exp-400k +================================================================================ + +--- ALL (n=3640) --- + + GT Answer Distribution: + Pos Count Pct Acc when GT + ----------------------------------- + A 958 26.3% 58.9% + B 912 25.1% 60.0% + C 852 23.4% 65.3% + D 918 25.2% 64.5% + + Model Prediction Distribution: + Pos Count Pct Acc when Pred + ----------------------------------- + A 889 24.4% 63.4% + B 849 23.3% 64.4% + C 905 24.9% 61.4% + D 997 27.4% 59.4% + + Bias Indicators: + GT Distribution Std: 1.04%p (uniform=0) + Pred Distribution Std: 1.49%p (uniform=0) + Overall Accuracy: 62.1% + +--- FAR+CLOSE (n=1206) --- + + GT Answer Distribution: + Pos Count Pct Acc when GT + ----------------------------------- + A 319 26.5% 58.9% + B 290 24.0% 53.4% + C 289 24.0% 59.5% + D 308 25.5% 52.9% + + Model Prediction Distribution: + Pos Count Pct Acc when Pred + ----------------------------------- + A 341 28.3% 55.1% + B 267 22.1% 58.1% + C 303 25.1% 56.8% + D 295 24.5% 55.3% + + Bias Indicators: + GT Distribution Std: 1.05%p (uniform=0) + Pred Distribution Std: 2.19%p (uniform=0) + Overall Accuracy: 56.2% + +--- FAR (n=594) --- + + GT Answer Distribution: + Pos Count Pct Acc when GT + ----------------------------------- + A 159 26.8% 62.3% + B 156 26.3% 56.4% + C 130 21.9% 63.8% + D 149 25.1% 53.0% + + Model Prediction Distribution: + Pos Count Pct Acc when Pred + ----------------------------------- + A 177 29.8% 55.9% + B 138 23.2% 63.8% + C 146 24.6% 56.8% + D 133 22.4% 59.4% + + Bias Indicators: + GT Distribution Std: 1.90%p (uniform=0) + Pred Distribution Std: 2.88%p (uniform=0) + Overall Accuracy: 58.8% + +--- CLOSE (n=612) --- + + GT Answer Distribution: + Pos Count Pct Acc when GT + ----------------------------------- + A 160 26.1% 55.6% + B 134 21.9% 50.0% + C 159 26.0% 56.0% + D 159 26.0% 52.8% + + Model Prediction Distribution: + Pos Count Pct Acc when Pred + ----------------------------------- + A 164 26.8% 54.3% + B 129 21.1% 51.9% + C 157 25.7% 56.7% + D 162 26.5% 51.9% + + Bias Indicators: + GT Distribution Std: 1.79%p (uniform=0) + Pred Distribution Std: 2.30%p (uniform=0) + Overall Accuracy: 53.8% + +================================================================================ +Model: NVILA-Lite-2B-data-scale-exp-800k +================================================================================ + +--- ALL (n=3640) --- + + GT Answer Distribution: + Pos Count Pct Acc when GT + ----------------------------------- + A 958 26.3% 68.7% + B 912 25.1% 65.7% + C 852 23.4% 71.6% + D 918 25.2% 73.0% + + Model Prediction Distribution: + Pos Count Pct Acc when Pred + ----------------------------------- + A 931 25.6% 70.7% + B 794 21.8% 75.4% + C 893 24.5% 68.3% + D 1022 28.1% 65.6% + + Bias Indicators: + GT Distribution Std: 1.04%p (uniform=0) + Pred Distribution Std: 2.25%p (uniform=0) + Overall Accuracy: 69.7% + +--- FAR+CLOSE (n=1206) --- + + GT Answer Distribution: + Pos Count Pct Acc when GT + ----------------------------------- + A 319 26.5% 65.5% + B 290 24.0% 50.7% + C 289 24.0% 58.1% + D 308 25.5% 57.8% + + Model Prediction Distribution: + Pos Count Pct Acc when Pred + ----------------------------------- + A 381 31.6% 54.9% + B 236 19.6% 62.3% + C 283 23.5% 59.4% + D 306 25.4% 58.2% + + Bias Indicators: + GT Distribution Std: 1.05%p (uniform=0) + Pred Distribution Std: 4.34%p (uniform=0) + Overall Accuracy: 58.2% + +--- FAR (n=594) --- + + GT Answer Distribution: + Pos Count Pct Acc when GT + ----------------------------------- + A 159 26.8% 71.7% + B 156 26.3% 55.1% + C 130 21.9% 62.3% + D 149 25.1% 61.1% + + Model Prediction Distribution: + Pos Count Pct Acc when Pred + ----------------------------------- + A 199 33.5% 57.3% + B 121 20.4% 71.1% + C 127 21.4% 63.8% + D 147 24.7% 61.9% + + Bias Indicators: + GT Distribution Std: 1.90%p (uniform=0) + Pred Distribution Std: 5.17%p (uniform=0) + Overall Accuracy: 62.6% + +--- CLOSE (n=612) --- + + GT Answer Distribution: + Pos Count Pct Acc when GT + ----------------------------------- + A 160 26.1% 59.4% + B 134 21.9% 45.5% + C 159 26.0% 54.7% + D 159 26.0% 54.7% + + Model Prediction Distribution: + Pos Count Pct Acc when Pred + ----------------------------------- + A 182 29.7% 52.2% + B 115 18.8% 53.0% + C 156 25.5% 55.8% + D 159 26.0% 54.7% + + Bias Indicators: + GT Distribution Std: 1.79%p (uniform=0) + Pred Distribution Std: 3.94%p (uniform=0) + Overall Accuracy: 53.9% + +================================================================================ +Model: NVILA-Lite-2B-data-scale-exp-2m +================================================================================ + +--- ALL (n=3640) --- + + GT Answer Distribution: + Pos Count Pct Acc when GT + ----------------------------------- + A 958 26.3% 72.4% + B 912 25.1% 65.1% + C 852 23.4% 70.2% + D 918 25.2% 69.6% + + Model Prediction Distribution: + Pos Count Pct Acc when Pred + ----------------------------------- + A 1008 27.7% 68.8% + B 784 21.5% 75.8% + C 892 24.5% 67.0% + D 956 26.3% 66.8% + + Bias Indicators: + GT Distribution Std: 1.04%p (uniform=0) + Pred Distribution Std: 2.30%p (uniform=0) + Overall Accuracy: 69.4% + +--- FAR+CLOSE (n=1206) --- + + GT Answer Distribution: + Pos Count Pct Acc when GT + ----------------------------------- + A 319 26.5% 64.9% + B 290 24.0% 50.7% + C 289 24.0% 58.5% + D 308 25.5% 52.9% + + Model Prediction Distribution: + Pos Count Pct Acc when Pred + ----------------------------------- + A 379 31.4% 54.6% + B 239 19.8% 61.5% + C 305 25.3% 55.4% + D 283 23.5% 57.6% + + Bias Indicators: + GT Distribution Std: 1.05%p (uniform=0) + Pred Distribution Std: 4.20%p (uniform=0) + Overall Accuracy: 56.9% + +--- FAR (n=594) --- + + GT Answer Distribution: + Pos Count Pct Acc when GT + ----------------------------------- + A 159 26.8% 69.8% + B 156 26.3% 55.8% + C 130 21.9% 64.6% + D 149 25.1% 55.0% + + Model Prediction Distribution: + Pos Count Pct Acc when Pred + ----------------------------------- + A 194 32.7% 57.2% + B 126 21.2% 69.0% + C 144 24.2% 58.3% + D 130 21.9% 63.1% + + Bias Indicators: + GT Distribution Std: 1.90%p (uniform=0) + Pred Distribution Std: 4.56%p (uniform=0) + Overall Accuracy: 61.3% + +--- CLOSE (n=612) --- + + GT Answer Distribution: + Pos Count Pct Acc when GT + ----------------------------------- + A 160 26.1% 60.0% + B 134 21.9% 44.8% + C 159 26.0% 53.5% + D 159 26.0% 50.9% + + Model Prediction Distribution: + Pos Count Pct Acc when Pred + ----------------------------------- + A 185 30.2% 51.9% + B 113 18.5% 53.1% + C 161 26.3% 52.8% + D 153 25.0% 52.9% + + Bias Indicators: + GT Distribution Std: 1.79%p (uniform=0) + Pred Distribution Std: 4.24%p (uniform=0) + Overall Accuracy: 52.6% + +================================================================================ +Model: RoboRefer-2B-SFT +================================================================================ + +--- ALL (n=3640) --- + + GT Answer Distribution: + Pos Count Pct Acc when GT + ----------------------------------- + A 958 26.3% 94.1% + B 912 25.1% 93.9% + C 852 23.4% 92.1% + D 918 25.2% 88.0% + + Model Prediction Distribution: + Pos Count Pct Acc when Pred + ----------------------------------- + A 991 27.3% 90.8% + B 937 25.8% 91.2% + C 851 23.4% 91.9% + D 851 23.4% 94.8% + + Bias Indicators: + GT Distribution Std: 1.04%p (uniform=0) + Pred Distribution Std: 1.64%p (uniform=0) + Overall Accuracy: 92.0% + +--- FAR+CLOSE (n=1206) --- + + GT Answer Distribution: + Pos Count Pct Acc when GT + ----------------------------------- + A 319 26.5% 88.1% + B 290 24.0% 84.8% + C 289 24.0% 81.7% + D 308 25.5% 76.0% + + Model Prediction Distribution: + Pos Count Pct Acc when Pred + ----------------------------------- + A 352 29.4% 79.5% + B 295 24.7% 83.1% + C 280 23.4% 83.2% + D 269 22.5% 86.6% + + Bias Indicators: + GT Distribution Std: 1.05%p (uniform=0) + Pred Distribution Std: 2.67%p (uniform=0) + Overall Accuracy: 82.7% + +--- FAR (n=594) --- + + GT Answer Distribution: + Pos Count Pct Acc when GT + ----------------------------------- + A 159 26.8% 90.6% + B 156 26.3% 85.3% + C 130 21.9% 76.2% + D 149 25.1% 72.5% + + Model Prediction Distribution: + Pos Count Pct Acc when Pred + ----------------------------------- + A 186 31.4% 76.9% + B 161 27.2% 82.0% + C 119 20.1% 82.4% + D 126 21.3% 86.5% + + Bias Indicators: + GT Distribution Std: 1.90%p (uniform=0) + Pred Distribution Std: 4.58%p (uniform=0) + Overall Accuracy: 81.5% + +--- CLOSE (n=612) --- + + GT Answer Distribution: + Pos Count Pct Acc when GT + ----------------------------------- + A 160 26.1% 85.6% + B 134 21.9% 84.3% + C 159 26.0% 86.2% + D 159 26.0% 79.2% + + Model Prediction Distribution: + Pos Count Pct Acc when Pred + ----------------------------------- + A 166 27.5% 82.5% + B 134 22.2% 84.3% + C 161 26.7% 83.9% + D 143 23.7% 86.7% + + Bias Indicators: + GT Distribution Std: 1.79%p (uniform=0) + Pred Distribution Std: 2.16%p (uniform=0) + Overall Accuracy: 83.8% + +================================================================================ +Model: Qwen2.5-VL-3B-Instruct +================================================================================ + +--- ALL (n=3640) --- + + GT Answer Distribution: + Pos Count Pct Acc when GT + ----------------------------------- + A 958 26.3% 51.9% + B 912 25.1% 61.5% + C 852 23.4% 64.0% + D 918 25.2% 72.3% + + Model Prediction Distribution: + Pos Count Pct Acc when Pred + ----------------------------------- + A 682 18.7% 72.9% + B 863 23.7% 65.0% + C 938 25.8% 58.1% + D 1157 31.8% 57.4% + + Bias Indicators: + GT Distribution Std: 1.04%p (uniform=0) + Pred Distribution Std: 4.68%p (uniform=0) + Overall Accuracy: 62.3% + +--- FAR+CLOSE (n=1206) --- + + GT Answer Distribution: + Pos Count Pct Acc when GT + ----------------------------------- + A 319 26.5% 42.3% + B 290 24.0% 47.2% + C 289 24.0% 49.8% + D 308 25.5% 62.7% + + Model Prediction Distribution: + Pos Count Pct Acc when Pred + ----------------------------------- + A 226 18.7% 59.7% + B 266 22.1% 51.5% + C 301 25.0% 47.8% + D 413 34.2% 46.7% + + Bias Indicators: + GT Distribution Std: 1.05%p (uniform=0) + Pred Distribution Std: 5.77%p (uniform=0) + Overall Accuracy: 50.5% + +--- FAR (n=594) --- + + GT Answer Distribution: + Pos Count Pct Acc when GT + ----------------------------------- + A 159 26.8% 42.8% + B 156 26.3% 48.1% + C 130 21.9% 48.5% + D 149 25.1% 66.4% + + Model Prediction Distribution: + Pos Count Pct Acc when Pred + ----------------------------------- + A 114 19.2% 59.6% + B 135 22.7% 55.6% + C 134 22.6% 47.0% + D 211 35.5% 46.9% + + Bias Indicators: + GT Distribution Std: 1.90%p (uniform=0) + Pred Distribution Std: 6.24%p (uniform=0) + Overall Accuracy: 51.3% + +--- CLOSE (n=612) --- + + GT Answer Distribution: + Pos Count Pct Acc when GT + ----------------------------------- + A 160 26.1% 41.9% + B 134 21.9% 46.3% + C 159 26.0% 50.9% + D 159 26.0% 59.1% + + Model Prediction Distribution: + Pos Count Pct Acc when Pred + ----------------------------------- + A 112 18.3% 59.8% + B 131 21.4% 47.3% + C 167 27.3% 48.5% + D 202 33.0% 46.5% + + Bias Indicators: + GT Distribution Std: 1.79%p (uniform=0) + Pred Distribution Std: 5.64%p (uniform=0) + Overall Accuracy: 49.7% + +================================================================================ +Model: Qwen2.5-VL-3B-Instruct-data_scale_exp_80k +================================================================================ + +--- ALL (n=3640) --- + + GT Answer Distribution: + Pos Count Pct Acc when GT + ----------------------------------- + A 958 26.3% 47.9% + B 912 25.1% 57.0% + C 852 23.4% 61.6% + D 918 25.2% 63.5% + + Model Prediction Distribution: + Pos Count Pct Acc when Pred + ----------------------------------- + A 704 19.3% 65.2% + B 883 24.3% 58.9% + C 974 26.8% 53.9% + D 1079 29.6% 54.0% + + Bias Indicators: + GT Distribution Std: 1.04%p (uniform=0) + Pred Distribution Std: 3.78%p (uniform=0) + Overall Accuracy: 57.3% + +--- FAR+CLOSE (n=1206) --- + + GT Answer Distribution: + Pos Count Pct Acc when GT + ----------------------------------- + A 319 26.5% 41.7% + B 290 24.0% 45.5% + C 289 24.0% 45.3% + D 308 25.5% 54.5% + + Model Prediction Distribution: + Pos Count Pct Acc when Pred + ----------------------------------- + A 238 19.7% 55.9% + B 270 22.4% 48.9% + C 296 24.5% 44.3% + D 402 33.3% 41.8% + + Bias Indicators: + GT Distribution Std: 1.05%p (uniform=0) + Pred Distribution Std: 5.10%p (uniform=0) + Overall Accuracy: 46.8% + +--- FAR (n=594) --- + + GT Answer Distribution: + Pos Count Pct Acc when GT + ----------------------------------- + A 159 26.8% 44.0% + B 156 26.3% 46.8% + C 130 21.9% 46.2% + D 149 25.1% 61.7% + + Model Prediction Distribution: + Pos Count Pct Acc when Pred + ----------------------------------- + A 123 20.7% 56.9% + B 131 22.1% 55.7% + C 139 23.4% 43.2% + D 201 33.8% 45.8% + + Bias Indicators: + GT Distribution Std: 1.90%p (uniform=0) + Pred Distribution Std: 5.19%p (uniform=0) + Overall Accuracy: 49.7% + +--- CLOSE (n=612) --- + + GT Answer Distribution: + Pos Count Pct Acc when GT + ----------------------------------- + A 160 26.1% 39.4% + B 134 21.9% 44.0% + C 159 26.0% 44.7% + D 159 26.0% 47.8% + + Model Prediction Distribution: + Pos Count Pct Acc when Pred + ----------------------------------- + A 115 18.8% 54.8% + B 139 22.7% 42.4% + C 157 25.7% 45.2% + D 201 32.8% 37.8% + + Bias Indicators: + GT Distribution Std: 1.79%p (uniform=0) + Pred Distribution Std: 5.14%p (uniform=0) + Overall Accuracy: 44.0% + +================================================================================ +Model: Qwen2.5-VL-3B-Instruct-data_scale_exp_400k +================================================================================ + +--- ALL (n=3640) --- + + GT Answer Distribution: + Pos Count Pct Acc when GT + ----------------------------------- + A 958 26.3% 50.1% + B 912 25.1% 56.6% + C 852 23.4% 62.3% + D 918 25.2% 66.1% + + Model Prediction Distribution: + Pos Count Pct Acc when Pred + ----------------------------------- + A 736 20.2% 65.2% + B 825 22.7% 62.5% + C 966 26.5% 55.0% + D 1113 30.6% 54.5% + + Bias Indicators: + GT Distribution Std: 1.04%p (uniform=0) + Pred Distribution Std: 3.93%p (uniform=0) + Overall Accuracy: 58.6% + +--- FAR+CLOSE (n=1206) --- + + GT Answer Distribution: + Pos Count Pct Acc when GT + ----------------------------------- + A 319 26.5% 43.6% + B 290 24.0% 43.4% + C 289 24.0% 45.3% + D 308 25.5% 60.4% + + Model Prediction Distribution: + Pos Count Pct Acc when Pred + ----------------------------------- + A 243 20.1% 57.2% + B 238 19.7% 52.9% + C 299 24.8% 43.8% + D 426 35.3% 43.7% + + Bias Indicators: + GT Distribution Std: 1.05%p (uniform=0) + Pred Distribution Std: 6.28%p (uniform=0) + Overall Accuracy: 48.3% + +--- FAR (n=594) --- + + GT Answer Distribution: + Pos Count Pct Acc when GT + ----------------------------------- + A 159 26.8% 46.5% + B 156 26.3% 44.9% + C 130 21.9% 48.5% + D 149 25.1% 65.8% + + Model Prediction Distribution: + Pos Count Pct Acc when Pred + ----------------------------------- + A 126 21.2% 58.7% + B 118 19.9% 59.3% + C 143 24.1% 44.1% + D 207 34.8% 47.3% + + Bias Indicators: + GT Distribution Std: 1.90%p (uniform=0) + Pred Distribution Std: 5.89%p (uniform=0) + Overall Accuracy: 51.3% + +--- CLOSE (n=612) --- + + GT Answer Distribution: + Pos Count Pct Acc when GT + ----------------------------------- + A 160 26.1% 40.6% + B 134 21.9% 41.8% + C 159 26.0% 42.8% + D 159 26.0% 55.3% + + Model Prediction Distribution: + Pos Count Pct Acc when Pred + ----------------------------------- + A 117 19.1% 55.6% + B 120 19.6% 46.7% + C 156 25.5% 43.6% + D 219 35.8% 40.2% + + Bias Indicators: + GT Distribution Std: 1.79%p (uniform=0) + Pred Distribution Std: 6.71%p (uniform=0) + Overall Accuracy: 45.3% + +================================================================================ +Model: Qwen2.5-VL-3B-Instruct-data_scale_exp_800k +================================================================================ + +--- ALL (n=3640) --- + + GT Answer Distribution: + Pos Count Pct Acc when GT + ----------------------------------- + A 958 26.3% 55.7% + B 912 25.1% 57.9% + C 852 23.4% 63.5% + D 918 25.2% 66.7% + + Model Prediction Distribution: + Pos Count Pct Acc when Pred + ----------------------------------- + A 814 22.4% 65.6% + B 810 22.3% 65.2% + C 937 25.7% 57.7% + D 1079 29.6% 56.7% + + Bias Indicators: + GT Distribution Std: 1.04%p (uniform=0) + Pred Distribution Std: 3.03%p (uniform=0) + Overall Accuracy: 60.9% + +--- FAR+CLOSE (n=1206) --- + + GT Answer Distribution: + Pos Count Pct Acc when GT + ----------------------------------- + A 319 26.5% 51.4% + B 290 24.0% 45.9% + C 289 24.0% 45.7% + D 308 25.5% 58.8% + + Model Prediction Distribution: + Pos Count Pct Acc when Pred + ----------------------------------- + A 294 24.4% 55.8% + B 235 19.5% 56.6% + C 283 23.5% 46.6% + D 394 32.7% 45.9% + + Bias Indicators: + GT Distribution Std: 1.05%p (uniform=0) + Pred Distribution Std: 4.80%p (uniform=0) + Overall Accuracy: 50.6% + +--- FAR (n=594) --- + + GT Answer Distribution: + Pos Count Pct Acc when GT + ----------------------------------- + A 159 26.8% 56.6% + B 156 26.3% 46.8% + C 130 21.9% 50.0% + D 149 25.1% 65.1% + + Model Prediction Distribution: + Pos Count Pct Acc when Pred + ----------------------------------- + A 156 26.3% 57.7% + B 109 18.4% 67.0% + C 139 23.4% 46.8% + D 190 32.0% 51.1% + + Bias Indicators: + GT Distribution Std: 1.90%p (uniform=0) + Pred Distribution Std: 4.93%p (uniform=0) + Overall Accuracy: 54.7% + +--- CLOSE (n=612) --- + + GT Answer Distribution: + Pos Count Pct Acc when GT + ----------------------------------- + A 160 26.1% 46.2% + B 134 21.9% 44.8% + C 159 26.0% 42.1% + D 159 26.0% 52.8% + + Model Prediction Distribution: + Pos Count Pct Acc when Pred + ----------------------------------- + A 138 22.5% 53.6% + B 126 20.6% 47.6% + C 144 23.5% 46.5% + D 204 33.3% 41.2% + + Bias Indicators: + GT Distribution Std: 1.79%p (uniform=0) + Pred Distribution Std: 4.93%p (uniform=0) + Overall Accuracy: 46.6% + +================================================================================ +Model: Qwen2.5-VL-3B-Instruct-data_scale_exp_2m +================================================================================ + +--- ALL (n=3640) --- + + GT Answer Distribution: + Pos Count Pct Acc when GT + ----------------------------------- + A 958 26.3% 63.3% + B 912 25.1% 63.7% + C 852 23.4% 69.8% + D 918 25.2% 66.6% + + Model Prediction Distribution: + Pos Count Pct Acc when Pred + ----------------------------------- + A 890 24.5% 68.1% + B 831 22.8% 69.9% + C 961 26.4% 61.9% + D 958 26.3% 63.8% + + Bias Indicators: + GT Distribution Std: 1.04%p (uniform=0) + Pred Distribution Std: 1.48%p (uniform=0) + Overall Accuracy: 65.7% + +--- FAR+CLOSE (n=1206) --- + + GT Answer Distribution: + Pos Count Pct Acc when GT + ----------------------------------- + A 319 26.5% 57.4% + B 290 24.0% 50.0% + C 289 24.0% 54.7% + D 308 25.5% 55.8% + + Model Prediction Distribution: + Pos Count Pct Acc when Pred + ----------------------------------- + A 322 26.7% 56.8% + B 245 20.3% 59.2% + C 309 25.6% 51.1% + D 330 27.4% 52.1% + + Bias Indicators: + GT Distribution Std: 1.05%p (uniform=0) + Pred Distribution Std: 2.78%p (uniform=0) + Overall Accuracy: 54.6% + +--- FAR (n=594) --- + + GT Answer Distribution: + Pos Count Pct Acc when GT + ----------------------------------- + A 159 26.8% 61.0% + B 156 26.3% 50.0% + C 130 21.9% 53.1% + D 149 25.1% 59.7% + + Model Prediction Distribution: + Pos Count Pct Acc when Pred + ----------------------------------- + A 165 27.8% 58.8% + B 127 21.4% 61.4% + C 146 24.6% 47.3% + D 156 26.3% 57.1% + + Bias Indicators: + GT Distribution Std: 1.90%p (uniform=0) + Pred Distribution Std: 2.38%p (uniform=0) + Overall Accuracy: 56.1% + +--- CLOSE (n=612) --- + + GT Answer Distribution: + Pos Count Pct Acc when GT + ----------------------------------- + A 160 26.1% 53.8% + B 134 21.9% 50.0% + C 159 26.0% 56.0% + D 159 26.0% 52.2% + + Model Prediction Distribution: + Pos Count Pct Acc when Pred + ----------------------------------- + A 157 25.7% 54.8% + B 118 19.3% 56.8% + C 163 26.6% 54.6% + D 174 28.4% 47.7% + + Bias Indicators: + GT Distribution Std: 1.79%p (uniform=0) + Pred Distribution Std: 3.45%p (uniform=0) + Overall Accuracy: 53.1% + +==================================================================================================== +MODEL BIAS COMPARISON SUMMARY +==================================================================================================== + +Model Subset GT Std Pred Std Pred Max Acc +------------------------------------------------------------------------------------------------- +molmo-7B-O-0924 ALL 1.0%p 4.3%p A(30.3%) 60.7% + FAR+CLOSE 1.0%p 1.9%p A(27.3%) 59.0% + FAR 1.9%p 1.7%p D(27.9%) 61.6% + CLOSE 1.8%p 3.5%p A(30.7%) 56.4% +molmo-7B-O-0924-data_scale_exp_80k ALL 1.0%p 3.6%p C(28.4%) 52.9% + FAR+CLOSE 1.0%p 1.3%p D(26.5%) 55.2% + FAR 1.9%p 2.5%p B(27.4%) 52.0% + CLOSE 1.8%p 3.0%p A(28.4%) 58.3% +molmo-7B-O-0924-data_scale_exp_400k ALL 1.0%p 1.4%p C(26.6%) 64.9% + FAR+CLOSE 1.0%p 2.2%p C(28.5%) 56.6% + FAR 1.9%p 2.7%p C(28.8%) 58.8% + CLOSE 1.8%p 2.0%p C(28.3%) 54.4% +molmo-7B-O-0924-data_scale_exp_800k ALL 1.0%p 4.9%p D(32.0%) 69.1% + FAR+CLOSE 1.0%p 9.8%p D(40.8%) 59.9% + FAR 1.9%p 11.7%p D(44.4%) 60.6% + CLOSE 1.8%p 8.1%p D(37.3%) 59.2% +molmo-7B-O-0924-data_scale_exp_2m ALL 1.0%p 3.8%p D(31.6%) 74.3% + FAR+CLOSE 1.0%p 6.2%p D(35.4%) 60.7% + FAR 1.9%p 8.1%p D(39.1%) 58.9% + CLOSE 1.8%p 5.1%p D(31.9%) 62.4% +NVILA-Lite-2B ALL 1.0%p 4.8%p A(32.0%) 17.0% + FAR+CLOSE 1.0%p 5.0%p A(33.0%) 14.3% + FAR 1.9%p 7.1%p A(36.5%) 13.6% + CLOSE 1.8%p 4.3%p A(29.6%) 15.0% +NVILA-Lite-2B-data-scale-exp-80k ALL 1.0%p 2.2%p B(27.7%) 65.1% + FAR+CLOSE 1.0%p 4.2%p A(30.1%) 50.5% + FAR 1.9%p 5.9%p A(32.7%) 55.6% + CLOSE 1.8%p 2.8%p A(27.6%) 45.6% +NVILA-Lite-2B-data-scale-exp-400k ALL 1.0%p 1.5%p D(27.4%) 62.1% + FAR+CLOSE 1.0%p 2.2%p A(28.3%) 56.2% + FAR 1.9%p 2.9%p A(29.8%) 58.8% + CLOSE 1.8%p 2.3%p A(26.8%) 53.8% +NVILA-Lite-2B-data-scale-exp-800k ALL 1.0%p 2.2%p D(28.1%) 69.7% + FAR+CLOSE 1.0%p 4.3%p A(31.6%) 58.2% + FAR 1.9%p 5.2%p A(33.5%) 62.6% + CLOSE 1.8%p 3.9%p A(29.7%) 53.9% +NVILA-Lite-2B-data-scale-exp-2m ALL 1.0%p 2.3%p A(27.7%) 69.4% + FAR+CLOSE 1.0%p 4.2%p A(31.4%) 56.9% + FAR 1.9%p 4.6%p A(32.7%) 61.3% + CLOSE 1.8%p 4.2%p A(30.2%) 52.6% +RoboRefer-2B-SFT ALL 1.0%p 1.6%p A(27.3%) 92.0% + FAR+CLOSE 1.0%p 2.7%p A(29.4%) 82.7% + FAR 1.9%p 4.6%p A(31.4%) 81.5% + CLOSE 1.8%p 2.2%p A(27.5%) 83.8% +Qwen2.5-VL-3B-Instruct ALL 1.0%p 4.7%p D(31.8%) 62.3% + FAR+CLOSE 1.0%p 5.8%p D(34.2%) 50.5% + FAR 1.9%p 6.2%p D(35.5%) 51.3% + CLOSE 1.8%p 5.6%p D(33.0%) 49.7% +Qwen2.5-VL-3B-Instruct-data_scale_exp_80k ALL 1.0%p 3.8%p D(29.6%) 57.3% + FAR+CLOSE 1.0%p 5.1%p D(33.3%) 46.8% + FAR 1.9%p 5.2%p D(33.8%) 49.7% + CLOSE 1.8%p 5.1%p D(32.8%) 44.0% +Qwen2.5-VL-3B-Instruct-data_scale_exp_400k ALL 1.0%p 3.9%p D(30.6%) 58.6% + FAR+CLOSE 1.0%p 6.3%p D(35.3%) 48.3% + FAR 1.9%p 5.9%p D(34.8%) 51.3% + CLOSE 1.8%p 6.7%p D(35.8%) 45.3% +Qwen2.5-VL-3B-Instruct-data_scale_exp_800k ALL 1.0%p 3.0%p D(29.6%) 60.9% + FAR+CLOSE 1.0%p 4.8%p D(32.7%) 50.6% + FAR 1.9%p 4.9%p D(32.0%) 54.7% + CLOSE 1.8%p 4.9%p D(33.3%) 46.6% +Qwen2.5-VL-3B-Instruct-data_scale_exp_2m ALL 1.0%p 1.5%p C(26.4%) 65.7% + FAR+CLOSE 1.0%p 2.8%p D(27.4%) 54.6% + FAR 1.9%p 2.4%p A(27.8%) 56.1% + CLOSE 1.8%p 3.4%p D(28.4%) 53.1% diff --git a/correct_filter/results/nvila/correct_only/csv/similarity_2m_L0.csv b/correct_filter/results/nvila/correct_only/csv/similarity_2m_L0.csv new file mode 100644 index 0000000000000000000000000000000000000000..c1e6ac9035d176e92d3f8a1e56042c4538af3ef3 --- /dev/null +++ b/correct_filter/results/nvila/correct_only/csv/similarity_2m_L0.csv @@ -0,0 +1,7 @@ +,left,right,above,under,far,close +left,0.9999998,0.99979234,0.9990382,0.99845904,0.99873054,0.99917614 +right,0.99979234,1.0000002,0.99917865,0.9987631,0.9989448,0.9993073 +above,0.9990382,0.99917865,0.9999999,0.9996766,0.99956864,0.9995194 +under,0.99845904,0.9987631,0.9996766,0.99999976,0.9995517,0.9991601 +far,0.99873054,0.9989448,0.99956864,0.9995517,1.0000004,0.9997673 +close,0.99917614,0.9993073,0.9995194,0.9991601,0.9997673,1.0000001 diff --git a/correct_filter/results/nvila/correct_only/csv/similarity_2m_L10.csv b/correct_filter/results/nvila/correct_only/csv/similarity_2m_L10.csv new file mode 100644 index 0000000000000000000000000000000000000000..3834837b79e4c618c29044f123a24f7b9d68ca18 --- /dev/null +++ b/correct_filter/results/nvila/correct_only/csv/similarity_2m_L10.csv @@ -0,0 +1,7 @@ +,left,right,above,under,far,close +left,1.0000002,0.99946415,0.99536633,0.9942555,0.9812977,0.98185515 +right,0.99946415,1.0000001,0.9956668,0.9950104,0.98220986,0.9825698 +above,0.99536633,0.9956668,1.0000004,0.9991444,0.98727834,0.9875144 +under,0.9942555,0.9950104,0.9991444,1.0000002,0.98638064,0.9860885 +far,0.9812977,0.98220986,0.98727834,0.98638064,1.0,0.9996808 +close,0.98185515,0.9825698,0.9875144,0.9860885,0.9996808,0.9999997 diff --git a/correct_filter/results/nvila/correct_only/csv/similarity_2m_L12.csv b/correct_filter/results/nvila/correct_only/csv/similarity_2m_L12.csv new file mode 100644 index 0000000000000000000000000000000000000000..e756f2f2ae607b16ff76b7ae824485b0401c6384 --- /dev/null +++ b/correct_filter/results/nvila/correct_only/csv/similarity_2m_L12.csv @@ -0,0 +1,7 @@ +,left,right,above,under,far,close +left,0.99999994,0.9992977,0.9910708,0.9898012,0.97599757,0.9766798 +right,0.9992977,0.9999998,0.9917161,0.9909911,0.97698414,0.9776015 +above,0.9910708,0.9917161,1.0,0.9988291,0.98402643,0.98436046 +under,0.9898012,0.9909911,0.9988291,0.9999997,0.98302853,0.9827963 +far,0.97599757,0.97698414,0.98402643,0.98302853,0.99999976,0.9993965 +close,0.9766798,0.9776015,0.98436046,0.9827963,0.9993965,0.99999934 diff --git a/correct_filter/results/nvila/correct_only/csv/similarity_2m_L15.csv b/correct_filter/results/nvila/correct_only/csv/similarity_2m_L15.csv new file mode 100644 index 0000000000000000000000000000000000000000..1ae3310180003c201e9773f4ef4dd78f67c7354b --- /dev/null +++ b/correct_filter/results/nvila/correct_only/csv/similarity_2m_L15.csv @@ -0,0 +1,7 @@ +,left,right,above,under,far,close +left,1.0000006,0.9960951,0.9754069,0.9750978,0.9668617,0.9666722 +right,0.9960951,1.0000005,0.9735367,0.9757243,0.9667201,0.966353 +above,0.9754069,0.9735367,1.000001,0.99429655,0.9720154,0.9716815 +under,0.9750978,0.9757243,0.99429655,0.99999964,0.9723926,0.9707299 +far,0.9668617,0.9667201,0.9720154,0.9723926,0.9999996,0.9988003 +close,0.9666722,0.966353,0.9716815,0.9707299,0.9988003,1.0000001 diff --git a/correct_filter/results/nvila/correct_only/csv/similarity_2m_L20.csv b/correct_filter/results/nvila/correct_only/csv/similarity_2m_L20.csv new file mode 100644 index 0000000000000000000000000000000000000000..7fc8d140d90b7480f373bcea3810fbcb82587067 --- /dev/null +++ b/correct_filter/results/nvila/correct_only/csv/similarity_2m_L20.csv @@ -0,0 +1,7 @@ +,left,right,above,under,far,close +left,1.0,0.8997723,0.8560219,0.84100085,0.812119,0.81015867 +right,0.8997723,1.0,0.8408875,0.8583672,0.8323572,0.82982045 +above,0.8560219,0.8408875,0.99999976,0.83596146,0.8394874,0.81615543 +under,0.84100085,0.8583672,0.83596146,1.0000001,0.8413338,0.8540078 +far,0.812119,0.8323572,0.8394874,0.8413338,1.0000002,0.9614612 +close,0.81015867,0.82982045,0.81615543,0.8540078,0.9614612,1.0000004 diff --git a/correct_filter/results/nvila/correct_only/csv/similarity_2m_L21.csv b/correct_filter/results/nvila/correct_only/csv/similarity_2m_L21.csv new file mode 100644 index 0000000000000000000000000000000000000000..382287936c0012e9dc01f6935120fc12d14fa241 --- /dev/null +++ b/correct_filter/results/nvila/correct_only/csv/similarity_2m_L21.csv @@ -0,0 +1,7 @@ +,left,right,above,under,far,close +left,0.99999964,0.9202951,0.8803115,0.8690176,0.844957,0.8430869 +right,0.9202951,0.9999999,0.86974925,0.8861736,0.8690333,0.8677544 +above,0.8803115,0.86974925,0.9999997,0.8800344,0.8820302,0.865402 +under,0.8690176,0.8861736,0.8800344,1.0,0.8819223,0.8901774 +far,0.844957,0.8690333,0.8820302,0.8819223,1.0000001,0.9756321 +close,0.8430869,0.8677544,0.865402,0.8901774,0.9756321,0.99999934 diff --git a/correct_filter/results/nvila/correct_only/csv/similarity_2m_L24.csv b/correct_filter/results/nvila/correct_only/csv/similarity_2m_L24.csv new file mode 100644 index 0000000000000000000000000000000000000000..3497150367c3073386edc5f2c8ca15260123557a --- /dev/null +++ b/correct_filter/results/nvila/correct_only/csv/similarity_2m_L24.csv @@ -0,0 +1,7 @@ +,left,right,above,under,far,close +left,0.9999998,0.9441167,0.8852379,0.877577,0.8462348,0.84368265 +right,0.9441167,0.9999995,0.86733294,0.88120615,0.8449521,0.8402463 +above,0.8852379,0.86733294,1.0,0.9256213,0.8766693,0.86528826 +under,0.877577,0.88120615,0.9256213,0.99999964,0.8739595,0.8758325 +far,0.8462348,0.8449521,0.8766693,0.8739595,1.0,0.9843055 +close,0.84368265,0.8402463,0.86528826,0.8758325,0.9843055,0.9999998 diff --git a/correct_filter/results/nvila/correct_only/csv/similarity_2m_L4.csv b/correct_filter/results/nvila/correct_only/csv/similarity_2m_L4.csv new file mode 100644 index 0000000000000000000000000000000000000000..01cf170e3bdf017988ca3fd32b4a6b697795e99e --- /dev/null +++ b/correct_filter/results/nvila/correct_only/csv/similarity_2m_L4.csv @@ -0,0 +1,7 @@ +,left,right,above,under,far,close +left,1.0,0.99861413,0.99788797,0.99436826,0.9940919,0.9947342 +right,0.99861413,1.0000002,0.99827963,0.9968713,0.9948081,0.9949278 +above,0.99788797,0.99827963,1.0000002,0.99800307,0.9956355,0.9955324 +under,0.99436826,0.9968713,0.99800307,1.0000001,0.9943704,0.99312276 +far,0.9940919,0.9948081,0.9956355,0.9943704,1.0,0.9994365 +close,0.9947342,0.9949278,0.9955324,0.99312276,0.9994365,1.0000002 diff --git a/correct_filter/results/nvila/correct_only/csv/similarity_400k_L0.csv b/correct_filter/results/nvila/correct_only/csv/similarity_400k_L0.csv new file mode 100644 index 0000000000000000000000000000000000000000..5437c5f987fcf430aad2e659a771589a152f3375 --- /dev/null +++ b/correct_filter/results/nvila/correct_only/csv/similarity_400k_L0.csv @@ -0,0 +1,7 @@ +,left,right,above,under,far,close +left,0.99999964,0.99937326,0.99939746,0.9992237,0.99935555,0.99926114 +right,0.99937326,1.0,0.99907005,0.9993704,0.9991206,0.9992242 +above,0.99939746,0.99907005,1.0000002,0.999896,0.99969333,0.9996633 +under,0.9992237,0.9993704,0.999896,1.0000002,0.9996517,0.99970394 +far,0.99935555,0.9991206,0.99969333,0.9996517,0.9999995,0.99996144 +close,0.99926114,0.9992242,0.9996633,0.99970394,0.99996144,0.99999946 diff --git a/correct_filter/results/nvila/correct_only/csv/similarity_400k_L10.csv b/correct_filter/results/nvila/correct_only/csv/similarity_400k_L10.csv new file mode 100644 index 0000000000000000000000000000000000000000..051780521152cb4ca16a3872782c6e5cb3b05c4f --- /dev/null +++ b/correct_filter/results/nvila/correct_only/csv/similarity_400k_L10.csv @@ -0,0 +1,7 @@ +,left,right,above,under,far,close +left,0.99999994,0.9989206,0.9917971,0.99177206,0.9653694,0.9650217 +right,0.9989206,0.99999994,0.9908831,0.991404,0.96409506,0.9640688 +above,0.9917971,0.9908831,1.0,0.9998317,0.98056906,0.98046494 +under,0.99177206,0.991404,0.9998317,1.0,0.9801248,0.9800962 +far,0.9653694,0.96409506,0.98056906,0.9801248,0.99999976,0.99993694 +close,0.9650217,0.9640688,0.98046494,0.9800962,0.99993694,1.0000001 diff --git a/correct_filter/results/nvila/correct_only/csv/similarity_400k_L12.csv b/correct_filter/results/nvila/correct_only/csv/similarity_400k_L12.csv new file mode 100644 index 0000000000000000000000000000000000000000..c2b67c78e1609b347f92b236d9b54156cbf5723e --- /dev/null +++ b/correct_filter/results/nvila/correct_only/csv/similarity_400k_L12.csv @@ -0,0 +1,7 @@ +,left,right,above,under,far,close +left,0.9999998,0.9988699,0.98620236,0.9862741,0.961798,0.9616283 +right,0.9988699,0.99999994,0.9853998,0.98599064,0.9603799,0.9605291 +above,0.98620236,0.9853998,0.9999995,0.99963886,0.9798792,0.9798204 +under,0.9862741,0.98599064,0.99963886,0.9999998,0.97985244,0.9798428 +far,0.961798,0.9603799,0.9798792,0.97985244,0.9999997,0.9998978 +close,0.9616283,0.9605291,0.9798204,0.9798428,0.9998978,1.0000001 diff --git a/correct_filter/results/nvila/correct_only/csv/similarity_400k_L13.csv b/correct_filter/results/nvila/correct_only/csv/similarity_400k_L13.csv new file mode 100644 index 0000000000000000000000000000000000000000..cf51455222980e5483cf4c458e8a261a1dcd1876 --- /dev/null +++ b/correct_filter/results/nvila/correct_only/csv/similarity_400k_L13.csv @@ -0,0 +1,7 @@ +,left,right,above,under,far,close +left,1.0000001,0.9983739,0.98168665,0.98217195,0.95686316,0.956294 +right,0.9983739,0.9999995,0.98163897,0.9828724,0.9566915,0.9564952 +above,0.98168665,0.98163897,0.99999917,0.9987243,0.975779,0.9747824 +under,0.98217195,0.9828724,0.9987243,0.99999976,0.9764465,0.9758391 +far,0.95686316,0.9566915,0.975779,0.9764465,1.0000002,0.99971694 +close,0.956294,0.9564952,0.9747824,0.9758391,0.99971694,1.0 diff --git a/correct_filter/results/nvila/correct_only/csv/similarity_400k_L14.csv b/correct_filter/results/nvila/correct_only/csv/similarity_400k_L14.csv new file mode 100644 index 0000000000000000000000000000000000000000..092a48807ee610c3d36782f6a43b545dbd031fe2 --- /dev/null +++ b/correct_filter/results/nvila/correct_only/csv/similarity_400k_L14.csv @@ -0,0 +1,7 @@ +,left,right,above,under,far,close +left,0.9999998,0.9985205,0.98138416,0.9822928,0.9568843,0.9561093 +right,0.9985205,1.0000004,0.98126113,0.9829378,0.95713615,0.9566823 +above,0.98138416,0.98126113,0.9999999,0.9986111,0.9755904,0.97441 +under,0.9822928,0.9829378,0.9986111,1.0000001,0.9771458,0.9763574 +far,0.9568843,0.95713615,0.9755904,0.9771458,0.9999996,0.9997202 +close,0.9561093,0.9566823,0.97441,0.9763574,0.9997202,0.9999998 diff --git a/correct_filter/results/nvila/correct_only/csv/similarity_400k_L15.csv b/correct_filter/results/nvila/correct_only/csv/similarity_400k_L15.csv new file mode 100644 index 0000000000000000000000000000000000000000..9975e2fea29b5ec64d84a6163ed66159415f440a --- /dev/null +++ b/correct_filter/results/nvila/correct_only/csv/similarity_400k_L15.csv @@ -0,0 +1,7 @@ +,left,right,above,under,far,close +left,0.99999976,0.9961381,0.96402776,0.9712392,0.94819504,0.94753337 +right,0.9961381,0.99999946,0.96187425,0.9719884,0.94920367,0.9488889 +above,0.96402776,0.96187425,0.99999994,0.99324864,0.95932007,0.9581619 +under,0.9712392,0.9719884,0.99324864,1.0000002,0.9649157,0.9638857 +far,0.94819504,0.94920367,0.95932007,0.9649157,0.99999964,0.9996454 +close,0.94753337,0.9488889,0.9581619,0.9638857,0.9996454,0.9999997 diff --git a/correct_filter/results/nvila/correct_only/csv/similarity_400k_L20.csv b/correct_filter/results/nvila/correct_only/csv/similarity_400k_L20.csv new file mode 100644 index 0000000000000000000000000000000000000000..bb2e721bab1c9edcbf9e2e8f2baaf3b4546c53d1 --- /dev/null +++ b/correct_filter/results/nvila/correct_only/csv/similarity_400k_L20.csv @@ -0,0 +1,7 @@ +,left,right,above,under,far,close +left,1.0000002,0.94959533,0.9076828,0.8961903,0.8253381,0.8177571 +right,0.94959533,1.0000001,0.89672065,0.9084783,0.8551606,0.85423845 +above,0.9076828,0.89672065,0.9999996,0.9012549,0.8612656,0.83851355 +under,0.8961903,0.9084783,0.9012549,0.99999964,0.8549114,0.87088656 +far,0.8253381,0.8551606,0.8612656,0.8549114,0.9999998,0.97840255 +close,0.8177571,0.85423845,0.83851355,0.87088656,0.97840255,1.0 diff --git a/correct_filter/results/nvila/correct_only/csv/similarity_400k_L21.csv b/correct_filter/results/nvila/correct_only/csv/similarity_400k_L21.csv new file mode 100644 index 0000000000000000000000000000000000000000..c26c780fb89968921b29ea76c639f4a009bf53c0 --- /dev/null +++ b/correct_filter/results/nvila/correct_only/csv/similarity_400k_L21.csv @@ -0,0 +1,7 @@ +,left,right,above,under,far,close +left,0.99999976,0.9635052,0.92306554,0.9076893,0.8688898,0.86037034 +right,0.9635052,1.0000005,0.9213424,0.9254695,0.90012884,0.8971458 +above,0.92306554,0.9213424,1.0000001,0.9205528,0.89912474,0.88151306 +under,0.9076893,0.9254695,0.9205528,1.0000001,0.88736314,0.8975957 +far,0.8688898,0.90012884,0.89912474,0.88736314,1.0000001,0.98656934 +close,0.86037034,0.8971458,0.88151306,0.8975957,0.98656934,1.0 diff --git a/correct_filter/results/nvila/correct_only/csv/similarity_400k_L22.csv b/correct_filter/results/nvila/correct_only/csv/similarity_400k_L22.csv new file mode 100644 index 0000000000000000000000000000000000000000..42f6f43fb676dd5cde7beded0bc18440140079f7 --- /dev/null +++ b/correct_filter/results/nvila/correct_only/csv/similarity_400k_L22.csv @@ -0,0 +1,7 @@ +,left,right,above,under,far,close +left,1.0000002,0.96869767,0.920773,0.9017892,0.86359686,0.85843223 +right,0.96869767,0.9999998,0.91396976,0.9125042,0.8843721,0.88239276 +above,0.920773,0.91396976,0.9999998,0.93451786,0.87860537,0.8666265 +under,0.9017892,0.9125042,0.93451786,1.0000002,0.8649305,0.8732993 +far,0.86359686,0.8843721,0.87860537,0.8649305,0.9999998,0.98876476 +close,0.85843223,0.88239276,0.8666265,0.8732993,0.98876476,1.0000001 diff --git a/correct_filter/results/nvila/correct_only/csv/similarity_400k_L27.csv b/correct_filter/results/nvila/correct_only/csv/similarity_400k_L27.csv new file mode 100644 index 0000000000000000000000000000000000000000..a8d5d7e3c47ff2cdcca0754c70b357471d1d0374 --- /dev/null +++ b/correct_filter/results/nvila/correct_only/csv/similarity_400k_L27.csv @@ -0,0 +1,7 @@ +,left,right,above,under,far,close +left,1.0000002,0.99905974,0.9938745,0.9942479,0.9916425,0.99195606 +right,0.99905974,1.0000002,0.99394035,0.9950758,0.9930149,0.9933292 +above,0.9938745,0.99394035,1.0000004,0.997444,0.9924405,0.9923437 +under,0.9942479,0.9950758,0.997444,0.99999964,0.99323577,0.9936469 +far,0.9916425,0.9930149,0.9924405,0.99323577,0.9999994,0.9997259 +close,0.99195606,0.9933292,0.9923437,0.9936469,0.9997259,1.0000001 diff --git a/correct_filter/results/nvila/correct_only/csv/similarity_400k_L5.csv b/correct_filter/results/nvila/correct_only/csv/similarity_400k_L5.csv new file mode 100644 index 0000000000000000000000000000000000000000..98177af05d50a1f075ff446b927a30c219caf4d7 --- /dev/null +++ b/correct_filter/results/nvila/correct_only/csv/similarity_400k_L5.csv @@ -0,0 +1,7 @@ +,left,right,above,under,far,close +left,0.9999999,0.9972796,0.9979343,0.9974654,0.9934282,0.9930154 +right,0.9972796,1.0,0.996982,0.99778414,0.9929778,0.9934241 +above,0.9979343,0.996982,0.9999998,0.99976426,0.994526,0.9944363 +under,0.9974654,0.99778414,0.99976426,1.0000001,0.9946017,0.9946864 +far,0.9934282,0.9929778,0.994526,0.9946017,1.0000001,0.99988496 +close,0.9930154,0.9934241,0.9944363,0.9946864,0.99988496,0.9999999 diff --git a/correct_filter/results/nvila/correct_only/csv/similarity_400k_L6.csv b/correct_filter/results/nvila/correct_only/csv/similarity_400k_L6.csv new file mode 100644 index 0000000000000000000000000000000000000000..4ca49cece3407a8bbd0575f6453952130e6aa9c4 --- /dev/null +++ b/correct_filter/results/nvila/correct_only/csv/similarity_400k_L6.csv @@ -0,0 +1,7 @@ +,left,right,above,under,far,close +left,0.99999994,0.99787366,0.99845725,0.99814403,0.9947071,0.9944121 +right,0.99787366,1.0000002,0.9980315,0.99859196,0.99486274,0.9951682 +above,0.99845725,0.9980315,0.99999964,0.99983656,0.9958496,0.99578476 +under,0.99814403,0.99859196,0.99983656,0.99999946,0.99596035,0.99600405 +far,0.9947071,0.99486274,0.9958496,0.99596035,0.9999999,0.9999253 +close,0.9944121,0.9951682,0.99578476,0.99600405,0.9999253,1.0000005 diff --git a/correct_filter/results/nvila/correct_only/csv/similarity_400k_L7.csv b/correct_filter/results/nvila/correct_only/csv/similarity_400k_L7.csv new file mode 100644 index 0000000000000000000000000000000000000000..bd5f3e41508e3e3955cff61a09ca71db4a533b74 --- /dev/null +++ b/correct_filter/results/nvila/correct_only/csv/similarity_400k_L7.csv @@ -0,0 +1,7 @@ +,left,right,above,under,far,close +left,0.9999998,0.9982521,0.99867207,0.998369,0.9958096,0.9954878 +right,0.9982521,0.99999917,0.99839646,0.9988315,0.99623215,0.9964118 +above,0.99867207,0.99839646,1.0,0.99986494,0.9967103,0.9965906 +under,0.998369,0.9988315,0.99986494,0.9999998,0.99682885,0.99680567 +far,0.9958096,0.99623215,0.9967103,0.99682885,0.9999999,0.9999416 +close,0.9954878,0.9964118,0.9965906,0.99680567,0.9999416,1.0000002 diff --git a/correct_filter/results/nvila/correct_only/csv/similarity_800k_L10.csv b/correct_filter/results/nvila/correct_only/csv/similarity_800k_L10.csv new file mode 100644 index 0000000000000000000000000000000000000000..9bd790bce1712685b7218e869bc7fd9292a9dd8e --- /dev/null +++ b/correct_filter/results/nvila/correct_only/csv/similarity_800k_L10.csv @@ -0,0 +1,7 @@ +,left,right,above,under,far,close +left,0.9999998,0.9997335,0.9946324,0.9929318,0.98346335,0.9839893 +right,0.9997335,0.99999976,0.9943074,0.99233896,0.98312676,0.9834057 +above,0.9946324,0.9943074,1.0000002,0.9992869,0.99030274,0.9904754 +under,0.9929318,0.99233896,0.9992869,1.0,0.98967177,0.9901939 +far,0.98346335,0.98312676,0.99030274,0.98967177,1.0000002,0.9988357 +close,0.9839893,0.9834057,0.9904754,0.9901939,0.9988357,1.0 diff --git a/correct_filter/results/nvila/correct_only/csv/similarity_800k_L15.csv b/correct_filter/results/nvila/correct_only/csv/similarity_800k_L15.csv new file mode 100644 index 0000000000000000000000000000000000000000..92b4243caf714bfef0bc229d5d66c9fd733702cf --- /dev/null +++ b/correct_filter/results/nvila/correct_only/csv/similarity_800k_L15.csv @@ -0,0 +1,7 @@ +,left,right,above,under,far,close +left,0.99999994,0.9955255,0.9616093,0.9634563,0.9570518,0.9555799 +right,0.9955255,1.0,0.9596715,0.9647523,0.956402,0.9524902 +above,0.9616093,0.9596715,1.0000004,0.98979074,0.9572837,0.95708257 +under,0.9634563,0.9647523,0.98979074,1.0,0.957764,0.95645 +far,0.9570518,0.956402,0.9572837,0.957764,1.0000007,0.99549437 +close,0.9555799,0.9524902,0.95708257,0.95645,0.99549437,0.99999964 diff --git a/correct_filter/results/nvila/correct_only/csv/similarity_800k_L16.csv b/correct_filter/results/nvila/correct_only/csv/similarity_800k_L16.csv new file mode 100644 index 0000000000000000000000000000000000000000..4e2244acbe417c47840077b616ef1a0f3ce3f50b --- /dev/null +++ b/correct_filter/results/nvila/correct_only/csv/similarity_800k_L16.csv @@ -0,0 +1,7 @@ +,left,right,above,under,far,close +left,0.9999993,0.937419,0.91674423,0.91465557,0.9169775,0.923213 +right,0.937419,0.9999999,0.9187542,0.9189402,0.92452234,0.9273007 +above,0.91674423,0.9187542,1.0,0.89840555,0.92467207,0.92687386 +under,0.91465557,0.9189402,0.89840555,1.0000001,0.90919626,0.9162538 +far,0.9169775,0.92452234,0.92467207,0.90919626,1.0000004,0.9890829 +close,0.923213,0.9273007,0.92687386,0.9162538,0.9890829,0.99999994 diff --git a/correct_filter/results/nvila/correct_only/csv/similarity_800k_L18.csv b/correct_filter/results/nvila/correct_only/csv/similarity_800k_L18.csv new file mode 100644 index 0000000000000000000000000000000000000000..53c6139e05c270c03266fa5b5cfca8c72b93432a --- /dev/null +++ b/correct_filter/results/nvila/correct_only/csv/similarity_800k_L18.csv @@ -0,0 +1,7 @@ +,left,right,above,under,far,close +left,1.0000001,0.88733137,0.8091318,0.83194005,0.8167282,0.81322694 +right,0.88733137,1.0000002,0.83587855,0.8211735,0.8257367,0.8230107 +above,0.8091318,0.83587855,0.9999997,0.7676464,0.8233376,0.7811038 +under,0.83194005,0.8211735,0.7676464,0.99999976,0.81050754,0.8206099 +far,0.8167282,0.8257367,0.8233376,0.81050754,1.0000004,0.94082886 +close,0.81322694,0.8230107,0.7811038,0.8206099,0.94082886,1.0000004 diff --git a/correct_filter/results/nvila/correct_only/csv/similarity_800k_L19.csv b/correct_filter/results/nvila/correct_only/csv/similarity_800k_L19.csv new file mode 100644 index 0000000000000000000000000000000000000000..f8f5b25055bf8a0b53a892e0f79770b0ddd1b1d7 --- /dev/null +++ b/correct_filter/results/nvila/correct_only/csv/similarity_800k_L19.csv @@ -0,0 +1,7 @@ +,left,right,above,under,far,close +left,1.0000002,0.904862,0.80710673,0.8477925,0.83130246,0.8128334 +right,0.904862,1.0000001,0.83244157,0.8415096,0.837732,0.8282201 +above,0.80710673,0.83244157,1.0,0.7711587,0.799425,0.7575373 +under,0.8477925,0.8415096,0.7711587,0.9999999,0.81178087,0.8155661 +far,0.83130246,0.837732,0.799425,0.81178087,0.99999976,0.940137 +close,0.8128334,0.8282201,0.7575373,0.8155661,0.940137,1.0 diff --git a/correct_filter/results/nvila/correct_only/csv/similarity_800k_L20.csv b/correct_filter/results/nvila/correct_only/csv/similarity_800k_L20.csv new file mode 100644 index 0000000000000000000000000000000000000000..4d8f3342bf1787484c5f23ac9a3066494b0ab39a --- /dev/null +++ b/correct_filter/results/nvila/correct_only/csv/similarity_800k_L20.csv @@ -0,0 +1,7 @@ +,left,right,above,under,far,close +left,0.99999976,0.9131943,0.83245647,0.8717643,0.8463599,0.8216339 +right,0.9131943,1.0000001,0.84933776,0.87377536,0.85917556,0.84626216 +above,0.83245647,0.84933776,1.0,0.8021531,0.81296337,0.77681535 +under,0.8717643,0.87377536,0.8021531,0.9999999,0.8474405,0.84407175 +far,0.8463599,0.85917556,0.81296337,0.8474405,0.9999999,0.958832 +close,0.8216339,0.84626216,0.77681535,0.84407175,0.958832,0.9999998 diff --git a/correct_filter/results/nvila/correct_only/csv/similarity_800k_L27.csv b/correct_filter/results/nvila/correct_only/csv/similarity_800k_L27.csv new file mode 100644 index 0000000000000000000000000000000000000000..44b43c3f05182da00b3a195406264aa554683c58 --- /dev/null +++ b/correct_filter/results/nvila/correct_only/csv/similarity_800k_L27.csv @@ -0,0 +1,7 @@ +,left,right,above,under,far,close +left,0.99999976,0.9989176,0.99486405,0.9962475,0.9953634,0.99469465 +right,0.9989176,1.0000006,0.99491745,0.9964434,0.9955484,0.99498737 +above,0.99486405,0.99491745,1.0000001,0.9970196,0.9946532,0.99397403 +under,0.9962475,0.9964434,0.9970196,1.0000004,0.9958383,0.99531734 +far,0.9953634,0.9955484,0.9946532,0.9958383,1.0000002,0.9996456 +close,0.99469465,0.99498737,0.99397403,0.99531734,0.9996456,1.0000005 diff --git a/correct_filter/results/nvila/correct_only/csv/similarity_800k_L4.csv b/correct_filter/results/nvila/correct_only/csv/similarity_800k_L4.csv new file mode 100644 index 0000000000000000000000000000000000000000..c22c6a0a09be1dce4148043a224c6a9a852e7515 --- /dev/null +++ b/correct_filter/results/nvila/correct_only/csv/similarity_800k_L4.csv @@ -0,0 +1,7 @@ +,left,right,above,under,far,close +left,0.9999999,0.99931574,0.9958405,0.9904083,0.99077135,0.98957026 +right,0.99931574,1.0000001,0.99584186,0.99013525,0.9912202,0.98926467 +above,0.9958405,0.99584186,1.0000002,0.997966,0.99544257,0.994243 +under,0.9904083,0.99013525,0.997966,1.0,0.99456835,0.99469686 +far,0.99077135,0.9912202,0.99544257,0.99456835,1.0000001,0.9977426 +close,0.98957026,0.98926467,0.994243,0.99469686,0.9977426,1.0000002 diff --git a/correct_filter/results/nvila/correct_only/csv/similarity_800k_L7.csv b/correct_filter/results/nvila/correct_only/csv/similarity_800k_L7.csv new file mode 100644 index 0000000000000000000000000000000000000000..3301cd9776e2e94871d1f69eef974d85989bc083 --- /dev/null +++ b/correct_filter/results/nvila/correct_only/csv/similarity_800k_L7.csv @@ -0,0 +1,7 @@ +,left,right,above,under,far,close +left,0.9999998,0.99970233,0.9979286,0.9962451,0.99490523,0.9946172 +right,0.99970233,0.9999998,0.9979725,0.9960514,0.99498373,0.9943552 +above,0.9979286,0.9979725,0.99999994,0.99914914,0.9973988,0.9966422 +under,0.9962451,0.9960514,0.99914914,1.0000001,0.9971471,0.9969803 +far,0.99490523,0.99498373,0.9973988,0.9971471,1.0000006,0.99878615 +close,0.9946172,0.9943552,0.9966422,0.9969803,0.99878615,0.9999996 diff --git a/correct_filter/results/nvila/correct_only/csv/similarity_800k_L8.csv b/correct_filter/results/nvila/correct_only/csv/similarity_800k_L8.csv new file mode 100644 index 0000000000000000000000000000000000000000..1120ff109fb6ed377b43d82a5ee48682ba31b07e --- /dev/null +++ b/correct_filter/results/nvila/correct_only/csv/similarity_800k_L8.csv @@ -0,0 +1,7 @@ +,left,right,above,under,far,close +left,1.0000002,0.9997558,0.99791306,0.99646586,0.99523884,0.9950807 +right,0.9997558,1.0000001,0.9978681,0.99624777,0.99530035,0.99486065 +above,0.99791306,0.9978681,0.9999996,0.9992501,0.99727607,0.9967006 +under,0.99646586,0.99624777,0.9992501,0.9999994,0.99712163,0.99706066 +far,0.99523884,0.99530035,0.99727607,0.99712163,0.9999997,0.99886113 +close,0.9950807,0.99486065,0.9967006,0.99706066,0.99886113,1.0 diff --git a/correct_filter/results/nvila/correct_only/csv/similarity_80k_L0.csv b/correct_filter/results/nvila/correct_only/csv/similarity_80k_L0.csv new file mode 100644 index 0000000000000000000000000000000000000000..98db32e9a0fc605e946ab1ce585b5ae3b04db234 --- /dev/null +++ b/correct_filter/results/nvila/correct_only/csv/similarity_80k_L0.csv @@ -0,0 +1,7 @@ +,left,right,above,under,far,close +left,1.0000002,0.9999928,0.9996275,0.9996228,0.9995172,0.9995024 +right,0.9999928,0.9999999,0.9996372,0.9996381,0.9995251,0.9995048 +above,0.9996275,0.9996372,1.0000001,0.9999921,0.9996672,0.9996296 +under,0.9996228,0.9996381,0.9999921,0.9999999,0.99967223,0.9996285 +far,0.9995172,0.9995251,0.9996672,0.99967223,1.0,0.9999763 +close,0.9995024,0.9995048,0.9996296,0.9996285,0.9999763,0.99999976 diff --git a/correct_filter/results/nvila/correct_only/csv/similarity_80k_L1.csv b/correct_filter/results/nvila/correct_only/csv/similarity_80k_L1.csv new file mode 100644 index 0000000000000000000000000000000000000000..cfbf1e535400ffa64700b96f960faa64e8e3f860 --- /dev/null +++ b/correct_filter/results/nvila/correct_only/csv/similarity_80k_L1.csv @@ -0,0 +1,7 @@ +,left,right,above,under,far,close +left,1.0,0.9999891,0.9995492,0.9995388,0.99923646,0.99923515 +right,0.9999891,1.0,0.999559,0.9995541,0.9992583,0.999249 +above,0.9995492,0.999559,1.0,0.99998856,0.9993894,0.9993697 +under,0.9995388,0.9995541,0.99998856,1.0,0.9994066,0.9993794 +far,0.99923646,0.9992583,0.9993894,0.9994066,0.99999994,0.9999724 +close,0.99923515,0.999249,0.9993697,0.9993794,0.9999724,0.9999996 diff --git a/correct_filter/results/nvila/correct_only/csv/similarity_80k_L12.csv b/correct_filter/results/nvila/correct_only/csv/similarity_80k_L12.csv new file mode 100644 index 0000000000000000000000000000000000000000..fac1ebb50ad0dc4c76589850d5b9aff747a437ec --- /dev/null +++ b/correct_filter/results/nvila/correct_only/csv/similarity_80k_L12.csv @@ -0,0 +1,7 @@ +,left,right,above,under,far,close +left,1.0000001,0.99992007,0.98682374,0.98694927,0.96131676,0.96126896 +right,0.99992007,1.0000005,0.98669213,0.9868369,0.9610707,0.96103275 +above,0.98682374,0.98669213,1.0000001,0.9996522,0.97436637,0.97421056 +under,0.98694927,0.9868369,0.9996522,0.99999976,0.9743051,0.9741693 +far,0.96131676,0.9610707,0.97436637,0.9743051,1.0000004,0.99982387 +close,0.96126896,0.96103275,0.97421056,0.9741693,0.99982387,1.0000001 diff --git a/correct_filter/results/nvila/correct_only/csv/similarity_80k_L13.csv b/correct_filter/results/nvila/correct_only/csv/similarity_80k_L13.csv new file mode 100644 index 0000000000000000000000000000000000000000..652c69427cd6416a2c05c253d7f01b188d016155 --- /dev/null +++ b/correct_filter/results/nvila/correct_only/csv/similarity_80k_L13.csv @@ -0,0 +1,7 @@ +,left,right,above,under,far,close +left,1.0000002,0.99964416,0.9821861,0.9828103,0.9578027,0.95762783 +right,0.99964416,1.0000005,0.98217076,0.98289746,0.95772654,0.95757335 +above,0.9821861,0.98217076,0.99999976,0.9989925,0.97151095,0.9707316 +under,0.9828103,0.98289746,0.9989925,1.0000004,0.97208655,0.9714904 +far,0.9578027,0.95772654,0.97151095,0.97208655,0.9999999,0.9997549 +close,0.95762783,0.95757335,0.9707316,0.9714904,0.9997549,0.99999946 diff --git a/correct_filter/results/nvila/correct_only/csv/similarity_80k_L18.csv b/correct_filter/results/nvila/correct_only/csv/similarity_80k_L18.csv new file mode 100644 index 0000000000000000000000000000000000000000..e1c0a7defbee9ea6281c2683d43c6c2be947c068 --- /dev/null +++ b/correct_filter/results/nvila/correct_only/csv/similarity_80k_L18.csv @@ -0,0 +1,7 @@ +,left,right,above,under,far,close +left,0.9999999,0.9506794,0.88382566,0.88530993,0.8269373,0.8271559 +right,0.9506794,1.0000001,0.87476265,0.90188134,0.838693,0.84223974 +above,0.88382566,0.87476265,1.0000002,0.9400799,0.9003339,0.8796129 +under,0.88530993,0.90188134,0.9400799,1.0000001,0.8822267,0.894028 +far,0.8269373,0.838693,0.9003339,0.8822267,0.9999995,0.99074644 +close,0.8271559,0.84223974,0.8796129,0.894028,0.99074644,1.0000006 diff --git a/correct_filter/results/nvila/correct_only/csv/similarity_80k_L2.csv b/correct_filter/results/nvila/correct_only/csv/similarity_80k_L2.csv new file mode 100644 index 0000000000000000000000000000000000000000..eb7d44982b900791335b991f6002691eec851f6b --- /dev/null +++ b/correct_filter/results/nvila/correct_only/csv/similarity_80k_L2.csv @@ -0,0 +1,7 @@ +,left,right,above,under,far,close +left,0.9999998,0.99997544,0.99910533,0.99907017,0.99487907,0.99464613 +right,0.99997544,0.9999998,0.99910426,0.9991061,0.9950284,0.9947916 +above,0.99910533,0.99910426,0.99999946,0.9999348,0.994704,0.994506 +under,0.99907017,0.9991061,0.9999348,0.99999976,0.9948836,0.99467635 +far,0.99487907,0.9950284,0.994704,0.9948836,1.0000004,0.9999575 +close,0.99464613,0.9947916,0.994506,0.99467635,0.9999575,1.0000004 diff --git a/correct_filter/results/nvila/correct_only/csv/similarity_80k_L20.csv b/correct_filter/results/nvila/correct_only/csv/similarity_80k_L20.csv new file mode 100644 index 0000000000000000000000000000000000000000..7a15746777409ebd28a52d2ed6190b74c142620a --- /dev/null +++ b/correct_filter/results/nvila/correct_only/csv/similarity_80k_L20.csv @@ -0,0 +1,7 @@ +,left,right,above,under,far,close +left,1.0000002,0.94373393,0.890359,0.8972434,0.8310231,0.83172584 +right,0.94373393,0.9999999,0.8833537,0.9212339,0.85914224,0.86019874 +above,0.890359,0.8833537,0.99999994,0.9401983,0.88969404,0.8716103 +under,0.8972434,0.9212339,0.9401983,1.0,0.89284706,0.9008564 +far,0.8310231,0.85914224,0.88969404,0.89284706,1.0000004,0.99279314 +close,0.83172584,0.86019874,0.8716103,0.9008564,0.99279314,1.0 diff --git a/correct_filter/results/nvila/correct_only/csv/similarity_80k_L24.csv b/correct_filter/results/nvila/correct_only/csv/similarity_80k_L24.csv new file mode 100644 index 0000000000000000000000000000000000000000..22eca23001b4b6d2ac15af352cd93226fd8ee631 --- /dev/null +++ b/correct_filter/results/nvila/correct_only/csv/similarity_80k_L24.csv @@ -0,0 +1,7 @@ +,left,right,above,under,far,close +left,0.9999996,0.97742325,0.88750535,0.8872726,0.8419494,0.8421845 +right,0.97742325,1.0000001,0.8867433,0.9016926,0.8560913,0.85670274 +above,0.88750535,0.8867433,1.0000001,0.971692,0.8757001,0.87120354 +under,0.8872726,0.9016926,0.971692,1.0000004,0.8741759,0.8779786 +far,0.8419494,0.8560913,0.8757001,0.8741759,0.9999998,0.9972954 +close,0.8421845,0.85670274,0.87120354,0.8779786,0.9972954,0.99999976 diff --git a/correct_filter/results/nvila/correct_only/csv/similarity_80k_L26.csv b/correct_filter/results/nvila/correct_only/csv/similarity_80k_L26.csv new file mode 100644 index 0000000000000000000000000000000000000000..4bbf1df41e11a8ac21ce808fa6d1c77d64df43e8 --- /dev/null +++ b/correct_filter/results/nvila/correct_only/csv/similarity_80k_L26.csv @@ -0,0 +1,7 @@ +,left,right,above,under,far,close +left,0.9999999,0.98567736,0.89949954,0.9015679,0.83705455,0.83549917 +right,0.98567736,0.9999999,0.89631855,0.90650165,0.84298885,0.841433 +above,0.89949954,0.89631855,0.99999976,0.97662956,0.8449816,0.840574 +under,0.9015679,0.90650165,0.97662956,1.0000002,0.84031403,0.84105325 +far,0.83705455,0.84298885,0.8449816,0.84031403,0.9999999,0.9974231 +close,0.83549917,0.841433,0.840574,0.84105325,0.9974231,1.0000002 diff --git a/correct_filter/results/nvila/correct_only/csv/similarity_80k_L5.csv b/correct_filter/results/nvila/correct_only/csv/similarity_80k_L5.csv new file mode 100644 index 0000000000000000000000000000000000000000..c0470643bfcca76fa34d8c84ebf8770ddb6e18af --- /dev/null +++ b/correct_filter/results/nvila/correct_only/csv/similarity_80k_L5.csv @@ -0,0 +1,7 @@ +,left,right,above,under,far,close +left,1.0,0.99994904,0.99607235,0.99601716,0.9891803,0.98881525 +right,0.99994904,0.9999997,0.99618846,0.9961636,0.9892961,0.98891604 +above,0.99607235,0.99618846,0.99999994,0.9999412,0.99260557,0.99223334 +under,0.99601716,0.9961636,0.9999412,1.0,0.992865,0.9924812 +far,0.9891803,0.9892961,0.99260557,0.992865,0.9999999,0.9999319 +close,0.98881525,0.98891604,0.99223334,0.9924812,0.9999319,1.0 diff --git a/correct_filter/results/nvila/correct_only/csv/similarity_80k_L7.csv b/correct_filter/results/nvila/correct_only/csv/similarity_80k_L7.csv new file mode 100644 index 0000000000000000000000000000000000000000..4922c74c6a53b7b1acf8e1148be9faf52972166c --- /dev/null +++ b/correct_filter/results/nvila/correct_only/csv/similarity_80k_L7.csv @@ -0,0 +1,7 @@ +,left,right,above,under,far,close +left,1.0000007,0.99997765,0.9980402,0.99805593,0.9940974,0.99391335 +right,0.99997765,0.9999998,0.9980756,0.9981079,0.99421495,0.9940232 +above,0.9980402,0.9980756,1.0000001,0.9999677,0.9959363,0.99573493 +under,0.99805593,0.9981079,0.9999677,1.0000001,0.9960644,0.9958569 +far,0.9940974,0.99421495,0.9959363,0.9960644,0.99999994,0.99996877 +close,0.99391335,0.9940232,0.99573493,0.9958569,0.99996877,1.0000002 diff --git a/correct_filter/results/nvila/correct_only/csv/similarity_80k_L9.csv b/correct_filter/results/nvila/correct_only/csv/similarity_80k_L9.csv new file mode 100644 index 0000000000000000000000000000000000000000..03c98cbf2aa54abbead940d764b71dbf227bef26 --- /dev/null +++ b/correct_filter/results/nvila/correct_only/csv/similarity_80k_L9.csv @@ -0,0 +1,7 @@ +,left,right,above,under,far,close +left,0.9999999,0.9999779,0.9979099,0.9978664,0.9914892,0.99141896 +right,0.9999779,0.99999994,0.99795455,0.9979277,0.9915622,0.9914869 +above,0.9979099,0.99795455,0.99999994,0.9999599,0.9929552,0.99283284 +under,0.9978664,0.9979277,0.9999599,0.9999999,0.99296045,0.99283123 +far,0.9914892,0.9915622,0.9929552,0.99296045,1.0,0.9999687 +close,0.99141896,0.9914869,0.99283284,0.99283123,0.9999687,1.0000004 diff --git a/correct_filter/results/nvila/correct_only/csv/similarity_roborefer_L12.csv b/correct_filter/results/nvila/correct_only/csv/similarity_roborefer_L12.csv new file mode 100644 index 0000000000000000000000000000000000000000..3398a6111add2ecf8dfb2b72d02d692c23762be2 --- /dev/null +++ b/correct_filter/results/nvila/correct_only/csv/similarity_roborefer_L12.csv @@ -0,0 +1,7 @@ +,left,right,above,under,far,close +left,1.0000004,0.9998851,0.9772084,0.9767925,0.92733586,0.92611945 +right,0.9998851,1.0,0.9774005,0.97699416,0.9275956,0.9263429 +above,0.9772084,0.9774005,0.9999999,0.9994277,0.9484417,0.9475716 +under,0.9767925,0.97699416,0.9994277,0.9999995,0.94778425,0.9468689 +far,0.92733586,0.9275956,0.9484417,0.94778425,0.99999994,0.9996827 +close,0.92611945,0.9263429,0.9475716,0.9468689,0.9996827,1.0000001 diff --git a/correct_filter/results/nvila/correct_only/csv/similarity_roborefer_L13.csv b/correct_filter/results/nvila/correct_only/csv/similarity_roborefer_L13.csv new file mode 100644 index 0000000000000000000000000000000000000000..dcb3c5135803f4ac070d5cff4f8511677dfe4476 --- /dev/null +++ b/correct_filter/results/nvila/correct_only/csv/similarity_roborefer_L13.csv @@ -0,0 +1,7 @@ +,left,right,above,under,far,close +left,1.0000001,0.999737,0.9714929,0.9713556,0.9228223,0.92111427 +right,0.999737,0.99999946,0.9718181,0.9717809,0.9234044,0.9216598 +above,0.9714929,0.9718181,1.0000006,0.99914813,0.9459721,0.9443468 +under,0.9713556,0.9717809,0.99914813,0.9999998,0.9453688,0.9437411 +far,0.9228223,0.9234044,0.9459721,0.9453688,0.99999994,0.99955255 +close,0.92111427,0.9216598,0.9443468,0.9437411,0.99955255,0.9999999 diff --git a/correct_filter/results/nvila/correct_only/csv/similarity_roborefer_L16.csv b/correct_filter/results/nvila/correct_only/csv/similarity_roborefer_L16.csv new file mode 100644 index 0000000000000000000000000000000000000000..cd8919f83f2b00b0055209ea75299c3d74f52986 --- /dev/null +++ b/correct_filter/results/nvila/correct_only/csv/similarity_roborefer_L16.csv @@ -0,0 +1,7 @@ +,left,right,above,under,far,close +left,1.0,0.9601641,0.95128024,0.9552473,0.9148139,0.9127438 +right,0.9601641,1.0,0.947104,0.9543113,0.9126753,0.91043645 +above,0.95128024,0.947104,1.0000002,0.98705524,0.9433115,0.9390137 +under,0.9552473,0.9543113,0.98705524,1.0000002,0.9456221,0.9441068 +far,0.9148139,0.9126753,0.9433115,0.9456221,1.0000004,0.99866474 +close,0.9127438,0.91043645,0.9390137,0.9441068,0.99866474,1.0 diff --git a/correct_filter/results/nvila/correct_only/csv/similarity_roborefer_L18.csv b/correct_filter/results/nvila/correct_only/csv/similarity_roborefer_L18.csv new file mode 100644 index 0000000000000000000000000000000000000000..24519cf736deec1f42ddaa3f3fac52cbdae3fec2 --- /dev/null +++ b/correct_filter/results/nvila/correct_only/csv/similarity_roborefer_L18.csv @@ -0,0 +1,7 @@ +,left,right,above,under,far,close +left,1.0,0.9608633,0.92537117,0.9244384,0.8540384,0.8518538 +right,0.9608633,0.99999976,0.91905,0.92326844,0.85935783,0.8567078 +above,0.92537117,0.91905,0.99999994,0.9752732,0.9008637,0.8881471 +under,0.9244384,0.92326844,0.9752732,0.99999994,0.90102303,0.89878786 +far,0.8540384,0.85935783,0.9008637,0.90102303,1.0000002,0.9912569 +close,0.8518538,0.8567078,0.8881471,0.89878786,0.9912569,0.9999995 diff --git a/correct_filter/results/nvila/correct_only/csv/similarity_roborefer_L2.csv b/correct_filter/results/nvila/correct_only/csv/similarity_roborefer_L2.csv new file mode 100644 index 0000000000000000000000000000000000000000..3f29ef872b44d1aa658cbf42912dee3480cd2d45 --- /dev/null +++ b/correct_filter/results/nvila/correct_only/csv/similarity_roborefer_L2.csv @@ -0,0 +1,7 @@ +,left,right,above,under,far,close +left,1.0,0.9999962,0.9991484,0.9991805,0.9948268,0.9948587 +right,0.9999962,1.0000002,0.99915814,0.99918693,0.9948442,0.99486744 +above,0.9991484,0.99915814,0.9999996,0.99997437,0.99448794,0.9944742 +under,0.9991805,0.99918693,0.99997437,1.0000004,0.99445987,0.9944654 +far,0.9948268,0.9948442,0.99448794,0.99445987,1.0000005,0.9999751 +close,0.9948587,0.99486744,0.9944742,0.9944654,0.9999751,1.0 diff --git a/correct_filter/results/nvila/correct_only/csv/similarity_roborefer_L21.csv b/correct_filter/results/nvila/correct_only/csv/similarity_roborefer_L21.csv new file mode 100644 index 0000000000000000000000000000000000000000..7aeb9623622b17bcf6419c8b3d3319537eb8eeef --- /dev/null +++ b/correct_filter/results/nvila/correct_only/csv/similarity_roborefer_L21.csv @@ -0,0 +1,7 @@ +,left,right,above,under,far,close +left,1.0,0.93721354,0.9134072,0.9170517,0.8403456,0.83969367 +right,0.93721354,0.9999997,0.9073029,0.91937286,0.8453176,0.84058297 +above,0.9134072,0.9073029,1.0000001,0.9646245,0.8933872,0.88048244 +under,0.9170517,0.91937286,0.9646245,1.0000001,0.8996245,0.8997544 +far,0.8403456,0.8453176,0.8933872,0.8996245,1.0000002,0.99122584 +close,0.83969367,0.84058297,0.88048244,0.8997544,0.99122584,1.0000002 diff --git a/correct_filter/results/nvila/correct_only/csv/similarity_roborefer_L23.csv b/correct_filter/results/nvila/correct_only/csv/similarity_roborefer_L23.csv new file mode 100644 index 0000000000000000000000000000000000000000..0d98ec883ed3759571e73e6050e17cd2a30d8438 --- /dev/null +++ b/correct_filter/results/nvila/correct_only/csv/similarity_roborefer_L23.csv @@ -0,0 +1,7 @@ +,left,right,above,under,far,close +left,1.0,0.94844383,0.86852306,0.8619679,0.7928587,0.79329395 +right,0.94844383,0.99999994,0.8564804,0.8564116,0.78943753,0.78770834 +above,0.86852306,0.8564804,1.0000001,0.97211385,0.81405485,0.81003135 +under,0.8619679,0.8564116,0.97211385,0.99999994,0.80660844,0.8107491 +far,0.7928587,0.78943753,0.81405485,0.80660844,0.9999996,0.99297726 +close,0.79329395,0.78770834,0.81003135,0.8107491,0.99297726,0.99999976 diff --git a/correct_filter/results/nvila/correct_only/csv/similarity_roborefer_L25.csv b/correct_filter/results/nvila/correct_only/csv/similarity_roborefer_L25.csv new file mode 100644 index 0000000000000000000000000000000000000000..c424c0e1c50b194a5b05b5f595fd3087ac87da13 --- /dev/null +++ b/correct_filter/results/nvila/correct_only/csv/similarity_roborefer_L25.csv @@ -0,0 +1,7 @@ +,left,right,above,under,far,close +left,0.99999976,0.96778744,0.85529387,0.8434015,0.74172765,0.7393539 +right,0.96778744,1.0,0.8583608,0.8495347,0.7489954,0.745943 +above,0.85529387,0.8583608,0.99999946,0.97153455,0.77254784,0.7669693 +under,0.8434015,0.8495347,0.97153455,0.99999976,0.7613792,0.7620967 +far,0.74172765,0.7489954,0.77254784,0.7613792,0.9999997,0.9919122 +close,0.7393539,0.745943,0.7669693,0.7620967,0.9919122,1.0000001 diff --git a/correct_filter/results/nvila/correct_only/csv/similarity_roborefer_L8.csv b/correct_filter/results/nvila/correct_only/csv/similarity_roborefer_L8.csv new file mode 100644 index 0000000000000000000000000000000000000000..34f2044f90bca0e31555114bc97d462ea682ac94 --- /dev/null +++ b/correct_filter/results/nvila/correct_only/csv/similarity_roborefer_L8.csv @@ -0,0 +1,7 @@ +,left,right,above,under,far,close +left,0.99999976,0.99999285,0.99318576,0.99256057,0.97675645,0.9759542 +right,0.99999285,1.0000005,0.99312145,0.9924865,0.97671086,0.9758926 +above,0.99318576,0.99312145,1.0000001,0.9999237,0.9862217,0.985832 +under,0.99256057,0.9924865,0.9999237,0.99999994,0.98661923,0.9862897 +far,0.97675645,0.97671086,0.9862217,0.98661923,1.0000002,0.99992365 +close,0.9759542,0.9758926,0.985832,0.9862897,0.99992365,0.9999999 diff --git a/correct_filter/results/nvila/correct_only/csv/similarity_roborefer_L9.csv b/correct_filter/results/nvila/correct_only/csv/similarity_roborefer_L9.csv new file mode 100644 index 0000000000000000000000000000000000000000..7ce25bfb8d6cd958e0be67d908bae36b109efd9e --- /dev/null +++ b/correct_filter/results/nvila/correct_only/csv/similarity_roborefer_L9.csv @@ -0,0 +1,7 @@ +,left,right,above,under,far,close +left,1.0000002,0.999993,0.9921558,0.99143416,0.97467434,0.9737021 +right,0.999993,1.0000004,0.99208957,0.9913442,0.9746237,0.97363716 +above,0.9921558,0.99208957,0.9999996,0.99973345,0.97945786,0.9787513 +under,0.99143416,0.9913442,0.99973345,0.99999976,0.979222,0.9785806 +far,0.97467434,0.9746237,0.97945786,0.979222,1.0000001,0.99990255 +close,0.9737021,0.97363716,0.9787513,0.9785806,0.99990255,1.0000002 diff --git a/correct_filter/results/nvila/correct_only/csv/similarity_vanilla_L11.csv b/correct_filter/results/nvila/correct_only/csv/similarity_vanilla_L11.csv new file mode 100644 index 0000000000000000000000000000000000000000..1bbaa91071d6d4bb33535782b6c6c4f3c5d675d4 --- /dev/null +++ b/correct_filter/results/nvila/correct_only/csv/similarity_vanilla_L11.csv @@ -0,0 +1,7 @@ +,left,right,above,under,far,close +left,0.9999999,0.99985665,0.98852915,0.98853856,0.95655036,0.9622253 +right,0.99985665,1.0000004,0.98762876,0.9875599,0.95446086,0.9609042 +above,0.98852915,0.98762876,0.99999976,0.9997464,0.9800935,0.98522526 +under,0.98853856,0.9875599,0.9997464,0.99999994,0.98039603,0.98491096 +far,0.95655036,0.95446086,0.9800935,0.98039603,1.0000001,0.9961934 +close,0.9622253,0.9609042,0.98522526,0.98491096,0.9961934,1.0000001 diff --git a/correct_filter/results/nvila/correct_only/csv/similarity_vanilla_L13.csv b/correct_filter/results/nvila/correct_only/csv/similarity_vanilla_L13.csv new file mode 100644 index 0000000000000000000000000000000000000000..11baeebd733f3bbd1ab7ab6eae23ab6f9d40c78e --- /dev/null +++ b/correct_filter/results/nvila/correct_only/csv/similarity_vanilla_L13.csv @@ -0,0 +1,7 @@ +,left,right,above,under,far,close +left,1.0000002,0.99975103,0.97896516,0.97938085,0.9414198,0.94830656 +right,0.99975103,1.0,0.97771764,0.9781034,0.9390122,0.94662476 +above,0.97896516,0.97771764,0.99999964,0.99946904,0.9741382,0.9800463 +under,0.97938085,0.9781034,0.99946904,0.9999999,0.9751323,0.98040295 +far,0.9414198,0.9390122,0.9741382,0.9751323,0.9999999,0.99605036 +close,0.94830656,0.94662476,0.9800463,0.98040295,0.99605036,0.99999976 diff --git a/correct_filter/results/nvila/correct_only/csv/similarity_vanilla_L14.csv b/correct_filter/results/nvila/correct_only/csv/similarity_vanilla_L14.csv new file mode 100644 index 0000000000000000000000000000000000000000..5545c9351efb7e4adc7649444405ef8f40a632da --- /dev/null +++ b/correct_filter/results/nvila/correct_only/csv/similarity_vanilla_L14.csv @@ -0,0 +1,7 @@ +,left,right,above,under,far,close +left,1.0,0.9996697,0.9763083,0.977741,0.92742324,0.93366325 +right,0.9996697,1.0000001,0.975211,0.9766682,0.9249244,0.9318292 +above,0.9763083,0.975211,1.0,0.9988332,0.96486825,0.9703514 +under,0.977741,0.9766682,0.9988332,0.9999998,0.9658613,0.97082955 +far,0.92742324,0.9249244,0.96486825,0.9658613,0.9999999,0.9960037 +close,0.93366325,0.9318292,0.9703514,0.97082955,0.9960037,0.99999976 diff --git a/correct_filter/results/nvila/correct_only/csv/similarity_vanilla_L15.csv b/correct_filter/results/nvila/correct_only/csv/similarity_vanilla_L15.csv new file mode 100644 index 0000000000000000000000000000000000000000..2512bb84640eb61855d964da601f21e6f8692e9e --- /dev/null +++ b/correct_filter/results/nvila/correct_only/csv/similarity_vanilla_L15.csv @@ -0,0 +1,7 @@ +,left,right,above,under,far,close +left,1.0000001,0.9981376,0.96162194,0.9651723,0.9024331,0.9074915 +right,0.9981376,1.0000002,0.9584219,0.9627757,0.89746016,0.9030967 +above,0.96162194,0.9584219,1.0000002,0.99763495,0.9454886,0.9498182 +under,0.9651723,0.9627757,0.99763495,0.9999999,0.9475203,0.9511009 +far,0.9024331,0.89746016,0.9454886,0.9475203,0.9999998,0.9955248 +close,0.9074915,0.9030967,0.9498182,0.9511009,0.9955248,0.9999999 diff --git a/correct_filter/results/nvila/correct_only/csv/similarity_vanilla_L16.csv b/correct_filter/results/nvila/correct_only/csv/similarity_vanilla_L16.csv new file mode 100644 index 0000000000000000000000000000000000000000..449436354caba484db9ea6887fcb717a7e6cea95 --- /dev/null +++ b/correct_filter/results/nvila/correct_only/csv/similarity_vanilla_L16.csv @@ -0,0 +1,7 @@ +,left,right,above,under,far,close +left,0.9999996,0.97954404,0.94853264,0.9543877,0.90955776,0.9138551 +right,0.97954404,1.0,0.9454099,0.9555405,0.9125205,0.91750187 +above,0.94853264,0.9454099,0.99999994,0.9884691,0.9474921,0.94660306 +under,0.9543877,0.9555405,0.9884691,0.9999998,0.95301306,0.9556092 +far,0.90955776,0.9125205,0.9474921,0.95301306,0.99999976,0.9949325 +close,0.9138551,0.91750187,0.94660306,0.9556092,0.9949325,1.0000001 diff --git a/correct_filter/results/nvila/correct_only/csv/similarity_vanilla_L17.csv b/correct_filter/results/nvila/correct_only/csv/similarity_vanilla_L17.csv new file mode 100644 index 0000000000000000000000000000000000000000..c121a5ff75ada56b1179259e29308c02cf7ecc05 --- /dev/null +++ b/correct_filter/results/nvila/correct_only/csv/similarity_vanilla_L17.csv @@ -0,0 +1,7 @@ +,left,right,above,under,far,close +left,0.99999976,0.9759122,0.9218537,0.92293537,0.8443061,0.8491499 +right,0.9759122,0.99999994,0.91811764,0.9245316,0.8499856,0.854786 +above,0.9218537,0.91811764,1.0,0.9866673,0.8953536,0.89514947 +under,0.92293537,0.9245316,0.9866673,0.99999994,0.9008581,0.9050645 +far,0.8443061,0.8499856,0.8953536,0.9008581,0.9999994,0.9945332 +close,0.8491499,0.854786,0.89514947,0.9050645,0.9945332,1.0000001 diff --git a/correct_filter/results/nvila/correct_only/csv/similarity_vanilla_L19.csv b/correct_filter/results/nvila/correct_only/csv/similarity_vanilla_L19.csv new file mode 100644 index 0000000000000000000000000000000000000000..a4d06280a28c6268af38d0249f4dc61f7a407400 --- /dev/null +++ b/correct_filter/results/nvila/correct_only/csv/similarity_vanilla_L19.csv @@ -0,0 +1,7 @@ +,left,right,above,under,far,close +left,0.99999964,0.9727133,0.9097869,0.9231508,0.8569409,0.85787857 +right,0.9727133,1.0000007,0.90907615,0.92764866,0.86199373,0.86297804 +above,0.9097869,0.90907615,1.0000002,0.9756527,0.8818724,0.87370664 +under,0.9231508,0.92764866,0.9756527,1.0000004,0.89276963,0.8943932 +far,0.8569409,0.86199373,0.8818724,0.89276963,1.0000001,0.99415433 +close,0.85787857,0.86297804,0.87370664,0.8943932,0.99415433,1.0000001 diff --git a/correct_filter/results/nvila/correct_only/csv/similarity_vanilla_L21.csv b/correct_filter/results/nvila/correct_only/csv/similarity_vanilla_L21.csv new file mode 100644 index 0000000000000000000000000000000000000000..2f234f1652f919a7a2619330ce5cc17069774848 --- /dev/null +++ b/correct_filter/results/nvila/correct_only/csv/similarity_vanilla_L21.csv @@ -0,0 +1,7 @@ +,left,right,above,under,far,close +left,0.99999976,0.9700895,0.9090193,0.91986436,0.8754928,0.87550724 +right,0.9700895,0.99999964,0.9095091,0.927956,0.88778985,0.8878808 +above,0.9090193,0.9095091,0.9999998,0.97830635,0.90452445,0.8996055 +under,0.91986436,0.927956,0.97830635,0.9999998,0.9211049,0.9226778 +far,0.8754928,0.88778985,0.90452445,0.9211049,0.99999946,0.996649 +close,0.87550724,0.8878808,0.8996055,0.9226778,0.996649,1.0000005 diff --git a/correct_filter/results/nvila/correct_only/csv/similarity_vanilla_L24.csv b/correct_filter/results/nvila/correct_only/csv/similarity_vanilla_L24.csv new file mode 100644 index 0000000000000000000000000000000000000000..e1bbb191fb0ef26f293d227020e4c8174efea899 --- /dev/null +++ b/correct_filter/results/nvila/correct_only/csv/similarity_vanilla_L24.csv @@ -0,0 +1,7 @@ +,left,right,above,under,far,close +left,1.0000004,0.9846282,0.87540233,0.8725613,0.8543791,0.85245764 +right,0.9846282,1.0000001,0.8787689,0.88013184,0.8635671,0.8618518 +above,0.87540233,0.8787689,1.0000005,0.98705924,0.8666504,0.8625918 +under,0.8725613,0.88013184,0.98705924,1.0,0.86705863,0.8663192 +far,0.8543791,0.8635671,0.8666504,0.86705863,0.9999999,0.9980716 +close,0.85245764,0.8618518,0.8625918,0.8663192,0.9980716,1.0000005 diff --git a/correct_filter/results/nvila/correct_only/csv/similarity_vanilla_L6.csv b/correct_filter/results/nvila/correct_only/csv/similarity_vanilla_L6.csv new file mode 100644 index 0000000000000000000000000000000000000000..d8af480ec328ea8a9b4079661a1c2fdc4f8eefc8 --- /dev/null +++ b/correct_filter/results/nvila/correct_only/csv/similarity_vanilla_L6.csv @@ -0,0 +1,7 @@ +,left,right,above,under,far,close +left,0.99999994,0.9997739,0.99530685,0.9950509,0.97794634,0.9868495 +right,0.9997739,0.99999994,0.9951017,0.9946436,0.9758659,0.9868785 +above,0.99530685,0.9951017,0.99999964,0.9997757,0.9825773,0.99224395 +under,0.9950509,0.9946436,0.9997757,0.9999996,0.9843655,0.9922911 +far,0.97794634,0.9758659,0.9825773,0.9843655,1.0000005,0.98989874 +close,0.9868495,0.9868785,0.99224395,0.9922911,0.98989874,1.0 diff --git a/correct_filter/results/nvila/incorrect_only/csv/similarity_2m_L1.csv b/correct_filter/results/nvila/incorrect_only/csv/similarity_2m_L1.csv new file mode 100644 index 0000000000000000000000000000000000000000..f84fb85820d7f330a17d4d8fa54d61da5491a1a9 --- /dev/null +++ b/correct_filter/results/nvila/incorrect_only/csv/similarity_2m_L1.csv @@ -0,0 +1,7 @@ +,left,right,above,under,far,close +left,1.0000001,0.9999973,0.9994252,0.99947846,0.9992412,0.99932873 +right,0.9999973,1.0000002,0.9994251,0.9994797,0.99923795,0.99932617 +above,0.9994252,0.9994251,0.9999996,0.9999915,0.9995292,0.99948674 +under,0.99947846,0.9994797,0.9999915,1.0000008,0.9995482,0.999526 +far,0.9992412,0.99923795,0.9995292,0.9995482,0.9999993,0.9999716 +close,0.99932873,0.99932617,0.99948674,0.999526,0.9999716,1.0000002 diff --git a/correct_filter/results/nvila/incorrect_only/csv/similarity_2m_L22.csv b/correct_filter/results/nvila/incorrect_only/csv/similarity_2m_L22.csv new file mode 100644 index 0000000000000000000000000000000000000000..16b79206c39f525882d145fb2e23e945f455c92b --- /dev/null +++ b/correct_filter/results/nvila/incorrect_only/csv/similarity_2m_L22.csv @@ -0,0 +1,7 @@ +,left,right,above,under,far,close +left,1.0000001,0.9818787,0.89300364,0.8904633,0.86953485,0.86418575 +right,0.9818787,0.9999997,0.89545876,0.90279615,0.8788948,0.8724193 +above,0.89300364,0.89545876,1.0000002,0.92393833,0.8912646,0.8668913 +under,0.8904633,0.90279615,0.92393833,0.9999997,0.8738034,0.8825587 +far,0.86953485,0.8788948,0.8912646,0.8738034,0.9999996,0.991261 +close,0.86418575,0.8724193,0.8668913,0.8825587,0.991261,1.0000001 diff --git a/correct_filter/results/nvila/incorrect_only/csv/similarity_2m_L3.csv b/correct_filter/results/nvila/incorrect_only/csv/similarity_2m_L3.csv new file mode 100644 index 0000000000000000000000000000000000000000..6328eaba88c08ae911c7749f9790a1a48d60d784 --- /dev/null +++ b/correct_filter/results/nvila/incorrect_only/csv/similarity_2m_L3.csv @@ -0,0 +1,7 @@ +,left,right,above,under,far,close +left,1.0000002,0.99999005,0.9990137,0.9991354,0.99553835,0.99564767 +right,0.99999005,1.0,0.99901646,0.99913955,0.99552804,0.9956268 +above,0.9990137,0.99901646,1.0,0.9999477,0.99558765,0.99550325 +under,0.9991354,0.99913955,0.9999477,1.0,0.99565977,0.995613 +far,0.99553835,0.99552804,0.99558765,0.99565977,0.9999998,0.9999527 +close,0.99564767,0.9956268,0.99550325,0.995613,0.9999527,1.0000002 diff --git a/correct_filter/results/nvila/incorrect_only/csv/similarity_400k_L16.csv b/correct_filter/results/nvila/incorrect_only/csv/similarity_400k_L16.csv new file mode 100644 index 0000000000000000000000000000000000000000..c804e23cf411b06093ad068305f766d6ca378477 --- /dev/null +++ b/correct_filter/results/nvila/incorrect_only/csv/similarity_400k_L16.csv @@ -0,0 +1,7 @@ +,left,right,above,under,far,close +left,0.9999998,0.9940622,0.9562423,0.9623292,0.9452511,0.94735706 +right,0.9940622,0.9999999,0.9550754,0.96539694,0.94249606,0.9463307 +above,0.9562423,0.9550754,0.9999997,0.9749493,0.9530518,0.94705707 +under,0.9623292,0.96539694,0.9749493,1.0000002,0.94919324,0.9541613 +far,0.9452511,0.94249606,0.9530518,0.94919324,0.9999998,0.99707067 +close,0.94735706,0.9463307,0.94705707,0.9541613,0.99707067,1.0 diff --git a/correct_filter/results/nvila/incorrect_only/csv/similarity_400k_L3.csv b/correct_filter/results/nvila/incorrect_only/csv/similarity_400k_L3.csv new file mode 100644 index 0000000000000000000000000000000000000000..19c4e370cf54e776b27c52893786d3ee05ec08c9 --- /dev/null +++ b/correct_filter/results/nvila/incorrect_only/csv/similarity_400k_L3.csv @@ -0,0 +1,7 @@ +,left,right,above,under,far,close +left,0.9999999,0.9998572,0.99917585,0.99909836,0.9928177,0.9930315 +right,0.9998572,0.9999999,0.9991829,0.9989221,0.99308974,0.99326926 +above,0.99917585,0.9991829,0.9999993,0.9998125,0.9927547,0.9928855 +under,0.99909836,0.9989221,0.9998125,1.0,0.99258155,0.99280405 +far,0.9928177,0.99308974,0.9927547,0.99258155,0.9999998,0.9998975 +close,0.9930315,0.99326926,0.9928855,0.99280405,0.9998975,0.9999996 diff --git a/correct_filter/results/nvila/incorrect_only/csv/similarity_400k_L4.csv b/correct_filter/results/nvila/incorrect_only/csv/similarity_400k_L4.csv new file mode 100644 index 0000000000000000000000000000000000000000..b58c8dda478778df9a9cf87576173fae44111b8a --- /dev/null +++ b/correct_filter/results/nvila/incorrect_only/csv/similarity_400k_L4.csv @@ -0,0 +1,7 @@ +,left,right,above,under,far,close +left,0.99999994,0.9998579,0.99885064,0.99866116,0.99352956,0.9936141 +right,0.9998579,1.0,0.9988346,0.9984198,0.9936539,0.9938157 +above,0.99885064,0.9988346,1.0000001,0.9997047,0.99349445,0.9935359 +under,0.99866116,0.9984198,0.9997047,0.99999976,0.9932706,0.99318033 +far,0.99352956,0.9936539,0.99349445,0.9932706,1.0000001,0.9998017 +close,0.9936141,0.9938157,0.9935359,0.99318033,0.9998017,1.0 diff --git a/correct_filter/results/nvila/incorrect_only/csv/similarity_800k_L2.csv b/correct_filter/results/nvila/incorrect_only/csv/similarity_800k_L2.csv new file mode 100644 index 0000000000000000000000000000000000000000..3701201ec28440713b2a0c53b5fd90c618bfd952 --- /dev/null +++ b/correct_filter/results/nvila/incorrect_only/csv/similarity_800k_L2.csv @@ -0,0 +1,7 @@ +,left,right,above,under,far,close +left,1.0000001,0.9997607,0.9984398,0.999406,0.99561507,0.9954602 +right,0.9997607,1.0000001,0.99733907,0.99907106,0.99568224,0.9955566 +above,0.9984398,0.99733907,0.99999976,0.99925697,0.9940475,0.9939439 +under,0.999406,0.99907106,0.99925697,1.0000001,0.9954207,0.9952926 +far,0.99561507,0.99568224,0.9940475,0.9954207,1.0,0.9999676 +close,0.9954602,0.9955566,0.9939439,0.9952926,0.9999676,1.0000002 diff --git a/correct_filter/results/nvila/incorrect_only/csv/similarity_800k_L6.csv b/correct_filter/results/nvila/incorrect_only/csv/similarity_800k_L6.csv new file mode 100644 index 0000000000000000000000000000000000000000..d5b2b87a0ac4a96fef278204a35790218e8b51bc --- /dev/null +++ b/correct_filter/results/nvila/incorrect_only/csv/similarity_800k_L6.csv @@ -0,0 +1,7 @@ +,left,right,above,under,far,close +left,0.99999976,0.99984515,0.99754,0.99884266,0.9964003,0.99614334 +right,0.99984515,0.9999996,0.99669844,0.9985724,0.99624455,0.99586344 +above,0.99754,0.99669844,0.99999964,0.9991046,0.99533427,0.99590874 +under,0.99884266,0.9985724,0.9991046,1.0,0.99683315,0.9968134 +far,0.9964003,0.99624455,0.99533427,0.99683315,1.0,0.99980724 +close,0.99614334,0.99586344,0.99590874,0.9968134,0.99980724,1.0000006 diff --git a/correct_filter/results/nvila/incorrect_only/csv/similarity_vanilla_L10.csv b/correct_filter/results/nvila/incorrect_only/csv/similarity_vanilla_L10.csv new file mode 100644 index 0000000000000000000000000000000000000000..86e7996f4491bbe113d4fc1d0977a393bbfa59cb --- /dev/null +++ b/correct_filter/results/nvila/incorrect_only/csv/similarity_vanilla_L10.csv @@ -0,0 +1,7 @@ +,left,right,above,under,far,close +left,1.0,0.9954036,0.972603,0.97351086,0.9538189,0.9351457 +right,0.9954036,1.0,0.9820013,0.98607177,0.96312124,0.9547689 +above,0.972603,0.9820013,0.99999976,0.9960129,0.9867181,0.9703555 +under,0.97351086,0.98607177,0.9960129,1.0000004,0.9815843,0.97655797 +far,0.9538189,0.96312124,0.9867181,0.9815843,1.0000001,0.979556 +close,0.9351457,0.9547689,0.9703555,0.97655797,0.979556,0.99999964 diff --git a/correct_filter/results/nvila/incorrect_only/csv/similarity_vanilla_L25.csv b/correct_filter/results/nvila/incorrect_only/csv/similarity_vanilla_L25.csv new file mode 100644 index 0000000000000000000000000000000000000000..775bbdf6495b1abacf891020f199b21f0970efc6 --- /dev/null +++ b/correct_filter/results/nvila/incorrect_only/csv/similarity_vanilla_L25.csv @@ -0,0 +1,7 @@ +,left,right,above,under,far,close +left,0.99999946,0.9947516,0.8832269,0.87420225,0.8301957,0.83076096 +right,0.9947516,0.99999964,0.88388616,0.87700284,0.8319423,0.83309585 +above,0.8832269,0.88388616,1.0000002,0.9945774,0.8473209,0.84513193 +under,0.87420225,0.87700284,0.9945774,1.0,0.8436996,0.84207255 +far,0.8301957,0.8319423,0.8473209,0.8436996,0.9999993,0.99110144 +close,0.83076096,0.83309585,0.84513193,0.84207255,0.99110144,1.0000006 diff --git a/correct_filter/results/nvila/incorrect_only/csv/similarity_vanilla_L3.csv b/correct_filter/results/nvila/incorrect_only/csv/similarity_vanilla_L3.csv new file mode 100644 index 0000000000000000000000000000000000000000..4ad229ac605dc59f85c41f139ab9e478838b110b --- /dev/null +++ b/correct_filter/results/nvila/incorrect_only/csv/similarity_vanilla_L3.csv @@ -0,0 +1,7 @@ +,left,right,above,under,far,close +left,1.0000001,0.996069,0.98306865,0.9881447,0.9927232,0.96856165 +right,0.996069,0.9999998,0.98445207,0.9958049,0.9906814,0.98205465 +above,0.98306865,0.98445207,0.9999999,0.99063927,0.98636675,0.9520421 +under,0.9881447,0.9958049,0.99063927,0.99999964,0.9877048,0.97938395 +far,0.9927232,0.9906814,0.98636675,0.9877048,1.0000001,0.97233 +close,0.96856165,0.98205465,0.9520421,0.97938395,0.97233,1.0 diff --git a/correct_filter/results/nvila/incorrect_only/csv/similarity_vanilla_L7.csv b/correct_filter/results/nvila/incorrect_only/csv/similarity_vanilla_L7.csv new file mode 100644 index 0000000000000000000000000000000000000000..d38f4d69e4246b76c299a82c4aaee8488a734ca6 --- /dev/null +++ b/correct_filter/results/nvila/incorrect_only/csv/similarity_vanilla_L7.csv @@ -0,0 +1,7 @@ +,left,right,above,under,far,close +left,0.99999964,0.99386585,0.9800472,0.9778317,0.9768666,0.94299716 +right,0.99386585,1.0000005,0.98667765,0.99101543,0.980471,0.9675071 +above,0.9800472,0.98667765,1.0,0.9936625,0.99108875,0.96583563 +under,0.9778317,0.99101543,0.9936625,1.0000002,0.9852049,0.9807894 +far,0.9768666,0.980471,0.99108875,0.9852049,0.99999964,0.96658003 +close,0.94299716,0.9675071,0.96583563,0.9807894,0.96658003,0.9999998 diff --git a/correct_filter/results/nvila/incorrect_only/csv/similarity_vanilla_L8.csv b/correct_filter/results/nvila/incorrect_only/csv/similarity_vanilla_L8.csv new file mode 100644 index 0000000000000000000000000000000000000000..375e1e82c1561f291dc4ef786a52f59d5d3bcd9d --- /dev/null +++ b/correct_filter/results/nvila/incorrect_only/csv/similarity_vanilla_L8.csv @@ -0,0 +1,7 @@ +,left,right,above,under,far,close +left,1.0000005,0.9946521,0.9818256,0.98021656,0.9760203,0.95066404 +right,0.9946521,1.0,0.98819447,0.9919569,0.980892,0.97191215 +above,0.9818256,0.98819447,0.99999994,0.99479777,0.99104965,0.9701023 +under,0.98021656,0.9919569,0.99479777,1.0000002,0.9863045,0.98299485 +far,0.9760203,0.980892,0.99104965,0.9863045,1.0000002,0.972171 +close,0.95066404,0.97191215,0.9701023,0.98299485,0.972171,1.0000005 diff --git a/counter_consistent_result_cvbench3d.txt b/counter_consistent_result_cvbench3d.txt new file mode 100644 index 0000000000000000000000000000000000000000..11235b5d3fb2c2fef07c927589aa2d22f42b3003 --- /dev/null +++ b/counter_consistent_result_cvbench3d.txt @@ -0,0 +1,358 @@ + +====================================================================== +Model: molmo-7B-O-0924 +====================================================================== + +Category Type Correct Total Accuracy +------------------------------------------------------ +Depth consistent 364 390 93.3% +Depth counter 52 71 73.2% +Depth ambiguous 91 139 65.5% +Distance consistent 89 165 53.9% +Distance counter 276 374 73.8% +Distance ambiguous 46 61 75.4% +------------------------------------------------------ +TOTAL consistent 453 555 81.6% +TOTAL counter 328 445 73.7% + +Accuracy Gap (Consistent - Counter): 7.9%p + -> Larger gap indicates stronger reliance on the 2D heuristic + +🔍 Counter examples wrong: 117 / 445 + +====================================================================== +Model: molmo-7B-O-0924-data_scale_exp_80k +====================================================================== + +Category Type Correct Total Accuracy +------------------------------------------------------ +Depth consistent 314 390 80.5% +Depth counter 39 71 54.9% +Depth ambiguous 73 139 52.5% +Distance consistent 96 165 58.2% +Distance counter 267 374 71.4% +Distance ambiguous 42 61 68.9% +------------------------------------------------------ +TOTAL consistent 410 555 73.9% +TOTAL counter 306 445 68.8% + +Accuracy Gap (Consistent - Counter): 5.1%p + -> Larger gap indicates stronger reliance on the 2D heuristic + +🔍 Counter examples wrong: 139 / 445 + +====================================================================== +Model: molmo-7B-O-0924-data_scale_exp_400k +====================================================================== + +Category Type Correct Total Accuracy +------------------------------------------------------ +Depth consistent 354 390 90.8% +Depth counter 37 71 52.1% +Depth ambiguous 89 139 64.0% +Distance consistent 106 165 64.2% +Distance counter 274 374 73.3% +Distance ambiguous 45 61 73.8% +------------------------------------------------------ +TOTAL consistent 460 555 82.9% +TOTAL counter 311 445 69.9% + +Accuracy Gap (Consistent - Counter): 13.0%p + -> Larger gap indicates stronger reliance on the 2D heuristic + +🔍 Counter examples wrong: 134 / 445 + +====================================================================== +Model: molmo-7B-O-0924-data_scale_exp_800k +====================================================================== + +Category Type Correct Total Accuracy +------------------------------------------------------ +Depth consistent 351 390 90.0% +Depth counter 48 71 67.6% +Depth ambiguous 93 139 66.9% +Distance consistent 112 165 67.9% +Distance counter 272 374 72.7% +Distance ambiguous 41 61 67.2% +------------------------------------------------------ +TOTAL consistent 463 555 83.4% +TOTAL counter 320 445 71.9% + +Accuracy Gap (Consistent - Counter): 11.5%p + -> Larger gap indicates stronger reliance on the 2D heuristic + +🔍 Counter examples wrong: 125 / 445 + +====================================================================== +Model: molmo-7B-O-0924-data_scale_exp_2m +====================================================================== + +Category Type Correct Total Accuracy +------------------------------------------------------ +Depth consistent 355 390 91.0% +Depth counter 53 71 74.6% +Depth ambiguous 116 139 83.5% +Distance consistent 119 165 72.1% +Distance counter 322 374 86.1% +Distance ambiguous 47 61 77.0% +------------------------------------------------------ +TOTAL consistent 474 555 85.4% +TOTAL counter 375 445 84.3% + +Accuracy Gap (Consistent - Counter): 1.1%p + -> Larger gap indicates stronger reliance on the 2D heuristic + +🔍 Counter examples wrong: 70 / 445 + +====================================================================== +Model: NVILA-Lite-2B +====================================================================== + +Category Type Correct Total Accuracy +------------------------------------------------------ +Depth consistent 294 390 75.4% +Depth counter 29 71 40.8% +Depth ambiguous 92 139 66.2% +Distance consistent 92 165 55.8% +Distance counter 181 374 48.4% +Distance ambiguous 41 61 67.2% +------------------------------------------------------ +TOTAL consistent 386 555 69.5% +TOTAL counter 210 445 47.2% + +Accuracy Gap (Consistent - Counter): 22.4%p + -> Larger gap indicates stronger reliance on the 2D heuristic + +🔍 Counter examples wrong: 235 / 445 + +====================================================================== +Model: NVILA-Lite-2B-data-scale-exp-80k +====================================================================== + +Category Type Correct Total Accuracy +------------------------------------------------------ +Depth consistent 284 390 72.8% +Depth counter 35 71 49.3% +Depth ambiguous 78 139 56.1% +Distance consistent 95 165 57.6% +Distance counter 228 374 61.0% +Distance ambiguous 42 61 68.9% +------------------------------------------------------ +TOTAL consistent 379 555 68.3% +TOTAL counter 263 445 59.1% + +Accuracy Gap (Consistent - Counter): 9.2%p + -> Larger gap indicates stronger reliance on the 2D heuristic + +🔍 Counter examples wrong: 182 / 445 + +====================================================================== +Model: NVILA-Lite-2B-data-scale-exp-400k +====================================================================== + +Category Type Correct Total Accuracy +------------------------------------------------------ +Depth consistent 319 390 81.8% +Depth counter 42 71 59.2% +Depth ambiguous 85 139 61.2% +Distance consistent 89 165 53.9% +Distance counter 269 374 71.9% +Distance ambiguous 44 61 72.1% +------------------------------------------------------ +TOTAL consistent 408 555 73.5% +TOTAL counter 311 445 69.9% + +Accuracy Gap (Consistent - Counter): 3.6%p + -> Larger gap indicates stronger reliance on the 2D heuristic + +🔍 Counter examples wrong: 134 / 445 + +====================================================================== +Model: NVILA-Lite-2B-data-scale-exp-800k +====================================================================== + +Category Type Correct Total Accuracy +------------------------------------------------------ +Depth consistent 330 390 84.6% +Depth counter 48 71 67.6% +Depth ambiguous 91 139 65.5% +Distance consistent 87 165 52.7% +Distance counter 295 374 78.9% +Distance ambiguous 46 61 75.4% +------------------------------------------------------ +TOTAL consistent 417 555 75.1% +TOTAL counter 343 445 77.1% + +Accuracy Gap (Consistent - Counter): -1.9%p + -> Larger gap indicates stronger reliance on the 2D heuristic + +🔍 Counter examples wrong: 102 / 445 + +====================================================================== +Model: NVILA-Lite-2B-data-scale-exp-2m +====================================================================== + +Category Type Correct Total Accuracy +------------------------------------------------------ +Depth consistent 380 390 97.4% +Depth counter 67 71 94.4% +Depth ambiguous 116 139 83.5% +Distance consistent 119 165 72.1% +Distance counter 347 374 92.8% +Distance ambiguous 57 61 93.4% +------------------------------------------------------ +TOTAL consistent 499 555 89.9% +TOTAL counter 414 445 93.0% + +Accuracy Gap (Consistent - Counter): -3.1%p + -> Larger gap indicates stronger reliance on the 2D heuristic + +🔍 Counter examples wrong: 31 / 445 + +====================================================================== +Model: RoboRefer-2B-SFT +====================================================================== + +Category Type Correct Total Accuracy +------------------------------------------------------ +Depth consistent 384 390 98.5% +Depth counter 68 71 95.8% +Depth ambiguous 122 139 87.8% +Distance consistent 132 165 80.0% +Distance counter 354 374 94.7% +Distance ambiguous 57 61 93.4% +------------------------------------------------------ +TOTAL consistent 516 555 93.0% +TOTAL counter 422 445 94.8% + +Accuracy Gap (Consistent - Counter): -1.9%p + -> Larger gap indicates stronger reliance on the 2D heuristic + +🔍 Counter examples wrong: 23 / 445 + +====================================================================== +Model: Qwen2.5-VL-3B-Instruct +====================================================================== + +Category Type Correct Total Accuracy +------------------------------------------------------ +Depth consistent 301 390 77.2% +Depth counter 38 71 53.5% +Depth ambiguous 83 139 59.7% +Distance consistent 87 165 52.7% +Distance counter 247 374 66.0% +Distance ambiguous 27 61 44.3% +------------------------------------------------------ +TOTAL consistent 388 555 69.9% +TOTAL counter 285 445 64.0% + +Accuracy Gap (Consistent - Counter): 5.9%p + -> Larger gap indicates stronger reliance on the 2D heuristic + +🔍 Counter examples wrong: 160 / 445 + +====================================================================== +Model: Qwen2.5-VL-3B-Instruct-data_scale_exp_80k +====================================================================== + +Category Type Correct Total Accuracy +------------------------------------------------------ +Depth consistent 273 390 70.0% +Depth counter 39 71 54.9% +Depth ambiguous 76 139 54.7% +Distance consistent 77 165 46.7% +Distance counter 255 374 68.2% +Distance ambiguous 37 61 60.7% +------------------------------------------------------ +TOTAL consistent 350 555 63.1% +TOTAL counter 294 445 66.1% + +Accuracy Gap (Consistent - Counter): -3.0%p + -> Larger gap indicates stronger reliance on the 2D heuristic + +🔍 Counter examples wrong: 151 / 445 + +====================================================================== +Model: Qwen2.5-VL-3B-Instruct-data_scale_exp_400k +====================================================================== + +Category Type Correct Total Accuracy +------------------------------------------------------ +Depth consistent 259 390 66.4% +Depth counter 38 71 53.5% +Depth ambiguous 75 139 54.0% +Distance consistent 62 165 37.6% +Distance counter 235 374 62.8% +Distance ambiguous 30 61 49.2% +------------------------------------------------------ +TOTAL consistent 321 555 57.8% +TOTAL counter 273 445 61.3% + +Accuracy Gap (Consistent - Counter): -3.5%p + -> Larger gap indicates stronger reliance on the 2D heuristic + +🔍 Counter examples wrong: 172 / 445 + +====================================================================== +Model: Qwen2.5-VL-3B-Instruct-data_scale_exp_800k +====================================================================== + +Category Type Correct Total Accuracy +------------------------------------------------------ +Depth consistent 242 390 62.1% +Depth counter 38 71 53.5% +Depth ambiguous 72 139 51.8% +Distance consistent 55 165 33.3% +Distance counter 233 374 62.3% +Distance ambiguous 19 61 31.1% +------------------------------------------------------ +TOTAL consistent 297 555 53.5% +TOTAL counter 271 445 60.9% + +Accuracy Gap (Consistent - Counter): -7.4%p + -> Larger gap indicates stronger reliance on the 2D heuristic + +🔍 Counter examples wrong: 174 / 445 + +====================================================================== +Model: Qwen2.5-VL-3B-Instruct-data_scale_exp_2m +====================================================================== + +Category Type Correct Total Accuracy +------------------------------------------------------ +Depth consistent 243 390 62.3% +Depth counter 36 71 50.7% +Depth ambiguous 72 139 51.8% +Distance consistent 61 165 37.0% +Distance counter 233 374 62.3% +Distance ambiguous 19 61 31.1% +------------------------------------------------------ +TOTAL consistent 304 555 54.8% +TOTAL counter 269 445 60.4% + +Accuracy Gap (Consistent - Counter): -5.7%p + -> Larger gap indicates stronger reliance on the 2D heuristic + +🔍 Counter examples wrong: 176 / 445 + +============================================================================== +MODEL COMPARISON +============================================================================== +Model Consistent Counter Gap +------------------------------------------------------------------------------ +molmo-7B-O-0924 81.6% 73.7% +7.9%p +molmo-7B-O-0924-data_scale_exp_80k 73.9% 68.8% +5.1%p +molmo-7B-O-0924-data_scale_exp_400k 82.9% 69.9% +13.0%p +molmo-7B-O-0924-data_scale_exp_800k 83.4% 71.9% +11.5%p +molmo-7B-O-0924-data_scale_exp_2m 85.4% 84.3% +1.1%p +NVILA-Lite-2B 69.5% 47.2% +22.4%p +NVILA-Lite-2B-data-scale-exp-80k 68.3% 59.1% +9.2%p +NVILA-Lite-2B-data-scale-exp-400k 73.5% 69.9% +3.6%p +NVILA-Lite-2B-data-scale-exp-800k 75.1% 77.1% -1.9%p +NVILA-Lite-2B-data-scale-exp-2m 89.9% 93.0% -3.1%p +RoboRefer-2B-SFT 93.0% 94.8% -1.9%p +Qwen2.5-VL-3B-Instruct 69.9% 64.0% +5.9%p +Qwen2.5-VL-3B-Instruct-data_scale_exp_80k 63.1% 66.1% -3.0%p +Qwen2.5-VL-3B-Instruct-data_scale_exp_400k 57.8% 61.3% -3.5%p +Qwen2.5-VL-3B-Instruct-data_scale_exp_800k 53.5% 60.9% -7.4%p +Qwen2.5-VL-3B-Instruct-data_scale_exp_2m 54.8% 60.4% -5.7%p diff --git a/counter_consistent_results.txt b/counter_consistent_results.txt new file mode 100644 index 0000000000000000000000000000000000000000..1abb93c27a02a69646f567d48598cd42973be7b8 --- /dev/null +++ b/counter_consistent_results.txt @@ -0,0 +1,360 @@ + +====================================================================== +Model: molmo-7B-O-0924 +====================================================================== + +Category Type Correct Total Accuracy +---------------------------------------------------- +FAR consistent 326 483 67.5% +FAR counter 16 61 26.2% +FAR ambiguous 24 50 48.0% +CLOSE consistent 294 493 59.6% +CLOSE counter 29 68 42.6% +CLOSE ambiguous 22 51 43.1% +---------------------------------------------------- +TOTAL consistent 620 976 63.5% +TOTAL counter 45 129 34.9% + +Accuracy Gap (Consistent - Counter): 28.6%p + -> Larger gap indicates stronger reliance on the 2D heuristic + +🔍 Counter examples wrong: 84 / 129 + +====================================================================== +Model: molmo-7B-O-0924-data_scale_exp_80k +====================================================================== + +Category Type Correct Total Accuracy +---------------------------------------------------- +FAR consistent 269 483 55.7% +FAR counter 19 61 31.1% +FAR ambiguous 21 50 42.0% +CLOSE consistent 322 493 65.3% +CLOSE counter 19 68 27.9% +CLOSE ambiguous 16 51 31.4% +---------------------------------------------------- +TOTAL consistent 591 976 60.6% +TOTAL counter 38 129 29.5% + +Accuracy Gap (Consistent - Counter): 31.1%p + -> Larger gap indicates stronger reliance on the 2D heuristic + +🔍 Counter examples wrong: 91 / 129 + +====================================================================== +Model: molmo-7B-O-0924-data_scale_exp_400k +====================================================================== + +Category Type Correct Total Accuracy +---------------------------------------------------- +FAR consistent 315 483 65.2% +FAR counter 15 61 24.6% +FAR ambiguous 19 50 38.0% +CLOSE consistent 297 493 60.2% +CLOSE counter 20 68 29.4% +CLOSE ambiguous 16 51 31.4% +---------------------------------------------------- +TOTAL consistent 612 976 62.7% +TOTAL counter 35 129 27.1% + +Accuracy Gap (Consistent - Counter): 35.6%p + -> Larger gap indicates stronger reliance on the 2D heuristic + +🔍 Counter examples wrong: 94 / 129 + +====================================================================== +Model: molmo-7B-O-0924-data_scale_exp_800k +====================================================================== + +Category Type Correct Total Accuracy +---------------------------------------------------- +FAR consistent 319 483 66.0% +FAR counter 22 61 36.1% +FAR ambiguous 19 50 38.0% +CLOSE consistent 317 493 64.3% +CLOSE counter 22 68 32.4% +CLOSE ambiguous 23 51 45.1% +---------------------------------------------------- +TOTAL consistent 636 976 65.2% +TOTAL counter 44 129 34.1% + +Accuracy Gap (Consistent - Counter): 31.1%p + -> Larger gap indicates stronger reliance on the 2D heuristic + +🔍 Counter examples wrong: 85 / 129 + +====================================================================== +Model: molmo-7B-O-0924-data_scale_exp_2m +====================================================================== + +Category Type Correct Total Accuracy +---------------------------------------------------- +FAR consistent 312 483 64.6% +FAR counter 18 61 29.5% +FAR ambiguous 20 50 40.0% +CLOSE consistent 325 493 65.9% +CLOSE counter 33 68 48.5% +CLOSE ambiguous 24 51 47.1% +---------------------------------------------------- +TOTAL consistent 637 976 65.3% +TOTAL counter 51 129 39.5% + +Accuracy Gap (Consistent - Counter): 25.7%p + -> Larger gap indicates stronger reliance on the 2D heuristic + +🔍 Counter examples wrong: 78 / 129 + +====================================================================== +Model: NVILA-Lite-2B +====================================================================== + +Category Type Correct Total Accuracy +------------------------------------------------------ +far consistent 242 483 50.1% +far counter 15 61 24.6% +far ambiguous 14 50 28.0% +close consistent 236 493 47.9% +close counter 20 68 29.4% +close ambiguous 20 51 39.2% +------------------------------------------------------ +TOTAL consistent 478 976 49.0% +TOTAL counter 35 129 27.1% + +Accuracy Gap (Consistent - Counter): 21.8%p + -> Larger gap indicates stronger reliance on the 2D heuristic + +🔍 Counter examples wrong: 94 / 129 + +====================================================================== +Model: NVILA-Lite-2B-data-scale-exp-80k +====================================================================== + +Category Type Correct Total Accuracy +---------------------------------------------------- +FAR consistent 317 483 65.6% +FAR counter 2 61 3.3% +FAR ambiguous 11 50 22.0% +CLOSE consistent 246 493 49.9% +CLOSE counter 18 68 26.5% +CLOSE ambiguous 15 51 29.4% +---------------------------------------------------- +TOTAL consistent 563 976 57.7% +TOTAL counter 20 129 15.5% + +Accuracy Gap (Consistent - Counter): 42.2%p + -> Larger gap indicates stronger reliance on the 2D heuristic + +🔍 Counter examples wrong: 109 / 129 + +====================================================================== +Model: NVILA-Lite-2B-data-scale-exp-400k +====================================================================== + +Category Type Correct Total Accuracy +---------------------------------------------------- +FAR consistent 319 483 66.0% +FAR counter 12 61 19.7% +FAR ambiguous 18 50 36.0% +CLOSE consistent 277 493 56.2% +CLOSE counter 32 68 47.1% +CLOSE ambiguous 20 51 39.2% +---------------------------------------------------- +TOTAL consistent 596 976 61.1% +TOTAL counter 44 129 34.1% + +Accuracy Gap (Consistent - Counter): 27.0%p + -> Larger gap indicates stronger reliance on the 2D heuristic + +🔍 Counter examples wrong: 85 / 129 + +====================================================================== +Model: NVILA-Lite-2B-data-scale-exp-800k +====================================================================== + +Category Type Correct Total Accuracy +---------------------------------------------------- +FAR consistent 335 483 69.4% +FAR counter 17 61 27.9% +FAR ambiguous 20 50 40.0% +CLOSE consistent 282 493 57.2% +CLOSE counter 33 68 48.5% +CLOSE ambiguous 15 51 29.4% +---------------------------------------------------- +TOTAL consistent 617 976 63.2% +TOTAL counter 50 129 38.8% + +Accuracy Gap (Consistent - Counter): 24.5%p + -> Larger gap indicates stronger reliance on the 2D heuristic + +🔍 Counter examples wrong: 79 / 129 + +====================================================================== +Model: NVILA-Lite-2B-data-scale-exp-2m +====================================================================== + +Category Type Correct Total Accuracy +---------------------------------------------------- +FAR consistent 324 483 67.1% +FAR counter 19 61 31.1% +FAR ambiguous 21 50 42.0% +CLOSE consistent 268 493 54.4% +CLOSE counter 34 68 50.0% +CLOSE ambiguous 20 51 39.2% +---------------------------------------------------- +TOTAL consistent 592 976 60.7% +TOTAL counter 53 129 41.1% + +Accuracy Gap (Consistent - Counter): 19.6%p + -> Larger gap indicates stronger reliance on the 2D heuristic + +🔍 Counter examples wrong: 76 / 129 + +====================================================================== +Model: RoboRefer-2B-SFT +====================================================================== + +Category Type Correct Total Accuracy +---------------------------------------------------- +FAR consistent 422 483 87.4% +FAR counter 28 61 45.9% +FAR ambiguous 34 50 68.0% +CLOSE consistent 427 493 86.6% +CLOSE counter 49 68 72.1% +CLOSE ambiguous 37 51 72.5% +---------------------------------------------------- +TOTAL consistent 849 976 87.0% +TOTAL counter 77 129 59.7% + +Accuracy Gap (Consistent - Counter): 27.3%p + -> Larger gap indicates stronger reliance on the 2D heuristic + +🔍 Counter examples wrong: 52 / 129 + +====================================================================== +Model: Qwen2.5-VL-3B-Instruct +====================================================================== + +Category Type Correct Total Accuracy +---------------------------------------------------- +FAR consistent 274 483 56.7% +FAR counter 15 61 24.6% +FAR ambiguous 16 50 32.0% +CLOSE consistent 260 493 52.7% +CLOSE counter 27 68 39.7% +CLOSE ambiguous 17 51 33.3% +---------------------------------------------------- +TOTAL consistent 534 976 54.7% +TOTAL counter 42 129 32.6% + +Accuracy Gap (Consistent - Counter): 22.2%p + -> Larger gap indicates stronger reliance on the 2D heuristic + +🔍 Counter examples wrong: 87 / 129 + +====================================================================== +Model: Qwen2.5-VL-3B-Instruct-data_scale_exp_80k +====================================================================== + +Category Type Correct Total Accuracy +---------------------------------------------------- +FAR consistent 267 483 55.3% +FAR counter 15 61 24.6% +FAR ambiguous 13 50 26.0% +CLOSE consistent 227 493 46.0% +CLOSE counter 24 68 35.3% +CLOSE ambiguous 18 51 35.3% +---------------------------------------------------- +TOTAL consistent 494 976 50.6% +TOTAL counter 39 129 30.2% + +Accuracy Gap (Consistent - Counter): 20.4%p + -> Larger gap indicates stronger reliance on the 2D heuristic + +🔍 Counter examples wrong: 90 / 129 + +====================================================================== +Model: Qwen2.5-VL-3B-Instruct-data_scale_exp_400k +====================================================================== + +Category Type Correct Total Accuracy +---------------------------------------------------- +FAR consistent 275 483 56.9% +FAR counter 13 61 21.3% +FAR ambiguous 17 50 34.0% +CLOSE consistent 238 493 48.3% +CLOSE counter 22 68 32.4% +CLOSE ambiguous 17 51 33.3% +---------------------------------------------------- +TOTAL consistent 513 976 52.6% +TOTAL counter 35 129 27.1% + +Accuracy Gap (Consistent - Counter): 25.4%p + -> Larger gap indicates stronger reliance on the 2D heuristic + +🔍 Counter examples wrong: 94 / 129 + +====================================================================== +Model: Qwen2.5-VL-3B-Instruct-data_scale_exp_800k +====================================================================== + +Category Type Correct Total Accuracy +---------------------------------------------------- +FAR consistent 297 483 61.5% +FAR counter 12 61 19.7% +FAR ambiguous 16 50 32.0% +CLOSE consistent 248 493 50.3% +CLOSE counter 22 68 32.4% +CLOSE ambiguous 15 51 29.4% +---------------------------------------------------- +TOTAL consistent 545 976 55.8% +TOTAL counter 34 129 26.4% + +Accuracy Gap (Consistent - Counter): 29.5%p + -> Larger gap indicates stronger reliance on the 2D heuristic + +🔍 Counter examples wrong: 95 / 129 + +====================================================================== +Model: Qwen2.5-VL-3B-Instruct-data_scale_exp_2m +====================================================================== + +Category Type Correct Total Accuracy +---------------------------------------------------- +FAR consistent 313 483 64.8% +FAR counter 6 61 9.8% +FAR ambiguous 14 50 28.0% +CLOSE consistent 281 493 57.0% +CLOSE counter 25 68 36.8% +CLOSE ambiguous 19 51 37.3% +---------------------------------------------------- +TOTAL consistent 594 976 60.9% +TOTAL counter 31 129 24.0% + +Accuracy Gap (Consistent - Counter): 36.8%p + -> Larger gap indicates stronger reliance on the 2D heuristic + +🔍 Counter examples wrong: 98 / 129 + +============================================================================== +MODEL COMPARISON (EmbSpatialBench far/close) +============================================================================== +Model Consistent Counter Gap +------------------------------------------------------------------------------ +molmo-7B-O-0924 63.5% 34.9% +28.6%p +molmo-7B-O-0924-data_scale_exp_80k 60.6% 29.5% +31.1%p +molmo-7B-O-0924-data_scale_exp_400k 62.7% 27.1% +35.6%p +molmo-7B-O-0924-data_scale_exp_800k 65.2% 34.1% +31.1%p +molmo-7B-O-0924-data_scale_exp_2m 65.3% 39.5% +25.7%p +------------------------------------------------------------------------------ +NVILA-Lite-2B 49.2% 27.1% +21.8%p +NVILA-Lite-2B-data-scale-exp-80k 57.7% 15.5% +42.2%p +NVILA-Lite-2B-data-scale-exp-400k 61.1% 34.1% +27.0%p +NVILA-Lite-2B-data-scale-exp-800k 63.2% 38.8% +24.5%p +NVILA-Lite-2B-data-scale-exp-2m 60.7% 41.1% +19.6%p +RoboRefer-2B-SFT 87.0% 59.7% +27.3%p +------------------------------------------------------------------------------ +Qwen2.5-VL-3B-Instruct 54.7% 32.6% +22.2%p +Qwen2.5-VL-3B-Instruct-data_scale_exp_80k 50.6% 30.2% +20.4%p +Qwen2.5-VL-3B-Instruct-data_scale_exp_400k 52.6% 27.1% +25.4%p +Qwen2.5-VL-3B-Instruct-data_scale_exp_800k 55.8% 26.4% +29.5%p +Qwen2.5-VL-3B-Instruct-data_scale_exp_2m 60.9% 24.0% +36.8%p diff --git a/counter_consistent_results_Qwen3-VL-32B.txt b/counter_consistent_results_Qwen3-VL-32B.txt new file mode 100644 index 0000000000000000000000000000000000000000..4b033336e1aae4fd99036817778dc31ae8b5ac94 --- /dev/null +++ b/counter_consistent_results_Qwen3-VL-32B.txt @@ -0,0 +1,21 @@ + +====================================================================== +Model: Qwen3-VL-32B-Instruct +====================================================================== + +Category Type Correct Total Accuracy +---------------------------------------------------- +FAR consistent 353 487 72.5% +FAR counter 22 63 34.9% +FAR ambiguous 18 44 40.9% +CLOSE consistent 370 500 74.0% +CLOSE counter 33 69 47.8% +CLOSE ambiguous 20 43 46.5% +---------------------------------------------------- +TOTAL consistent 723 987 73.3% +TOTAL counter 55 132 41.7% + +📊 Accuracy Gap (Consistent - Counter): 31.6%p + → Gap이 클수록 모델이 2D heuristic에 의존하는 경향 + +🔍 Counter Examples 오답 수: 77 / 132 diff --git a/counter_consistent_results_before_ai2thor_fixed.txt b/counter_consistent_results_before_ai2thor_fixed.txt new file mode 100644 index 0000000000000000000000000000000000000000..83e1138c1de036207e2dd5ef14ee9f46da440f35 --- /dev/null +++ b/counter_consistent_results_before_ai2thor_fixed.txt @@ -0,0 +1,358 @@ + +====================================================================== +Model: molmo-7B-O-0924 +====================================================================== + +Category Type Correct Total Accuracy +---------------------------------------------------- +FAR consistent 328 487 67.4% +FAR counter 16 63 25.4% +FAR ambiguous 22 44 50.0% +CLOSE consistent 298 500 59.6% +CLOSE counter 30 69 43.5% +CLOSE ambiguous 17 43 39.5% +---------------------------------------------------- +TOTAL consistent 626 987 63.4% +TOTAL counter 46 132 34.8% + +📊 Accuracy Gap (Consistent - Counter): 28.6%p + → Gap이 클수록 모델이 2D heuristic에 의존하는 경향 + +🔍 Counter Examples 오답 수: 86 / 132 + +====================================================================== +Model: molmo-7B-O-0924-data_scale_exp_80k +====================================================================== + +Category Type Correct Total Accuracy +---------------------------------------------------- +FAR consistent 271 487 55.6% +FAR counter 19 63 30.2% +FAR ambiguous 19 44 43.2% +CLOSE consistent 324 500 64.8% +CLOSE counter 20 69 29.0% +CLOSE ambiguous 13 43 30.2% +---------------------------------------------------- +TOTAL consistent 595 987 60.3% +TOTAL counter 39 132 29.5% + +📊 Accuracy Gap (Consistent - Counter): 30.7%p + → Gap이 클수록 모델이 2D heuristic에 의존하는 경향 + +🔍 Counter Examples 오답 수: 93 / 132 + +====================================================================== +Model: molmo-7B-O-0924-data_scale_exp_400k +====================================================================== + +Category Type Correct Total Accuracy +---------------------------------------------------- +FAR consistent 317 487 65.1% +FAR counter 15 63 23.8% +FAR ambiguous 17 44 38.6% +CLOSE consistent 300 500 60.0% +CLOSE counter 21 69 30.4% +CLOSE ambiguous 12 43 27.9% +---------------------------------------------------- +TOTAL consistent 617 987 62.5% +TOTAL counter 36 132 27.3% + +📊 Accuracy Gap (Consistent - Counter): 35.2%p + → Gap이 클수록 모델이 2D heuristic에 의존하는 경향 + +🔍 Counter Examples 오답 수: 96 / 132 + +====================================================================== +Model: molmo-7B-O-0924-data_scale_exp_800k +====================================================================== + +Category Type Correct Total Accuracy +---------------------------------------------------- +FAR consistent 320 487 65.7% +FAR counter 23 63 36.5% +FAR ambiguous 17 44 38.6% +CLOSE consistent 320 500 64.0% +CLOSE counter 23 69 33.3% +CLOSE ambiguous 19 43 44.2% +---------------------------------------------------- +TOTAL consistent 640 987 64.8% +TOTAL counter 46 132 34.8% + +📊 Accuracy Gap (Consistent - Counter): 30.0%p + → Gap이 클수록 모델이 2D heuristic에 의존하는 경향 + +🔍 Counter Examples 오답 수: 86 / 132 + +====================================================================== +Model: molmo-7B-O-0924-data_scale_exp_2m +====================================================================== + +Category Type Correct Total Accuracy +---------------------------------------------------- +FAR consistent 313 487 64.3% +FAR counter 19 63 30.2% +FAR ambiguous 18 44 40.9% +CLOSE consistent 328 500 65.6% +CLOSE counter 34 69 49.3% +CLOSE ambiguous 20 43 46.5% +---------------------------------------------------- +TOTAL consistent 641 987 64.9% +TOTAL counter 53 132 40.2% + +📊 Accuracy Gap (Consistent - Counter): 24.8%p + → Gap이 클수록 모델이 2D heuristic에 의존하는 경향 + +🔍 Counter Examples 오답 수: 79 / 132 + +====================================================================== +Model: NVILA-Lite-2B +====================================================================== + +Category Type Correct Total Accuracy +---------------------------------------------------- +FAR consistent 73 487 15.0% +FAR counter 3 63 4.8% +FAR ambiguous 5 44 11.4% +CLOSE consistent 77 500 15.4% +CLOSE counter 8 69 11.6% +CLOSE ambiguous 7 43 16.3% +---------------------------------------------------- +TOTAL consistent 150 987 15.2% +TOTAL counter 11 132 8.3% + +📊 Accuracy Gap (Consistent - Counter): 6.9%p + → Gap이 클수록 모델이 2D heuristic에 의존하는 경향 + +🔍 Counter Examples 오답 수: 121 / 132 + +====================================================================== +Model: NVILA-Lite-2B-data-scale-exp-80k +====================================================================== + +Category Type Correct Total Accuracy +---------------------------------------------------- +FAR consistent 317 487 65.1% +FAR counter 2 63 3.2% +FAR ambiguous 11 44 25.0% +CLOSE consistent 248 500 49.6% +CLOSE counter 19 69 27.5% +CLOSE ambiguous 12 43 27.9% +---------------------------------------------------- +TOTAL consistent 565 987 57.2% +TOTAL counter 21 132 15.9% + +📊 Accuracy Gap (Consistent - Counter): 41.3%p + → Gap이 클수록 모델이 2D heuristic에 의존하는 경향 + +🔍 Counter Examples 오답 수: 111 / 132 + +====================================================================== +Model: NVILA-Lite-2B-data-scale-exp-400k +====================================================================== + +Category Type Correct Total Accuracy +---------------------------------------------------- +FAR consistent 319 487 65.5% +FAR counter 12 63 19.0% +FAR ambiguous 18 44 40.9% +CLOSE consistent 280 500 56.0% +CLOSE counter 33 69 47.8% +CLOSE ambiguous 16 43 37.2% +---------------------------------------------------- +TOTAL consistent 599 987 60.7% +TOTAL counter 45 132 34.1% + +📊 Accuracy Gap (Consistent - Counter): 26.6%p + → Gap이 클수록 모델이 2D heuristic에 의존하는 경향 + +🔍 Counter Examples 오답 수: 87 / 132 + +====================================================================== +Model: NVILA-Lite-2B-data-scale-exp-800k +====================================================================== + +Category Type Correct Total Accuracy +---------------------------------------------------- +FAR consistent 336 487 69.0% +FAR counter 17 63 27.0% +FAR ambiguous 19 44 43.2% +CLOSE consistent 283 500 56.6% +CLOSE counter 34 69 49.3% +CLOSE ambiguous 13 43 30.2% +---------------------------------------------------- +TOTAL consistent 619 987 62.7% +TOTAL counter 51 132 38.6% + +📊 Accuracy Gap (Consistent - Counter): 24.1%p + → Gap이 클수록 모델이 2D heuristic에 의존하는 경향 + +🔍 Counter Examples 오답 수: 81 / 132 + +====================================================================== +Model: NVILA-Lite-2B-data-scale-exp-2m +====================================================================== + +Category Type Correct Total Accuracy +---------------------------------------------------- +FAR consistent 324 487 66.5% +FAR counter 19 63 30.2% +FAR ambiguous 21 44 47.7% +CLOSE consistent 271 500 54.2% +CLOSE counter 35 69 50.7% +CLOSE ambiguous 16 43 37.2% +---------------------------------------------------- +TOTAL consistent 595 987 60.3% +TOTAL counter 54 132 40.9% + +📊 Accuracy Gap (Consistent - Counter): 19.4%p + → Gap이 클수록 모델이 2D heuristic에 의존하는 경향 + +🔍 Counter Examples 오답 수: 78 / 132 + +====================================================================== +Model: RoboRefer-2B-SFT +====================================================================== + +Category Type Correct Total Accuracy +---------------------------------------------------- +FAR consistent 425 487 87.3% +FAR counter 30 63 47.6% +FAR ambiguous 29 44 65.9% +CLOSE consistent 432 500 86.4% +CLOSE counter 49 69 71.0% +CLOSE ambiguous 32 43 74.4% +---------------------------------------------------- +TOTAL consistent 857 987 86.8% +TOTAL counter 79 132 59.8% + +📊 Accuracy Gap (Consistent - Counter): 27.0%p + → Gap이 클수록 모델이 2D heuristic에 의존하는 경향 + +🔍 Counter Examples 오답 수: 53 / 132 + +====================================================================== +Model: Qwen2.5-VL-3B-Instruct +====================================================================== + +Category Type Correct Total Accuracy +---------------------------------------------------- +FAR consistent 274 487 56.3% +FAR counter 15 63 23.8% +FAR ambiguous 16 44 36.4% +CLOSE consistent 263 500 52.6% +CLOSE counter 28 69 40.6% +CLOSE ambiguous 13 43 30.2% +---------------------------------------------------- +TOTAL consistent 537 987 54.4% +TOTAL counter 43 132 32.6% + +📊 Accuracy Gap (Consistent - Counter): 21.8%p + → Gap이 클수록 모델이 2D heuristic에 의존하는 경향 + +🔍 Counter Examples 오답 수: 89 / 132 + +====================================================================== +Model: Qwen2.5-VL-3B-Instruct-data_scale_exp_80k +====================================================================== + +Category Type Correct Total Accuracy +---------------------------------------------------- +FAR consistent 268 487 55.0% +FAR counter 15 63 23.8% +FAR ambiguous 12 44 27.3% +CLOSE consistent 231 500 46.2% +CLOSE counter 25 69 36.2% +CLOSE ambiguous 13 43 30.2% +---------------------------------------------------- +TOTAL consistent 499 987 50.6% +TOTAL counter 40 132 30.3% + +📊 Accuracy Gap (Consistent - Counter): 20.3%p + → Gap이 클수록 모델이 2D heuristic에 의존하는 경향 + +🔍 Counter Examples 오답 수: 92 / 132 + +====================================================================== +Model: Qwen2.5-VL-3B-Instruct-data_scale_exp_400k +====================================================================== + +Category Type Correct Total Accuracy +---------------------------------------------------- +FAR consistent 276 487 56.7% +FAR counter 13 63 20.6% +FAR ambiguous 16 44 36.4% +CLOSE consistent 241 500 48.2% +CLOSE counter 23 69 33.3% +CLOSE ambiguous 13 43 30.2% +---------------------------------------------------- +TOTAL consistent 517 987 52.4% +TOTAL counter 36 132 27.3% + +📊 Accuracy Gap (Consistent - Counter): 25.1%p + → Gap이 클수록 모델이 2D heuristic에 의존하는 경향 + +🔍 Counter Examples 오답 수: 96 / 132 + +====================================================================== +Model: Qwen2.5-VL-3B-Instruct-data_scale_exp_800k +====================================================================== + +Category Type Correct Total Accuracy +---------------------------------------------------- +FAR consistent 298 487 61.2% +FAR counter 12 63 19.0% +FAR ambiguous 15 44 34.1% +CLOSE consistent 251 500 50.2% +CLOSE counter 23 69 33.3% +CLOSE ambiguous 11 43 25.6% +---------------------------------------------------- +TOTAL consistent 549 987 55.6% +TOTAL counter 35 132 26.5% + +📊 Accuracy Gap (Consistent - Counter): 29.1%p + → Gap이 클수록 모델이 2D heuristic에 의존하는 경향 + +🔍 Counter Examples 오답 수: 97 / 132 + +====================================================================== +Model: Qwen2.5-VL-3B-Instruct-data_scale_exp_2m +====================================================================== + +Category Type Correct Total Accuracy +---------------------------------------------------- +FAR consistent 313 487 64.3% +FAR counter 6 63 9.5% +FAR ambiguous 14 44 31.8% +CLOSE consistent 284 500 56.8% +CLOSE counter 26 69 37.7% +CLOSE ambiguous 15 43 34.9% +---------------------------------------------------- +TOTAL consistent 597 987 60.5% +TOTAL counter 32 132 24.2% + +📊 Accuracy Gap (Consistent - Counter): 36.2%p + → Gap이 클수록 모델이 2D heuristic에 의존하는 경향 + +🔍 Counter Examples 오답 수: 100 / 132 + +============================================================================== +MODEL COMPARISON +============================================================================== +Model Consistent Counter Gap +------------------------------------------------------------------------------ +molmo-7B-O-0924 63.4% 34.8% +28.6%p +molmo-7B-O-0924-data_scale_exp_80k 60.3% 29.5% +30.7%p +molmo-7B-O-0924-data_scale_exp_400k 62.5% 27.3% +35.2%p +molmo-7B-O-0924-data_scale_exp_800k 64.8% 34.8% +30.0%p +molmo-7B-O-0924-data_scale_exp_2m 64.9% 40.2% +24.8%p +NVILA-Lite-2B 15.2% 8.3% +6.9%p +NVILA-Lite-2B-data-scale-exp-80k 57.2% 15.9% +41.3%p +NVILA-Lite-2B-data-scale-exp-400k 60.7% 34.1% +26.6%p +NVILA-Lite-2B-data-scale-exp-800k 62.7% 38.6% +24.1%p +NVILA-Lite-2B-data-scale-exp-2m 60.3% 40.9% +19.4%p +RoboRefer-2B-SFT 86.8% 59.8% +27.0%p +Qwen2.5-VL-3B-Instruct 54.4% 32.6% +21.8%p +Qwen2.5-VL-3B-Instruct-data_scale_exp_80k 50.6% 30.3% +20.3%p +Qwen2.5-VL-3B-Instruct-data_scale_exp_400k 52.4% 27.3% +25.1%p +Qwen2.5-VL-3B-Instruct-data_scale_exp_800k 55.6% 26.5% +29.1%p +Qwen2.5-VL-3B-Instruct-data_scale_exp_2m 60.5% 24.2% +36.2%p diff --git a/counter_consistent_results_cvbench3d_all.txt b/counter_consistent_results_cvbench3d_all.txt new file mode 100644 index 0000000000000000000000000000000000000000..d1d438fa3fc2632338bc0b7d565ae9e77407acd7 --- /dev/null +++ b/counter_consistent_results_cvbench3d_all.txt @@ -0,0 +1,386 @@ + +====================================================================== +Model: molmo-7B-O-0924 +====================================================================== + +Category Type Correct Total Accuracy +------------------------------------------------------ +Depth consistent 338 363 93.1% +Depth counter 49 65 75.4% +Depth ambiguous 120 172 69.8% +------------------------------------------------------ +TOTAL consistent 338 363 93.1% +TOTAL counter 49 65 75.4% + +Accuracy Gap (Consistent - Counter): 17.7%p + -> Larger gap indicates stronger reliance on the 2D heuristic + +🔍 Counter examples wrong: 16 / 65 + +====================================================================== +Model: molmo-7B-O-0924-data_scale_exp_80k +====================================================================== + +Category Type Correct Total Accuracy +------------------------------------------------------ +Depth consistent 291 363 80.2% +Depth counter 37 65 56.9% +Depth ambiguous 98 172 57.0% +------------------------------------------------------ +TOTAL consistent 291 363 80.2% +TOTAL counter 37 65 56.9% + +Accuracy Gap (Consistent - Counter): 23.2%p + -> Larger gap indicates stronger reliance on the 2D heuristic + +🔍 Counter examples wrong: 28 / 65 + +====================================================================== +Model: molmo-7B-O-0924-data_scale_exp_400k +====================================================================== + +Category Type Correct Total Accuracy +------------------------------------------------------ +Depth consistent 325 363 89.5% +Depth counter 37 65 56.9% +Depth ambiguous 118 172 68.6% +------------------------------------------------------ +TOTAL consistent 325 363 89.5% +TOTAL counter 37 65 56.9% + +Accuracy Gap (Consistent - Counter): 32.6%p + -> Larger gap indicates stronger reliance on the 2D heuristic + +🔍 Counter examples wrong: 28 / 65 + +====================================================================== +Model: molmo-7B-O-0924-data_scale_exp_800k +====================================================================== + +Category Type Correct Total Accuracy +------------------------------------------------------ +Depth consistent 322 363 88.7% +Depth counter 46 65 70.8% +Depth ambiguous 124 172 72.1% +------------------------------------------------------ +TOTAL consistent 322 363 88.7% +TOTAL counter 46 65 70.8% + +Accuracy Gap (Consistent - Counter): 17.9%p + -> Larger gap indicates stronger reliance on the 2D heuristic + +🔍 Counter examples wrong: 19 / 65 + +====================================================================== +Model: molmo-7B-O-0924-data_scale_exp_2m +====================================================================== + +Category Type Correct Total Accuracy +------------------------------------------------------ +Depth consistent 329 363 90.6% +Depth counter 47 65 72.3% +Depth ambiguous 148 172 86.0% +------------------------------------------------------ +TOTAL consistent 329 363 90.6% +TOTAL counter 47 65 72.3% + +Accuracy Gap (Consistent - Counter): 18.3%p + -> Larger gap indicates stronger reliance on the 2D heuristic + +🔍 Counter examples wrong: 18 / 65 + +====================================================================== +Model: NVILA-Lite-2B +====================================================================== + +Category Type Correct Total Accuracy +------------------------------------------------------ +Depth consistent 270 363 74.4% +Depth counter 26 65 40.0% +Depth ambiguous 119 172 69.2% +------------------------------------------------------ +TOTAL consistent 270 363 74.4% +TOTAL counter 26 65 40.0% + +Accuracy Gap (Consistent - Counter): 34.4%p + -> Larger gap indicates stronger reliance on the 2D heuristic + +🔍 Counter examples wrong: 39 / 65 + +====================================================================== +Model: NVILA-Lite-2B-data-scale-exp-80k +====================================================================== + +Category Type Correct Total Accuracy +------------------------------------------------------ +Depth consistent 260 363 71.6% +Depth counter 33 65 50.8% +Depth ambiguous 104 172 60.5% +------------------------------------------------------ +TOTAL consistent 260 363 71.6% +TOTAL counter 33 65 50.8% + +Accuracy Gap (Consistent - Counter): 20.9%p + -> Larger gap indicates stronger reliance on the 2D heuristic + +🔍 Counter examples wrong: 32 / 65 + +====================================================================== +Model: NVILA-Lite-2B-data-scale-exp-400k +====================================================================== + +Category Type Correct Total Accuracy +------------------------------------------------------ +Depth consistent 295 363 81.3% +Depth counter 38 65 58.5% +Depth ambiguous 113 172 65.7% +------------------------------------------------------ +TOTAL consistent 295 363 81.3% +TOTAL counter 38 65 58.5% + +Accuracy Gap (Consistent - Counter): 22.8%p + -> Larger gap indicates stronger reliance on the 2D heuristic + +🔍 Counter examples wrong: 27 / 65 + +====================================================================== +Model: NVILA-Lite-2B-data-scale-exp-800k +====================================================================== + +Category Type Correct Total Accuracy +------------------------------------------------------ +Depth consistent 307 363 84.6% +Depth counter 44 65 67.7% +Depth ambiguous 118 172 68.6% +------------------------------------------------------ +TOTAL consistent 307 363 84.6% +TOTAL counter 44 65 67.7% + +Accuracy Gap (Consistent - Counter): 16.9%p + -> Larger gap indicates stronger reliance on the 2D heuristic + +🔍 Counter examples wrong: 21 / 65 + +====================================================================== +Model: NVILA-Lite-2B-data-scale-exp-2m +====================================================================== + +Category Type Correct Total Accuracy +------------------------------------------------------ +Depth consistent 353 363 97.2% +Depth counter 61 65 93.8% +Depth ambiguous 149 172 86.6% +------------------------------------------------------ +TOTAL consistent 353 363 97.2% +TOTAL counter 61 65 93.8% + +Accuracy Gap (Consistent - Counter): 3.4%p + -> Larger gap indicates stronger reliance on the 2D heuristic + +🔍 Counter examples wrong: 4 / 65 + +====================================================================== +Model: NVILA-Lite-2B-ST-80k-5pct +====================================================================== + +Category Type Correct Total Accuracy +------------------------------------------------------ +Depth consistent 261 363 71.9% +Depth counter 33 65 50.8% +Depth ambiguous 100 172 58.1% +------------------------------------------------------ +TOTAL consistent 261 363 71.9% +TOTAL counter 33 65 50.8% + +Accuracy Gap (Consistent - Counter): 21.1%p + -> Larger gap indicates stronger reliance on the 2D heuristic + +🔍 Counter examples wrong: 32 / 65 + +====================================================================== +Model: NVILA-Lite-2B-ST-400k-5pct +====================================================================== + +Category Type Correct Total Accuracy +------------------------------------------------------ +Depth consistent 318 363 87.6% +Depth counter 50 65 76.9% +Depth ambiguous 128 172 74.4% +------------------------------------------------------ +TOTAL consistent 318 363 87.6% +TOTAL counter 50 65 76.9% + +Accuracy Gap (Consistent - Counter): 10.7%p + -> Larger gap indicates stronger reliance on the 2D heuristic + +🔍 Counter examples wrong: 15 / 65 + +====================================================================== +Model: NVILA-Lite-2B-ST-800k-5pct +====================================================================== + +Category Type Correct Total Accuracy +------------------------------------------------------ +Depth consistent 340 363 93.7% +Depth counter 52 65 80.0% +Depth ambiguous 140 172 81.4% +------------------------------------------------------ +TOTAL consistent 340 363 93.7% +TOTAL counter 52 65 80.0% + +Accuracy Gap (Consistent - Counter): 13.7%p + -> Larger gap indicates stronger reliance on the 2D heuristic + +🔍 Counter examples wrong: 13 / 65 + +====================================================================== +Model: RoboRefer-2B-SFT +====================================================================== + +Category Type Correct Total Accuracy +------------------------------------------------------ +Depth consistent 359 363 98.9% +Depth counter 62 65 95.4% +Depth ambiguous 153 172 89.0% +------------------------------------------------------ +TOTAL consistent 359 363 98.9% +TOTAL counter 62 65 95.4% + +Accuracy Gap (Consistent - Counter): 3.5%p + -> Larger gap indicates stronger reliance on the 2D heuristic + +🔍 Counter examples wrong: 3 / 65 + +====================================================================== +Model: Qwen2.5-VL-3B-Instruct +====================================================================== + +Category Type Correct Total Accuracy +------------------------------------------------------ +Depth consistent 274 363 75.5% +Depth counter 36 65 55.4% +Depth ambiguous 112 172 65.1% +------------------------------------------------------ +TOTAL consistent 274 363 75.5% +TOTAL counter 36 65 55.4% + +Accuracy Gap (Consistent - Counter): 20.1%p + -> Larger gap indicates stronger reliance on the 2D heuristic + +🔍 Counter examples wrong: 29 / 65 + +====================================================================== +Model: Qwen2.5-VL-3B-Instruct-data_scale_exp_80k +====================================================================== + +Category Type Correct Total Accuracy +------------------------------------------------------ +Depth consistent 253 363 69.7% +Depth counter 39 65 60.0% +Depth ambiguous 96 172 55.8% +------------------------------------------------------ +TOTAL consistent 253 363 69.7% +TOTAL counter 39 65 60.0% + +Accuracy Gap (Consistent - Counter): 9.7%p + -> Larger gap indicates stronger reliance on the 2D heuristic + +🔍 Counter examples wrong: 26 / 65 + +====================================================================== +Model: Qwen2.5-VL-3B-Instruct-data_scale_exp_400k +====================================================================== + +Category Type Correct Total Accuracy +------------------------------------------------------ +Depth consistent 239 363 65.8% +Depth counter 38 65 58.5% +Depth ambiguous 95 172 55.2% +------------------------------------------------------ +TOTAL consistent 239 363 65.8% +TOTAL counter 38 65 58.5% + +Accuracy Gap (Consistent - Counter): 7.4%p + -> Larger gap indicates stronger reliance on the 2D heuristic + +🔍 Counter examples wrong: 27 / 65 + +====================================================================== +Model: Qwen2.5-VL-3B-Instruct-data_scale_exp_800k +====================================================================== + +Category Type Correct Total Accuracy +------------------------------------------------------ +Depth consistent 222 363 61.2% +Depth counter 38 65 58.5% +Depth ambiguous 92 172 53.5% +------------------------------------------------------ +TOTAL consistent 222 363 61.2% +TOTAL counter 38 65 58.5% + +Accuracy Gap (Consistent - Counter): 2.7%p + -> Larger gap indicates stronger reliance on the 2D heuristic + +🔍 Counter examples wrong: 27 / 65 + +====================================================================== +Model: Qwen2.5-VL-3B-Instruct-data_scale_exp_2m +====================================================================== + +Category Type Correct Total Accuracy +------------------------------------------------------ +Depth consistent 225 363 62.0% +Depth counter 35 65 53.8% +Depth ambiguous 91 172 52.9% +------------------------------------------------------ +TOTAL consistent 225 363 62.0% +TOTAL counter 35 65 53.8% + +Accuracy Gap (Consistent - Counter): 8.1%p + -> Larger gap indicates stronger reliance on the 2D heuristic + +🔍 Counter examples wrong: 30 / 65 + +====================================================================== +Model: Qwen3-VL-235B-A22B-Instruct +====================================================================== + +Category Type Correct Total Accuracy +------------------------------------------------------ +Depth consistent 356 363 98.1% +Depth counter 59 65 90.8% +Depth ambiguous 145 172 84.3% +------------------------------------------------------ +TOTAL consistent 356 363 98.1% +TOTAL counter 59 65 90.8% + +Accuracy Gap (Consistent - Counter): 7.3%p + -> Larger gap indicates stronger reliance on the 2D heuristic + +🔍 Counter examples wrong: 6 / 65 + +============================================================================== +MODEL COMPARISON +============================================================================== +Model Consistent Counter Gap +------------------------------------------------------------------------------ +molmo-7B-O-0924 93.1% 75.4% +17.7%p +molmo-7B-O-0924-data_scale_exp_80k 80.2% 56.9% +23.2%p +molmo-7B-O-0924-data_scale_exp_400k 89.5% 56.9% +32.6%p +molmo-7B-O-0924-data_scale_exp_800k 88.7% 70.8% +17.9%p +molmo-7B-O-0924-data_scale_exp_2m 90.6% 72.3% +18.3%p +NVILA-Lite-2B 74.4% 40.0% +34.4%p +NVILA-Lite-2B-data-scale-exp-80k 71.6% 50.8% +20.9%p +NVILA-Lite-2B-data-scale-exp-400k 81.3% 58.5% +22.8%p +NVILA-Lite-2B-data-scale-exp-800k 84.6% 67.7% +16.9%p +NVILA-Lite-2B-data-scale-exp-2m 97.2% 93.8% +3.4%p +NVILA-Lite-2B-ST-80k-5pct 71.9% 50.8% +21.1%p +NVILA-Lite-2B-ST-400k-5pct 87.6% 76.9% +10.7%p +NVILA-Lite-2B-ST-800k-5pct 93.7% 80.0% +13.7%p +RoboRefer-2B-SFT 98.9% 95.4% +3.5%p +Qwen2.5-VL-3B-Instruct 75.5% 55.4% +20.1%p +Qwen2.5-VL-3B-Instruct-data_scale_exp_80k 69.7% 60.0% +9.7%p +Qwen2.5-VL-3B-Instruct-data_scale_exp_400k 65.8% 58.5% +7.4%p +Qwen2.5-VL-3B-Instruct-data_scale_exp_800k 61.2% 58.5% +2.7%p +Qwen2.5-VL-3B-Instruct-data_scale_exp_2m 62.0% 53.8% +8.1%p +Qwen3-VL-235B-A22B-Instruct 98.1% 90.8% +7.3%p diff --git a/counter_consistent_results_embspatial.txt b/counter_consistent_results_embspatial.txt new file mode 100644 index 0000000000000000000000000000000000000000..4558db853fbcc93145da5702e94699d376dd5b91 --- /dev/null +++ b/counter_consistent_results_embspatial.txt @@ -0,0 +1,380 @@ + +====================================================================== +Model: molmo-7B-O-0924 +====================================================================== + +Category Type Correct Total Accuracy +------------------------------------------------------ +far consistent 326 483 67.5% +far counter 16 61 26.2% +far ambiguous 24 50 48.0% +close consistent 294 493 59.6% +close counter 29 68 42.6% +close ambiguous 22 51 43.1% +------------------------------------------------------ +TOTAL consistent 620 976 63.5% +TOTAL counter 45 129 34.9% + +Accuracy Gap (Consistent - Counter): 28.6%p + -> Larger gap indicates stronger reliance on the 2D heuristic + +🔍 Counter examples wrong: 84 / 129 + +====================================================================== +Model: molmo-7B-O-0924-data_scale_exp_80k +====================================================================== + +Category Type Correct Total Accuracy +------------------------------------------------------ +far consistent 269 483 55.7% +far counter 19 61 31.1% +far ambiguous 21 50 42.0% +close consistent 322 493 65.3% +close counter 19 68 27.9% +close ambiguous 16 51 31.4% +------------------------------------------------------ +TOTAL consistent 591 976 60.6% +TOTAL counter 38 129 29.5% + +Accuracy Gap (Consistent - Counter): 31.1%p + -> Larger gap indicates stronger reliance on the 2D heuristic + +🔍 Counter examples wrong: 91 / 129 + +====================================================================== +Model: molmo-7B-O-0924-data_scale_exp_400k +====================================================================== + +Category Type Correct Total Accuracy +------------------------------------------------------ +far consistent 315 483 65.2% +far counter 15 61 24.6% +far ambiguous 19 50 38.0% +close consistent 297 493 60.2% +close counter 20 68 29.4% +close ambiguous 16 51 31.4% +------------------------------------------------------ +TOTAL consistent 612 976 62.7% +TOTAL counter 35 129 27.1% + +Accuracy Gap (Consistent - Counter): 35.6%p + -> Larger gap indicates stronger reliance on the 2D heuristic + +🔍 Counter examples wrong: 94 / 129 + +====================================================================== +Model: molmo-7B-O-0924-data_scale_exp_800k +====================================================================== + +Category Type Correct Total Accuracy +------------------------------------------------------ +far consistent 319 483 66.0% +far counter 22 61 36.1% +far ambiguous 19 50 38.0% +close consistent 317 493 64.3% +close counter 22 68 32.4% +close ambiguous 23 51 45.1% +------------------------------------------------------ +TOTAL consistent 636 976 65.2% +TOTAL counter 44 129 34.1% + +Accuracy Gap (Consistent - Counter): 31.1%p + -> Larger gap indicates stronger reliance on the 2D heuristic + +🔍 Counter examples wrong: 85 / 129 + +====================================================================== +Model: molmo-7B-O-0924-data_scale_exp_2m +====================================================================== + +Category Type Correct Total Accuracy +------------------------------------------------------ +far consistent 312 483 64.6% +far counter 18 61 29.5% +far ambiguous 20 50 40.0% +close consistent 325 493 65.9% +close counter 33 68 48.5% +close ambiguous 24 51 47.1% +------------------------------------------------------ +TOTAL consistent 637 976 65.3% +TOTAL counter 51 129 39.5% + +Accuracy Gap (Consistent - Counter): 25.7%p + -> Larger gap indicates stronger reliance on the 2D heuristic + +🔍 Counter examples wrong: 78 / 129 + +====================================================================== +Model: NVILA-Lite-2B +====================================================================== + +Category Type Correct Total Accuracy +------------------------------------------------------ +far consistent 73 483 15.1% +far counter 3 61 4.9% +far ambiguous 5 50 10.0% +close consistent 76 493 15.4% +close counter 7 68 10.3% +close ambiguous 9 51 17.6% +------------------------------------------------------ +TOTAL consistent 149 976 15.3% +TOTAL counter 10 129 7.8% + +Accuracy Gap (Consistent - Counter): 7.5%p + -> Larger gap indicates stronger reliance on the 2D heuristic + +🔍 Counter examples wrong: 119 / 129 + +====================================================================== +Model: NVILA-Lite-2B-data-scale-exp-80k +====================================================================== + +Category Type Correct Total Accuracy +------------------------------------------------------ +far consistent 317 483 65.6% +far counter 2 61 3.3% +far ambiguous 11 50 22.0% +close consistent 246 493 49.9% +close counter 18 68 26.5% +close ambiguous 15 51 29.4% +------------------------------------------------------ +TOTAL consistent 563 976 57.7% +TOTAL counter 20 129 15.5% + +Accuracy Gap (Consistent - Counter): 42.2%p + -> Larger gap indicates stronger reliance on the 2D heuristic + +🔍 Counter examples wrong: 109 / 129 + +====================================================================== +Model: NVILA-Lite-2B-data-scale-exp-400k +====================================================================== + +Category Type Correct Total Accuracy +------------------------------------------------------ +far consistent 319 483 66.0% +far counter 12 61 19.7% +far ambiguous 18 50 36.0% +close consistent 277 493 56.2% +close counter 32 68 47.1% +close ambiguous 20 51 39.2% +------------------------------------------------------ +TOTAL consistent 596 976 61.1% +TOTAL counter 44 129 34.1% + +Accuracy Gap (Consistent - Counter): 27.0%p + -> Larger gap indicates stronger reliance on the 2D heuristic + +🔍 Counter examples wrong: 85 / 129 + +====================================================================== +Model: NVILA-Lite-2B-data-scale-exp-800k +====================================================================== + +Category Type Correct Total Accuracy +------------------------------------------------------ +far consistent 335 483 69.4% +far counter 17 61 27.9% +far ambiguous 20 50 40.0% +close consistent 282 493 57.2% +close counter 33 68 48.5% +close ambiguous 15 51 29.4% +------------------------------------------------------ +TOTAL consistent 617 976 63.2% +TOTAL counter 50 129 38.8% + +Accuracy Gap (Consistent - Counter): 24.5%p + -> Larger gap indicates stronger reliance on the 2D heuristic + +🔍 Counter examples wrong: 79 / 129 + +====================================================================== +Model: NVILA-Lite-2B-data-scale-exp-2m +====================================================================== + +Category Type Correct Total Accuracy +------------------------------------------------------ +far consistent 324 483 67.1% +far counter 19 61 31.1% +far ambiguous 21 50 42.0% +close consistent 268 493 54.4% +close counter 34 68 50.0% +close ambiguous 20 51 39.2% +------------------------------------------------------ +TOTAL consistent 592 976 60.7% +TOTAL counter 53 129 41.1% + +Accuracy Gap (Consistent - Counter): 19.6%p + -> Larger gap indicates stronger reliance on the 2D heuristic + +🔍 Counter examples wrong: 76 / 129 + +====================================================================== +Model: RoboRefer-2B-SFT +====================================================================== + +Category Type Correct Total Accuracy +------------------------------------------------------ +far consistent 422 483 87.4% +far counter 28 61 45.9% +far ambiguous 34 50 68.0% +close consistent 427 493 86.6% +close counter 49 68 72.1% +close ambiguous 37 51 72.5% +------------------------------------------------------ +TOTAL consistent 849 976 87.0% +TOTAL counter 77 129 59.7% + +Accuracy Gap (Consistent - Counter): 27.3%p + -> Larger gap indicates stronger reliance on the 2D heuristic + +🔍 Counter examples wrong: 52 / 129 + +====================================================================== +Model: Qwen2.5-VL-3B-Instruct +====================================================================== + +Category Type Correct Total Accuracy +------------------------------------------------------ +far consistent 274 483 56.7% +far counter 15 61 24.6% +far ambiguous 16 50 32.0% +close consistent 260 493 52.7% +close counter 27 68 39.7% +close ambiguous 17 51 33.3% +------------------------------------------------------ +TOTAL consistent 534 976 54.7% +TOTAL counter 42 129 32.6% + +Accuracy Gap (Consistent - Counter): 22.2%p + -> Larger gap indicates stronger reliance on the 2D heuristic + +🔍 Counter examples wrong: 87 / 129 + +====================================================================== +Model: Qwen2.5-VL-3B-Instruct-data_scale_exp_80k +====================================================================== + +Category Type Correct Total Accuracy +------------------------------------------------------ +far consistent 267 483 55.3% +far counter 15 61 24.6% +far ambiguous 13 50 26.0% +close consistent 227 493 46.0% +close counter 24 68 35.3% +close ambiguous 18 51 35.3% +------------------------------------------------------ +TOTAL consistent 494 976 50.6% +TOTAL counter 39 129 30.2% + +Accuracy Gap (Consistent - Counter): 20.4%p + -> Larger gap indicates stronger reliance on the 2D heuristic + +🔍 Counter examples wrong: 90 / 129 + +====================================================================== +Model: Qwen2.5-VL-3B-Instruct-data_scale_exp_400k +====================================================================== + +Category Type Correct Total Accuracy +------------------------------------------------------ +far consistent 275 483 56.9% +far counter 13 61 21.3% +far ambiguous 17 50 34.0% +close consistent 238 493 48.3% +close counter 22 68 32.4% +close ambiguous 17 51 33.3% +------------------------------------------------------ +TOTAL consistent 513 976 52.6% +TOTAL counter 35 129 27.1% + +Accuracy Gap (Consistent - Counter): 25.4%p + -> Larger gap indicates stronger reliance on the 2D heuristic + +🔍 Counter examples wrong: 94 / 129 + +====================================================================== +Model: Qwen2.5-VL-3B-Instruct-data_scale_exp_800k +====================================================================== + +Category Type Correct Total Accuracy +------------------------------------------------------ +far consistent 297 483 61.5% +far counter 12 61 19.7% +far ambiguous 16 50 32.0% +close consistent 248 493 50.3% +close counter 22 68 32.4% +close ambiguous 15 51 29.4% +------------------------------------------------------ +TOTAL consistent 545 976 55.8% +TOTAL counter 34 129 26.4% + +Accuracy Gap (Consistent - Counter): 29.5%p + -> Larger gap indicates stronger reliance on the 2D heuristic + +🔍 Counter examples wrong: 95 / 129 + +====================================================================== +Model: Qwen2.5-VL-3B-Instruct-data_scale_exp_2m +====================================================================== + +Category Type Correct Total Accuracy +------------------------------------------------------ +far consistent 313 483 64.8% +far counter 6 61 9.8% +far ambiguous 14 50 28.0% +close consistent 281 493 57.0% +close counter 25 68 36.8% +close ambiguous 19 51 37.3% +------------------------------------------------------ +TOTAL consistent 594 976 60.9% +TOTAL counter 31 129 24.0% + +Accuracy Gap (Consistent - Counter): 36.8%p + -> Larger gap indicates stronger reliance on the 2D heuristic + +🔍 Counter examples wrong: 98 / 129 + +====================================================================== +Model: Qwen3-VL-235B-A22B-Instruct +====================================================================== + +Category Type Correct Total Accuracy +------------------------------------------------------ +far consistent 325 483 67.3% +far counter 22 61 36.1% +far ambiguous 22 50 44.0% +close consistent 363 493 73.6% +close counter 29 68 42.6% +close ambiguous 27 51 52.9% +------------------------------------------------------ +TOTAL consistent 688 976 70.5% +TOTAL counter 51 129 39.5% + +Accuracy Gap (Consistent - Counter): 31.0%p + -> Larger gap indicates stronger reliance on the 2D heuristic + +🔍 Counter examples wrong: 78 / 129 + +============================================================================== +MODEL COMPARISON +============================================================================== +Model Consistent Counter Gap +------------------------------------------------------------------------------ +molmo-7B-O-0924 63.5% 34.9% +28.6%p +molmo-7B-O-0924-data_scale_exp_80k 60.6% 29.5% +31.1%p +molmo-7B-O-0924-data_scale_exp_400k 62.7% 27.1% +35.6%p +molmo-7B-O-0924-data_scale_exp_800k 65.2% 34.1% +31.1%p +molmo-7B-O-0924-data_scale_exp_2m 65.3% 39.5% +25.7%p +NVILA-Lite-2B 15.3% 7.8% +7.5%p +NVILA-Lite-2B-data-scale-exp-80k 57.7% 15.5% +42.2%p +NVILA-Lite-2B-data-scale-exp-400k 61.1% 34.1% +27.0%p +NVILA-Lite-2B-data-scale-exp-800k 63.2% 38.8% +24.5%p +NVILA-Lite-2B-data-scale-exp-2m 60.7% 41.1% +19.6%p +RoboRefer-2B-SFT 87.0% 59.7% +27.3%p +Qwen2.5-VL-3B-Instruct 54.7% 32.6% +22.2%p +Qwen2.5-VL-3B-Instruct-data_scale_exp_80k 50.6% 30.2% +20.4%p +Qwen2.5-VL-3B-Instruct-data_scale_exp_400k 52.6% 27.1% +25.4%p +Qwen2.5-VL-3B-Instruct-data_scale_exp_800k 55.8% 26.4% +29.5%p +Qwen2.5-VL-3B-Instruct-data_scale_exp_2m 60.9% 24.0% +36.8%p +Qwen3-VL-235B-A22B-Instruct 70.5% 39.5% +31.0%p diff --git a/counter_consistent_results_embspatial_all.txt b/counter_consistent_results_embspatial_all.txt new file mode 100644 index 0000000000000000000000000000000000000000..21bafaeba9163f62b81a33876b621364abab9de0 --- /dev/null +++ b/counter_consistent_results_embspatial_all.txt @@ -0,0 +1,446 @@ + +====================================================================== +Model: molmo-7B-O-0924 +====================================================================== + +Category Type Correct Total Accuracy +------------------------------------------------------ +far consistent 326 483 67.5% +far counter 16 61 26.2% +far ambiguous 24 50 48.0% +close consistent 294 493 59.6% +close counter 29 68 42.6% +close ambiguous 22 51 43.1% +------------------------------------------------------ +TOTAL consistent 620 976 63.5% +TOTAL counter 45 129 34.9% + +Accuracy Gap (Consistent - Counter): 28.6%p + -> Larger gap indicates stronger reliance on the 2D heuristic + +🔍 Counter examples wrong: 84 / 129 + +====================================================================== +Model: molmo-7B-O-0924-data_scale_exp_80k +====================================================================== + +Category Type Correct Total Accuracy +------------------------------------------------------ +far consistent 269 483 55.7% +far counter 19 61 31.1% +far ambiguous 21 50 42.0% +close consistent 322 493 65.3% +close counter 19 68 27.9% +close ambiguous 16 51 31.4% +------------------------------------------------------ +TOTAL consistent 591 976 60.6% +TOTAL counter 38 129 29.5% + +Accuracy Gap (Consistent - Counter): 31.1%p + -> Larger gap indicates stronger reliance on the 2D heuristic + +🔍 Counter examples wrong: 91 / 129 + +====================================================================== +Model: molmo-7B-O-0924-data_scale_exp_400k +====================================================================== + +Category Type Correct Total Accuracy +------------------------------------------------------ +far consistent 315 483 65.2% +far counter 15 61 24.6% +far ambiguous 19 50 38.0% +close consistent 297 493 60.2% +close counter 20 68 29.4% +close ambiguous 16 51 31.4% +------------------------------------------------------ +TOTAL consistent 612 976 62.7% +TOTAL counter 35 129 27.1% + +Accuracy Gap (Consistent - Counter): 35.6%p + -> Larger gap indicates stronger reliance on the 2D heuristic + +🔍 Counter examples wrong: 94 / 129 + +====================================================================== +Model: molmo-7B-O-0924-data_scale_exp_800k +====================================================================== + +Category Type Correct Total Accuracy +------------------------------------------------------ +far consistent 319 483 66.0% +far counter 22 61 36.1% +far ambiguous 19 50 38.0% +close consistent 317 493 64.3% +close counter 22 68 32.4% +close ambiguous 23 51 45.1% +------------------------------------------------------ +TOTAL consistent 636 976 65.2% +TOTAL counter 44 129 34.1% + +Accuracy Gap (Consistent - Counter): 31.1%p + -> Larger gap indicates stronger reliance on the 2D heuristic + +🔍 Counter examples wrong: 85 / 129 + +====================================================================== +Model: molmo-7B-O-0924-data_scale_exp_2m +====================================================================== + +Category Type Correct Total Accuracy +------------------------------------------------------ +far consistent 312 483 64.6% +far counter 18 61 29.5% +far ambiguous 20 50 40.0% +close consistent 325 493 65.9% +close counter 33 68 48.5% +close ambiguous 24 51 47.1% +------------------------------------------------------ +TOTAL consistent 637 976 65.3% +TOTAL counter 51 129 39.5% + +Accuracy Gap (Consistent - Counter): 25.7%p + -> Larger gap indicates stronger reliance on the 2D heuristic + +🔍 Counter examples wrong: 78 / 129 + +====================================================================== +Model: NVILA-Lite-2B +====================================================================== + +Category Type Correct Total Accuracy +------------------------------------------------------ +far consistent 242 483 50.1% +far counter 15 61 24.6% +far ambiguous 14 50 28.0% +close consistent 236 493 47.9% +close counter 20 68 29.4% +close ambiguous 20 51 39.2% +------------------------------------------------------ +TOTAL consistent 478 976 49.0% +TOTAL counter 35 129 27.1% + +Accuracy Gap (Consistent - Counter): 21.8%p + -> Larger gap indicates stronger reliance on the 2D heuristic + +🔍 Counter examples wrong: 94 / 129 + +====================================================================== +Model: NVILA-Lite-2B-data-scale-exp-80k +====================================================================== + +Category Type Correct Total Accuracy +------------------------------------------------------ +far consistent 317 483 65.6% +far counter 2 61 3.3% +far ambiguous 11 50 22.0% +close consistent 246 493 49.9% +close counter 18 68 26.5% +close ambiguous 15 51 29.4% +------------------------------------------------------ +TOTAL consistent 563 976 57.7% +TOTAL counter 20 129 15.5% + +Accuracy Gap (Consistent - Counter): 42.2%p + -> Larger gap indicates stronger reliance on the 2D heuristic + +🔍 Counter examples wrong: 109 / 129 + +====================================================================== +Model: NVILA-Lite-2B-data-scale-exp-400k +====================================================================== + +Category Type Correct Total Accuracy +------------------------------------------------------ +far consistent 319 483 66.0% +far counter 12 61 19.7% +far ambiguous 18 50 36.0% +close consistent 277 493 56.2% +close counter 32 68 47.1% +close ambiguous 20 51 39.2% +------------------------------------------------------ +TOTAL consistent 596 976 61.1% +TOTAL counter 44 129 34.1% + +Accuracy Gap (Consistent - Counter): 27.0%p + -> Larger gap indicates stronger reliance on the 2D heuristic + +🔍 Counter examples wrong: 85 / 129 + +====================================================================== +Model: NVILA-Lite-2B-data-scale-exp-800k +====================================================================== + +Category Type Correct Total Accuracy +------------------------------------------------------ +far consistent 335 483 69.4% +far counter 17 61 27.9% +far ambiguous 20 50 40.0% +close consistent 282 493 57.2% +close counter 33 68 48.5% +close ambiguous 15 51 29.4% +------------------------------------------------------ +TOTAL consistent 617 976 63.2% +TOTAL counter 50 129 38.8% + +Accuracy Gap (Consistent - Counter): 24.5%p + -> Larger gap indicates stronger reliance on the 2D heuristic + +🔍 Counter examples wrong: 79 / 129 + +====================================================================== +Model: NVILA-Lite-2B-data-scale-exp-2m +====================================================================== + +Category Type Correct Total Accuracy +------------------------------------------------------ +far consistent 324 483 67.1% +far counter 19 61 31.1% +far ambiguous 21 50 42.0% +close consistent 268 493 54.4% +close counter 34 68 50.0% +close ambiguous 20 51 39.2% +------------------------------------------------------ +TOTAL consistent 592 976 60.7% +TOTAL counter 53 129 41.1% + +Accuracy Gap (Consistent - Counter): 19.6%p + -> Larger gap indicates stronger reliance on the 2D heuristic + +🔍 Counter examples wrong: 76 / 129 + +====================================================================== +Model: NVILA-Lite-2B-ST-80k-5pct +====================================================================== + +Category Type Correct Total Accuracy +------------------------------------------------------ +far consistent 307 483 63.6% +far counter 5 61 8.2% +far ambiguous 14 50 28.0% +close consistent 226 493 45.8% +close counter 16 68 23.5% +close ambiguous 14 51 27.5% +------------------------------------------------------ +TOTAL consistent 533 976 54.6% +TOTAL counter 21 129 16.3% + +Accuracy Gap (Consistent - Counter): 38.3%p + -> Larger gap indicates stronger reliance on the 2D heuristic + +🔍 Counter examples wrong: 108 / 129 + +====================================================================== +Model: NVILA-Lite-2B-ST-400k-5pct +====================================================================== + +Category Type Correct Total Accuracy +------------------------------------------------------ +far consistent 308 483 63.8% +far counter 3 61 4.9% +far ambiguous 14 50 28.0% +close consistent 202 493 41.0% +close counter 34 68 50.0% +close ambiguous 22 51 43.1% +------------------------------------------------------ +TOTAL consistent 510 976 52.3% +TOTAL counter 37 129 28.7% + +Accuracy Gap (Consistent - Counter): 23.6%p + -> Larger gap indicates stronger reliance on the 2D heuristic + +🔍 Counter examples wrong: 92 / 129 + +====================================================================== +Model: NVILA-Lite-2B-ST-800k-5pct +====================================================================== + +Category Type Correct Total Accuracy +------------------------------------------------------ +far consistent 318 483 65.8% +far counter 17 61 27.9% +far ambiguous 22 50 44.0% +close consistent 225 493 45.6% +close counter 34 68 50.0% +close ambiguous 17 51 33.3% +------------------------------------------------------ +TOTAL consistent 543 976 55.6% +TOTAL counter 51 129 39.5% + +Accuracy Gap (Consistent - Counter): 16.1%p + -> Larger gap indicates stronger reliance on the 2D heuristic + +🔍 Counter examples wrong: 78 / 129 + +====================================================================== +Model: RoboRefer-2B-SFT +====================================================================== + +Category Type Correct Total Accuracy +------------------------------------------------------ +far consistent 422 483 87.4% +far counter 28 61 45.9% +far ambiguous 34 50 68.0% +close consistent 427 493 86.6% +close counter 49 68 72.1% +close ambiguous 37 51 72.5% +------------------------------------------------------ +TOTAL consistent 849 976 87.0% +TOTAL counter 77 129 59.7% + +Accuracy Gap (Consistent - Counter): 27.3%p + -> Larger gap indicates stronger reliance on the 2D heuristic + +🔍 Counter examples wrong: 52 / 129 + +====================================================================== +Model: Qwen2.5-VL-3B-Instruct +====================================================================== + +Category Type Correct Total Accuracy +------------------------------------------------------ +far consistent 274 483 56.7% +far counter 15 61 24.6% +far ambiguous 16 50 32.0% +close consistent 260 493 52.7% +close counter 27 68 39.7% +close ambiguous 17 51 33.3% +------------------------------------------------------ +TOTAL consistent 534 976 54.7% +TOTAL counter 42 129 32.6% + +Accuracy Gap (Consistent - Counter): 22.2%p + -> Larger gap indicates stronger reliance on the 2D heuristic + +🔍 Counter examples wrong: 87 / 129 + +====================================================================== +Model: Qwen2.5-VL-3B-Instruct-data_scale_exp_80k +====================================================================== + +Category Type Correct Total Accuracy +------------------------------------------------------ +far consistent 267 483 55.3% +far counter 15 61 24.6% +far ambiguous 13 50 26.0% +close consistent 227 493 46.0% +close counter 24 68 35.3% +close ambiguous 18 51 35.3% +------------------------------------------------------ +TOTAL consistent 494 976 50.6% +TOTAL counter 39 129 30.2% + +Accuracy Gap (Consistent - Counter): 20.4%p + -> Larger gap indicates stronger reliance on the 2D heuristic + +🔍 Counter examples wrong: 90 / 129 + +====================================================================== +Model: Qwen2.5-VL-3B-Instruct-data_scale_exp_400k +====================================================================== + +Category Type Correct Total Accuracy +------------------------------------------------------ +far consistent 275 483 56.9% +far counter 13 61 21.3% +far ambiguous 17 50 34.0% +close consistent 238 493 48.3% +close counter 22 68 32.4% +close ambiguous 17 51 33.3% +------------------------------------------------------ +TOTAL consistent 513 976 52.6% +TOTAL counter 35 129 27.1% + +Accuracy Gap (Consistent - Counter): 25.4%p + -> Larger gap indicates stronger reliance on the 2D heuristic + +🔍 Counter examples wrong: 94 / 129 + +====================================================================== +Model: Qwen2.5-VL-3B-Instruct-data_scale_exp_800k +====================================================================== + +Category Type Correct Total Accuracy +------------------------------------------------------ +far consistent 297 483 61.5% +far counter 12 61 19.7% +far ambiguous 16 50 32.0% +close consistent 248 493 50.3% +close counter 22 68 32.4% +close ambiguous 15 51 29.4% +------------------------------------------------------ +TOTAL consistent 545 976 55.8% +TOTAL counter 34 129 26.4% + +Accuracy Gap (Consistent - Counter): 29.5%p + -> Larger gap indicates stronger reliance on the 2D heuristic + +🔍 Counter examples wrong: 95 / 129 + +====================================================================== +Model: Qwen2.5-VL-3B-Instruct-data_scale_exp_2m +====================================================================== + +Category Type Correct Total Accuracy +------------------------------------------------------ +far consistent 313 483 64.8% +far counter 6 61 9.8% +far ambiguous 14 50 28.0% +close consistent 281 493 57.0% +close counter 25 68 36.8% +close ambiguous 19 51 37.3% +------------------------------------------------------ +TOTAL consistent 594 976 60.9% +TOTAL counter 31 129 24.0% + +Accuracy Gap (Consistent - Counter): 36.8%p + -> Larger gap indicates stronger reliance on the 2D heuristic + +🔍 Counter examples wrong: 98 / 129 + +====================================================================== +Model: Qwen3-VL-235B-A22B-Instruct +====================================================================== + +Category Type Correct Total Accuracy +------------------------------------------------------ +far consistent 325 483 67.3% +far counter 22 61 36.1% +far ambiguous 22 50 44.0% +close consistent 363 493 73.6% +close counter 29 68 42.6% +close ambiguous 27 51 52.9% +------------------------------------------------------ +TOTAL consistent 688 976 70.5% +TOTAL counter 51 129 39.5% + +Accuracy Gap (Consistent - Counter): 31.0%p + -> Larger gap indicates stronger reliance on the 2D heuristic + +🔍 Counter examples wrong: 78 / 129 + +============================================================================== +MODEL COMPARISON +============================================================================== +Model Consistent Counter Gap +------------------------------------------------------------------------------ +molmo-7B-O-0924 63.5% 34.9% +28.6%p +molmo-7B-O-0924-data_scale_exp_80k 60.6% 29.5% +31.1%p +molmo-7B-O-0924-data_scale_exp_400k 62.7% 27.1% +35.6%p +molmo-7B-O-0924-data_scale_exp_800k 65.2% 34.1% +31.1%p +molmo-7B-O-0924-data_scale_exp_2m 65.3% 39.5% +25.7%p +NVILA-Lite-2B 49.0% 27.1% +21.8%p +NVILA-Lite-2B-data-scale-exp-80k 57.7% 15.5% +42.2%p +NVILA-Lite-2B-data-scale-exp-400k 61.1% 34.1% +27.0%p +NVILA-Lite-2B-data-scale-exp-800k 63.2% 38.8% +24.5%p +NVILA-Lite-2B-data-scale-exp-2m 60.7% 41.1% +19.6%p +NVILA-Lite-2B-ST-80k-5pct 54.6% 16.3% +38.3%p +NVILA-Lite-2B-ST-400k-5pct 52.3% 28.7% +23.6%p +NVILA-Lite-2B-ST-800k-5pct 55.6% 39.5% +16.1%p +RoboRefer-2B-SFT 87.0% 59.7% +27.3%p +Qwen2.5-VL-3B-Instruct 54.7% 32.6% +22.2%p +Qwen2.5-VL-3B-Instruct-data_scale_exp_80k 50.6% 30.2% +20.4%p +Qwen2.5-VL-3B-Instruct-data_scale_exp_400k 52.6% 27.1% +25.4%p +Qwen2.5-VL-3B-Instruct-data_scale_exp_800k 55.8% 26.4% +29.5%p +Qwen2.5-VL-3B-Instruct-data_scale_exp_2m 60.9% 24.0% +36.8%p +Qwen3-VL-235B-A22B-Instruct 70.5% 39.5% +31.0%p diff --git a/embspatial_classify_cache.json b/embspatial_classify_cache.json new file mode 100644 index 0000000000000000000000000000000000000000..e0e0e30553dcc29d251cc8877bc2013d78afaa97 --- /dev/null +++ b/embspatial_classify_cache.json @@ -0,0 +1,45322 @@ +{ + "mp3d_0": { + "classification": "consistent", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "basket", + "gt_center_y": 427.0, + "other_avg_y": 318.1666666666667, + "y_diff": 108.83333333333331, + "threshold": 24.0, + "all_objects": [ + [ + "table", + 322.0 + ], + [ + "towel", + 384.5 + ], + [ + "door", + 248.0 + ], + [ + "basket", + 427.0 + ] + ] + } + }, + "mp3d_1": { + "classification": "consistent", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "pillow", + "gt_center_y": 390.0, + "other_avg_y": 191.0, + "y_diff": 199.0, + "threshold": 24.0, + "all_objects": [ + [ + "fireplace", + 228.0 + ], + [ + "pool table", + 317.5 + ], + [ + "railing", + 27.5 + ], + [ + "pillow", + 390.0 + ] + ] + } + }, + "mp3d_2": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_3": { + "classification": "consistent", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "headboard", + "gt_center_y": 310.0, + "other_avg_y": 277.6666666666667, + "y_diff": 32.333333333333314, + "threshold": 24.0, + "all_objects": [ + [ + "night stand", + 385.5 + ], + [ + "window", + 201.0 + ], + [ + "headboard", + 310.0 + ], + [ + "mirror", + 246.5 + ] + ] + } + }, + "mp3d_4": { + "classification": "ambiguous", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "sheet", + "gt_center_y": 302.0, + "other_avg_y": 303.0, + "y_diff": -1.0, + "threshold": 24.0, + "all_objects": [ + [ + "sheet", + 302.0 + ], + [ + "cabinet", + 342.0 + ], + [ + "chimney", + 207.5 + ], + [ + "fireplace", + 359.5 + ] + ] + } + }, + "mp3d_5": { + "classification": "consistent", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "stairs", + "gt_center_y": 325.0, + "other_avg_y": 96.33333333333333, + "y_diff": 228.66666666666669, + "threshold": 24.0, + "all_objects": [ + [ + "banister", + 56.0 + ], + [ + "chest", + 90.5 + ], + [ + "table", + 142.5 + ], + [ + "stairs", + 325.0 + ] + ] + } + }, + "mp3d_6": { + "classification": "consistent", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "cabinet", + "gt_center_y": 267.0, + "other_avg_y": 358.0, + "y_diff": -91.0, + "threshold": 24.0, + "all_objects": [ + [ + "plant", + 285.0 + ], + [ + "pillow", + 356.0 + ], + [ + "cabinet", + 267.0 + ], + [ + "table", + 433.0 + ] + ] + } + }, + "mp3d_7": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_8": { + "classification": "consistent", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "window", + "gt_center_y": 232.5, + "other_avg_y": 369.5, + "y_diff": -137.0, + "threshold": 24.0, + "all_objects": [ + [ + "chair", + 377.0 + ], + [ + "plant", + 285.5 + ], + [ + "window", + 232.5 + ], + [ + "tv stand", + 446.0 + ] + ] + } + }, + "mp3d_9": { + "classification": "consistent", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "curtain", + "gt_center_y": 250.0, + "other_avg_y": 444.3333333333333, + "y_diff": -194.33333333333331, + "threshold": 24.0, + "all_objects": [ + [ + "doll", + 453.5 + ], + [ + "curtain", + 250.0 + ], + [ + "plant", + 444.5 + ], + [ + "bench", + 435.0 + ] + ] + } + }, + "mp3d_10": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_11": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_12": { + "classification": "consistent", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "coffee table", + "gt_center_y": 441.0, + "other_avg_y": 299.1666666666667, + "y_diff": 141.83333333333331, + "threshold": 24.0, + "all_objects": [ + [ + "sofa", + 384.0 + ], + [ + "lamp", + 278.0 + ], + [ + "picture", + 235.5 + ], + [ + "coffee table", + 441.0 + ] + ] + } + }, + "mp3d_13": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_14": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_15": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_16": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_17": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_18": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_19": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_20": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_21": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_22": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_23": { + "classification": "counter", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "chair", + "gt_center_y": 338.5, + "other_avg_y": 225.5, + "y_diff": 113.0, + "threshold": 24.0, + "all_objects": [ + [ + "lamp", + 86.0 + ], + [ + "microwave", + 243.5 + ], + [ + "chair", + 338.5 + ], + [ + "pot", + 347.0 + ] + ] + } + }, + "mp3d_24": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_25": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_26": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_27": { + "classification": "consistent", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "plant", + "gt_center_y": 368.0, + "other_avg_y": 274.6666666666667, + "y_diff": 93.33333333333331, + "threshold": 24.0, + "all_objects": [ + [ + "oven", + 256.5 + ], + [ + "plant", + 368.0 + ], + [ + "window", + 254.0 + ], + [ + "pillow", + 313.5 + ] + ] + } + }, + "mp3d_28": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_29": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_30": { + "classification": "consistent", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "oven", + "gt_center_y": 269.5, + "other_avg_y": 352.5, + "y_diff": -83.0, + "threshold": 24.0, + "all_objects": [ + [ + "curtain", + 240.0 + ], + [ + "sofa", + 440.0 + ], + [ + "oven", + 269.5 + ], + [ + "kitchen island", + 377.5 + ] + ] + } + }, + "mp3d_31": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_32": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_33": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_34": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_35": { + "classification": "counter", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "picture", + "gt_center_y": 236.5, + "other_avg_y": 359.8333333333333, + "y_diff": -123.33333333333331, + "threshold": 24.0, + "all_objects": [ + [ + "shelves", + 421.5 + ], + [ + "cabinet", + 377.5 + ], + [ + "case", + 280.5 + ], + [ + "picture", + 236.5 + ] + ] + } + }, + "mp3d_36": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_37": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_38": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_39": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_40": { + "classification": "counter", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "chair", + "gt_center_y": 359.0, + "other_avg_y": 323.5, + "y_diff": 35.5, + "threshold": 24.0, + "all_objects": [ + [ + "fireplace", + 356.0 + ], + [ + "chair", + 359.0 + ], + [ + "television", + 183.5 + ], + [ + "rug", + 431.0 + ] + ] + } + }, + "mp3d_41": { + "classification": "consistent", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "counter", + "gt_center_y": 451.5, + "other_avg_y": 287.8333333333333, + "y_diff": 163.66666666666669, + "threshold": 24.0, + "all_objects": [ + [ + "mirror", + 220.5 + ], + [ + "tissue box", + 432.0 + ], + [ + "counter", + 451.5 + ], + [ + "clock", + 211.0 + ] + ] + } + }, + "mp3d_42": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_43": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_44": { + "classification": "consistent", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "oven", + "gt_center_y": 271.0, + "other_avg_y": 351.0, + "y_diff": -80.0, + "threshold": 24.0, + "all_objects": [ + [ + "pillow", + 368.5 + ], + [ + "sofa", + 416.0 + ], + [ + "curtain", + 268.5 + ], + [ + "oven", + 271.0 + ] + ] + } + }, + "mp3d_45": { + "classification": "consistent", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "window", + "gt_center_y": 231.0, + "other_avg_y": 293.0, + "y_diff": -62.0, + "threshold": 24.0, + "all_objects": [ + [ + "stove", + 360.5 + ], + [ + "jar", + 433.5 + ], + [ + "range hood", + 85.0 + ], + [ + "window", + 231.0 + ] + ] + } + }, + "mp3d_46": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_47": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_48": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_49": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_50": { + "classification": "consistent", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "shelves", + "gt_center_y": 243.0, + "other_avg_y": 385.0, + "y_diff": -142.0, + "threshold": 24.0, + "all_objects": [ + [ + "table", + 286.5 + ], + [ + "rug", + 437.0 + ], + [ + "shelves", + 243.0 + ], + [ + "coffee table", + 431.5 + ] + ] + } + }, + "mp3d_51": { + "classification": "consistent", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "curtain", + "gt_center_y": 266.0, + "other_avg_y": 349.5, + "y_diff": -83.5, + "threshold": 24.0, + "all_objects": [ + [ + "bed", + 396.0 + ], + [ + "cabinet", + 412.5 + ], + [ + "curtain", + 266.0 + ], + [ + "mirror", + 240.0 + ] + ] + } + }, + "mp3d_52": { + "classification": "consistent", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "coffee table", + "gt_center_y": 336.5, + "other_avg_y": 386.6666666666667, + "y_diff": -50.166666666666686, + "threshold": 24.0, + "all_objects": [ + [ + "coffee table", + 336.5 + ], + [ + "bed", + 376.0 + ], + [ + "bench", + 420.0 + ], + [ + "fireplace", + 364.0 + ] + ] + } + }, + "mp3d_53": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_54": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_55": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_56": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_57": { + "classification": "consistent", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "table", + "gt_center_y": 438.0, + "other_avg_y": 255.83333333333334, + "y_diff": 182.16666666666666, + "threshold": 24.0, + "all_objects": [ + [ + "garage door", + 127.0 + ], + [ + "cabinet", + 292.5 + ], + [ + "table", + 438.0 + ], + [ + "cart", + 348.0 + ] + ] + } + }, + "mp3d_58": { + "classification": "consistent", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "window", + "gt_center_y": 270.5, + "other_avg_y": 380.1666666666667, + "y_diff": -109.66666666666669, + "threshold": 24.0, + "all_objects": [ + [ + "window", + 270.5 + ], + [ + "bed", + 371.5 + ], + [ + "chair", + 355.5 + ], + [ + "plant", + 413.5 + ] + ] + } + }, + "mp3d_59": { + "classification": "ambiguous", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "chair", + "gt_center_y": 421.5, + "other_avg_y": 429.5, + "y_diff": -8.0, + "threshold": 24.0, + "all_objects": [ + [ + "desk", + 425.0 + ], + [ + "bicycle", + 437.5 + ], + [ + "chair", + 421.5 + ], + [ + "doll", + 426.0 + ] + ] + } + }, + "mp3d_60": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_61": { + "classification": "consistent", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "towel", + "gt_center_y": 434.5, + "other_avg_y": 302.0, + "y_diff": 132.5, + "threshold": 24.0, + "all_objects": [ + [ + "coffee table", + 365.0 + ], + [ + "window", + 92.0 + ], + [ + "bucket", + 449.0 + ], + [ + "towel", + 434.5 + ] + ] + } + }, + "mp3d_62": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_63": { + "classification": "consistent", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "fireplace", + "gt_center_y": 238.0, + "other_avg_y": 196.16666666666666, + "y_diff": 41.83333333333334, + "threshold": 24.0, + "all_objects": [ + [ + "cabinet", + 253.5 + ], + [ + "window", + 231.0 + ], + [ + "fireplace", + 238.0 + ], + [ + "curtain", + 104.0 + ] + ] + } + }, + "mp3d_64": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_65": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_66": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_67": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_68": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_69": { + "classification": "consistent", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "pillow", + "gt_center_y": 364.0, + "other_avg_y": 269.5, + "y_diff": 94.5, + "threshold": 24.0, + "all_objects": [ + [ + "banister", + 253.0 + ], + [ + "shelves", + 319.5 + ], + [ + "pillow", + 364.0 + ], + [ + "plant", + 236.0 + ] + ] + } + }, + "mp3d_70": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_71": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_72": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_73": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_74": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_75": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_76": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_77": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_78": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_79": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_80": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_81": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_82": { + "classification": "consistent", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "sofa", + "gt_center_y": 356.5, + "other_avg_y": 208.83333333333334, + "y_diff": 147.66666666666666, + "threshold": 24.0, + "all_objects": [ + [ + "sofa", + 356.5 + ], + [ + "picture", + 152.0 + ], + [ + "cabinet", + 265.5 + ], + [ + "curtain", + 209.0 + ] + ] + } + }, + "mp3d_83": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_84": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_85": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_86": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_87": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_88": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_89": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_90": { + "classification": "consistent", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "window", + "gt_center_y": 258.5, + "other_avg_y": 347.8333333333333, + "y_diff": -89.33333333333331, + "threshold": 24.0, + "all_objects": [ + [ + "window", + 258.5 + ], + [ + "stand", + 373.5 + ], + [ + "picture", + 243.5 + ], + [ + "lamp", + 426.5 + ] + ] + } + }, + "mp3d_91": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_92": { + "classification": "ambiguous", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "pot", + "gt_center_y": 320.5, + "other_avg_y": 298.8333333333333, + "y_diff": 21.666666666666686, + "threshold": 24.0, + "all_objects": [ + [ + "pot", + 320.5 + ], + [ + "cabinet", + 290.5 + ], + [ + "plant", + 328.5 + ], + [ + "window", + 277.5 + ] + ] + } + }, + "mp3d_93": { + "classification": "consistent", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "window", + "gt_center_y": 236.0, + "other_avg_y": 298.1666666666667, + "y_diff": -62.166666666666686, + "threshold": 24.0, + "all_objects": [ + [ + "door", + 284.0 + ], + [ + "table", + 417.0 + ], + [ + "window", + 236.0 + ], + [ + "range hood", + 193.5 + ] + ] + } + }, + "mp3d_94": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_95": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_96": { + "classification": "consistent", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "banister", + "gt_center_y": 163.0, + "other_avg_y": 268.5, + "y_diff": -105.5, + "threshold": 24.0, + "all_objects": [ + [ + "chandelier", + 85.0 + ], + [ + "tray", + 432.0 + ], + [ + "door way", + 288.5 + ], + [ + "banister", + 163.0 + ] + ] + } + }, + "mp3d_97": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_98": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_99": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_100": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_101": { + "classification": "ambiguous", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "television", + "gt_center_y": 385.5, + "other_avg_y": 382.6666666666667, + "y_diff": 2.8333333333333144, + "threshold": 24.0, + "all_objects": [ + [ + "television", + 385.5 + ], + [ + "plant", + 324.5 + ], + [ + "sofa", + 398.0 + ], + [ + "chair", + 425.5 + ] + ] + } + }, + "mp3d_102": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_103": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_104": { + "classification": "consistent", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "mirror", + "gt_center_y": 251.5, + "other_avg_y": 310.3333333333333, + "y_diff": -58.833333333333314, + "threshold": 24.0, + "all_objects": [ + [ + "table", + 426.0 + ], + [ + "fan", + 70.0 + ], + [ + "chair", + 435.0 + ], + [ + "mirror", + 251.5 + ] + ] + } + }, + "mp3d_105": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_106": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_107": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_108": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_109": { + "classification": "consistent", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "table", + "gt_center_y": 372.0, + "other_avg_y": 131.5, + "y_diff": 240.5, + "threshold": 24.0, + "all_objects": [ + [ + "garage door", + 85.0 + ], + [ + "table", + 372.0 + ], + [ + "window", + 203.0 + ], + [ + "lamp", + 106.5 + ] + ] + } + }, + "mp3d_110": { + "classification": "consistent", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "door", + "gt_center_y": 269.5, + "other_avg_y": 299.5, + "y_diff": -30.0, + "threshold": 24.0, + "all_objects": [ + [ + "door", + 269.5 + ], + [ + "table", + 432.0 + ], + [ + "shelves", + 206.0 + ], + [ + "wine", + 260.5 + ] + ] + } + }, + "mp3d_111": { + "classification": "consistent", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "television", + "gt_center_y": 223.5, + "other_avg_y": 371.5, + "y_diff": -148.0, + "threshold": 24.0, + "all_objects": [ + [ + "person", + 389.5 + ], + [ + "bookshelf", + 372.5 + ], + [ + "television", + 223.5 + ], + [ + "sofa", + 352.5 + ] + ] + } + }, + "mp3d_112": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_113": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_114": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_115": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_116": { + "classification": "consistent", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "picture", + "gt_center_y": 249.5, + "other_avg_y": 373.0, + "y_diff": -123.5, + "threshold": 24.0, + "all_objects": [ + [ + "picture", + 249.5 + ], + [ + "counter", + 435.5 + ], + [ + "mirror", + 240.0 + ], + [ + "faucet", + 443.5 + ] + ] + } + }, + "mp3d_117": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_118": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_119": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_120": { + "classification": "ambiguous", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "cabinet", + "gt_center_y": 319.5, + "other_avg_y": 335.1666666666667, + "y_diff": -15.666666666666686, + "threshold": 24.0, + "all_objects": [ + [ + "lamp", + 344.0 + ], + [ + "bed", + 421.5 + ], + [ + "curtain", + 240.0 + ], + [ + "cabinet", + 319.5 + ] + ] + } + }, + "mp3d_121": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_122": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_123": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_124": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_125": { + "classification": "consistent", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "table", + "gt_center_y": 428.5, + "other_avg_y": 316.8333333333333, + "y_diff": 111.66666666666669, + "threshold": 24.0, + "all_objects": [ + [ + "table", + 428.5 + ], + [ + "door", + 267.5 + ], + [ + "candlestick", + 376.5 + ], + [ + "candle", + 306.5 + ] + ] + } + }, + "mp3d_126": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_127": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_128": { + "classification": "consistent", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "sofa", + "gt_center_y": 413.0, + "other_avg_y": 311.8333333333333, + "y_diff": 101.16666666666669, + "threshold": 24.0, + "all_objects": [ + [ + "glass", + 256.0 + ], + [ + "rug", + 422.5 + ], + [ + "sofa", + 413.0 + ], + [ + "plant", + 257.0 + ] + ] + } + }, + "mp3d_129": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_130": { + "classification": "consistent", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "plant", + "gt_center_y": 217.0, + "other_avg_y": 256.5, + "y_diff": -39.5, + "threshold": 24.0, + "all_objects": [ + [ + "picture", + 123.0 + ], + [ + "plant", + 217.0 + ], + [ + "fireplace", + 240.0 + ], + [ + "table", + 406.5 + ] + ] + } + }, + "mp3d_131": { + "classification": "consistent", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "chair", + "gt_center_y": 444.0, + "other_avg_y": 271.8333333333333, + "y_diff": 172.16666666666669, + "threshold": 24.0, + "all_objects": [ + [ + "chair", + 444.0 + ], + [ + "telephone", + 248.5 + ], + [ + "window", + 182.5 + ], + [ + "counter", + 384.5 + ] + ] + } + }, + "mp3d_132": { + "classification": "consistent", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "curtain", + "gt_center_y": 219.0, + "other_avg_y": 375.5, + "y_diff": -156.5, + "threshold": 24.0, + "all_objects": [ + [ + "stool", + 430.5 + ], + [ + "curtain", + 219.0 + ], + [ + "shelves", + 348.5 + ], + [ + "piano", + 347.5 + ] + ] + } + }, + "mp3d_133": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_134": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_135": { + "classification": "consistent", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "plant", + "gt_center_y": 261.5, + "other_avg_y": 428.5, + "y_diff": -167.0, + "threshold": 24.0, + "all_objects": [ + [ + "bin", + 445.5 + ], + [ + "table", + 432.0 + ], + [ + "plant", + 261.5 + ], + [ + "chair", + 408.0 + ] + ] + } + }, + "mp3d_136": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_137": { + "classification": "counter", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "lamp", + "gt_center_y": 192.0, + "other_avg_y": 307.6666666666667, + "y_diff": -115.66666666666669, + "threshold": 24.0, + "all_objects": [ + [ + "pot", + 349.5 + ], + [ + "lamp", + 192.0 + ], + [ + "toaster oven", + 309.0 + ], + [ + "wreathe", + 264.5 + ] + ] + } + }, + "mp3d_138": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_139": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_140": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_141": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_142": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_143": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_144": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_145": { + "classification": "consistent", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "window", + "gt_center_y": 228.5, + "other_avg_y": 435.5, + "y_diff": -207.0, + "threshold": 24.0, + "all_objects": [ + [ + "counter", + 452.5 + ], + [ + "jar", + 432.5 + ], + [ + "window", + 228.5 + ], + [ + "soap", + 421.5 + ] + ] + } + }, + "mp3d_146": { + "classification": "consistent", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "chair", + "gt_center_y": 330.5, + "other_avg_y": 404.1666666666667, + "y_diff": -73.66666666666669, + "threshold": 24.0, + "all_objects": [ + [ + "chair", + 330.5 + ], + [ + "stool", + 366.0 + ], + [ + "pillow", + 422.0 + ], + [ + "bed", + 424.5 + ] + ] + } + }, + "mp3d_147": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_148": { + "classification": "consistent", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "bookshelf", + "gt_center_y": 131.5, + "other_avg_y": 306.6666666666667, + "y_diff": -175.16666666666669, + "threshold": 24.0, + "all_objects": [ + [ + "computer", + 375.0 + ], + [ + "bookshelf", + 131.5 + ], + [ + "table", + 288.0 + ], + [ + "window", + 257.0 + ] + ] + } + }, + "mp3d_149": { + "classification": "consistent", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "plant", + "gt_center_y": 272.0, + "other_avg_y": 195.66666666666666, + "y_diff": 76.33333333333334, + "threshold": 24.0, + "all_objects": [ + [ + "railing", + 145.0 + ], + [ + "door", + 234.0 + ], + [ + "plant", + 272.0 + ], + [ + "curtain", + 208.0 + ] + ] + } + }, + "mp3d_150": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_151": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_152": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_153": { + "classification": "consistent", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "computer", + "gt_center_y": 345.5, + "other_avg_y": 377.0, + "y_diff": -31.5, + "threshold": 24.0, + "all_objects": [ + [ + "chair", + 435.5 + ], + [ + "globe", + 250.0 + ], + [ + "computer", + 345.5 + ], + [ + "table", + 445.5 + ] + ] + } + }, + "mp3d_154": { + "classification": "consistent", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "stool", + "gt_center_y": 443.0, + "other_avg_y": 189.66666666666666, + "y_diff": 253.33333333333334, + "threshold": 24.0, + "all_objects": [ + [ + "bar", + 391.0 + ], + [ + "pipe", + 49.5 + ], + [ + "stool", + 443.0 + ], + [ + "clock", + 128.5 + ] + ] + } + }, + "mp3d_155": { + "classification": "counter", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "fireplace", + "gt_center_y": 240.0, + "other_avg_y": 378.0, + "y_diff": -138.0, + "threshold": 24.0, + "all_objects": [ + [ + "sofa", + 384.0 + ], + [ + "plant", + 421.5 + ], + [ + "cabinet", + 328.5 + ], + [ + "fireplace", + 240.0 + ] + ] + } + }, + "mp3d_156": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_157": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_158": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_159": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_160": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_161": { + "classification": "consistent", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "kitchen island", + "gt_center_y": 394.0, + "other_avg_y": 302.8333333333333, + "y_diff": 91.16666666666669, + "threshold": 24.0, + "all_objects": [ + [ + "kitchen island", + 394.0 + ], + [ + "door", + 263.0 + ], + [ + "oven", + 275.5 + ], + [ + "table", + 370.0 + ] + ] + } + }, + "mp3d_162": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_163": { + "classification": "consistent", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "mirror", + "gt_center_y": 220.5, + "other_avg_y": 305.8333333333333, + "y_diff": -85.33333333333331, + "threshold": 24.0, + "all_objects": [ + [ + "counter", + 292.5 + ], + [ + "mirror", + 220.5 + ], + [ + "shelves", + 211.5 + ], + [ + "stand", + 413.5 + ] + ] + } + }, + "mp3d_164": { + "classification": "counter", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "plant", + "gt_center_y": 394.0, + "other_avg_y": 428.8333333333333, + "y_diff": -34.833333333333314, + "threshold": 24.0, + "all_objects": [ + [ + "tea pot", + 455.0 + ], + [ + "person", + 384.5 + ], + [ + "plant", + 394.0 + ], + [ + "coffee table", + 447.0 + ] + ] + } + }, + "mp3d_165": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_166": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_167": { + "classification": "consistent", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "counter", + "gt_center_y": 303.5, + "other_avg_y": 385.1666666666667, + "y_diff": -81.66666666666669, + "threshold": 24.0, + "all_objects": [ + [ + "table", + 355.5 + ], + [ + "foosball table", + 427.0 + ], + [ + "counter", + 303.5 + ], + [ + "chair", + 373.0 + ] + ] + } + }, + "mp3d_168": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_169": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_170": { + "classification": "ambiguous", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "window", + "gt_center_y": 231.0, + "other_avg_y": 239.33333333333334, + "y_diff": -8.333333333333343, + "threshold": 24.0, + "all_objects": [ + [ + "range hood", + 85.0 + ], + [ + "pot", + 238.0 + ], + [ + "soap", + 395.0 + ], + [ + "window", + 231.0 + ] + ] + } + }, + "mp3d_171": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_172": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_173": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_174": { + "classification": "consistent", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "door", + "gt_center_y": 230.5, + "other_avg_y": 356.0, + "y_diff": -125.5, + "threshold": 24.0, + "all_objects": [ + [ + "cart", + 421.0 + ], + [ + "table", + 343.5 + ], + [ + "desk", + 303.5 + ], + [ + "door", + 230.5 + ] + ] + } + }, + "mp3d_175": { + "classification": "ambiguous", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "plant", + "gt_center_y": 296.5, + "other_avg_y": 318.0, + "y_diff": -21.5, + "threshold": 24.0, + "all_objects": [ + [ + "mirror", + 240.5 + ], + [ + "counter", + 369.0 + ], + [ + "bathtub", + 344.5 + ], + [ + "plant", + 296.5 + ] + ] + } + }, + "mp3d_176": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_177": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_178": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_179": { + "classification": "consistent", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "window", + "gt_center_y": 203.0, + "other_avg_y": 296.6666666666667, + "y_diff": -93.66666666666669, + "threshold": 24.0, + "all_objects": [ + [ + "table", + 372.0 + ], + [ + "lamp", + 106.5 + ], + [ + "window", + 203.0 + ], + [ + "cart", + 411.5 + ] + ] + } + }, + "mp3d_180": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_181": { + "classification": "consistent", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "refridgerator", + "gt_center_y": 276.0, + "other_avg_y": 401.8333333333333, + "y_diff": -125.83333333333331, + "threshold": 24.0, + "all_objects": [ + [ + "kitchen island", + 391.5 + ], + [ + "chair", + 439.0 + ], + [ + "refridgerator", + 276.0 + ], + [ + "stove", + 375.0 + ] + ] + } + }, + "mp3d_182": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_183": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_184": { + "classification": "counter", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "curtain", + "gt_center_y": 240.0, + "other_avg_y": 405.6666666666667, + "y_diff": -165.66666666666669, + "threshold": 24.0, + "all_objects": [ + [ + "pitcher", + 381.5 + ], + [ + "curtain", + 240.0 + ], + [ + "bowl", + 405.5 + ], + [ + "dresser", + 430.0 + ] + ] + } + }, + "mp3d_185": { + "classification": "consistent", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "shelves", + "gt_center_y": 409.5, + "other_avg_y": 318.6666666666667, + "y_diff": 90.83333333333331, + "threshold": 24.0, + "all_objects": [ + [ + "case", + 275.5 + ], + [ + "cabinet", + 347.5 + ], + [ + "shelves", + 409.5 + ], + [ + "chair", + 333.0 + ] + ] + } + }, + "mp3d_186": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_187": { + "classification": "consistent", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "cabinet", + "gt_center_y": 284.0, + "other_avg_y": 232.0, + "y_diff": 52.0, + "threshold": 24.0, + "all_objects": [ + [ + "cabinet", + 284.0 + ], + [ + "picture", + 142.5 + ], + [ + "plant", + 223.0 + ], + [ + "pot", + 330.5 + ] + ] + } + }, + "mp3d_188": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_189": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_190": { + "classification": "consistent", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "sofa", + "gt_center_y": 391.0, + "other_avg_y": 265.1666666666667, + "y_diff": 125.83333333333331, + "threshold": 24.0, + "all_objects": [ + [ + "sofa", + 391.0 + ], + [ + "chair", + 337.0 + ], + [ + "plant", + 252.0 + ], + [ + "picture", + 206.5 + ] + ] + } + }, + "mp3d_191": { + "classification": "consistent", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "window", + "gt_center_y": 214.5, + "other_avg_y": 290.6666666666667, + "y_diff": -76.16666666666669, + "threshold": 24.0, + "all_objects": [ + [ + "door", + 240.0 + ], + [ + "oven", + 240.0 + ], + [ + "counter", + 392.0 + ], + [ + "window", + 214.5 + ] + ] + } + }, + "mp3d_192": { + "classification": "consistent", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "mirror", + "gt_center_y": 178.5, + "other_avg_y": 307.3333333333333, + "y_diff": -128.83333333333331, + "threshold": 24.0, + "all_objects": [ + [ + "cup", + 251.0 + ], + [ + "mirror", + 178.5 + ], + [ + "counter", + 431.0 + ], + [ + "curtain", + 240.0 + ] + ] + } + }, + "mp3d_193": { + "classification": "consistent", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "tv stand", + "gt_center_y": 421.5, + "other_avg_y": 224.5, + "y_diff": 197.0, + "threshold": 24.0, + "all_objects": [ + [ + "globe", + 344.5 + ], + [ + "lamp", + 72.0 + ], + [ + "tv stand", + 421.5 + ], + [ + "photo", + 257.0 + ] + ] + } + }, + "mp3d_194": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_195": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_196": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_197": { + "classification": "consistent", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "chest", + "gt_center_y": 435.0, + "other_avg_y": 356.5, + "y_diff": 78.5, + "threshold": 24.0, + "all_objects": [ + [ + "curtain", + 263.0 + ], + [ + "bed", + 408.5 + ], + [ + "chest", + 435.0 + ], + [ + "chair", + 398.0 + ] + ] + } + }, + "mp3d_198": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_199": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_200": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_201": { + "classification": "counter", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "shelves", + "gt_center_y": 353.0, + "other_avg_y": 267.8333333333333, + "y_diff": 85.16666666666669, + "threshold": 24.0, + "all_objects": [ + [ + "bathtub", + 308.5 + ], + [ + "picture", + 242.5 + ], + [ + "curtain", + 252.5 + ], + [ + "shelves", + 353.0 + ] + ] + } + }, + "mp3d_202": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_203": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_204": { + "classification": "consistent", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "window", + "gt_center_y": 235.5, + "other_avg_y": 323.3333333333333, + "y_diff": -87.83333333333331, + "threshold": 24.0, + "all_objects": [ + [ + "candle", + 281.0 + ], + [ + "window", + 235.5 + ], + [ + "candlestick", + 334.5 + ], + [ + "vase", + 354.5 + ] + ] + } + }, + "mp3d_205": { + "classification": "consistent", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "car", + "gt_center_y": 294.0, + "other_avg_y": 395.6666666666667, + "y_diff": -101.66666666666669, + "threshold": 24.0, + "all_objects": [ + [ + "counter", + 399.0 + ], + [ + "car", + 294.0 + ], + [ + "washing machine", + 452.5 + ], + [ + "bathtub", + 335.5 + ] + ] + } + }, + "mp3d_206": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_207": { + "classification": "consistent", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "fireplace", + "gt_center_y": 261.0, + "other_avg_y": 336.6666666666667, + "y_diff": -75.66666666666669, + "threshold": 24.0, + "all_objects": [ + [ + "bathtub", + 317.5 + ], + [ + "fireplace", + 261.0 + ], + [ + "table", + 404.0 + ], + [ + "plant", + 288.5 + ] + ] + } + }, + "mp3d_208": { + "classification": "consistent", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "sculpture", + "gt_center_y": 336.0, + "other_avg_y": 295.3333333333333, + "y_diff": 40.666666666666686, + "threshold": 24.0, + "all_objects": [ + [ + "piano", + 341.0 + ], + [ + "curtain", + 232.5 + ], + [ + "lamp", + 312.5 + ], + [ + "sculpture", + 336.0 + ] + ] + } + }, + "mp3d_209": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_210": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_211": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_212": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_213": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_214": { + "classification": "consistent", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "table", + "gt_center_y": 422.0, + "other_avg_y": 334.0, + "y_diff": 88.0, + "threshold": 24.0, + "all_objects": [ + [ + "bookshelf", + 314.0 + ], + [ + "bar", + 401.5 + ], + [ + "table", + 422.0 + ], + [ + "cabinet", + 286.5 + ] + ] + } + }, + "mp3d_215": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_216": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_217": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_218": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_219": { + "classification": "consistent", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "window", + "gt_center_y": 236.0, + "other_avg_y": 286.0, + "y_diff": -50.0, + "threshold": 24.0, + "all_objects": [ + [ + "door", + 284.0 + ], + [ + "cabinet", + 380.5 + ], + [ + "range hood", + 193.5 + ], + [ + "window", + 236.0 + ] + ] + } + }, + "mp3d_220": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_221": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_222": { + "classification": "consistent", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "fireplace", + "gt_center_y": 304.0, + "other_avg_y": 366.3333333333333, + "y_diff": -62.333333333333314, + "threshold": 24.0, + "all_objects": [ + [ + "piano", + 349.5 + ], + [ + "fireplace", + 304.0 + ], + [ + "stool", + 425.0 + ], + [ + "sculpture", + 324.5 + ] + ] + } + }, + "mp3d_223": { + "classification": "consistent", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "sofa", + "gt_center_y": 422.0, + "other_avg_y": 320.3333333333333, + "y_diff": 101.66666666666669, + "threshold": 24.0, + "all_objects": [ + [ + "fireplace", + 312.5 + ], + [ + "sofa", + 422.0 + ], + [ + "chair", + 342.0 + ], + [ + "banister", + 306.5 + ] + ] + } + }, + "mp3d_224": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_225": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_226": { + "classification": "consistent", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "sofa", + "gt_center_y": 422.0, + "other_avg_y": 288.3333333333333, + "y_diff": 133.66666666666669, + "threshold": 24.0, + "all_objects": [ + [ + "television", + 216.5 + ], + [ + "banister", + 306.5 + ], + [ + "sofa", + 422.0 + ], + [ + "chair", + 342.0 + ] + ] + } + }, + "mp3d_227": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_228": { + "classification": "consistent", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "picture", + "gt_center_y": 240.5, + "other_avg_y": 291.5, + "y_diff": -51.0, + "threshold": 24.0, + "all_objects": [ + [ + "picture", + 240.5 + ], + [ + "sofa", + 321.5 + ], + [ + "curtain", + 254.0 + ], + [ + "piano", + 299.0 + ] + ] + } + }, + "mp3d_229": { + "classification": "ambiguous", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "sculpture", + "gt_center_y": 306.0, + "other_avg_y": 307.8333333333333, + "y_diff": -1.8333333333333144, + "threshold": 24.0, + "all_objects": [ + [ + "curtain", + 255.5 + ], + [ + "piano", + 297.0 + ], + [ + "fireplace", + 371.0 + ], + [ + "sculpture", + 306.0 + ] + ] + } + }, + "mp3d_230": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_231": { + "classification": "consistent", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "plant", + "gt_center_y": 365.5, + "other_avg_y": 257.8333333333333, + "y_diff": 107.66666666666669, + "threshold": 24.0, + "all_objects": [ + [ + "window", + 211.0 + ], + [ + "coffee table", + 312.0 + ], + [ + "plant", + 365.5 + ], + [ + "door", + 250.5 + ] + ] + } + }, + "mp3d_232": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_233": { + "classification": "consistent", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "clock", + "gt_center_y": 221.5, + "other_avg_y": 379.3333333333333, + "y_diff": -157.83333333333331, + "threshold": 24.0, + "all_objects": [ + [ + "clock", + 221.5 + ], + [ + "pot", + 273.0 + ], + [ + "fire extinguisher", + 452.0 + ], + [ + "counter", + 413.0 + ] + ] + } + }, + "mp3d_234": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_235": { + "classification": "ambiguous", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "sculpture", + "gt_center_y": 282.0, + "other_avg_y": 287.8333333333333, + "y_diff": -5.833333333333314, + "threshold": 24.0, + "all_objects": [ + [ + "sculpture", + 282.0 + ], + [ + "stand", + 344.0 + ], + [ + "counter", + 303.0 + ], + [ + "mirror", + 216.5 + ] + ] + } + }, + "mp3d_236": { + "classification": "consistent", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "window", + "gt_center_y": 182.5, + "other_avg_y": 359.0, + "y_diff": -176.5, + "threshold": 24.0, + "all_objects": [ + [ + "window", + 182.5 + ], + [ + "telephone", + 248.5 + ], + [ + "counter", + 384.5 + ], + [ + "chair", + 444.0 + ] + ] + } + }, + "mp3d_237": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_238": { + "classification": "consistent", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "coffee table", + "gt_center_y": 443.5, + "other_avg_y": 342.8333333333333, + "y_diff": 100.66666666666669, + "threshold": 24.0, + "all_objects": [ + [ + "door", + 276.0 + ], + [ + "fireplace", + 354.0 + ], + [ + "coffee table", + 443.5 + ], + [ + "cabinet", + 398.5 + ] + ] + } + }, + "mp3d_239": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_240": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_241": { + "classification": "consistent", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "mirror", + "gt_center_y": 238.0, + "other_avg_y": 355.6666666666667, + "y_diff": -117.66666666666669, + "threshold": 24.0, + "all_objects": [ + [ + "cabinet", + 362.0 + ], + [ + "mirror", + 238.0 + ], + [ + "picture", + 256.5 + ], + [ + "floor mat", + 448.5 + ] + ] + } + }, + "mp3d_242": { + "classification": "consistent", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "sofa", + "gt_center_y": 453.0, + "other_avg_y": 320.5, + "y_diff": 132.5, + "threshold": 24.0, + "all_objects": [ + [ + "stand", + 414.5 + ], + [ + "sofa", + 453.0 + ], + [ + "cabinet", + 357.0 + ], + [ + "window", + 190.0 + ] + ] + } + }, + "mp3d_243": { + "classification": "counter", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "window", + "gt_center_y": 252.0, + "other_avg_y": 276.5, + "y_diff": -24.5, + "threshold": 24.0, + "all_objects": [ + [ + "window", + 252.0 + ], + [ + "picture", + 247.0 + ], + [ + "fireplace", + 344.0 + ], + [ + "curtain", + 238.5 + ] + ] + } + }, + "mp3d_244": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_245": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_246": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_247": { + "classification": "counter", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "book", + "gt_center_y": 422.5, + "other_avg_y": 232.33333333333334, + "y_diff": 190.16666666666666, + "threshold": 24.0, + "all_objects": [ + [ + "door", + 256.0 + ], + [ + "desk", + 279.0 + ], + [ + "shelves", + 162.0 + ], + [ + "book", + 422.5 + ] + ] + } + }, + "mp3d_248": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_249": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_250": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_251": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_252": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_253": { + "classification": "consistent", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "kitchen island", + "gt_center_y": 405.5, + "other_avg_y": 263.6666666666667, + "y_diff": 141.83333333333331, + "threshold": 24.0, + "all_objects": [ + [ + "window", + 226.0 + ], + [ + "fireplace", + 287.5 + ], + [ + "kitchen island", + 405.5 + ], + [ + "plant", + 277.5 + ] + ] + } + }, + "mp3d_254": { + "classification": "consistent", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "picture", + "gt_center_y": 238.0, + "other_avg_y": 339.6666666666667, + "y_diff": -101.66666666666669, + "threshold": 24.0, + "all_objects": [ + [ + "cabinet", + 279.0 + ], + [ + "picture", + 238.0 + ], + [ + "bed", + 376.0 + ], + [ + "fireplace", + 364.0 + ] + ] + } + }, + "mp3d_255": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_256": { + "classification": "consistent", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "table", + "gt_center_y": 424.0, + "other_avg_y": 340.8333333333333, + "y_diff": 83.16666666666669, + "threshold": 24.0, + "all_objects": [ + [ + "table", + 424.0 + ], + [ + "coffee table", + 447.0 + ], + [ + "chimney", + 208.0 + ], + [ + "fireplace", + 367.5 + ] + ] + } + }, + "mp3d_257": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_258": { + "classification": "counter", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "shelves", + "gt_center_y": 392.0, + "other_avg_y": 236.66666666666666, + "y_diff": 155.33333333333334, + "threshold": 24.0, + "all_objects": [ + [ + "tv stand", + 419.0 + ], + [ + "fan", + 34.5 + ], + [ + "globe", + 256.5 + ], + [ + "shelves", + 392.0 + ] + ] + } + }, + "mp3d_259": { + "classification": "counter", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "cabinet", + "gt_center_y": 240.0, + "other_avg_y": 272.3333333333333, + "y_diff": -32.333333333333314, + "threshold": 24.0, + "all_objects": [ + [ + "cabinet", + 240.0 + ], + [ + "window", + 273.5 + ], + [ + "lamp", + 184.0 + ], + [ + "pot", + 359.5 + ] + ] + } + }, + "mp3d_260": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_261": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_262": { + "classification": "consistent", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "window", + "gt_center_y": 204.5, + "other_avg_y": 351.0, + "y_diff": -146.5, + "threshold": 24.0, + "all_objects": [ + [ + "headboard", + 297.0 + ], + [ + "blanket", + 445.5 + ], + [ + "lamp", + 310.5 + ], + [ + "window", + 204.5 + ] + ] + } + }, + "mp3d_263": { + "classification": "counter", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "counter", + "gt_center_y": 314.5, + "other_avg_y": 221.83333333333334, + "y_diff": 92.66666666666666, + "threshold": 24.0, + "all_objects": [ + [ + "picture", + 206.5 + ], + [ + "cup", + 226.5 + ], + [ + "door", + 232.5 + ], + [ + "counter", + 314.5 + ] + ] + } + }, + "mp3d_264": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_265": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_266": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_267": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_268": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_269": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_270": { + "classification": "consistent", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "table", + "gt_center_y": 432.5, + "other_avg_y": 389.3333333333333, + "y_diff": 43.166666666666686, + "threshold": 24.0, + "all_objects": [ + [ + "desk", + 369.0 + ], + [ + "table", + 432.5 + ], + [ + "bin", + 387.0 + ], + [ + "chair", + 412.0 + ] + ] + } + }, + "mp3d_271": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_272": { + "classification": "counter", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "cabinet", + "gt_center_y": 297.5, + "other_avg_y": 269.8333333333333, + "y_diff": 27.666666666666686, + "threshold": 24.0, + "all_objects": [ + [ + "garage door", + 76.5 + ], + [ + "cart", + 326.0 + ], + [ + "table", + 407.0 + ], + [ + "cabinet", + 297.5 + ] + ] + } + }, + "mp3d_273": { + "classification": "consistent", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "ottoman", + "gt_center_y": 422.0, + "other_avg_y": 279.0, + "y_diff": 143.0, + "threshold": 24.0, + "all_objects": [ + [ + "fireplace", + 302.0 + ], + [ + "mirror", + 329.5 + ], + [ + "ottoman", + 422.0 + ], + [ + "television", + 205.5 + ] + ] + } + }, + "mp3d_274": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_275": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_276": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_277": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_278": { + "classification": "ambiguous", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "vase", + "gt_center_y": 340.0, + "other_avg_y": 341.5, + "y_diff": -1.5, + "threshold": 24.0, + "all_objects": [ + [ + "headboard", + 280.5 + ], + [ + "bed", + 422.5 + ], + [ + "vase", + 340.0 + ], + [ + "pillow", + 321.5 + ] + ] + } + }, + "mp3d_279": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_280": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_281": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_282": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_283": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_284": { + "classification": "consistent", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "sofa", + "gt_center_y": 353.5, + "other_avg_y": 223.5, + "y_diff": 130.0, + "threshold": 24.0, + "all_objects": [ + [ + "pot", + 250.5 + ], + [ + "sofa", + 353.5 + ], + [ + "window", + 235.0 + ], + [ + "picture", + 185.0 + ] + ] + } + }, + "mp3d_285": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_286": { + "classification": "ambiguous", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "window", + "gt_center_y": 236.0, + "other_avg_y": 259.8333333333333, + "y_diff": -23.833333333333314, + "threshold": 24.0, + "all_objects": [ + [ + "door", + 245.5 + ], + [ + "plant", + 304.0 + ], + [ + "window", + 236.0 + ], + [ + "refridgerator", + 230.0 + ] + ] + } + }, + "mp3d_287": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_288": { + "classification": "consistent", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "bed", + "gt_center_y": 441.5, + "other_avg_y": 285.0, + "y_diff": 156.5, + "threshold": 24.0, + "all_objects": [ + [ + "door", + 267.5 + ], + [ + "headboard", + 258.0 + ], + [ + "bed", + 441.5 + ], + [ + "pillow", + 329.5 + ] + ] + } + }, + "mp3d_289": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_290": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_291": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_292": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_293": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_294": { + "classification": "consistent", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "mirror", + "gt_center_y": 214.5, + "other_avg_y": 265.0, + "y_diff": -50.5, + "threshold": 24.0, + "all_objects": [ + [ + "counter", + 358.5 + ], + [ + "cup", + 217.5 + ], + [ + "mirror", + 214.5 + ], + [ + "curtain", + 219.0 + ] + ] + } + }, + "mp3d_295": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_296": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_297": { + "classification": "consistent", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "window", + "gt_center_y": 173.5, + "other_avg_y": 302.1666666666667, + "y_diff": -128.66666666666669, + "threshold": 24.0, + "all_objects": [ + [ + "cabinet", + 240.0 + ], + [ + "dresser", + 365.5 + ], + [ + "sofa", + 301.0 + ], + [ + "window", + 173.5 + ] + ] + } + }, + "mp3d_298": { + "classification": "consistent", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "cabinet", + "gt_center_y": 421.5, + "other_avg_y": 276.6666666666667, + "y_diff": 144.83333333333331, + "threshold": 24.0, + "all_objects": [ + [ + "television", + 223.5 + ], + [ + "shelves", + 204.5 + ], + [ + "cabinet", + 421.5 + ], + [ + "chair", + 402.0 + ] + ] + } + }, + "mp3d_299": { + "classification": "consistent", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "television", + "gt_center_y": 249.0, + "other_avg_y": 401.6666666666667, + "y_diff": -152.66666666666669, + "threshold": 24.0, + "all_objects": [ + [ + "kitchen island", + 438.5 + ], + [ + "television", + 249.0 + ], + [ + "coffee table", + 366.5 + ], + [ + "rug", + 400.0 + ] + ] + } + }, + "mp3d_300": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_301": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_302": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_303": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_304": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_305": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_306": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_307": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_308": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_309": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_310": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_311": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_312": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_313": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_314": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_315": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_316": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_317": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_318": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_319": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_320": { + "classification": "counter", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "cabinet", + "gt_center_y": 377.5, + "other_avg_y": 312.8333333333333, + "y_diff": 64.66666666666669, + "threshold": 24.0, + "all_objects": [ + [ + "picture", + 236.5 + ], + [ + "case", + 280.5 + ], + [ + "shelves", + 421.5 + ], + [ + "cabinet", + 377.5 + ] + ] + } + }, + "mp3d_321": { + "classification": "counter", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "bar", + "gt_center_y": 287.5, + "other_avg_y": 204.66666666666666, + "y_diff": 82.83333333333334, + "threshold": 24.0, + "all_objects": [ + [ + "bar", + 287.5 + ], + [ + "mirror", + 201.5 + ], + [ + "lamp", + 63.0 + ], + [ + "cabinet", + 349.5 + ] + ] + } + }, + "mp3d_322": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_323": { + "classification": "consistent", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "railing", + "gt_center_y": 105.0, + "other_avg_y": 408.1666666666667, + "y_diff": -303.1666666666667, + "threshold": 24.0, + "all_objects": [ + [ + "cabinet", + 369.0 + ], + [ + "railing", + 105.0 + ], + [ + "light", + 416.0 + ], + [ + "table", + 439.5 + ] + ] + } + }, + "mp3d_324": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_325": { + "classification": "consistent", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "pillow", + "gt_center_y": 378.5, + "other_avg_y": 180.5, + "y_diff": 198.0, + "threshold": 24.0, + "all_objects": [ + [ + "curtain", + 127.0 + ], + [ + "window", + 218.5 + ], + [ + "television", + 196.0 + ], + [ + "pillow", + 378.5 + ] + ] + } + }, + "mp3d_326": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_327": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_328": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_329": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_330": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_331": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_332": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_333": { + "classification": "consistent", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "television", + "gt_center_y": 385.0, + "other_avg_y": 306.6666666666667, + "y_diff": 78.33333333333331, + "threshold": 24.0, + "all_objects": [ + [ + "tv stand", + 415.5 + ], + [ + "globe", + 260.5 + ], + [ + "television", + 385.0 + ], + [ + "door", + 244.0 + ] + ] + } + }, + "mp3d_334": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_335": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_336": { + "classification": "consistent", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "plant", + "gt_center_y": 256.5, + "other_avg_y": 332.5, + "y_diff": -76.0, + "threshold": 24.0, + "all_objects": [ + [ + "picture", + 237.0 + ], + [ + "sofa", + 430.0 + ], + [ + "chest", + 330.5 + ], + [ + "plant", + 256.5 + ] + ] + } + }, + "mp3d_337": { + "classification": "ambiguous", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "television", + "gt_center_y": 381.0, + "other_avg_y": 359.5, + "y_diff": 21.5, + "threshold": 24.0, + "all_objects": [ + [ + "desk", + 376.0 + ], + [ + "chair", + 445.5 + ], + [ + "television", + 381.0 + ], + [ + "globe", + 257.0 + ] + ] + } + }, + "mp3d_338": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_339": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_340": { + "classification": "consistent", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "table", + "gt_center_y": 418.0, + "other_avg_y": 318.0, + "y_diff": 100.0, + "threshold": 24.0, + "all_objects": [ + [ + "candlestick", + 360.0 + ], + [ + "candle", + 293.0 + ], + [ + "table", + 418.0 + ], + [ + "plant", + 301.0 + ] + ] + } + }, + "mp3d_341": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_342": { + "classification": "consistent", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "picture", + "gt_center_y": 216.0, + "other_avg_y": 335.8333333333333, + "y_diff": -119.83333333333331, + "threshold": 24.0, + "all_objects": [ + [ + "fireplace", + 311.5 + ], + [ + "picture", + 216.0 + ], + [ + "lamp", + 401.0 + ], + [ + "bathtub", + 295.0 + ] + ] + } + }, + "mp3d_343": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_344": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_345": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_346": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_347": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_348": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_349": { + "classification": "consistent", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "lamp", + "gt_center_y": 286.0, + "other_avg_y": 255.66666666666666, + "y_diff": 30.333333333333343, + "threshold": 24.0, + "all_objects": [ + [ + "pot", + 322.0 + ], + [ + "plant", + 226.0 + ], + [ + "window", + 219.0 + ], + [ + "lamp", + 286.0 + ] + ] + } + }, + "mp3d_350": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_351": { + "classification": "consistent", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "oven", + "gt_center_y": 271.5, + "other_avg_y": 391.5, + "y_diff": -120.0, + "threshold": 24.0, + "all_objects": [ + [ + "kitchen island", + 352.0 + ], + [ + "sofa", + 413.5 + ], + [ + "chair", + 409.0 + ], + [ + "oven", + 271.5 + ] + ] + } + }, + "mp3d_352": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_353": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_354": { + "classification": "consistent", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "sofa", + "gt_center_y": 392.5, + "other_avg_y": 252.33333333333334, + "y_diff": 140.16666666666666, + "threshold": 24.0, + "all_objects": [ + [ + "stairs", + 236.5 + ], + [ + "bar", + 284.0 + ], + [ + "sofa", + 392.5 + ], + [ + "picture", + 236.5 + ] + ] + } + }, + "mp3d_355": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_356": { + "classification": "ambiguous", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "bed", + "gt_center_y": 410.0, + "other_avg_y": 388.1666666666667, + "y_diff": 21.833333333333314, + "threshold": 24.0, + "all_objects": [ + [ + "shelves", + 305.0 + ], + [ + "bed", + 410.0 + ], + [ + "pillow", + 439.5 + ], + [ + "table", + 420.0 + ] + ] + } + }, + "mp3d_357": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_358": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_359": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_360": { + "classification": "consistent", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "photo", + "gt_center_y": 260.5, + "other_avg_y": 359.3333333333333, + "y_diff": -98.83333333333331, + "threshold": 24.0, + "all_objects": [ + [ + "cabinet", + 352.0 + ], + [ + "lamp", + 303.0 + ], + [ + "photo", + 260.5 + ], + [ + "globe", + 423.0 + ] + ] + } + }, + "mp3d_361": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_362": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_363": { + "classification": "consistent", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "sofa", + "gt_center_y": 395.5, + "other_avg_y": 322.8333333333333, + "y_diff": 72.66666666666669, + "threshold": 24.0, + "all_objects": [ + [ + "sculpture", + 432.5 + ], + [ + "sofa", + 395.5 + ], + [ + "window", + 229.0 + ], + [ + "chair", + 307.0 + ] + ] + } + }, + "mp3d_364": { + "classification": "ambiguous", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "paper", + "gt_center_y": 413.5, + "other_avg_y": 435.0, + "y_diff": -21.5, + "threshold": 24.0, + "all_objects": [ + [ + "paper", + 413.5 + ], + [ + "printer", + 443.5 + ], + [ + "box", + 428.0 + ], + [ + "chair", + 433.5 + ] + ] + } + }, + "mp3d_365": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_366": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_367": { + "classification": "consistent", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "chest", + "gt_center_y": 391.5, + "other_avg_y": 239.5, + "y_diff": 152.0, + "threshold": 24.0, + "all_objects": [ + [ + "plant", + 270.0 + ], + [ + "window", + 258.0 + ], + [ + "lamp", + 190.5 + ], + [ + "chest", + 391.5 + ] + ] + } + }, + "mp3d_368": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_369": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_370": { + "classification": "consistent", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "chair", + "gt_center_y": 388.0, + "other_avg_y": 285.1666666666667, + "y_diff": 102.83333333333331, + "threshold": 24.0, + "all_objects": [ + [ + "monitor", + 292.5 + ], + [ + "wardrobe", + 258.0 + ], + [ + "fireplace", + 305.0 + ], + [ + "chair", + 388.0 + ] + ] + } + }, + "mp3d_371": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_372": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_373": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_374": { + "classification": "consistent", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "headboard", + "gt_center_y": 327.5, + "other_avg_y": 276.8333333333333, + "y_diff": 50.666666666666686, + "threshold": 24.0, + "all_objects": [ + [ + "window", + 206.5 + ], + [ + "headboard", + 327.5 + ], + [ + "night stand", + 377.0 + ], + [ + "mirror", + 247.0 + ] + ] + } + }, + "mp3d_375": { + "classification": "consistent", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "table", + "gt_center_y": 429.0, + "other_avg_y": 227.0, + "y_diff": 202.0, + "threshold": 24.0, + "all_objects": [ + [ + "table", + 429.0 + ], + [ + "mirror", + 200.5 + ], + [ + "bar", + 269.5 + ], + [ + "railing", + 211.0 + ] + ] + } + }, + "mp3d_376": { + "classification": "consistent", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "window", + "gt_center_y": 227.5, + "other_avg_y": 339.5, + "y_diff": -112.0, + "threshold": 24.0, + "all_objects": [ + [ + "vase", + 428.5 + ], + [ + "window", + 227.5 + ], + [ + "picture", + 179.5 + ], + [ + "candlestick", + 410.5 + ] + ] + } + }, + "mp3d_377": { + "classification": "consistent", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "sofa", + "gt_center_y": 409.0, + "other_avg_y": 285.8333333333333, + "y_diff": 123.16666666666669, + "threshold": 24.0, + "all_objects": [ + [ + "sofa", + 409.0 + ], + [ + "piano", + 319.5 + ], + [ + "fireplace", + 294.0 + ], + [ + "picture", + 244.0 + ] + ] + } + }, + "mp3d_378": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_379": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_380": { + "classification": "ambiguous", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "bookshelf", + "gt_center_y": 287.0, + "other_avg_y": 287.6666666666667, + "y_diff": -0.6666666666666856, + "threshold": 24.0, + "all_objects": [ + [ + "night stand", + 431.0 + ], + [ + "book", + 172.5 + ], + [ + "bookshelf", + 287.0 + ], + [ + "wardrobe", + 259.5 + ] + ] + } + }, + "mp3d_381": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_382": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_383": { + "classification": "ambiguous", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "bed", + "gt_center_y": 355.0, + "other_avg_y": 370.0, + "y_diff": -15.0, + "threshold": 24.0, + "all_objects": [ + [ + "bed", + 355.0 + ], + [ + "chair", + 351.5 + ], + [ + "ottoman", + 420.0 + ], + [ + "night stand", + 338.5 + ] + ] + } + }, + "mp3d_384": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_385": { + "classification": "ambiguous", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "wreathe", + "gt_center_y": 285.5, + "other_avg_y": 290.3333333333333, + "y_diff": -4.833333333333314, + "threshold": 24.0, + "all_objects": [ + [ + "globe", + 254.0 + ], + [ + "television", + 377.0 + ], + [ + "wreathe", + 285.5 + ], + [ + "door", + 240.0 + ] + ] + } + }, + "mp3d_386": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_387": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_388": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_389": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_390": { + "classification": "counter", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "door", + "gt_center_y": 240.0, + "other_avg_y": 370.0, + "y_diff": -130.0, + "threshold": 24.0, + "all_objects": [ + [ + "curtain", + 240.0 + ], + [ + "chair", + 446.0 + ], + [ + "basket", + 424.0 + ], + [ + "door", + 240.0 + ] + ] + } + }, + "mp3d_391": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_392": { + "classification": "ambiguous", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "cup", + "gt_center_y": 240.5, + "other_avg_y": 251.66666666666666, + "y_diff": -11.166666666666657, + "threshold": 24.0, + "all_objects": [ + [ + "door", + 222.5 + ], + [ + "curtain", + 240.0 + ], + [ + "cup", + 240.5 + ], + [ + "table", + 292.5 + ] + ] + } + }, + "mp3d_393": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_394": { + "classification": "counter", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "picture", + "gt_center_y": 204.0, + "other_avg_y": 322.1666666666667, + "y_diff": -118.16666666666669, + "threshold": 24.0, + "all_objects": [ + [ + "picture", + 204.0 + ], + [ + "shelves", + 337.0 + ], + [ + "fireplace", + 296.0 + ], + [ + "piano", + 333.5 + ] + ] + } + }, + "mp3d_395": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_396": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_397": { + "classification": "consistent", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "window", + "gt_center_y": 216.5, + "other_avg_y": 296.1666666666667, + "y_diff": -79.66666666666669, + "threshold": 24.0, + "all_objects": [ + [ + "lamp", + 292.5 + ], + [ + "window", + 216.5 + ], + [ + "pot", + 370.5 + ], + [ + "plant", + 225.5 + ] + ] + } + }, + "mp3d_398": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_399": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_400": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_401": { + "classification": "counter", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "night stand", + "gt_center_y": 388.5, + "other_avg_y": 352.1666666666667, + "y_diff": 36.333333333333314, + "threshold": 24.0, + "all_objects": [ + [ + "globe", + 255.5 + ], + [ + "night stand", + 388.5 + ], + [ + "television", + 377.0 + ], + [ + "chair", + 424.0 + ] + ] + } + }, + "mp3d_402": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_403": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_404": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_405": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_406": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_407": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_408": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_409": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_410": { + "classification": "consistent", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "cabinet", + "gt_center_y": 171.5, + "other_avg_y": 271.0, + "y_diff": -99.5, + "threshold": 24.0, + "all_objects": [ + [ + "cabinet", + 171.5 + ], + [ + "table", + 323.5 + ], + [ + "plant", + 214.0 + ], + [ + "vase", + 275.5 + ] + ] + } + }, + "mp3d_411": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_412": { + "classification": "counter", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "pot", + "gt_center_y": 302.0, + "other_avg_y": 263.5, + "y_diff": 38.5, + "threshold": 24.0, + "all_objects": [ + [ + "pot", + 302.0 + ], + [ + "window", + 282.0 + ], + [ + "cabinet", + 306.5 + ], + [ + "lamp", + 202.0 + ] + ] + } + }, + "mp3d_413": { + "classification": "consistent", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "table", + "gt_center_y": 419.0, + "other_avg_y": 235.16666666666666, + "y_diff": 183.83333333333334, + "threshold": 24.0, + "all_objects": [ + [ + "door", + 260.5 + ], + [ + "chair", + 398.5 + ], + [ + "table", + 419.0 + ], + [ + "fan", + 46.5 + ] + ] + } + }, + "mp3d_414": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_415": { + "classification": "consistent", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "lamp", + "gt_center_y": 347.5, + "other_avg_y": 320.6666666666667, + "y_diff": 26.833333333333314, + "threshold": 24.0, + "all_objects": [ + [ + "fireplace", + 282.5 + ], + [ + "lamp", + 347.5 + ], + [ + "pillow", + 365.0 + ], + [ + "table", + 314.5 + ] + ] + } + }, + "mp3d_416": { + "classification": "consistent", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "sink", + "gt_center_y": 433.0, + "other_avg_y": 314.8333333333333, + "y_diff": 118.16666666666669, + "threshold": 24.0, + "all_objects": [ + [ + "counter", + 422.0 + ], + [ + "sofa", + 260.0 + ], + [ + "sink", + 433.0 + ], + [ + "mirror", + 262.5 + ] + ] + } + }, + "mp3d_417": { + "classification": "consistent", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "shelves", + "gt_center_y": 394.5, + "other_avg_y": 303.6666666666667, + "y_diff": 90.83333333333331, + "threshold": 24.0, + "all_objects": [ + [ + "shelves", + 394.5 + ], + [ + "table", + 349.0 + ], + [ + "bar", + 288.5 + ], + [ + "cabinet", + 273.5 + ] + ] + } + }, + "mp3d_418": { + "classification": "consistent", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "table", + "gt_center_y": 424.5, + "other_avg_y": 290.8333333333333, + "y_diff": 133.66666666666669, + "threshold": 24.0, + "all_objects": [ + [ + "table", + 424.5 + ], + [ + "curtain", + 262.5 + ], + [ + "chair", + 381.5 + ], + [ + "window", + 228.5 + ] + ] + } + }, + "mp3d_419": { + "classification": "consistent", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "picture", + "gt_center_y": 220.5, + "other_avg_y": 301.1666666666667, + "y_diff": -80.66666666666669, + "threshold": 24.0, + "all_objects": [ + [ + "sofa", + 313.5 + ], + [ + "television", + 242.0 + ], + [ + "coffee table", + 348.0 + ], + [ + "picture", + 220.5 + ] + ] + } + }, + "mp3d_420": { + "classification": "ambiguous", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "fireplace", + "gt_center_y": 316.0, + "other_avg_y": 296.3333333333333, + "y_diff": 19.666666666666686, + "threshold": 24.0, + "all_objects": [ + [ + "sculpture", + 344.5 + ], + [ + "curtain", + 197.5 + ], + [ + "fireplace", + 316.0 + ], + [ + "piano", + 347.0 + ] + ] + } + }, + "mp3d_421": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_422": { + "classification": "consistent", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "candlestick", + "gt_center_y": 421.5, + "other_avg_y": 343.8333333333333, + "y_diff": 77.66666666666669, + "threshold": 24.0, + "all_objects": [ + [ + "candlestick", + 421.5 + ], + [ + "sofa", + 330.0 + ], + [ + "candle", + 349.0 + ], + [ + "plant", + 352.5 + ] + ] + } + }, + "mp3d_423": { + "classification": "consistent", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "lamp", + "gt_center_y": 341.5, + "other_avg_y": 301.5, + "y_diff": 40.0, + "threshold": 24.0, + "all_objects": [ + [ + "plant", + 227.5 + ], + [ + "lamp", + 341.5 + ], + [ + "table", + 422.0 + ], + [ + "cabinet", + 255.0 + ] + ] + } + }, + "mp3d_424": { + "classification": "consistent", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "picture", + "gt_center_y": 289.0, + "other_avg_y": 416.3333333333333, + "y_diff": -127.33333333333331, + "threshold": 24.0, + "all_objects": [ + [ + "picture", + 289.0 + ], + [ + "table", + 417.0 + ], + [ + "globe", + 386.0 + ], + [ + "shelves", + 446.0 + ] + ] + } + }, + "mp3d_425": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_426": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_427": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_428": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_429": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_430": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_431": { + "classification": "consistent", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "stove", + "gt_center_y": 343.0, + "other_avg_y": 391.5, + "y_diff": -48.5, + "threshold": 24.0, + "all_objects": [ + [ + "kitchen island", + 396.5 + ], + [ + "plant", + 334.5 + ], + [ + "stove", + 343.0 + ], + [ + "table", + 443.5 + ] + ] + } + }, + "mp3d_432": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_433": { + "classification": "consistent", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "sculpture", + "gt_center_y": 282.0, + "other_avg_y": 249.33333333333334, + "y_diff": 32.66666666666666, + "threshold": 24.0, + "all_objects": [ + [ + "sculpture", + 282.0 + ], + [ + "mirror", + 216.5 + ], + [ + "shelves", + 228.5 + ], + [ + "counter", + 303.0 + ] + ] + } + }, + "mp3d_434": { + "classification": "consistent", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "lamp", + "gt_center_y": 367.0, + "other_avg_y": 331.6666666666667, + "y_diff": 35.333333333333314, + "threshold": 24.0, + "all_objects": [ + [ + "flower pot", + 308.0 + ], + [ + "picture", + 234.5 + ], + [ + "sink", + 452.5 + ], + [ + "lamp", + 367.0 + ] + ] + } + }, + "mp3d_435": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_436": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_437": { + "classification": "counter", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "glass", + "gt_center_y": 240.0, + "other_avg_y": 371.0, + "y_diff": -131.0, + "threshold": 24.0, + "all_objects": [ + [ + "counter", + 369.0 + ], + [ + "glass", + 240.0 + ], + [ + "bathtub", + 344.5 + ], + [ + "cabinet", + 399.5 + ] + ] + } + }, + "mp3d_438": { + "classification": "consistent", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "door", + "gt_center_y": 255.0, + "other_avg_y": 280.8333333333333, + "y_diff": -25.833333333333314, + "threshold": 24.0, + "all_objects": [ + [ + "stove", + 331.5 + ], + [ + "door", + 255.0 + ], + [ + "range hood", + 192.0 + ], + [ + "refridgerator", + 319.0 + ] + ] + } + }, + "mp3d_439": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_440": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_441": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_442": { + "classification": "consistent", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "picture", + "gt_center_y": 219.0, + "other_avg_y": 364.8333333333333, + "y_diff": -145.83333333333331, + "threshold": 24.0, + "all_objects": [ + [ + "stool", + 369.5 + ], + [ + "picture", + 219.0 + ], + [ + "coffee table", + 353.5 + ], + [ + "rug", + 371.5 + ] + ] + } + }, + "mp3d_443": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_444": { + "classification": "consistent", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "fireplace", + "gt_center_y": 307.5, + "other_avg_y": 367.8333333333333, + "y_diff": -60.333333333333314, + "threshold": 24.0, + "all_objects": [ + [ + "sofa", + 437.0 + ], + [ + "curtain", + 235.5 + ], + [ + "stool", + 431.0 + ], + [ + "fireplace", + 307.5 + ] + ] + } + }, + "mp3d_445": { + "classification": "counter", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "plant", + "gt_center_y": 430.0, + "other_avg_y": 327.0, + "y_diff": 103.0, + "threshold": 24.0, + "all_objects": [ + [ + "fireplace", + 379.5 + ], + [ + "plant", + 430.0 + ], + [ + "microwave", + 415.5 + ], + [ + "chimney", + 186.0 + ] + ] + } + }, + "mp3d_446": { + "classification": "consistent", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "picture", + "gt_center_y": 248.5, + "other_avg_y": 348.5, + "y_diff": -100.0, + "threshold": 24.0, + "all_objects": [ + [ + "lamp", + 343.5 + ], + [ + "picture", + 248.5 + ], + [ + "fireplace", + 394.5 + ], + [ + "shelves", + 307.5 + ] + ] + } + }, + "mp3d_447": { + "classification": "consistent", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "bowl", + "gt_center_y": 437.0, + "other_avg_y": 371.8333333333333, + "y_diff": 65.16666666666669, + "threshold": 24.0, + "all_objects": [ + [ + "pitcher", + 412.0 + ], + [ + "curtain", + 251.5 + ], + [ + "dresser", + 452.0 + ], + [ + "bowl", + 437.0 + ] + ] + } + }, + "mp3d_448": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_449": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_450": { + "classification": "counter", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "computer", + "gt_center_y": 386.0, + "other_avg_y": 160.66666666666666, + "y_diff": 225.33333333333334, + "threshold": 24.0, + "all_objects": [ + [ + "bookshelf", + 94.0 + ], + [ + "fan", + 64.0 + ], + [ + "computer", + 386.0 + ], + [ + "desk", + 324.0 + ] + ] + } + }, + "mp3d_451": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_452": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_453": { + "classification": "consistent", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "shower curtain", + "gt_center_y": 265.5, + "other_avg_y": 333.5, + "y_diff": -68.0, + "threshold": 24.0, + "all_objects": [ + [ + "shelves", + 312.0 + ], + [ + "bathtub", + 411.0 + ], + [ + "door frame", + 277.5 + ], + [ + "shower curtain", + 265.5 + ] + ] + } + }, + "mp3d_454": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_455": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_456": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_457": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_458": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_459": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_460": { + "classification": "consistent", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "glass", + "gt_center_y": 256.0, + "other_avg_y": 378.3333333333333, + "y_diff": -122.33333333333331, + "threshold": 24.0, + "all_objects": [ + [ + "fireplace", + 299.5 + ], + [ + "rug", + 422.5 + ], + [ + "sofa", + 413.0 + ], + [ + "glass", + 256.0 + ] + ] + } + }, + "mp3d_461": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_462": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_463": { + "classification": "counter", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "cart", + "gt_center_y": 351.0, + "other_avg_y": 288.3333333333333, + "y_diff": 62.666666666666686, + "threshold": 24.0, + "all_objects": [ + [ + "cart", + 351.0 + ], + [ + "garage door", + 61.0 + ], + [ + "table", + 381.0 + ], + [ + "garbage bin", + 423.0 + ] + ] + } + }, + "mp3d_464": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_465": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_466": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_467": { + "classification": "consistent", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "table", + "gt_center_y": 451.0, + "other_avg_y": 358.1666666666667, + "y_diff": 92.83333333333331, + "threshold": 24.0, + "all_objects": [ + [ + "pillow", + 323.0 + ], + [ + "telephone", + 417.0 + ], + [ + "table", + 451.0 + ], + [ + "sofa", + 334.5 + ] + ] + } + }, + "mp3d_468": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_469": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_470": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_471": { + "classification": "consistent", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "shelves", + "gt_center_y": 233.0, + "other_avg_y": 284.0, + "y_diff": -51.0, + "threshold": 24.0, + "all_objects": [ + [ + "shelves", + 233.0 + ], + [ + "stand", + 337.5 + ], + [ + "cabinet", + 273.0 + ], + [ + "railing", + 241.5 + ] + ] + } + }, + "mp3d_472": { + "classification": "consistent", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "plant", + "gt_center_y": 445.5, + "other_avg_y": 351.3333333333333, + "y_diff": 94.16666666666669, + "threshold": 24.0, + "all_objects": [ + [ + "bar", + 276.0 + ], + [ + "table", + 336.0 + ], + [ + "coffee table", + 442.0 + ], + [ + "plant", + 445.5 + ] + ] + } + }, + "mp3d_473": { + "classification": "consistent", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "window", + "gt_center_y": 226.5, + "other_avg_y": 342.3333333333333, + "y_diff": -115.83333333333331, + "threshold": 24.0, + "all_objects": [ + [ + "picture", + 256.5 + ], + [ + "cabinet", + 350.0 + ], + [ + "window", + 226.5 + ], + [ + "table", + 420.5 + ] + ] + } + }, + "mp3d_474": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_475": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_476": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_477": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_478": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_479": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_480": { + "classification": "consistent", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "chair", + "gt_center_y": 413.5, + "other_avg_y": 306.6666666666667, + "y_diff": 106.83333333333331, + "threshold": 24.0, + "all_objects": [ + [ + "curtain", + 263.0 + ], + [ + "chair", + 413.5 + ], + [ + "chest", + 428.5 + ], + [ + "sofa", + 228.5 + ] + ] + } + }, + "mp3d_481": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_482": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_483": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_484": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_485": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_486": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_487": { + "classification": "consistent", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "floor mat", + "gt_center_y": 448.5, + "other_avg_y": 283.6666666666667, + "y_diff": 164.83333333333331, + "threshold": 24.0, + "all_objects": [ + [ + "floor mat", + 448.5 + ], + [ + "mirror", + 238.0 + ], + [ + "cabinet", + 362.0 + ], + [ + "glass", + 251.0 + ] + ] + } + }, + "mp3d_488": { + "classification": "consistent", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "picture", + "gt_center_y": 173.5, + "other_avg_y": 415.6666666666667, + "y_diff": -242.16666666666669, + "threshold": 24.0, + "all_objects": [ + [ + "counter", + 433.0 + ], + [ + "vase", + 367.5 + ], + [ + "tray", + 446.5 + ], + [ + "picture", + 173.5 + ] + ] + } + }, + "mp3d_489": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_490": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_491": { + "classification": "counter", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "sink", + "gt_center_y": 339.5, + "other_avg_y": 295.6666666666667, + "y_diff": 43.833333333333314, + "threshold": 24.0, + "all_objects": [ + [ + "drawer", + 399.0 + ], + [ + "sink", + 339.5 + ], + [ + "lamp", + 44.5 + ], + [ + "dresser", + 443.5 + ] + ] + } + }, + "mp3d_492": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_493": { + "classification": "consistent", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "plant", + "gt_center_y": 278.0, + "other_avg_y": 400.5, + "y_diff": -122.5, + "threshold": 24.0, + "all_objects": [ + [ + "pillow", + 437.5 + ], + [ + "container", + 345.5 + ], + [ + "plant", + 278.0 + ], + [ + "blanket", + 418.5 + ] + ] + } + }, + "mp3d_494": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_495": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_496": { + "classification": "consistent", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "window", + "gt_center_y": 225.5, + "other_avg_y": 349.8333333333333, + "y_diff": -124.33333333333331, + "threshold": 24.0, + "all_objects": [ + [ + "window", + 225.5 + ], + [ + "table", + 445.5 + ], + [ + "refridgerator", + 275.0 + ], + [ + "counter", + 329.0 + ] + ] + } + }, + "mp3d_497": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_498": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_499": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_500": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_501": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_502": { + "classification": "consistent", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "lamp", + "gt_center_y": 279.5, + "other_avg_y": 326.8333333333333, + "y_diff": -47.333333333333314, + "threshold": 24.0, + "all_objects": [ + [ + "desk", + 354.0 + ], + [ + "sofa", + 403.0 + ], + [ + "lamp", + 279.5 + ], + [ + "curtain", + 223.5 + ] + ] + } + }, + "mp3d_503": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_504": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_505": { + "classification": "consistent", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "fireplace", + "gt_center_y": 303.0, + "other_avg_y": 330.0, + "y_diff": -27.0, + "threshold": 24.0, + "all_objects": [ + [ + "sculpture", + 340.5 + ], + [ + "fireplace", + 303.0 + ], + [ + "curtain", + 219.0 + ], + [ + "stool", + 430.5 + ] + ] + } + }, + "mp3d_506": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_507": { + "classification": "consistent", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "table", + "gt_center_y": 413.0, + "other_avg_y": 226.5, + "y_diff": 186.5, + "threshold": 24.0, + "all_objects": [ + [ + "cart", + 318.5 + ], + [ + "desk", + 280.0 + ], + [ + "table", + 413.0 + ], + [ + "garage door", + 81.0 + ] + ] + } + }, + "mp3d_508": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_509": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_510": { + "classification": "consistent", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "television", + "gt_center_y": 219.0, + "other_avg_y": 426.3333333333333, + "y_diff": -207.33333333333331, + "threshold": 24.0, + "all_objects": [ + [ + "tea pot", + 451.5 + ], + [ + "person", + 412.0 + ], + [ + "television", + 219.0 + ], + [ + "bookshelf", + 415.5 + ] + ] + } + }, + "mp3d_511": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_512": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_513": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_514": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_515": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_516": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_517": { + "classification": "consistent", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "window", + "gt_center_y": 256.5, + "other_avg_y": 287.1666666666667, + "y_diff": -30.666666666666686, + "threshold": 24.0, + "all_objects": [ + [ + "fan", + 53.0 + ], + [ + "monitor", + 374.0 + ], + [ + "window", + 256.5 + ], + [ + "table", + 434.5 + ] + ] + } + }, + "mp3d_518": { + "classification": "consistent", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "tray", + "gt_center_y": 432.0, + "other_avg_y": 280.6666666666667, + "y_diff": 151.33333333333331, + "threshold": 24.0, + "all_objects": [ + [ + "chandelier", + 83.5 + ], + [ + "tray", + 432.0 + ], + [ + "sofa", + 342.0 + ], + [ + "table", + 416.5 + ] + ] + } + }, + "mp3d_519": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_520": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_521": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_522": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_523": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_524": { + "classification": "consistent", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "oven", + "gt_center_y": 375.5, + "other_avg_y": 408.8333333333333, + "y_diff": -33.333333333333314, + "threshold": 24.0, + "all_objects": [ + [ + "oven", + 375.5 + ], + [ + "table", + 448.5 + ], + [ + "refridgerator", + 358.0 + ], + [ + "towel", + 420.0 + ] + ] + } + }, + "mp3d_525": { + "classification": "consistent", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "sofa", + "gt_center_y": 433.0, + "other_avg_y": 359.5, + "y_diff": 73.5, + "threshold": 24.0, + "all_objects": [ + [ + "stool", + 425.0 + ], + [ + "sofa", + 433.0 + ], + [ + "fireplace", + 304.0 + ], + [ + "piano", + 349.5 + ] + ] + } + }, + "mp3d_526": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_527": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_528": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_529": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_530": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_531": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_532": { + "classification": "consistent", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "lamp", + "gt_center_y": 288.5, + "other_avg_y": 405.0, + "y_diff": -116.5, + "threshold": 24.0, + "all_objects": [ + [ + "lamp", + 288.5 + ], + [ + "chair", + 371.0 + ], + [ + "coffee table", + 435.0 + ], + [ + "sofa", + 409.0 + ] + ] + } + }, + "mp3d_533": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_534": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_535": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_536": { + "classification": "consistent", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "kitchen island", + "gt_center_y": 410.5, + "other_avg_y": 359.6666666666667, + "y_diff": 50.833333333333314, + "threshold": 24.0, + "all_objects": [ + [ + "clothes", + 331.0 + ], + [ + "kitchen island", + 410.5 + ], + [ + "stove", + 398.0 + ], + [ + "sofa", + 350.0 + ] + ] + } + }, + "mp3d_537": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_538": { + "classification": "ambiguous", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "stove", + "gt_center_y": 291.0, + "other_avg_y": 288.5, + "y_diff": 2.5, + "threshold": 24.0, + "all_objects": [ + [ + "table", + 418.0 + ], + [ + "window", + 182.5 + ], + [ + "spice rack", + 265.0 + ], + [ + "stove", + 291.0 + ] + ] + } + }, + "mp3d_539": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_540": { + "classification": "counter", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "sculpture", + "gt_center_y": 302.0, + "other_avg_y": 330.8333333333333, + "y_diff": -28.833333333333314, + "threshold": 24.0, + "all_objects": [ + [ + "table", + 344.0 + ], + [ + "fireplace", + 300.5 + ], + [ + "sculpture", + 302.0 + ], + [ + "chair", + 348.0 + ] + ] + } + }, + "mp3d_541": { + "classification": "consistent", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "table", + "gt_center_y": 413.5, + "other_avg_y": 228.83333333333334, + "y_diff": 184.66666666666666, + "threshold": 24.0, + "all_objects": [ + [ + "trophy", + 248.5 + ], + [ + "table", + 413.5 + ], + [ + "lamp", + 85.0 + ], + [ + "picture", + 353.0 + ] + ] + } + }, + "mp3d_542": { + "classification": "consistent", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "table", + "gt_center_y": 423.0, + "other_avg_y": 335.3333333333333, + "y_diff": 87.66666666666669, + "threshold": 24.0, + "all_objects": [ + [ + "globe", + 320.5 + ], + [ + "table", + 423.0 + ], + [ + "window", + 276.5 + ], + [ + "shelves", + 409.0 + ] + ] + } + }, + "mp3d_543": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_544": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_545": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_546": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_547": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_548": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_549": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_550": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_551": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_552": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_553": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_554": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_555": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_556": { + "classification": "consistent", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "bed", + "gt_center_y": 401.5, + "other_avg_y": 315.8333333333333, + "y_diff": 85.66666666666669, + "threshold": 24.0, + "all_objects": [ + [ + "bed", + 401.5 + ], + [ + "curtain", + 262.0 + ], + [ + "door", + 311.0 + ], + [ + "bench", + 374.5 + ] + ] + } + }, + "mp3d_557": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_558": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_559": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_560": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_561": { + "classification": "consistent", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "window", + "gt_center_y": 234.0, + "other_avg_y": 360.5, + "y_diff": -126.5, + "threshold": 24.0, + "all_objects": [ + [ + "window", + 234.0 + ], + [ + "pot", + 239.0 + ], + [ + "cabinet", + 449.0 + ], + [ + "stove", + 393.5 + ] + ] + } + }, + "mp3d_562": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_563": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_564": { + "classification": "consistent", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "table", + "gt_center_y": 415.5, + "other_avg_y": 189.83333333333334, + "y_diff": 225.66666666666666, + "threshold": 24.0, + "all_objects": [ + [ + "bed", + 250.5 + ], + [ + "curtain", + 270.5 + ], + [ + "fan", + 48.5 + ], + [ + "table", + 415.5 + ] + ] + } + }, + "mp3d_565": { + "classification": "counter", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "chair", + "gt_center_y": 412.0, + "other_avg_y": 286.1666666666667, + "y_diff": 125.83333333333331, + "threshold": 24.0, + "all_objects": [ + [ + "chair", + 412.0 + ], + [ + "lamp", + 367.0 + ], + [ + "table", + 388.0 + ], + [ + "television", + 103.5 + ] + ] + } + }, + "mp3d_566": { + "classification": "consistent", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "picture", + "gt_center_y": 247.0, + "other_avg_y": 345.0, + "y_diff": -98.0, + "threshold": 24.0, + "all_objects": [ + [ + "picture", + 247.0 + ], + [ + "chair", + 352.0 + ], + [ + "blanket", + 433.0 + ], + [ + "window", + 250.0 + ] + ] + } + }, + "mp3d_567": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_568": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_569": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_570": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_571": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_572": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_573": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_574": { + "classification": "consistent", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "bar", + "gt_center_y": 393.0, + "other_avg_y": 274.6666666666667, + "y_diff": 118.33333333333331, + "threshold": 24.0, + "all_objects": [ + [ + "cabinet", + 252.5 + ], + [ + "bar", + 393.0 + ], + [ + "refridgerator", + 228.0 + ], + [ + "table", + 343.5 + ] + ] + } + }, + "mp3d_575": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_576": { + "classification": "counter", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "door", + "gt_center_y": 240.0, + "other_avg_y": 308.5, + "y_diff": -68.5, + "threshold": 24.0, + "all_objects": [ + [ + "cabinet", + 347.0 + ], + [ + "sofa", + 293.0 + ], + [ + "monitor", + 285.5 + ], + [ + "door", + 240.0 + ] + ] + } + }, + "mp3d_577": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_578": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_579": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_580": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_581": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_582": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_583": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_584": { + "classification": "consistent", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "window", + "gt_center_y": 173.5, + "other_avg_y": 372.0, + "y_diff": -198.5, + "threshold": 24.0, + "all_objects": [ + [ + "sofa", + 301.0 + ], + [ + "window", + 173.5 + ], + [ + "dresser", + 365.5 + ], + [ + "bin", + 449.5 + ] + ] + } + }, + "mp3d_585": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_586": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_587": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_588": { + "classification": "consistent", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "refridgerator", + "gt_center_y": 359.5, + "other_avg_y": 334.1666666666667, + "y_diff": 25.333333333333314, + "threshold": 24.0, + "all_objects": [ + [ + "oven", + 374.0 + ], + [ + "shelves", + 324.5 + ], + [ + "television", + 304.0 + ], + [ + "refridgerator", + 359.5 + ] + ] + } + }, + "mp3d_589": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_590": { + "classification": "consistent", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "shelves", + "gt_center_y": 180.5, + "other_avg_y": 351.3333333333333, + "y_diff": -170.83333333333331, + "threshold": 24.0, + "all_objects": [ + [ + "shelves", + 180.5 + ], + [ + "chair", + 426.5 + ], + [ + "desk", + 408.5 + ], + [ + "picture", + 219.0 + ] + ] + } + }, + "mp3d_591": { + "classification": "consistent", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "sheet", + "gt_center_y": 437.5, + "other_avg_y": 316.1666666666667, + "y_diff": 121.33333333333331, + "threshold": 24.0, + "all_objects": [ + [ + "night stand", + 364.5 + ], + [ + "table", + 328.5 + ], + [ + "sheet", + 437.5 + ], + [ + "mirror", + 255.5 + ] + ] + } + }, + "mp3d_592": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_593": { + "classification": "ambiguous", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "chair", + "gt_center_y": 359.0, + "other_avg_y": 336.8333333333333, + "y_diff": 22.166666666666686, + "threshold": 24.0, + "all_objects": [ + [ + "sofa", + 396.0 + ], + [ + "chair", + 359.0 + ], + [ + "television", + 183.5 + ], + [ + "rug", + 431.0 + ] + ] + } + }, + "mp3d_594": { + "classification": "consistent", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "monitor", + "gt_center_y": 93.5, + "other_avg_y": 228.83333333333334, + "y_diff": -135.33333333333334, + "threshold": 24.0, + "all_objects": [ + [ + "table", + 125.5 + ], + [ + "plant", + 430.0 + ], + [ + "monitor", + 93.5 + ], + [ + "banister", + 131.0 + ] + ] + } + }, + "mp3d_595": { + "classification": "consistent", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "pipe", + "gt_center_y": 71.0, + "other_avg_y": 225.5, + "y_diff": -154.5, + "threshold": 24.0, + "all_objects": [ + [ + "window", + 249.5 + ], + [ + "garage door", + 58.0 + ], + [ + "pipe", + 71.0 + ], + [ + "cabinet", + 369.0 + ] + ] + } + }, + "mp3d_596": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_597": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_598": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_599": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_600": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_601": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_602": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_603": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_604": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_605": { + "classification": "consistent", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "sculpture", + "gt_center_y": 328.5, + "other_avg_y": 362.6666666666667, + "y_diff": -34.166666666666686, + "threshold": 24.0, + "all_objects": [ + [ + "fireplace", + 393.5 + ], + [ + "lamp", + 343.5 + ], + [ + "sculpture", + 328.5 + ], + [ + "piano", + 351.0 + ] + ] + } + }, + "mp3d_606": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_607": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_608": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_609": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_610": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_611": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_612": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_613": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_614": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_615": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_616": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_617": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_618": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_619": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_620": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_621": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_622": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_623": { + "classification": "consistent", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "table", + "gt_center_y": 419.5, + "other_avg_y": 335.5, + "y_diff": 84.0, + "threshold": 24.0, + "all_objects": [ + [ + "vase", + 376.5 + ], + [ + "door", + 245.5 + ], + [ + "stairs", + 384.5 + ], + [ + "table", + 419.5 + ] + ] + } + }, + "mp3d_624": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_625": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_626": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_627": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_628": { + "classification": "counter", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "window", + "gt_center_y": 240.0, + "other_avg_y": 302.6666666666667, + "y_diff": -62.666666666666686, + "threshold": 24.0, + "all_objects": [ + [ + "window", + 240.0 + ], + [ + "dresser", + 383.0 + ], + [ + "plant", + 301.0 + ], + [ + "mirror", + 224.0 + ] + ] + } + }, + "mp3d_629": { + "classification": "consistent", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "window", + "gt_center_y": 234.5, + "other_avg_y": 354.8333333333333, + "y_diff": -120.33333333333331, + "threshold": 24.0, + "all_objects": [ + [ + "window", + 234.5 + ], + [ + "pot", + 244.0 + ], + [ + "cabinet", + 436.0 + ], + [ + "counter", + 384.5 + ] + ] + } + }, + "mp3d_630": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_631": { + "classification": "ambiguous", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "fireplace", + "gt_center_y": 294.0, + "other_avg_y": 316.5, + "y_diff": -22.5, + "threshold": 24.0, + "all_objects": [ + [ + "picture", + 244.0 + ], + [ + "fireplace", + 294.0 + ], + [ + "sculpture", + 296.5 + ], + [ + "sofa", + 409.0 + ] + ] + } + }, + "mp3d_632": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_633": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_634": { + "classification": "consistent", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "plant", + "gt_center_y": 287.5, + "other_avg_y": 433.6666666666667, + "y_diff": -146.16666666666669, + "threshold": 24.0, + "all_objects": [ + [ + "sofa", + 439.0 + ], + [ + "sculpture", + 413.5 + ], + [ + "table", + 448.5 + ], + [ + "plant", + 287.5 + ] + ] + } + }, + "mp3d_635": { + "classification": "consistent", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "box", + "gt_center_y": 226.5, + "other_avg_y": 348.3333333333333, + "y_diff": -121.83333333333331, + "threshold": 24.0, + "all_objects": [ + [ + "box", + 226.5 + ], + [ + "car", + 374.5 + ], + [ + "cabinet", + 284.0 + ], + [ + "coffee table", + 386.5 + ] + ] + } + }, + "mp3d_636": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_637": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_638": { + "classification": "consistent", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "cabinet", + "gt_center_y": 240.0, + "other_avg_y": 370.6666666666667, + "y_diff": -130.66666666666669, + "threshold": 24.0, + "all_objects": [ + [ + "chair", + 429.5 + ], + [ + "picture", + 264.0 + ], + [ + "cabinet", + 240.0 + ], + [ + "mirror", + 418.5 + ] + ] + } + }, + "mp3d_639": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_640": { + "classification": "consistent", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "door", + "gt_center_y": 231.0, + "other_avg_y": 325.6666666666667, + "y_diff": -94.66666666666669, + "threshold": 24.0, + "all_objects": [ + [ + "door", + 231.0 + ], + [ + "table", + 346.5 + ], + [ + "cabinet", + 325.0 + ], + [ + "desk", + 305.5 + ] + ] + } + }, + "mp3d_641": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_642": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_643": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_644": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_645": { + "classification": "consistent", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "curtain", + "gt_center_y": 237.0, + "other_avg_y": 287.8333333333333, + "y_diff": -50.833333333333314, + "threshold": 24.0, + "all_objects": [ + [ + "oven", + 315.5 + ], + [ + "sofa", + 304.5 + ], + [ + "picture", + 243.5 + ], + [ + "curtain", + 237.0 + ] + ] + } + }, + "mp3d_646": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_647": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_648": { + "classification": "consistent", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "headboard", + "gt_center_y": 340.5, + "other_avg_y": 367.8333333333333, + "y_diff": -27.333333333333314, + "threshold": 24.0, + "all_objects": [ + [ + "blanket", + 427.0 + ], + [ + "headboard", + 340.5 + ], + [ + "door", + 260.5 + ], + [ + "bed", + 416.0 + ] + ] + } + }, + "mp3d_649": { + "classification": "consistent", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "bookshelf", + "gt_center_y": 396.5, + "other_avg_y": 281.8333333333333, + "y_diff": 114.66666666666669, + "threshold": 24.0, + "all_objects": [ + [ + "bookshelf", + 396.5 + ], + [ + "person", + 344.0 + ], + [ + "television", + 224.5 + ], + [ + "door", + 277.0 + ] + ] + } + }, + "mp3d_650": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_651": { + "classification": "consistent", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "sofa", + "gt_center_y": 422.0, + "other_avg_y": 278.5, + "y_diff": 143.5, + "threshold": 24.0, + "all_objects": [ + [ + "banister", + 306.5 + ], + [ + "fireplace", + 312.5 + ], + [ + "television", + 216.5 + ], + [ + "sofa", + 422.0 + ] + ] + } + }, + "mp3d_652": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_653": { + "classification": "consistent", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "kitchen island", + "gt_center_y": 422.0, + "other_avg_y": 355.6666666666667, + "y_diff": 66.33333333333331, + "threshold": 24.0, + "all_objects": [ + [ + "dishwasher", + 394.0 + ], + [ + "kitchen island", + 422.0 + ], + [ + "sink", + 347.5 + ], + [ + "stove", + 325.5 + ] + ] + } + }, + "mp3d_654": { + "classification": "consistent", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "table", + "gt_center_y": 434.5, + "other_avg_y": 266.1666666666667, + "y_diff": 168.33333333333331, + "threshold": 24.0, + "all_objects": [ + [ + "cabinet", + 261.5 + ], + [ + "table", + 434.5 + ], + [ + "pillow", + 376.0 + ], + [ + "television", + 161.0 + ] + ] + } + }, + "mp3d_655": { + "classification": "counter", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "door", + "gt_center_y": 305.5, + "other_avg_y": 411.0, + "y_diff": -105.5, + "threshold": 24.0, + "all_objects": [ + [ + "chair", + 414.0 + ], + [ + "dresser", + 401.0 + ], + [ + "basket", + 418.0 + ], + [ + "door", + 305.5 + ] + ] + } + }, + "mp3d_656": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_657": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_658": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_659": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_660": { + "classification": "consistent", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "picture", + "gt_center_y": 89.5, + "other_avg_y": 377.8333333333333, + "y_diff": -288.3333333333333, + "threshold": 24.0, + "all_objects": [ + [ + "microwave", + 397.0 + ], + [ + "toy", + 324.5 + ], + [ + "toaster oven", + 412.0 + ], + [ + "picture", + 89.5 + ] + ] + } + }, + "mp3d_661": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_662": { + "classification": "consistent", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "table", + "gt_center_y": 369.0, + "other_avg_y": 180.0, + "y_diff": 189.0, + "threshold": 24.0, + "all_objects": [ + [ + "window", + 208.0 + ], + [ + "garage door", + 77.0 + ], + [ + "monitor", + 255.0 + ], + [ + "table", + 369.0 + ] + ] + } + }, + "mp3d_663": { + "classification": "consistent", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "table", + "gt_center_y": 413.5, + "other_avg_y": 188.33333333333334, + "y_diff": 225.16666666666666, + "threshold": 24.0, + "all_objects": [ + [ + "garage door", + 56.5 + ], + [ + "cart", + 369.5 + ], + [ + "table", + 413.5 + ], + [ + "pipe", + 139.0 + ] + ] + } + }, + "mp3d_664": { + "classification": "consistent", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "bed", + "gt_center_y": 420.0, + "other_avg_y": 325.1666666666667, + "y_diff": 94.83333333333331, + "threshold": 24.0, + "all_objects": [ + [ + "bed", + 420.0 + ], + [ + "stairs", + 318.5 + ], + [ + "night stand", + 374.5 + ], + [ + "lamp", + 282.5 + ] + ] + } + }, + "mp3d_665": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_666": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_667": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_668": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_669": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_670": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_671": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_672": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_673": { + "classification": "ambiguous", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "window", + "gt_center_y": 273.5, + "other_avg_y": 261.1666666666667, + "y_diff": 12.333333333333314, + "threshold": 24.0, + "all_objects": [ + [ + "pot", + 359.5 + ], + [ + "window", + 273.5 + ], + [ + "cabinet", + 240.0 + ], + [ + "lamp", + 184.0 + ] + ] + } + }, + "mp3d_674": { + "classification": "consistent", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "window", + "gt_center_y": 208.0, + "other_avg_y": 233.66666666666666, + "y_diff": -25.666666666666657, + "threshold": 24.0, + "all_objects": [ + [ + "monitor", + 255.0 + ], + [ + "garage door", + 77.0 + ], + [ + "table", + 369.0 + ], + [ + "window", + 208.0 + ] + ] + } + }, + "mp3d_675": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_676": { + "classification": "consistent", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "sofa", + "gt_center_y": 382.0, + "other_avg_y": 265.6666666666667, + "y_diff": 116.33333333333331, + "threshold": 24.0, + "all_objects": [ + [ + "sofa", + 382.0 + ], + [ + "plant", + 257.0 + ], + [ + "fireplace", + 296.5 + ], + [ + "mirror", + 243.5 + ] + ] + } + }, + "mp3d_677": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_678": { + "classification": "consistent", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "bar", + "gt_center_y": 388.0, + "other_avg_y": 295.0, + "y_diff": 93.0, + "threshold": 24.0, + "all_objects": [ + [ + "sofa", + 301.0 + ], + [ + "bar", + 388.0 + ], + [ + "counter", + 353.5 + ], + [ + "refridgerator", + 230.5 + ] + ] + } + }, + "mp3d_679": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_680": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_681": { + "classification": "consistent", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "picture", + "gt_center_y": 288.0, + "other_avg_y": 384.3333333333333, + "y_diff": -96.33333333333331, + "threshold": 24.0, + "all_objects": [ + [ + "plant", + 378.0 + ], + [ + "picture", + 288.0 + ], + [ + "door", + 328.5 + ], + [ + "towel", + 446.5 + ] + ] + } + }, + "mp3d_682": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_683": { + "classification": "consistent", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "chair", + "gt_center_y": 376.5, + "other_avg_y": 404.3333333333333, + "y_diff": -27.833333333333314, + "threshold": 24.0, + "all_objects": [ + [ + "stairs", + 408.0 + ], + [ + "chair", + 376.5 + ], + [ + "railing", + 410.0 + ], + [ + "sofa", + 395.0 + ] + ] + } + }, + "mp3d_684": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_685": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_686": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_687": { + "classification": "consistent", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "table", + "gt_center_y": 435.0, + "other_avg_y": 211.16666666666666, + "y_diff": 223.83333333333334, + "threshold": 24.0, + "all_objects": [ + [ + "garage door", + 71.0 + ], + [ + "table", + 435.0 + ], + [ + "cart", + 331.0 + ], + [ + "door", + 231.5 + ] + ] + } + }, + "mp3d_688": { + "classification": "consistent", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "fireplace", + "gt_center_y": 335.5, + "other_avg_y": 270.6666666666667, + "y_diff": 64.83333333333331, + "threshold": 24.0, + "all_objects": [ + [ + "window", + 253.0 + ], + [ + "fireplace", + 335.5 + ], + [ + "chair", + 332.0 + ], + [ + "curtain", + 227.0 + ] + ] + } + }, + "mp3d_689": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_690": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_691": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_692": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_693": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_694": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_695": { + "classification": "counter", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "door", + "gt_center_y": 240.0, + "other_avg_y": 329.1666666666667, + "y_diff": -89.16666666666669, + "threshold": 24.0, + "all_objects": [ + [ + "window", + 263.0 + ], + [ + "globe", + 317.5 + ], + [ + "door", + 240.0 + ], + [ + "shelves", + 407.0 + ] + ] + } + }, + "mp3d_696": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_697": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_698": { + "classification": "consistent", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "sofa", + "gt_center_y": 413.5, + "other_avg_y": 297.0, + "y_diff": 116.5, + "threshold": 24.0, + "all_objects": [ + [ + "oven", + 271.5 + ], + [ + "sofa", + 413.5 + ], + [ + "kitchen island", + 352.0 + ], + [ + "curtain", + 267.5 + ] + ] + } + }, + "mp3d_699": { + "classification": "consistent", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "window", + "gt_center_y": 269.5, + "other_avg_y": 347.5, + "y_diff": -78.0, + "threshold": 24.0, + "all_objects": [ + [ + "bed", + 278.5 + ], + [ + "chair", + 352.0 + ], + [ + "window", + 269.5 + ], + [ + "dresser", + 412.0 + ] + ] + } + }, + "mp3d_700": { + "classification": "consistent", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "keyboard", + "gt_center_y": 455.0, + "other_avg_y": 360.5, + "y_diff": 94.5, + "threshold": 24.0, + "all_objects": [ + [ + "window", + 257.0 + ], + [ + "keyboard", + 455.0 + ], + [ + "monitor", + 386.5 + ], + [ + "table", + 438.0 + ] + ] + } + }, + "mp3d_701": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_702": { + "classification": "consistent", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "blinds", + "gt_center_y": 235.0, + "other_avg_y": 407.3333333333333, + "y_diff": -172.33333333333331, + "threshold": 24.0, + "all_objects": [ + [ + "towel", + 350.5 + ], + [ + "sink", + 447.5 + ], + [ + "blinds", + 235.0 + ], + [ + "cabinet", + 424.0 + ] + ] + } + }, + "mp3d_703": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_704": { + "classification": "consistent", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "coffee table", + "gt_center_y": 442.0, + "other_avg_y": 283.6666666666667, + "y_diff": 158.33333333333331, + "threshold": 24.0, + "all_objects": [ + [ + "bar", + 276.0 + ], + [ + "table", + 336.0 + ], + [ + "stairs", + 239.0 + ], + [ + "coffee table", + 442.0 + ] + ] + } + }, + "mp3d_705": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_706": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_707": { + "classification": "consistent", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "plant", + "gt_center_y": 403.0, + "other_avg_y": 292.0, + "y_diff": 111.0, + "threshold": 24.0, + "all_objects": [ + [ + "piano", + 314.0 + ], + [ + "curtain", + 259.0 + ], + [ + "sculpture", + 303.0 + ], + [ + "plant", + 403.0 + ] + ] + } + }, + "mp3d_708": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_709": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_710": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_711": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_712": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_713": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_714": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_715": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_716": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_717": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_718": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_719": { + "classification": "consistent", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "tv stand", + "gt_center_y": 403.0, + "other_avg_y": 334.8333333333333, + "y_diff": 68.16666666666669, + "threshold": 24.0, + "all_objects": [ + [ + "computer", + 340.0 + ], + [ + "globe", + 252.0 + ], + [ + "tv stand", + 403.0 + ], + [ + "chair", + 412.5 + ] + ] + } + }, + "mp3d_720": { + "classification": "consistent", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "curtain", + "gt_center_y": 199.0, + "other_avg_y": 329.3333333333333, + "y_diff": -130.33333333333331, + "threshold": 24.0, + "all_objects": [ + [ + "wardrobe", + 277.0 + ], + [ + "lamp shade", + 291.5 + ], + [ + "night stand", + 419.5 + ], + [ + "curtain", + 199.0 + ] + ] + } + }, + "mp3d_721": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_722": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_723": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_724": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_725": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_726": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_727": { + "classification": "consistent", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "door way", + "gt_center_y": 253.0, + "other_avg_y": 418.3333333333333, + "y_diff": -165.33333333333331, + "threshold": 24.0, + "all_objects": [ + [ + "door way", + 253.0 + ], + [ + "sofa", + 375.5 + ], + [ + "coffee table", + 449.5 + ], + [ + "chair", + 430.0 + ] + ] + } + }, + "mp3d_728": { + "classification": "consistent", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "bed", + "gt_center_y": 372.5, + "other_avg_y": 344.1666666666667, + "y_diff": 28.333333333333314, + "threshold": 24.0, + "all_objects": [ + [ + "night stand", + 428.0 + ], + [ + "door", + 272.0 + ], + [ + "bed", + 372.5 + ], + [ + "lamp", + 332.5 + ] + ] + } + }, + "mp3d_729": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_730": { + "classification": "consistent", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "tray", + "gt_center_y": 437.0, + "other_avg_y": 250.16666666666666, + "y_diff": 186.83333333333334, + "threshold": 24.0, + "all_objects": [ + [ + "chandelier", + 81.0 + ], + [ + "tray", + 437.0 + ], + [ + "table", + 425.5 + ], + [ + "door way", + 244.0 + ] + ] + } + }, + "mp3d_731": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_732": { + "classification": "consistent", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "refridgerator", + "gt_center_y": 242.5, + "other_avg_y": 400.3333333333333, + "y_diff": -157.83333333333331, + "threshold": 24.0, + "all_objects": [ + [ + "refridgerator", + 242.5 + ], + [ + "bar", + 442.0 + ], + [ + "counter", + 377.5 + ], + [ + "cup", + 381.5 + ] + ] + } + }, + "mp3d_733": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_734": { + "classification": "consistent", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "monitor", + "gt_center_y": 407.0, + "other_avg_y": 294.8333333333333, + "y_diff": 112.16666666666669, + "threshold": 24.0, + "all_objects": [ + [ + "shelves", + 226.0 + ], + [ + "box", + 391.5 + ], + [ + "monitor", + 407.0 + ], + [ + "whiteboard", + 267.0 + ] + ] + } + }, + "mp3d_735": { + "classification": "consistent", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "lamp", + "gt_center_y": 345.5, + "other_avg_y": 269.3333333333333, + "y_diff": 76.16666666666669, + "threshold": 24.0, + "all_objects": [ + [ + "lamp", + 345.5 + ], + [ + "fireplace", + 218.5 + ], + [ + "pot", + 372.0 + ], + [ + "window", + 217.5 + ] + ] + } + }, + "mp3d_736": { + "classification": "consistent", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "bar", + "gt_center_y": 394.0, + "other_avg_y": 247.5, + "y_diff": 146.5, + "threshold": 24.0, + "all_objects": [ + [ + "window", + 181.0 + ], + [ + "counter", + 335.0 + ], + [ + "shelves", + 226.5 + ], + [ + "bar", + 394.0 + ] + ] + } + }, + "mp3d_737": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_738": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_739": { + "classification": "counter", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "pot", + "gt_center_y": 330.5, + "other_avg_y": 246.16666666666666, + "y_diff": 84.33333333333334, + "threshold": 24.0, + "all_objects": [ + [ + "cabinet", + 301.0 + ], + [ + "clock", + 252.0 + ], + [ + "lamp", + 185.5 + ], + [ + "pot", + 330.5 + ] + ] + } + }, + "mp3d_740": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_741": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_742": { + "classification": "ambiguous", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "water cooler", + "gt_center_y": 388.5, + "other_avg_y": 387.6666666666667, + "y_diff": 0.8333333333333144, + "threshold": 24.0, + "all_objects": [ + [ + "water cooler", + 388.5 + ], + [ + "stool", + 442.5 + ], + [ + "sofa", + 332.5 + ], + [ + "coffee table", + 388.0 + ] + ] + } + }, + "mp3d_743": { + "classification": "consistent", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "coffee table", + "gt_center_y": 435.5, + "other_avg_y": 294.3333333333333, + "y_diff": 141.16666666666669, + "threshold": 24.0, + "all_objects": [ + [ + "shelves", + 333.5 + ], + [ + "coffee table", + 435.5 + ], + [ + "window", + 233.5 + ], + [ + "table", + 316.0 + ] + ] + } + }, + "mp3d_744": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_745": { + "classification": "consistent", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "counter", + "gt_center_y": 404.0, + "other_avg_y": 201.5, + "y_diff": 202.5, + "threshold": 24.0, + "all_objects": [ + [ + "window", + 233.0 + ], + [ + "picture", + 168.0 + ], + [ + "door", + 203.5 + ], + [ + "counter", + 404.0 + ] + ] + } + }, + "mp3d_746": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_747": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_748": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_749": { + "classification": "counter", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "glass", + "gt_center_y": 240.0, + "other_avg_y": 293.8333333333333, + "y_diff": -53.833333333333314, + "threshold": 24.0, + "all_objects": [ + [ + "glass", + 240.0 + ], + [ + "plant", + 296.5 + ], + [ + "mirror", + 240.5 + ], + [ + "bathtub", + 344.5 + ] + ] + } + }, + "mp3d_750": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_751": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_752": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_753": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_754": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_755": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_756": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_757": { + "classification": "consistent", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "table", + "gt_center_y": 442.5, + "other_avg_y": 362.5, + "y_diff": 80.0, + "threshold": 24.0, + "all_objects": [ + [ + "wardrobe", + 269.5 + ], + [ + "rug", + 455.0 + ], + [ + "chest", + 363.0 + ], + [ + "table", + 442.5 + ] + ] + } + }, + "mp3d_758": { + "classification": "counter", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "cup", + "gt_center_y": 162.0, + "other_avg_y": 251.83333333333334, + "y_diff": -89.83333333333334, + "threshold": 24.0, + "all_objects": [ + [ + "cup", + 162.0 + ], + [ + "mirror", + 213.5 + ], + [ + "counter", + 372.0 + ], + [ + "picture", + 170.0 + ] + ] + } + }, + "mp3d_759": { + "classification": "consistent", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "table", + "gt_center_y": 416.0, + "other_avg_y": 244.5, + "y_diff": 171.5, + "threshold": 24.0, + "all_objects": [ + [ + "candle", + 285.5 + ], + [ + "table", + 416.0 + ], + [ + "fireplace", + 274.0 + ], + [ + "picture", + 174.0 + ] + ] + } + }, + "mp3d_760": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_761": { + "classification": "consistent", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "cabinet", + "gt_center_y": 265.0, + "other_avg_y": 316.6666666666667, + "y_diff": -51.666666666666686, + "threshold": 24.0, + "all_objects": [ + [ + "chair", + 314.0 + ], + [ + "fireplace", + 319.0 + ], + [ + "mirror", + 317.0 + ], + [ + "cabinet", + 265.0 + ] + ] + } + }, + "mp3d_762": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_763": { + "classification": "consistent", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "chair", + "gt_center_y": 388.5, + "other_avg_y": 358.1666666666667, + "y_diff": 30.333333333333314, + "threshold": 24.0, + "all_objects": [ + [ + "chest", + 425.5 + ], + [ + "bed", + 378.0 + ], + [ + "chair", + 388.5 + ], + [ + "wardrobe", + 271.0 + ] + ] + } + }, + "mp3d_764": { + "classification": "ambiguous", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "picture", + "gt_center_y": 221.0, + "other_avg_y": 201.5, + "y_diff": 19.5, + "threshold": 24.0, + "all_objects": [ + [ + "cup", + 240.0 + ], + [ + "curtain", + 200.0 + ], + [ + "mirror", + 164.5 + ], + [ + "picture", + 221.0 + ] + ] + } + }, + "mp3d_765": { + "classification": "counter", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "fan", + "gt_center_y": 53.0, + "other_avg_y": 316.1666666666667, + "y_diff": -263.1666666666667, + "threshold": 24.0, + "all_objects": [ + [ + "window", + 256.5 + ], + [ + "garbage bin", + 448.5 + ], + [ + "fan", + 53.0 + ], + [ + "picture", + 243.5 + ] + ] + } + }, + "mp3d_766": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_767": { + "classification": "ambiguous", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "chair", + "gt_center_y": 378.0, + "other_avg_y": 364.3333333333333, + "y_diff": 13.666666666666686, + "threshold": 24.0, + "all_objects": [ + [ + "bed", + 329.5 + ], + [ + "comforter", + 448.5 + ], + [ + "chair", + 378.0 + ], + [ + "light", + 315.0 + ] + ] + } + }, + "mp3d_768": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_769": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_770": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_771": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_772": { + "classification": "consistent", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "chair", + "gt_center_y": 413.0, + "other_avg_y": 243.83333333333334, + "y_diff": 169.16666666666666, + "threshold": 24.0, + "all_objects": [ + [ + "shelves", + 205.0 + ], + [ + "door", + 272.0 + ], + [ + "chair", + 413.0 + ], + [ + "wine", + 254.5 + ] + ] + } + }, + "mp3d_773": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_774": { + "classification": "consistent", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "chair", + "gt_center_y": 336.5, + "other_avg_y": 395.6666666666667, + "y_diff": -59.166666666666686, + "threshold": 24.0, + "all_objects": [ + [ + "cabinet", + 422.0 + ], + [ + "chair", + 336.5 + ], + [ + "coffee table", + 392.0 + ], + [ + "pillow", + 373.0 + ] + ] + } + }, + "mp3d_775": { + "classification": "counter", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "door", + "gt_center_y": 240.0, + "other_avg_y": 397.3333333333333, + "y_diff": -157.33333333333331, + "threshold": 24.0, + "all_objects": [ + [ + "chair", + 409.0 + ], + [ + "door", + 240.0 + ], + [ + "stool", + 434.0 + ], + [ + "piano", + 349.0 + ] + ] + } + }, + "mp3d_776": { + "classification": "consistent", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "television", + "gt_center_y": 172.5, + "other_avg_y": 338.3333333333333, + "y_diff": -165.83333333333331, + "threshold": 24.0, + "all_objects": [ + [ + "television", + 172.5 + ], + [ + "stove", + 374.0 + ], + [ + "sink", + 359.5 + ], + [ + "refridgerator", + 281.5 + ] + ] + } + }, + "mp3d_777": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_778": { + "classification": "consistent", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "curtain", + "gt_center_y": 219.5, + "other_avg_y": 396.0, + "y_diff": -176.5, + "threshold": 24.0, + "all_objects": [ + [ + "curtain", + 219.5 + ], + [ + "chair", + 397.0 + ], + [ + "desk", + 397.0 + ], + [ + "cabinet", + 394.0 + ] + ] + } + }, + "mp3d_779": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_780": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_781": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_782": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_783": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_784": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_785": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_786": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_787": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_788": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_789": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_790": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_791": { + "classification": "counter", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "door", + "gt_center_y": 277.5, + "other_avg_y": 376.0, + "y_diff": -98.5, + "threshold": 24.0, + "all_objects": [ + [ + "door", + 277.5 + ], + [ + "window", + 260.0 + ], + [ + "desk", + 443.0 + ], + [ + "air conditioner", + 425.0 + ] + ] + } + }, + "mp3d_792": { + "classification": "consistent", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "tray", + "gt_center_y": 452.5, + "other_avg_y": 392.0, + "y_diff": 60.5, + "threshold": 24.0, + "all_objects": [ + [ + "person", + 357.5 + ], + [ + "tray", + 452.5 + ], + [ + "coffee table", + 438.0 + ], + [ + "sofa", + 380.5 + ] + ] + } + }, + "mp3d_793": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_794": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_795": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_796": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_797": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_798": { + "classification": "consistent", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "table", + "gt_center_y": 417.0, + "other_avg_y": 272.3333333333333, + "y_diff": 144.66666666666669, + "threshold": 24.0, + "all_objects": [ + [ + "range hood", + 193.5 + ], + [ + "table", + 417.0 + ], + [ + "door", + 284.0 + ], + [ + "stove", + 339.5 + ] + ] + } + }, + "mp3d_799": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_800": { + "classification": "consistent", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "basket", + "gt_center_y": 404.5, + "other_avg_y": 266.0, + "y_diff": 138.5, + "threshold": 24.0, + "all_objects": [ + [ + "plant", + 190.0 + ], + [ + "counter", + 400.5 + ], + [ + "bathtub", + 207.5 + ], + [ + "basket", + 404.5 + ] + ] + } + }, + "mp3d_801": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_802": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_803": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_804": { + "classification": "consistent", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "fireplace", + "gt_center_y": 303.0, + "other_avg_y": 345.5, + "y_diff": -42.5, + "threshold": 24.0, + "all_objects": [ + [ + "shelves", + 348.5 + ], + [ + "fireplace", + 303.0 + ], + [ + "sculpture", + 340.5 + ], + [ + "piano", + 347.5 + ] + ] + } + }, + "mp3d_805": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_806": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_807": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_808": { + "classification": "consistent", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "window", + "gt_center_y": 235.5, + "other_avg_y": 309.1666666666667, + "y_diff": -73.66666666666669, + "threshold": 24.0, + "all_objects": [ + [ + "soap", + 317.0 + ], + [ + "counter", + 358.0 + ], + [ + "window", + 235.5 + ], + [ + "pot", + 252.5 + ] + ] + } + }, + "mp3d_809": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_810": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_811": { + "classification": "consistent", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "door", + "gt_center_y": 243.0, + "other_avg_y": 359.1666666666667, + "y_diff": -116.16666666666669, + "threshold": 24.0, + "all_objects": [ + [ + "mirror", + 263.5 + ], + [ + "door", + 243.0 + ], + [ + "sink", + 425.0 + ], + [ + "table", + 389.0 + ] + ] + } + }, + "mp3d_812": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_813": { + "classification": "counter", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "counter", + "gt_center_y": 274.0, + "other_avg_y": 228.16666666666666, + "y_diff": 45.83333333333334, + "threshold": 24.0, + "all_objects": [ + [ + "railing", + 197.5 + ], + [ + "curtain", + 226.5 + ], + [ + "counter", + 274.0 + ], + [ + "plant", + 260.5 + ] + ] + } + }, + "mp3d_814": { + "classification": "consistent", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "door", + "gt_center_y": 276.0, + "other_avg_y": 380.0, + "y_diff": -104.0, + "threshold": 24.0, + "all_objects": [ + [ + "refridgerator", + 387.5 + ], + [ + "fireplace", + 354.0 + ], + [ + "door", + 276.0 + ], + [ + "cabinet", + 398.5 + ] + ] + } + }, + "mp3d_815": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_816": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_817": { + "classification": "consistent", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "stool", + "gt_center_y": 356.5, + "other_avg_y": 326.3333333333333, + "y_diff": 30.166666666666686, + "threshold": 24.0, + "all_objects": [ + [ + "stool", + 356.5 + ], + [ + "fireplace", + 299.5 + ], + [ + "plant", + 257.0 + ], + [ + "rug", + 422.5 + ] + ] + } + }, + "mp3d_818": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_819": { + "classification": "ambiguous", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "sculpture", + "gt_center_y": 340.5, + "other_avg_y": 360.3333333333333, + "y_diff": -19.833333333333314, + "threshold": 24.0, + "all_objects": [ + [ + "sculpture", + 340.5 + ], + [ + "stool", + 430.5 + ], + [ + "fireplace", + 303.0 + ], + [ + "piano", + 347.5 + ] + ] + } + }, + "mp3d_820": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_821": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_822": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_823": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_824": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_825": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_826": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_827": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_828": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_829": { + "classification": "counter", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "curtain", + "gt_center_y": 261.0, + "other_avg_y": 323.5, + "y_diff": -62.5, + "threshold": 24.0, + "all_objects": [ + [ + "basket", + 379.0 + ], + [ + "picture", + 223.5 + ], + [ + "curtain", + 261.0 + ], + [ + "table", + 368.0 + ] + ] + } + }, + "mp3d_830": { + "classification": "consistent", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "chair", + "gt_center_y": 415.0, + "other_avg_y": 271.0, + "y_diff": 144.0, + "threshold": 24.0, + "all_objects": [ + [ + "door way", + 248.0 + ], + [ + "door", + 308.0 + ], + [ + "chair", + 415.0 + ], + [ + "mirror", + 257.0 + ] + ] + } + }, + "mp3d_831": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_832": { + "classification": "ambiguous", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "chair", + "gt_center_y": 351.5, + "other_avg_y": 341.3333333333333, + "y_diff": 10.166666666666686, + "threshold": 24.0, + "all_objects": [ + [ + "chair", + 351.5 + ], + [ + "table", + 383.0 + ], + [ + "monitor", + 257.5 + ], + [ + "scale", + 383.5 + ] + ] + } + }, + "mp3d_833": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_834": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_835": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_836": { + "classification": "consistent", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "printer", + "gt_center_y": 443.0, + "other_avg_y": 330.8333333333333, + "y_diff": 112.16666666666669, + "threshold": 24.0, + "all_objects": [ + [ + "printer", + 443.0 + ], + [ + "table", + 339.5 + ], + [ + "picture", + 223.5 + ], + [ + "book", + 429.5 + ] + ] + } + }, + "mp3d_837": { + "classification": "consistent", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "mirror", + "gt_center_y": 248.5, + "other_avg_y": 328.5, + "y_diff": -80.0, + "threshold": 24.0, + "all_objects": [ + [ + "cabinet", + 400.5 + ], + [ + "mirror", + 248.5 + ], + [ + "counter", + 345.0 + ], + [ + "door", + 240.0 + ] + ] + } + }, + "mp3d_838": { + "classification": "consistent", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "sofa", + "gt_center_y": 427.0, + "other_avg_y": 307.1666666666667, + "y_diff": 119.83333333333331, + "threshold": 24.0, + "all_objects": [ + [ + "sofa", + 427.0 + ], + [ + "stairs", + 312.0 + ], + [ + "banister", + 253.5 + ], + [ + "stool", + 356.0 + ] + ] + } + }, + "mp3d_839": { + "classification": "consistent", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "mirror", + "gt_center_y": 229.5, + "other_avg_y": 335.8333333333333, + "y_diff": -106.33333333333331, + "threshold": 24.0, + "all_objects": [ + [ + "chair", + 358.0 + ], + [ + "door", + 240.0 + ], + [ + "mirror", + 229.5 + ], + [ + "table", + 409.5 + ] + ] + } + }, + "mp3d_840": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_841": { + "classification": "ambiguous", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "sink", + "gt_center_y": 327.5, + "other_avg_y": 339.8333333333333, + "y_diff": -12.333333333333314, + "threshold": 24.0, + "all_objects": [ + [ + "counter", + 378.0 + ], + [ + "bar", + 401.5 + ], + [ + "sink", + 327.5 + ], + [ + "oven", + 240.0 + ] + ] + } + }, + "mp3d_842": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_843": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_844": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_845": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_846": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_847": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_848": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_849": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_850": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_851": { + "classification": "counter", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "table", + "gt_center_y": 444.0, + "other_avg_y": 382.0, + "y_diff": 62.0, + "threshold": 24.0, + "all_objects": [ + [ + "globe", + 252.0 + ], + [ + "tv stand", + 449.5 + ], + [ + "shelves", + 444.5 + ], + [ + "table", + 444.0 + ] + ] + } + }, + "mp3d_852": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_853": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_854": { + "classification": "consistent", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "window", + "gt_center_y": 181.0, + "other_avg_y": 318.5, + "y_diff": -137.5, + "threshold": 24.0, + "all_objects": [ + [ + "shelves", + 226.5 + ], + [ + "counter", + 335.0 + ], + [ + "bar", + 394.0 + ], + [ + "window", + 181.0 + ] + ] + } + }, + "mp3d_855": { + "classification": "consistent", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "chair", + "gt_center_y": 385.5, + "other_avg_y": 312.8333333333333, + "y_diff": 72.66666666666669, + "threshold": 24.0, + "all_objects": [ + [ + "chair", + 385.5 + ], + [ + "picture", + 182.0 + ], + [ + "table", + 370.0 + ], + [ + "stairs", + 386.5 + ] + ] + } + }, + "mp3d_856": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_857": { + "classification": "consistent", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "television", + "gt_center_y": 136.0, + "other_avg_y": 293.5, + "y_diff": -157.5, + "threshold": 24.0, + "all_objects": [ + [ + "book", + 450.5 + ], + [ + "lamp", + 52.5 + ], + [ + "table", + 377.5 + ], + [ + "television", + 136.0 + ] + ] + } + }, + "mp3d_858": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_859": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_860": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_861": { + "classification": "counter", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "television", + "gt_center_y": 217.5, + "other_avg_y": 361.8333333333333, + "y_diff": -144.33333333333331, + "threshold": 24.0, + "all_objects": [ + [ + "tray", + 452.5 + ], + [ + "person", + 357.5 + ], + [ + "door", + 275.5 + ], + [ + "television", + 217.5 + ] + ] + } + }, + "mp3d_862": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_863": { + "classification": "consistent", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "tray", + "gt_center_y": 432.0, + "other_avg_y": 338.3333333333333, + "y_diff": 93.66666666666669, + "threshold": 24.0, + "all_objects": [ + [ + "sofa", + 342.0 + ], + [ + "door", + 256.5 + ], + [ + "tray", + 432.0 + ], + [ + "table", + 416.5 + ] + ] + } + }, + "mp3d_864": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_865": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_866": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_867": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_868": { + "classification": "consistent", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "candlestick", + "gt_center_y": 421.5, + "other_avg_y": 279.6666666666667, + "y_diff": 141.83333333333331, + "threshold": 24.0, + "all_objects": [ + [ + "picture", + 160.0 + ], + [ + "sofa", + 330.0 + ], + [ + "candle", + 349.0 + ], + [ + "candlestick", + 421.5 + ] + ] + } + }, + "mp3d_869": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_870": { + "classification": "consistent", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "fireplace", + "gt_center_y": 300.5, + "other_avg_y": 331.3333333333333, + "y_diff": -30.833333333333314, + "threshold": 24.0, + "all_objects": [ + [ + "chair", + 348.0 + ], + [ + "sculpture", + 302.0 + ], + [ + "table", + 344.0 + ], + [ + "fireplace", + 300.5 + ] + ] + } + }, + "mp3d_871": { + "classification": "consistent", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "desk", + "gt_center_y": 373.5, + "other_avg_y": 242.33333333333334, + "y_diff": 131.16666666666666, + "threshold": 24.0, + "all_objects": [ + [ + "desk", + 373.5 + ], + [ + "lamp", + 57.5 + ], + [ + "basket", + 405.0 + ], + [ + "door", + 264.5 + ] + ] + } + }, + "mp3d_872": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_873": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_874": { + "classification": "consistent", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "window", + "gt_center_y": 249.0, + "other_avg_y": 368.3333333333333, + "y_diff": -119.33333333333331, + "threshold": 24.0, + "all_objects": [ + [ + "fireplace", + 399.0 + ], + [ + "picture", + 257.5 + ], + [ + "chair", + 448.5 + ], + [ + "window", + 249.0 + ] + ] + } + }, + "mp3d_875": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_876": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_877": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_878": { + "classification": "consistent", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "garbage bin", + "gt_center_y": 432.5, + "other_avg_y": 289.8333333333333, + "y_diff": 142.66666666666669, + "threshold": 24.0, + "all_objects": [ + [ + "toy", + 281.0 + ], + [ + "microwave", + 319.0 + ], + [ + "garbage bin", + 432.5 + ], + [ + "wreathe", + 269.5 + ] + ] + } + }, + "mp3d_879": { + "classification": "consistent", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "window", + "gt_center_y": 199.5, + "other_avg_y": 306.1666666666667, + "y_diff": -106.66666666666669, + "threshold": 24.0, + "all_objects": [ + [ + "sofa", + 383.0 + ], + [ + "counter", + 290.0 + ], + [ + "window", + 199.5 + ], + [ + "refridgerator", + 245.5 + ] + ] + } + }, + "mp3d_880": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_881": { + "classification": "consistent", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "window", + "gt_center_y": 234.0, + "other_avg_y": 285.0, + "y_diff": -51.0, + "threshold": 24.0, + "all_objects": [ + [ + "soap", + 332.0 + ], + [ + "window", + 234.0 + ], + [ + "stove", + 393.5 + ], + [ + "range hood", + 129.5 + ] + ] + } + }, + "mp3d_882": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_883": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_884": { + "classification": "consistent", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "utensil", + "gt_center_y": 442.0, + "other_avg_y": 352.6666666666667, + "y_diff": 89.33333333333331, + "threshold": 24.0, + "all_objects": [ + [ + "utensil", + 442.0 + ], + [ + "chair", + 409.5 + ], + [ + "pot", + 237.5 + ], + [ + "table", + 411.0 + ] + ] + } + }, + "mp3d_885": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_886": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_887": { + "classification": "consistent", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "desk", + "gt_center_y": 416.0, + "other_avg_y": 208.33333333333334, + "y_diff": 207.66666666666666, + "threshold": 24.0, + "all_objects": [ + [ + "desk", + 416.0 + ], + [ + "door", + 190.0 + ], + [ + "curtain", + 212.5 + ], + [ + "picture", + 222.5 + ] + ] + } + }, + "mp3d_888": { + "classification": "consistent", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "desk", + "gt_center_y": 425.0, + "other_avg_y": 245.33333333333334, + "y_diff": 179.66666666666666, + "threshold": 24.0, + "all_objects": [ + [ + "lamp", + 305.0 + ], + [ + "door", + 199.0 + ], + [ + "desk", + 425.0 + ], + [ + "curtain", + 232.0 + ] + ] + } + }, + "mp3d_889": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_890": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_891": { + "classification": "consistent", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "pot", + "gt_center_y": 341.0, + "other_avg_y": 259.8333333333333, + "y_diff": 81.16666666666669, + "threshold": 24.0, + "all_objects": [ + [ + "plant", + 219.5 + ], + [ + "pot", + 341.0 + ], + [ + "door", + 260.0 + ], + [ + "chest", + 300.0 + ] + ] + } + }, + "mp3d_892": { + "classification": "ambiguous", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "window", + "gt_center_y": 233.0, + "other_avg_y": 253.83333333333334, + "y_diff": -20.833333333333343, + "threshold": 24.0, + "all_objects": [ + [ + "window", + 233.0 + ], + [ + "door", + 203.5 + ], + [ + "picture", + 168.0 + ], + [ + "sofa", + 390.0 + ] + ] + } + }, + "mp3d_893": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_894": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_895": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_896": { + "classification": "consistent", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "door", + "gt_center_y": 272.0, + "other_avg_y": 304.5, + "y_diff": -32.5, + "threshold": 24.0, + "all_objects": [ + [ + "wine", + 254.5 + ], + [ + "television", + 246.0 + ], + [ + "chair", + 413.0 + ], + [ + "door", + 272.0 + ] + ] + } + }, + "mp3d_897": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_898": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_899": { + "classification": "consistent", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "cabinet", + "gt_center_y": 405.5, + "other_avg_y": 256.0, + "y_diff": 149.5, + "threshold": 24.0, + "all_objects": [ + [ + "pot", + 240.5 + ], + [ + "stove", + 342.5 + ], + [ + "cabinet", + 405.5 + ], + [ + "range hood", + 185.0 + ] + ] + } + }, + "mp3d_900": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_901": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_902": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_903": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_904": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_905": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_906": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_907": { + "classification": "consistent", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "pipe", + "gt_center_y": 43.5, + "other_avg_y": 344.0, + "y_diff": -300.5, + "threshold": 24.0, + "all_objects": [ + [ + "chair", + 373.0 + ], + [ + "counter", + 303.5 + ], + [ + "pipe", + 43.5 + ], + [ + "table", + 355.5 + ] + ] + } + }, + "mp3d_908": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_909": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_910": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_911": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_912": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_913": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_914": { + "classification": "counter", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "wreathe", + "gt_center_y": 285.5, + "other_avg_y": 355.8333333333333, + "y_diff": -70.33333333333331, + "threshold": 24.0, + "all_objects": [ + [ + "television", + 377.0 + ], + [ + "chair", + 436.5 + ], + [ + "globe", + 254.0 + ], + [ + "wreathe", + 285.5 + ] + ] + } + }, + "mp3d_915": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_916": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_917": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_918": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_919": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_920": { + "classification": "consistent", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "window", + "gt_center_y": 219.0, + "other_avg_y": 402.8333333333333, + "y_diff": -183.83333333333331, + "threshold": 24.0, + "all_objects": [ + [ + "sink", + 390.0 + ], + [ + "kitchen island", + 409.0 + ], + [ + "window", + 219.0 + ], + [ + "stove", + 409.5 + ] + ] + } + }, + "mp3d_921": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_922": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_923": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_924": { + "classification": "counter", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "sculpture", + "gt_center_y": 319.5, + "other_avg_y": 367.1666666666667, + "y_diff": -47.666666666666686, + "threshold": 24.0, + "all_objects": [ + [ + "sculpture", + 319.5 + ], + [ + "shelves", + 263.5 + ], + [ + "door", + 427.5 + ], + [ + "stairs", + 410.5 + ] + ] + } + }, + "mp3d_925": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_926": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_927": { + "classification": "counter", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "stove", + "gt_center_y": 245.5, + "other_avg_y": 333.3333333333333, + "y_diff": -87.83333333333331, + "threshold": 24.0, + "all_objects": [ + [ + "window", + 191.0 + ], + [ + "table", + 415.0 + ], + [ + "stove", + 245.5 + ], + [ + "cabinet", + 394.0 + ] + ] + } + }, + "mp3d_928": { + "classification": "consistent", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "coffee table", + "gt_center_y": 429.5, + "other_avg_y": 327.0, + "y_diff": 102.5, + "threshold": 24.0, + "all_objects": [ + [ + "person", + 352.5 + ], + [ + "coffee table", + 429.5 + ], + [ + "door", + 274.0 + ], + [ + "sofa", + 354.5 + ] + ] + } + }, + "mp3d_929": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_930": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_931": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_932": { + "classification": "consistent", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "soap", + "gt_center_y": 325.0, + "other_avg_y": 255.16666666666666, + "y_diff": 69.83333333333334, + "threshold": 24.0, + "all_objects": [ + [ + "range hood", + 161.0 + ], + [ + "stove", + 360.5 + ], + [ + "pot", + 244.0 + ], + [ + "soap", + 325.0 + ] + ] + } + }, + "mp3d_933": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_934": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_935": { + "classification": "consistent", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "lamp", + "gt_center_y": 273.0, + "other_avg_y": 335.3333333333333, + "y_diff": -62.333333333333314, + "threshold": 24.0, + "all_objects": [ + [ + "mirror", + 160.5 + ], + [ + "cabinet", + 435.5 + ], + [ + "lamp", + 273.0 + ], + [ + "bucket", + 410.0 + ] + ] + } + }, + "mp3d_936": { + "classification": "consistent", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "curtain", + "gt_center_y": 229.5, + "other_avg_y": 284.5, + "y_diff": -55.0, + "threshold": 24.0, + "all_objects": [ + [ + "mirror", + 232.5 + ], + [ + "bar", + 344.5 + ], + [ + "counter", + 276.5 + ], + [ + "curtain", + 229.5 + ] + ] + } + }, + "mp3d_937": { + "classification": "consistent", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "curtain", + "gt_center_y": 260.0, + "other_avg_y": 393.6666666666667, + "y_diff": -133.66666666666669, + "threshold": 24.0, + "all_objects": [ + [ + "sofa", + 391.5 + ], + [ + "curtain", + 260.0 + ], + [ + "coffee table", + 448.5 + ], + [ + "pillow", + 341.0 + ] + ] + } + }, + "mp3d_938": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_939": { + "classification": "consistent", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "stove", + "gt_center_y": 375.0, + "other_avg_y": 256.5, + "y_diff": 118.5, + "threshold": 24.0, + "all_objects": [ + [ + "pot", + 244.0 + ], + [ + "stove", + 375.0 + ], + [ + "counter", + 384.5 + ], + [ + "range hood", + 141.0 + ] + ] + } + }, + "mp3d_940": { + "classification": "consistent", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "stool", + "gt_center_y": 440.5, + "other_avg_y": 348.0, + "y_diff": 92.5, + "threshold": 24.0, + "all_objects": [ + [ + "stool", + 440.5 + ], + [ + "pillow", + 355.5 + ], + [ + "oven", + 275.0 + ], + [ + "kitchen island", + 413.5 + ] + ] + } + }, + "mp3d_941": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_942": { + "classification": "counter", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "monitor", + "gt_center_y": 350.5, + "other_avg_y": 216.66666666666666, + "y_diff": 133.83333333333334, + "threshold": 24.0, + "all_objects": [ + [ + "table", + 426.0 + ], + [ + "picture", + 182.0 + ], + [ + "fan", + 42.0 + ], + [ + "monitor", + 350.5 + ] + ] + } + }, + "mp3d_943": { + "classification": "consistent", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "sink", + "gt_center_y": 414.5, + "other_avg_y": 272.6666666666667, + "y_diff": 141.83333333333331, + "threshold": 24.0, + "all_objects": [ + [ + "window", + 191.0 + ], + [ + "bar", + 397.0 + ], + [ + "sink", + 414.5 + ], + [ + "refridgerator", + 230.0 + ] + ] + } + }, + "mp3d_944": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_945": { + "classification": "consistent", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "doll", + "gt_center_y": 401.0, + "other_avg_y": 344.6666666666667, + "y_diff": 56.333333333333314, + "threshold": 24.0, + "all_objects": [ + [ + "doll", + 401.0 + ], + [ + "bed", + 386.5 + ], + [ + "picture", + 228.5 + ], + [ + "night stand", + 419.0 + ] + ] + } + }, + "mp3d_946": { + "classification": "consistent", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "window", + "gt_center_y": 180.0, + "other_avg_y": 275.0, + "y_diff": -95.0, + "threshold": 24.0, + "all_objects": [ + [ + "oven", + 253.0 + ], + [ + "bar", + 401.0 + ], + [ + "shelves", + 171.0 + ], + [ + "window", + 180.0 + ] + ] + } + }, + "mp3d_947": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_948": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_949": { + "classification": "consistent", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "coffee table", + "gt_center_y": 427.5, + "other_avg_y": 302.6666666666667, + "y_diff": 124.83333333333331, + "threshold": 24.0, + "all_objects": [ + [ + "plant", + 314.5 + ], + [ + "television", + 239.0 + ], + [ + "tv stand", + 354.5 + ], + [ + "coffee table", + 427.5 + ] + ] + } + }, + "mp3d_950": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_951": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_952": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_953": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_954": { + "classification": "counter", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "lamp", + "gt_center_y": 202.0, + "other_avg_y": 312.1666666666667, + "y_diff": -110.16666666666669, + "threshold": 24.0, + "all_objects": [ + [ + "pot", + 307.5 + ], + [ + "toaster oven", + 315.5 + ], + [ + "lamp", + 202.0 + ], + [ + "microwave", + 313.5 + ] + ] + } + }, + "mp3d_955": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_956": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_957": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_958": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_959": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_960": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_961": { + "classification": "consistent", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "cabinet", + "gt_center_y": 397.5, + "other_avg_y": 221.66666666666666, + "y_diff": 175.83333333333334, + "threshold": 24.0, + "all_objects": [ + [ + "lamp", + 116.5 + ], + [ + "picture", + 325.5 + ], + [ + "window", + 223.0 + ], + [ + "cabinet", + 397.5 + ] + ] + } + }, + "mp3d_962": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_963": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_964": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_965": { + "classification": "consistent", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "picture", + "gt_center_y": 240.5, + "other_avg_y": 273.8333333333333, + "y_diff": -33.333333333333314, + "threshold": 24.0, + "all_objects": [ + [ + "table", + 418.5 + ], + [ + "pipe", + 28.5 + ], + [ + "cabinet", + 374.5 + ], + [ + "picture", + 240.5 + ] + ] + } + }, + "mp3d_966": { + "classification": "counter", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "chair", + "gt_center_y": 434.5, + "other_avg_y": 268.3333333333333, + "y_diff": 166.16666666666669, + "threshold": 24.0, + "all_objects": [ + [ + "chair", + 434.5 + ], + [ + "fan", + 51.0 + ], + [ + "computer", + 379.0 + ], + [ + "desk", + 375.0 + ] + ] + } + }, + "mp3d_967": { + "classification": "consistent", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "window", + "gt_center_y": 250.5, + "other_avg_y": 314.6666666666667, + "y_diff": -64.16666666666669, + "threshold": 24.0, + "all_objects": [ + [ + "air conditioner", + 390.0 + ], + [ + "fan", + 138.0 + ], + [ + "chair", + 416.0 + ], + [ + "window", + 250.5 + ] + ] + } + }, + "mp3d_968": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_969": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_970": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_971": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_972": { + "classification": "counter", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "door", + "gt_center_y": 217.5, + "other_avg_y": 251.83333333333334, + "y_diff": -34.33333333333334, + "threshold": 24.0, + "all_objects": [ + [ + "counter", + 320.0 + ], + [ + "door", + 217.5 + ], + [ + "picture", + 212.5 + ], + [ + "mirror", + 223.0 + ] + ] + } + }, + "mp3d_973": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_974": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_975": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_976": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_977": { + "classification": "consistent", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "window", + "gt_center_y": 191.0, + "other_avg_y": 310.1666666666667, + "y_diff": -119.16666666666669, + "threshold": 24.0, + "all_objects": [ + [ + "spice rack", + 270.0 + ], + [ + "table", + 415.0 + ], + [ + "stove", + 245.5 + ], + [ + "window", + 191.0 + ] + ] + } + }, + "mp3d_978": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_979": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_980": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_981": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_982": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_983": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_984": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_985": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_986": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_987": { + "classification": "consistent", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "vase", + "gt_center_y": 371.5, + "other_avg_y": 249.83333333333334, + "y_diff": 121.66666666666666, + "threshold": 24.0, + "all_objects": [ + [ + "plant", + 301.5 + ], + [ + "picture", + 174.0 + ], + [ + "fireplace", + 274.0 + ], + [ + "vase", + 371.5 + ] + ] + } + }, + "mp3d_988": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_989": { + "classification": "consistent", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "pool table", + "gt_center_y": 411.5, + "other_avg_y": 206.0, + "y_diff": 205.5, + "threshold": 24.0, + "all_objects": [ + [ + "cabinet", + 241.0 + ], + [ + "projector", + 115.0 + ], + [ + "pool table", + 411.5 + ], + [ + "door way", + 262.0 + ] + ] + } + }, + "mp3d_990": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_991": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_992": { + "classification": "consistent", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "stairs", + "gt_center_y": 325.0, + "other_avg_y": 194.0, + "y_diff": 131.0, + "threshold": 24.0, + "all_objects": [ + [ + "plant", + 435.5 + ], + [ + "stairs", + 325.0 + ], + [ + "banister", + 56.0 + ], + [ + "chest", + 90.5 + ] + ] + } + }, + "mp3d_993": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_994": { + "classification": "counter", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "lamp", + "gt_center_y": 82.5, + "other_avg_y": 258.1666666666667, + "y_diff": -175.66666666666669, + "threshold": 24.0, + "all_objects": [ + [ + "lamp", + 82.5 + ], + [ + "railing", + 218.0 + ], + [ + "mirror", + 195.5 + ], + [ + "cabinet", + 361.0 + ] + ] + } + }, + "mp3d_995": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_996": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_997": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_998": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_999": { + "classification": "consistent", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "night stand", + "gt_center_y": 318.5, + "other_avg_y": 372.0, + "y_diff": -53.5, + "threshold": 24.0, + "all_objects": [ + [ + "rug", + 430.0 + ], + [ + "sofa", + 370.5 + ], + [ + "night stand", + 318.5 + ], + [ + "bed", + 315.5 + ] + ] + } + }, + "mp3d_1000": { + "classification": "consistent", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "table", + "gt_center_y": 403.0, + "other_avg_y": 278.6666666666667, + "y_diff": 124.33333333333331, + "threshold": 24.0, + "all_objects": [ + [ + "basket", + 350.0 + ], + [ + "dresser", + 239.0 + ], + [ + "bed", + 247.0 + ], + [ + "table", + 403.0 + ] + ] + } + }, + "mp3d_1001": { + "classification": "consistent", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "picture", + "gt_center_y": 167.0, + "other_avg_y": 328.3333333333333, + "y_diff": -161.33333333333331, + "threshold": 24.0, + "all_objects": [ + [ + "door", + 240.0 + ], + [ + "sofa", + 411.5 + ], + [ + "lamp", + 333.5 + ], + [ + "picture", + 167.0 + ] + ] + } + }, + "mp3d_1002": { + "classification": "consistent", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "chair", + "gt_center_y": 308.0, + "other_avg_y": 336.3333333333333, + "y_diff": -28.333333333333314, + "threshold": 24.0, + "all_objects": [ + [ + "cabinet", + 263.0 + ], + [ + "plant", + 382.5 + ], + [ + "fireplace", + 363.5 + ], + [ + "chair", + 308.0 + ] + ] + } + }, + "mp3d_1003": { + "classification": "consistent", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "plate", + "gt_center_y": 442.0, + "other_avg_y": 254.33333333333334, + "y_diff": 187.66666666666666, + "threshold": 24.0, + "all_objects": [ + [ + "plate", + 442.0 + ], + [ + "telephone", + 253.5 + ], + [ + "window", + 110.0 + ], + [ + "cabinet", + 399.5 + ] + ] + } + }, + "mp3d_1004": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_1005": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_1006": { + "classification": "counter", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "desk", + "gt_center_y": 372.5, + "other_avg_y": 318.0, + "y_diff": 54.5, + "threshold": 24.0, + "all_objects": [ + [ + "shelves", + 310.0 + ], + [ + "picture", + 251.5 + ], + [ + "fireplace", + 392.5 + ], + [ + "desk", + 372.5 + ] + ] + } + }, + "mp3d_1007": { + "classification": "consistent", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "stool", + "gt_center_y": 369.5, + "other_avg_y": 290.6666666666667, + "y_diff": 78.83333333333331, + "threshold": 24.0, + "all_objects": [ + [ + "stool", + 369.5 + ], + [ + "lamp", + 281.5 + ], + [ + "rug", + 371.5 + ], + [ + "picture", + 219.0 + ] + ] + } + }, + "mp3d_1008": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_1009": { + "classification": "ambiguous", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "chair", + "gt_center_y": 314.0, + "other_avg_y": 321.8333333333333, + "y_diff": -7.833333333333314, + "threshold": 24.0, + "all_objects": [ + [ + "television", + 199.5 + ], + [ + "fireplace", + 319.0 + ], + [ + "ottoman", + 447.0 + ], + [ + "chair", + 314.0 + ] + ] + } + }, + "mp3d_1010": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_1011": { + "classification": "consistent", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "chair", + "gt_center_y": 307.0, + "other_avg_y": 352.3333333333333, + "y_diff": -45.333333333333314, + "threshold": 24.0, + "all_objects": [ + [ + "sculpture", + 432.5 + ], + [ + "window", + 229.0 + ], + [ + "sofa", + 395.5 + ], + [ + "chair", + 307.0 + ] + ] + } + }, + "mp3d_1012": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_1013": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_1014": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_1015": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_1016": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_1017": { + "classification": "consistent", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "table", + "gt_center_y": 433.0, + "other_avg_y": 318.6666666666667, + "y_diff": 114.33333333333331, + "threshold": 24.0, + "all_objects": [ + [ + "table", + 433.0 + ], + [ + "plant", + 285.0 + ], + [ + "sofa", + 293.5 + ], + [ + "picture", + 377.5 + ] + ] + } + }, + "mp3d_1018": { + "classification": "consistent", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "lamp", + "gt_center_y": 302.5, + "other_avg_y": 219.83333333333334, + "y_diff": 82.66666666666666, + "threshold": 24.0, + "all_objects": [ + [ + "fireplace", + 336.5 + ], + [ + "lamp", + 302.5 + ], + [ + "picture", + 129.5 + ], + [ + "railing", + 193.5 + ] + ] + } + }, + "mp3d_1019": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_1020": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_1021": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_1022": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_1023": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_1024": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_1025": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_1026": { + "classification": "consistent", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "cabinet", + "gt_center_y": 436.0, + "other_avg_y": 331.3333333333333, + "y_diff": 104.66666666666669, + "threshold": 24.0, + "all_objects": [ + [ + "cabinet", + 436.0 + ], + [ + "window", + 234.5 + ], + [ + "stove", + 375.0 + ], + [ + "counter", + 384.5 + ] + ] + } + }, + "mp3d_1027": { + "classification": "consistent", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "television", + "gt_center_y": 207.5, + "other_avg_y": 327.6666666666667, + "y_diff": -120.16666666666669, + "threshold": 24.0, + "all_objects": [ + [ + "lamp", + 269.0 + ], + [ + "television", + 207.5 + ], + [ + "ottoman", + 377.5 + ], + [ + "table", + 336.5 + ] + ] + } + }, + "mp3d_1028": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_1029": { + "classification": "consistent", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "desk", + "gt_center_y": 394.5, + "other_avg_y": 221.0, + "y_diff": 173.5, + "threshold": 24.0, + "all_objects": [ + [ + "table", + 378.5 + ], + [ + "mirror", + 241.0 + ], + [ + "desk", + 394.5 + ], + [ + "window", + 43.5 + ] + ] + } + }, + "mp3d_1030": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_1031": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_1032": { + "classification": "consistent", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "curtain", + "gt_center_y": 219.0, + "other_avg_y": 372.8333333333333, + "y_diff": -153.83333333333331, + "threshold": 24.0, + "all_objects": [ + [ + "curtain", + 219.0 + ], + [ + "stool", + 430.5 + ], + [ + "piano", + 347.5 + ], + [ + "sculpture", + 340.5 + ] + ] + } + }, + "mp3d_1033": { + "classification": "consistent", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "window", + "gt_center_y": 231.0, + "other_avg_y": 280.1666666666667, + "y_diff": -49.166666666666686, + "threshold": 24.0, + "all_objects": [ + [ + "stove", + 360.5 + ], + [ + "window", + 231.0 + ], + [ + "range hood", + 85.0 + ], + [ + "soap", + 395.0 + ] + ] + } + }, + "mp3d_1034": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_1035": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_1036": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_1037": { + "classification": "consistent", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "rug", + "gt_center_y": 453.5, + "other_avg_y": 327.5, + "y_diff": 126.0, + "threshold": 24.0, + "all_objects": [ + [ + "chair", + 363.0 + ], + [ + "cabinet", + 319.0 + ], + [ + "banister", + 300.5 + ], + [ + "rug", + 453.5 + ] + ] + } + }, + "mp3d_1038": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_1039": { + "classification": "counter", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "globe", + "gt_center_y": 259.0, + "other_avg_y": 286.8333333333333, + "y_diff": -27.833333333333314, + "threshold": 24.0, + "all_objects": [ + [ + "desk", + 375.5 + ], + [ + "globe", + 259.0 + ], + [ + "chair", + 433.0 + ], + [ + "fan", + 52.0 + ] + ] + } + }, + "mp3d_1040": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_1041": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_1042": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_1043": { + "classification": "ambiguous", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "chair", + "gt_center_y": 417.5, + "other_avg_y": 398.3333333333333, + "y_diff": 19.166666666666686, + "threshold": 24.0, + "all_objects": [ + [ + "chair", + 417.5 + ], + [ + "desk", + 419.5 + ], + [ + "bicycle", + 446.0 + ], + [ + "curtain", + 329.5 + ] + ] + } + }, + "mp3d_1044": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_1045": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_1046": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_1047": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_1048": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_1049": { + "classification": "consistent", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "chest", + "gt_center_y": 427.0, + "other_avg_y": 359.8333333333333, + "y_diff": 67.16666666666669, + "threshold": 24.0, + "all_objects": [ + [ + "chest", + 427.0 + ], + [ + "stool", + 366.5 + ], + [ + "fireplace", + 316.0 + ], + [ + "table", + 397.0 + ] + ] + } + }, + "mp3d_1050": { + "classification": "consistent", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "photo", + "gt_center_y": 265.0, + "other_avg_y": 358.3333333333333, + "y_diff": -93.33333333333331, + "threshold": 24.0, + "all_objects": [ + [ + "photo", + 265.0 + ], + [ + "coffee table", + 392.0 + ], + [ + "fireplace", + 375.5 + ], + [ + "microwave", + 307.5 + ] + ] + } + }, + "mp3d_1051": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_1052": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_1053": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_1054": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_1055": { + "classification": "ambiguous", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "cabinet", + "gt_center_y": 392.0, + "other_avg_y": 373.8333333333333, + "y_diff": 18.166666666666686, + "threshold": 24.0, + "all_objects": [ + [ + "shelves", + 433.5 + ], + [ + "cabinet", + 392.0 + ], + [ + "case", + 288.5 + ], + [ + "desk", + 399.5 + ] + ] + } + }, + "mp3d_1056": { + "classification": "ambiguous", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "desk", + "gt_center_y": 367.5, + "other_avg_y": 371.3333333333333, + "y_diff": -3.8333333333333144, + "threshold": 24.0, + "all_objects": [ + [ + "desk", + 367.5 + ], + [ + "lamp", + 343.5 + ], + [ + "shelves", + 317.5 + ], + [ + "chair", + 453.0 + ] + ] + } + }, + "mp3d_1057": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_1058": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_1059": { + "classification": "counter", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "curtain", + "gt_center_y": 134.0, + "other_avg_y": 328.5, + "y_diff": -194.5, + "threshold": 24.0, + "all_objects": [ + [ + "curtain", + 134.0 + ], + [ + "bed", + 356.5 + ], + [ + "ottoman", + 351.5 + ], + [ + "mirror", + 277.5 + ] + ] + } + }, + "mp3d_1060": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_1061": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_1062": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_1063": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_1064": { + "classification": "consistent", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "door", + "gt_center_y": 303.5, + "other_avg_y": 334.3333333333333, + "y_diff": -30.833333333333314, + "threshold": 24.0, + "all_objects": [ + [ + "globe", + 345.5 + ], + [ + "shelves", + 417.5 + ], + [ + "window", + 240.0 + ], + [ + "door", + 303.5 + ] + ] + } + }, + "mp3d_1065": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_1066": { + "classification": "consistent", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "bed", + "gt_center_y": 363.5, + "other_avg_y": 264.0, + "y_diff": 99.5, + "threshold": 24.0, + "all_objects": [ + [ + "lamp", + 245.0 + ], + [ + "bed", + 363.5 + ], + [ + "window", + 219.0 + ], + [ + "pillow", + 328.0 + ] + ] + } + }, + "mp3d_1067": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_1068": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_1069": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_1070": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_1071": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_1072": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_1073": { + "classification": "consistent", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "toaster oven", + "gt_center_y": 350.0, + "other_avg_y": 231.0, + "y_diff": 119.0, + "threshold": 24.0, + "all_objects": [ + [ + "clock", + 253.5 + ], + [ + "picture", + 153.0 + ], + [ + "toy", + 286.5 + ], + [ + "toaster oven", + 350.0 + ] + ] + } + }, + "mp3d_1074": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_1075": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_1076": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_1077": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_1078": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_1079": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_1080": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_1081": { + "classification": "consistent", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "coffee table", + "gt_center_y": 407.0, + "other_avg_y": 219.16666666666666, + "y_diff": 187.83333333333334, + "threshold": 24.0, + "all_objects": [ + [ + "television", + 224.5 + ], + [ + "door", + 224.0 + ], + [ + "coffee table", + 407.0 + ], + [ + "window", + 209.0 + ] + ] + } + }, + "mp3d_1082": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_1083": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_1084": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_1085": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_1086": { + "classification": "consistent", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "plant", + "gt_center_y": 365.5, + "other_avg_y": 279.5, + "y_diff": 86.0, + "threshold": 24.0, + "all_objects": [ + [ + "plant", + 365.5 + ], + [ + "bar", + 315.5 + ], + [ + "window", + 211.0 + ], + [ + "coffee table", + 312.0 + ] + ] + } + }, + "mp3d_1087": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_1088": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_1089": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_1090": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_1091": { + "classification": "consistent", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "window", + "gt_center_y": 220.5, + "other_avg_y": 317.8333333333333, + "y_diff": -97.33333333333331, + "threshold": 24.0, + "all_objects": [ + [ + "chair", + 444.0 + ], + [ + "window", + 220.5 + ], + [ + "picture", + 73.0 + ], + [ + "sculpture", + 436.5 + ] + ] + } + }, + "mp3d_1092": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_1093": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_1094": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_1095": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_1096": { + "classification": "ambiguous", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "counter", + "gt_center_y": 274.0, + "other_avg_y": 266.8333333333333, + "y_diff": 7.166666666666686, + "threshold": 24.0, + "all_objects": [ + [ + "railing", + 197.5 + ], + [ + "bar", + 342.5 + ], + [ + "counter", + 274.0 + ], + [ + "plant", + 260.5 + ] + ] + } + }, + "mp3d_1097": { + "classification": "consistent", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "toy", + "gt_center_y": 359.5, + "other_avg_y": 254.5, + "y_diff": 105.0, + "threshold": 24.0, + "all_objects": [ + [ + "towel", + 432.5 + ], + [ + "wreathe", + 274.0 + ], + [ + "picture", + 57.0 + ], + [ + "toy", + 359.5 + ] + ] + } + }, + "mp3d_1098": { + "classification": "consistent", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "bar", + "gt_center_y": 389.5, + "other_avg_y": 252.66666666666666, + "y_diff": 136.83333333333334, + "threshold": 24.0, + "all_objects": [ + [ + "oven", + 209.5 + ], + [ + "sink", + 332.0 + ], + [ + "bar", + 389.5 + ], + [ + "shelves", + 216.5 + ] + ] + } + }, + "mp3d_1099": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_1100": { + "classification": "consistent", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "stool", + "gt_center_y": 356.5, + "other_avg_y": 311.8333333333333, + "y_diff": 44.666666666666686, + "threshold": 24.0, + "all_objects": [ + [ + "stool", + 356.5 + ], + [ + "glass", + 256.0 + ], + [ + "plant", + 257.0 + ], + [ + "rug", + 422.5 + ] + ] + } + }, + "mp3d_1101": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_1102": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_1103": { + "classification": "consistent", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "table", + "gt_center_y": 409.5, + "other_avg_y": 297.1666666666667, + "y_diff": 112.33333333333331, + "threshold": 24.0, + "all_objects": [ + [ + "stove", + 331.5 + ], + [ + "pot", + 241.0 + ], + [ + "refridgerator", + 319.0 + ], + [ + "table", + 409.5 + ] + ] + } + }, + "mp3d_1104": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_1105": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_1106": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_1107": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_1108": { + "classification": "consistent", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "window", + "gt_center_y": 175.0, + "other_avg_y": 362.3333333333333, + "y_diff": -187.33333333333331, + "threshold": 24.0, + "all_objects": [ + [ + "counter", + 400.0 + ], + [ + "window", + 175.0 + ], + [ + "sink", + 376.0 + ], + [ + "cup", + 311.0 + ] + ] + } + }, + "mp3d_1109": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_1110": { + "classification": "consistent", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "picture", + "gt_center_y": 204.0, + "other_avg_y": 282.8333333333333, + "y_diff": -78.83333333333331, + "threshold": 24.0, + "all_objects": [ + [ + "curtain", + 240.0 + ], + [ + "picture", + 204.0 + ], + [ + "cup", + 244.5 + ], + [ + "counter", + 364.0 + ] + ] + } + }, + "mp3d_1111": { + "classification": "consistent", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "door", + "gt_center_y": 274.5, + "other_avg_y": 368.0, + "y_diff": -93.5, + "threshold": 24.0, + "all_objects": [ + [ + "sheet", + 353.5 + ], + [ + "pillow", + 323.5 + ], + [ + "bed", + 427.0 + ], + [ + "door", + 274.5 + ] + ] + } + }, + "mp3d_1112": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_1113": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_1114": { + "classification": "consistent", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "mirror", + "gt_center_y": 193.5, + "other_avg_y": 393.3333333333333, + "y_diff": -199.83333333333331, + "threshold": 24.0, + "all_objects": [ + [ + "fireplace", + 321.5 + ], + [ + "sofa", + 427.0 + ], + [ + "coffee table", + 431.5 + ], + [ + "mirror", + 193.5 + ] + ] + } + }, + "mp3d_1115": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_1116": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_1117": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_1118": { + "classification": "consistent", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "drawer", + "gt_center_y": 317.0, + "other_avg_y": 361.5, + "y_diff": -44.5, + "threshold": 24.0, + "all_objects": [ + [ + "drawer", + 317.0 + ], + [ + "table", + 388.0 + ], + [ + "stove", + 324.0 + ], + [ + "chair", + 372.5 + ] + ] + } + }, + "mp3d_1119": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_1120": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_1121": { + "classification": "consistent", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "counter", + "gt_center_y": 387.0, + "other_avg_y": 216.66666666666666, + "y_diff": 170.33333333333334, + "threshold": 24.0, + "all_objects": [ + [ + "television", + 175.5 + ], + [ + "refridgerator", + 290.0 + ], + [ + "counter", + 387.0 + ], + [ + "sofa", + 184.5 + ] + ] + } + }, + "mp3d_1122": { + "classification": "consistent", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "window", + "gt_center_y": 101.5, + "other_avg_y": 410.1666666666667, + "y_diff": -308.6666666666667, + "threshold": 24.0, + "all_objects": [ + [ + "bench", + 422.0 + ], + [ + "coffee table", + 391.5 + ], + [ + "window", + 101.5 + ], + [ + "towel", + 417.0 + ] + ] + } + }, + "mp3d_1123": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_1124": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_1125": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_1126": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_1127": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_1128": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_1129": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_1130": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_1131": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_1132": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_1133": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_1134": { + "classification": "consistent", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "television", + "gt_center_y": 200.5, + "other_avg_y": 351.5, + "y_diff": -151.0, + "threshold": 24.0, + "all_objects": [ + [ + "ottoman", + 426.0 + ], + [ + "television", + 200.5 + ], + [ + "mirror", + 318.0 + ], + [ + "fireplace", + 310.5 + ] + ] + } + }, + "mp3d_1135": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_1136": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_1137": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_1138": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_1139": { + "classification": "consistent", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "cabinet", + "gt_center_y": 433.0, + "other_avg_y": 302.5, + "y_diff": 130.5, + "threshold": 24.0, + "all_objects": [ + [ + "sink", + 397.5 + ], + [ + "jar", + 342.5 + ], + [ + "range hood", + 167.5 + ], + [ + "cabinet", + 433.0 + ] + ] + } + }, + "mp3d_1140": { + "classification": "consistent", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "bar", + "gt_center_y": 385.0, + "other_avg_y": 206.66666666666666, + "y_diff": 178.33333333333334, + "threshold": 24.0, + "all_objects": [ + [ + "oven", + 216.5 + ], + [ + "window", + 187.0 + ], + [ + "shelves", + 216.5 + ], + [ + "bar", + 385.0 + ] + ] + } + }, + "mp3d_1141": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_1142": { + "classification": "consistent", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "box", + "gt_center_y": 226.5, + "other_avg_y": 354.1666666666667, + "y_diff": -127.66666666666669, + "threshold": 24.0, + "all_objects": [ + [ + "bathtub", + 301.5 + ], + [ + "car", + 374.5 + ], + [ + "box", + 226.5 + ], + [ + "coffee table", + 386.5 + ] + ] + } + }, + "mp3d_1143": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_1144": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_1145": { + "classification": "consistent", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "picture", + "gt_center_y": 229.5, + "other_avg_y": 398.8333333333333, + "y_diff": -169.33333333333331, + "threshold": 24.0, + "all_objects": [ + [ + "night stand", + 434.0 + ], + [ + "picture", + 229.5 + ], + [ + "doll", + 393.5 + ], + [ + "lamp", + 369.0 + ] + ] + } + }, + "mp3d_1146": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_1147": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_1148": { + "classification": "consistent", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "door", + "gt_center_y": 275.0, + "other_avg_y": 382.5, + "y_diff": -107.5, + "threshold": 24.0, + "all_objects": [ + [ + "door", + 275.0 + ], + [ + "shelves", + 358.5 + ], + [ + "pillow", + 441.0 + ], + [ + "stand", + 348.0 + ] + ] + } + }, + "mp3d_1149": { + "classification": "consistent", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "bar", + "gt_center_y": 397.0, + "other_avg_y": 293.0, + "y_diff": 104.0, + "threshold": 24.0, + "all_objects": [ + [ + "cabinet", + 256.5 + ], + [ + "bar", + 397.0 + ], + [ + "refridgerator", + 257.0 + ], + [ + "sofa", + 365.5 + ] + ] + } + }, + "mp3d_1150": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_1151": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_1152": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_1153": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_1154": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_1155": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_1156": { + "classification": "consistent", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "ball", + "gt_center_y": 387.5, + "other_avg_y": 342.3333333333333, + "y_diff": 45.166666666666686, + "threshold": 24.0, + "all_objects": [ + [ + "chair", + 349.5 + ], + [ + "ball", + 387.5 + ], + [ + "sofa", + 311.5 + ], + [ + "table", + 366.0 + ] + ] + } + }, + "mp3d_1157": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_1158": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_1159": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_1160": { + "classification": "consistent", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "window", + "gt_center_y": 179.0, + "other_avg_y": 338.0, + "y_diff": -159.0, + "threshold": 24.0, + "all_objects": [ + [ + "table", + 400.5 + ], + [ + "window", + 179.0 + ], + [ + "monitor", + 262.0 + ], + [ + "tv stand", + 351.5 + ] + ] + } + }, + "mp3d_1161": { + "classification": "consistent", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "curtain", + "gt_center_y": 219.5, + "other_avg_y": 360.1666666666667, + "y_diff": -140.66666666666669, + "threshold": 24.0, + "all_objects": [ + [ + "coffee table", + 377.5 + ], + [ + "desk", + 347.0 + ], + [ + "chair", + 356.0 + ], + [ + "curtain", + 219.5 + ] + ] + } + }, + "mp3d_1162": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_1163": { + "classification": "counter", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "bed", + "gt_center_y": 354.5, + "other_avg_y": 273.3333333333333, + "y_diff": 81.16666666666669, + "threshold": 24.0, + "all_objects": [ + [ + "coffee table", + 423.5 + ], + [ + "fan", + 41.0 + ], + [ + "bed", + 354.5 + ], + [ + "ottoman", + 355.5 + ] + ] + } + }, + "mp3d_1164": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_1165": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_1166": { + "classification": "consistent", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "vase", + "gt_center_y": 269.5, + "other_avg_y": 302.8333333333333, + "y_diff": -33.333333333333314, + "threshold": 24.0, + "all_objects": [ + [ + "headboard", + 259.0 + ], + [ + "lamp", + 306.0 + ], + [ + "pillow", + 343.5 + ], + [ + "vase", + 269.5 + ] + ] + } + }, + "mp3d_1167": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_1168": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_1169": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_1170": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_1171": { + "classification": "consistent", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "counter", + "gt_center_y": 291.5, + "other_avg_y": 350.3333333333333, + "y_diff": -58.833333333333314, + "threshold": 24.0, + "all_objects": [ + [ + "refridgerator", + 248.0 + ], + [ + "sofa", + 376.5 + ], + [ + "counter", + 291.5 + ], + [ + "table", + 426.5 + ] + ] + } + }, + "mp3d_1172": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_1173": { + "classification": "consistent", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "mirror", + "gt_center_y": 206.5, + "other_avg_y": 338.3333333333333, + "y_diff": -131.83333333333331, + "threshold": 24.0, + "all_objects": [ + [ + "mirror", + 206.5 + ], + [ + "cabinet", + 318.0 + ], + [ + "picture", + 270.5 + ], + [ + "sofa", + 426.5 + ] + ] + } + }, + "mp3d_1174": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_1175": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_1176": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_1177": { + "classification": "counter", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "globe", + "gt_center_y": 307.0, + "other_avg_y": 348.6666666666667, + "y_diff": -41.666666666666686, + "threshold": 24.0, + "all_objects": [ + [ + "door", + 307.0 + ], + [ + "television", + 433.5 + ], + [ + "wreathe", + 305.5 + ], + [ + "globe", + 307.0 + ] + ] + } + }, + "mp3d_1178": { + "classification": "ambiguous", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "oven", + "gt_center_y": 386.5, + "other_avg_y": 370.6666666666667, + "y_diff": 15.833333333333314, + "threshold": 24.0, + "all_objects": [ + [ + "plant", + 341.5 + ], + [ + "refridgerator", + 352.0 + ], + [ + "pot", + 418.5 + ], + [ + "oven", + 386.5 + ] + ] + } + }, + "mp3d_1179": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_1180": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_1181": { + "classification": "ambiguous", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "cup", + "gt_center_y": 240.0, + "other_avg_y": 260.3333333333333, + "y_diff": -20.333333333333314, + "threshold": 24.0, + "all_objects": [ + [ + "mirror", + 174.0 + ], + [ + "counter", + 367.0 + ], + [ + "cup", + 240.0 + ], + [ + "door", + 240.0 + ] + ] + } + }, + "mp3d_1182": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_1183": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_1184": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_1185": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_1186": { + "classification": "consistent", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "blinds", + "gt_center_y": 235.0, + "other_avg_y": 407.3333333333333, + "y_diff": -172.33333333333331, + "threshold": 24.0, + "all_objects": [ + [ + "cabinet", + 424.0 + ], + [ + "towel", + 350.5 + ], + [ + "sink", + 447.5 + ], + [ + "blinds", + 235.0 + ] + ] + } + }, + "mp3d_1187": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_1188": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_1189": { + "classification": "consistent", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "sculpture", + "gt_center_y": 295.5, + "other_avg_y": 261.6666666666667, + "y_diff": 33.833333333333314, + "threshold": 24.0, + "all_objects": [ + [ + "sculpture", + 295.5 + ], + [ + "curtain", + 213.5 + ], + [ + "sofa", + 314.5 + ], + [ + "cabinet", + 257.0 + ] + ] + } + }, + "mp3d_1190": { + "classification": "ambiguous", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "cabinet", + "gt_center_y": 347.5, + "other_avg_y": 354.0, + "y_diff": -6.5, + "threshold": 24.0, + "all_objects": [ + [ + "shelves", + 409.5 + ], + [ + "cabinet", + 347.5 + ], + [ + "desk", + 377.0 + ], + [ + "case", + 275.5 + ] + ] + } + }, + "mp3d_1191": { + "classification": "ambiguous", + "relation": "close", + "data_source": "mp3d", + "details": { + "gt_object": "cabinet", + "gt_center_y": 240.0, + "other_avg_y": 228.0, + "y_diff": 12.0, + "threshold": 24.0, + "all_objects": [ + [ + "toy", + 355.0 + ], + [ + "picture", + 59.5 + ], + [ + "cabinet", + 240.0 + ], + [ + "window", + 269.5 + ] + ] + } + }, + "mp3d_1192": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_1193": { + "classification": "not_applicable", + "relation": "right" + }, + "mp3d_1194": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_1195": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_1196": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_1197": { + "classification": "not_applicable", + "relation": "under" + }, + "mp3d_1198": { + "classification": "not_applicable", + "relation": "left" + }, + "mp3d_1199": { + "classification": "not_applicable", + "relation": "above" + }, + "mp3d_1200": { + "classification": "consistent", + "relation": "far", + "data_source": "mp3d", + "details": { + "gt_object": "chair", + "gt_center_y": 343.0, + "other_avg_y": 408.8333333333333, + "y_diff": -65.83333333333331, + "threshold": 24.0, + "all_objects": [ + [ + "bed", + 443.0 + ], + [ + "chair", + 343.0 + ], + [ + "blanket", + 410.0 + ], + [ + "lamp", + 373.5 + ] + ] + } + }, + "ai2thor_0": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_1": { + "classification": "consistent", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "mirror", + "gt_center_y": 24.5, + "other_avg_y": 222.66666666666666, + "y_diff": -198.16666666666666, + "threshold": 15.0, + "all_objects": [ + [ + "garbagecan", + 277.5 + ], + [ + "mirror", + 24.5 + ], + [ + "spraybottle", + 178.0 + ], + [ + "sink", + 212.5 + ] + ] + } + }, + "ai2thor_2": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_3": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_4": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_5": { + "classification": "consistent", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "toaster", + "gt_center_y": 244.0, + "other_avg_y": 284.1666666666667, + "y_diff": -40.166666666666686, + "threshold": 15.0, + "all_objects": [ + [ + "cup", + 320.5 + ], + [ + "toaster", + 244.0 + ], + [ + "bread", + 297.5 + ], + [ + "lettuce", + 234.5 + ] + ] + } + }, + "ai2thor_6": { + "classification": "consistent", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "saltshaker", + "gt_center_y": 412.0, + "other_avg_y": 351.1666666666667, + "y_diff": 60.833333333333314, + "threshold": 15.0, + "all_objects": [ + [ + "butterknife", + 331.5 + ], + [ + "saltshaker", + 412.0 + ], + [ + "tomato", + 370.5 + ], + [ + "potato", + 351.5 + ] + ] + } + }, + "ai2thor_7": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_8": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_9": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_10": { + "classification": "counter", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "laptop", + "gt_center_y": 308.5, + "other_avg_y": 349.1666666666667, + "y_diff": -40.666666666666686, + "threshold": 15.0, + "all_objects": [ + [ + "pen", + 365.0 + ], + [ + "laptop", + 308.5 + ], + [ + "book", + 374.0 + ], + [ + "bowl", + 308.5 + ] + ] + } + }, + "ai2thor_11": { + "classification": "counter", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "alarmclock", + "gt_center_y": 303.0, + "other_avg_y": 334.8333333333333, + "y_diff": -31.833333333333314, + "threshold": 15.0, + "all_objects": [ + [ + "chair", + 424.0 + ], + [ + "alarmclock", + 303.0 + ], + [ + "book", + 267.5 + ], + [ + "laptop", + 313.0 + ] + ] + } + }, + "ai2thor_12": { + "classification": "consistent", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "vase", + "gt_center_y": 280.5, + "other_avg_y": 89.33333333333333, + "y_diff": 191.16666666666669, + "threshold": 15.0, + "all_objects": [ + [ + "vase", + 280.5 + ], + [ + "laptop", + 81.0 + ], + [ + "window", + 75.0 + ], + [ + "diningtable", + 112.0 + ] + ] + } + }, + "ai2thor_13": { + "classification": "consistent", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "candle", + "gt_center_y": 389.5, + "other_avg_y": 168.83333333333334, + "y_diff": 220.66666666666666, + "threshold": 15.0, + "all_objects": [ + [ + "mirror", + 65.0 + ], + [ + "countertop", + 154.5 + ], + [ + "candle", + 389.5 + ], + [ + "toiletpaper", + 287.0 + ] + ] + } + }, + "ai2thor_14": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_15": { + "classification": "consistent", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "tomato", + "gt_center_y": 307.0, + "other_avg_y": 332.5, + "y_diff": -25.5, + "threshold": 15.0, + "all_objects": [ + [ + "spatula", + 336.0 + ], + [ + "dishsponge", + 374.5 + ], + [ + "cup", + 287.0 + ], + [ + "tomato", + 307.0 + ] + ] + } + }, + "ai2thor_16": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_17": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_18": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_19": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_20": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_21": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_22": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_23": { + "classification": "consistent", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "glassbottle", + "gt_center_y": 324.0, + "other_avg_y": 294.5, + "y_diff": 29.5, + "threshold": 15.0, + "all_objects": [ + [ + "glassbottle", + 324.0 + ], + [ + "spatula", + 276.0 + ], + [ + "lettuce", + 275.5 + ], + [ + "apple", + 332.0 + ] + ] + } + }, + "ai2thor_24": { + "classification": "consistent", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "egg", + "gt_center_y": 280.5, + "other_avg_y": 173.5, + "y_diff": 107.0, + "threshold": 15.0, + "all_objects": [ + [ + "egg", + 280.5 + ], + [ + "garbagecan", + 143.5 + ], + [ + "soapbottle", + 153.0 + ], + [ + "pot", + 224.0 + ] + ] + } + }, + "ai2thor_25": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_26": { + "classification": "consistent", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "desklamp", + "gt_center_y": 242.5, + "other_avg_y": 372.0, + "y_diff": -129.5, + "threshold": 15.0, + "all_objects": [ + [ + "cd", + 426.0 + ], + [ + "desklamp", + 242.5 + ], + [ + "alarmclock", + 318.0 + ], + [ + "cellphone", + 372.0 + ] + ] + } + }, + "ai2thor_27": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_28": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_29": { + "classification": "consistent", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "alarmclock", + "gt_center_y": 247.5, + "other_avg_y": 319.0, + "y_diff": -71.5, + "threshold": 15.0, + "all_objects": [ + [ + "alarmclock", + 247.5 + ], + [ + "shelf", + 322.5 + ], + [ + "chair", + 396.0 + ], + [ + "book", + 238.5 + ] + ] + } + }, + "ai2thor_30": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_31": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_32": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_33": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_34": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_35": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_36": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_37": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_38": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_39": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_40": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_41": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_42": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_43": { + "classification": "counter", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "pot", + "gt_center_y": 190.5, + "other_avg_y": 259.8333333333333, + "y_diff": -69.33333333333331, + "threshold": 15.0, + "all_objects": [ + [ + "drawer", + 377.5 + ], + [ + "spatula", + 192.5 + ], + [ + "pot", + 190.5 + ], + [ + "egg", + 209.5 + ] + ] + } + }, + "ai2thor_44": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_45": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_46": { + "classification": "consistent", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "plate", + "gt_center_y": 306.0, + "other_avg_y": 273.3333333333333, + "y_diff": 32.666666666666686, + "threshold": 15.0, + "all_objects": [ + [ + "vase", + 259.0 + ], + [ + "bowl", + 249.5 + ], + [ + "newspaper", + 311.5 + ], + [ + "plate", + 306.0 + ] + ] + } + }, + "ai2thor_47": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_48": { + "classification": "consistent", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "garbagecan", + "gt_center_y": 370.0, + "other_avg_y": 95.33333333333333, + "y_diff": 274.6666666666667, + "threshold": 15.0, + "all_objects": [ + [ + "mirror", + 50.0 + ], + [ + "handtowelholder", + 22.5 + ], + [ + "garbagecan", + 370.0 + ], + [ + "countertop", + 213.5 + ] + ] + } + }, + "ai2thor_49": { + "classification": "consistent", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "dishsponge", + "gt_center_y": 293.5, + "other_avg_y": 212.33333333333334, + "y_diff": 81.16666666666666, + "threshold": 15.0, + "all_objects": [ + [ + "dishsponge", + 293.5 + ], + [ + "potato", + 197.0 + ], + [ + "lettuce", + 260.0 + ], + [ + "fork", + 180.0 + ] + ] + } + }, + "ai2thor_50": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_51": { + "classification": "consistent", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "dishsponge", + "gt_center_y": 415.0, + "other_avg_y": 270.6666666666667, + "y_diff": 144.33333333333331, + "threshold": 15.0, + "all_objects": [ + [ + "apple", + 220.0 + ], + [ + "toaster", + 212.0 + ], + [ + "dishsponge", + 415.0 + ], + [ + "spoon", + 380.0 + ] + ] + } + }, + "ai2thor_52": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_53": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_54": { + "classification": "consistent", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "window", + "gt_center_y": 51.0, + "other_avg_y": 253.83333333333334, + "y_diff": -202.83333333333334, + "threshold": 15.0, + "all_objects": [ + [ + "book", + 310.0 + ], + [ + "window", + 51.0 + ], + [ + "alarmclock", + 249.5 + ], + [ + "chair", + 202.0 + ] + ] + } + }, + "ai2thor_55": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_56": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_57": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_58": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_59": { + "classification": "consistent", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "toiletpaper", + "gt_center_y": 318.5, + "other_avg_y": 161.0, + "y_diff": 157.5, + "threshold": 15.0, + "all_objects": [ + [ + "mirror", + 47.0 + ], + [ + "soapbottle", + 120.5 + ], + [ + "scrubbrush", + 315.5 + ], + [ + "toiletpaper", + 318.5 + ] + ] + } + }, + "ai2thor_60": { + "classification": "consistent", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "spraybottle", + "gt_center_y": 208.0, + "other_avg_y": 292.0, + "y_diff": -84.0, + "threshold": 15.0, + "all_objects": [ + [ + "soapbottle", + 268.0 + ], + [ + "toiletpaper", + 237.0 + ], + [ + "spraybottle", + 208.0 + ], + [ + "soapbar", + 371.0 + ] + ] + } + }, + "ai2thor_61": { + "classification": "consistent", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "creditcard", + "gt_center_y": 380.5, + "other_avg_y": 165.16666666666666, + "y_diff": 215.33333333333334, + "threshold": 15.0, + "all_objects": [ + [ + "plate", + 234.5 + ], + [ + "laptop", + 76.0 + ], + [ + "newspaper", + 185.0 + ], + [ + "creditcard", + 380.5 + ] + ] + } + }, + "ai2thor_62": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_63": { + "classification": "consistent", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "bread", + "gt_center_y": 372.0, + "other_avg_y": 282.5, + "y_diff": 89.5, + "threshold": 15.0, + "all_objects": [ + [ + "bread", + 372.0 + ], + [ + "soapbottle", + 234.0 + ], + [ + "spatula", + 412.0 + ], + [ + "pan", + 201.5 + ] + ] + } + }, + "ai2thor_64": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_65": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_66": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_67": { + "classification": "consistent", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "alarmclock", + "gt_center_y": 247.5, + "other_avg_y": 359.8333333333333, + "y_diff": -112.33333333333331, + "threshold": 15.0, + "all_objects": [ + [ + "alarmclock", + 247.5 + ], + [ + "chair", + 396.0 + ], + [ + "cellphone", + 361.0 + ], + [ + "shelf", + 322.5 + ] + ] + } + }, + "ai2thor_68": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_69": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_70": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_71": { + "classification": "consistent", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "egg", + "gt_center_y": 400.5, + "other_avg_y": 324.3333333333333, + "y_diff": 76.16666666666669, + "threshold": 15.0, + "all_objects": [ + [ + "egg", + 400.5 + ], + [ + "plate", + 337.0 + ], + [ + "spoon", + 374.5 + ], + [ + "toaster", + 261.5 + ] + ] + } + }, + "ai2thor_72": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_73": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_74": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_75": { + "classification": "consistent", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "sink", + "gt_center_y": 212.5, + "other_avg_y": 229.33333333333334, + "y_diff": -16.833333333333343, + "threshold": 15.0, + "all_objects": [ + [ + "spraybottle", + 219.0 + ], + [ + "garbagecan", + 277.5 + ], + [ + "sink", + 212.5 + ], + [ + "toiletpaper", + 191.5 + ] + ] + } + }, + "ai2thor_76": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_77": { + "classification": "consistent", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "bowl", + "gt_center_y": 334.0, + "other_avg_y": 220.0, + "y_diff": 114.0, + "threshold": 15.0, + "all_objects": [ + [ + "tomato", + 295.5 + ], + [ + "houseplant", + 101.5 + ], + [ + "spoon", + 263.0 + ], + [ + "bowl", + 334.0 + ] + ] + } + }, + "ai2thor_78": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_79": { + "classification": "consistent", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "fridge", + "gt_center_y": 74.5, + "other_avg_y": 244.16666666666666, + "y_diff": -169.66666666666666, + "threshold": 15.0, + "all_objects": [ + [ + "fridge", + 74.5 + ], + [ + "tomato", + 211.5 + ], + [ + "pan", + 311.0 + ], + [ + "soapbottle", + 210.0 + ] + ] + } + }, + "ai2thor_80": { + "classification": "consistent", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "tomato", + "gt_center_y": 370.0, + "other_avg_y": 184.16666666666666, + "y_diff": 185.83333333333334, + "threshold": 15.0, + "all_objects": [ + [ + "potato", + 183.0 + ], + [ + "lettuce", + 133.0 + ], + [ + "apple", + 236.5 + ], + [ + "tomato", + 370.0 + ] + ] + } + }, + "ai2thor_81": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_82": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_83": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_84": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_85": { + "classification": "consistent", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "chair", + "gt_center_y": 194.0, + "other_avg_y": 286.8333333333333, + "y_diff": -92.83333333333331, + "threshold": 15.0, + "all_objects": [ + [ + "spatula", + 282.5 + ], + [ + "plate", + 302.0 + ], + [ + "lettuce", + 276.0 + ], + [ + "chair", + 194.0 + ] + ] + } + }, + "ai2thor_86": { + "classification": "consistent", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "cellphone", + "gt_center_y": 393.0, + "other_avg_y": 265.5, + "y_diff": 127.5, + "threshold": 15.0, + "all_objects": [ + [ + "book", + 303.5 + ], + [ + "alarmclock", + 234.0 + ], + [ + "vase", + 259.0 + ], + [ + "cellphone", + 393.0 + ] + ] + } + }, + "ai2thor_87": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_88": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_89": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_90": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_91": { + "classification": "consistent", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "sidetable", + "gt_center_y": 239.0, + "other_avg_y": 191.16666666666666, + "y_diff": 47.83333333333334, + "threshold": 15.0, + "all_objects": [ + [ + "bread", + 153.5 + ], + [ + "bowl", + 176.0 + ], + [ + "mug", + 244.0 + ], + [ + "sidetable", + 239.0 + ] + ] + } + }, + "ai2thor_92": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_93": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_94": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_95": { + "classification": "consistent", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "keychain", + "gt_center_y": 396.0, + "other_avg_y": 163.66666666666666, + "y_diff": 232.33333333333334, + "threshold": 15.0, + "all_objects": [ + [ + "sidetable", + 145.5 + ], + [ + "bowl", + 108.0 + ], + [ + "keychain", + 396.0 + ], + [ + "pillow", + 237.5 + ] + ] + } + }, + "ai2thor_96": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_97": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_98": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_99": { + "classification": "consistent", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "lettuce", + "gt_center_y": 351.0, + "other_avg_y": 266.0, + "y_diff": 85.0, + "threshold": 15.0, + "all_objects": [ + [ + "lettuce", + 351.0 + ], + [ + "cup", + 259.5 + ], + [ + "spatula", + 226.5 + ], + [ + "knife", + 312.0 + ] + ] + } + }, + "ai2thor_100": { + "classification": "consistent", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "plate", + "gt_center_y": 277.5, + "other_avg_y": 163.0, + "y_diff": 114.5, + "threshold": 15.0, + "all_objects": [ + [ + "potato", + 188.5 + ], + [ + "fridge", + 73.5 + ], + [ + "tomato", + 227.0 + ], + [ + "plate", + 277.5 + ] + ] + } + }, + "ai2thor_101": { + "classification": "counter", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "chair", + "gt_center_y": 418.0, + "other_avg_y": 317.1666666666667, + "y_diff": 100.83333333333331, + "threshold": 15.0, + "all_objects": [ + [ + "mug", + 326.5 + ], + [ + "bowl", + 320.5 + ], + [ + "alarmclock", + 304.5 + ], + [ + "chair", + 418.0 + ] + ] + } + }, + "ai2thor_102": { + "classification": "consistent", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "lettuce", + "gt_center_y": 276.0, + "other_avg_y": 318.1666666666667, + "y_diff": -42.166666666666686, + "threshold": 15.0, + "all_objects": [ + [ + "plate", + 302.0 + ], + [ + "lettuce", + 276.0 + ], + [ + "tomato", + 370.0 + ], + [ + "spatula", + 282.5 + ] + ] + } + }, + "ai2thor_103": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_104": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_105": { + "classification": "consistent", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "plate", + "gt_center_y": 362.5, + "other_avg_y": 190.66666666666666, + "y_diff": 171.83333333333334, + "threshold": 15.0, + "all_objects": [ + [ + "plate", + 362.5 + ], + [ + "houseplant", + 101.5 + ], + [ + "lettuce", + 314.0 + ], + [ + "glassbottle", + 156.5 + ] + ] + } + }, + "ai2thor_106": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_107": { + "classification": "consistent", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "chair", + "gt_center_y": 194.0, + "other_avg_y": 278.0, + "y_diff": -84.0, + "threshold": 15.0, + "all_objects": [ + [ + "ladle", + 261.0 + ], + [ + "cup", + 232.5 + ], + [ + "chair", + 194.0 + ], + [ + "soapbottle", + 340.5 + ] + ] + } + }, + "ai2thor_108": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_109": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_110": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_111": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_112": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_113": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_114": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_115": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_116": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_117": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_118": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_119": { + "classification": "consistent", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "handtowel", + "gt_center_y": 205.5, + "other_avg_y": 263.0, + "y_diff": -57.5, + "threshold": 15.0, + "all_objects": [ + [ + "cabinet", + 66.5 + ], + [ + "spraybottle", + 326.5 + ], + [ + "handtowel", + 205.5 + ], + [ + "tissuebox", + 396.0 + ] + ] + } + }, + "ai2thor_120": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_121": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_122": { + "classification": "consistent", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "tomato", + "gt_center_y": 34.0, + "other_avg_y": 132.5, + "y_diff": -98.5, + "threshold": 15.0, + "all_objects": [ + [ + "plate", + 180.0 + ], + [ + "garbagecan", + 87.0 + ], + [ + "tomato", + 34.0 + ], + [ + "lettuce", + 130.5 + ] + ] + } + }, + "ai2thor_123": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_124": { + "classification": "consistent", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "pot", + "gt_center_y": 94.5, + "other_avg_y": 213.0, + "y_diff": -118.5, + "threshold": 15.0, + "all_objects": [ + [ + "potato", + 199.5 + ], + [ + "tomato", + 149.0 + ], + [ + "kettle", + 290.5 + ], + [ + "pot", + 94.5 + ] + ] + } + }, + "ai2thor_125": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_126": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_127": { + "classification": "consistent", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "bowl", + "gt_center_y": 326.0, + "other_avg_y": 301.8333333333333, + "y_diff": 24.166666666666686, + "threshold": 15.0, + "all_objects": [ + [ + "bowl", + 326.0 + ], + [ + "garbagecan", + 372.0 + ], + [ + "soapbottle", + 203.0 + ], + [ + "potato", + 330.5 + ] + ] + } + }, + "ai2thor_128": { + "classification": "consistent", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "chair", + "gt_center_y": 372.0, + "other_avg_y": 247.83333333333334, + "y_diff": 124.16666666666666, + "threshold": 15.0, + "all_objects": [ + [ + "laptop", + 215.0 + ], + [ + "shelf", + 346.5 + ], + [ + "desklamp", + 182.0 + ], + [ + "chair", + 372.0 + ] + ] + } + }, + "ai2thor_129": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_130": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_131": { + "classification": "consistent", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "mirror", + "gt_center_y": 24.5, + "other_avg_y": 227.16666666666666, + "y_diff": -202.66666666666666, + "threshold": 15.0, + "all_objects": [ + [ + "toiletpaper", + 191.5 + ], + [ + "mirror", + 24.5 + ], + [ + "sink", + 212.5 + ], + [ + "garbagecan", + 277.5 + ] + ] + } + }, + "ai2thor_132": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_133": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_134": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_135": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_136": { + "classification": "consistent", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "cellphone", + "gt_center_y": 327.5, + "other_avg_y": 300.1666666666667, + "y_diff": 27.333333333333314, + "threshold": 15.0, + "all_objects": [ + [ + "glassbottle", + 291.0 + ], + [ + "cellphone", + 327.5 + ], + [ + "fridge", + 326.0 + ], + [ + "pan", + 283.5 + ] + ] + } + }, + "ai2thor_137": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_138": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_139": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_140": { + "classification": "consistent", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "peppershaker", + "gt_center_y": 347.5, + "other_avg_y": 322.1666666666667, + "y_diff": 25.333333333333314, + "threshold": 15.0, + "all_objects": [ + [ + "peppershaker", + 347.5 + ], + [ + "dishsponge", + 376.5 + ], + [ + "mug", + 280.0 + ], + [ + "cup", + 310.0 + ] + ] + } + }, + "ai2thor_141": { + "classification": "consistent", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "mirror", + "gt_center_y": 51.0, + "other_avg_y": 245.66666666666666, + "y_diff": -194.66666666666666, + "threshold": 15.0, + "all_objects": [ + [ + "countertop", + 199.0 + ], + [ + "towel", + 334.0 + ], + [ + "sink", + 204.0 + ], + [ + "mirror", + 51.0 + ] + ] + } + }, + "ai2thor_142": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_143": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_144": { + "classification": "consistent", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "soapbar", + "gt_center_y": 372.0, + "other_avg_y": 178.16666666666666, + "y_diff": 193.83333333333334, + "threshold": 15.0, + "all_objects": [ + [ + "soapbar", + 372.0 + ], + [ + "scrubbrush", + 160.5 + ], + [ + "toiletpaperhanger", + 161.5 + ], + [ + "plunger", + 212.5 + ] + ] + } + }, + "ai2thor_145": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_146": { + "classification": "counter", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "chair", + "gt_center_y": 229.5, + "other_avg_y": 206.16666666666666, + "y_diff": 23.333333333333343, + "threshold": 15.0, + "all_objects": [ + [ + "dishsponge", + 193.5 + ], + [ + "potato", + 191.5 + ], + [ + "chair", + 229.5 + ], + [ + "lettuce", + 233.5 + ] + ] + } + }, + "ai2thor_147": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_148": { + "classification": "consistent", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "tomato", + "gt_center_y": 386.0, + "other_avg_y": 269.6666666666667, + "y_diff": 116.33333333333331, + "threshold": 15.0, + "all_objects": [ + [ + "tomato", + 386.0 + ], + [ + "mug", + 276.5 + ], + [ + "toaster", + 246.0 + ], + [ + "bread", + 286.5 + ] + ] + } + }, + "ai2thor_149": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_150": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_151": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_152": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_153": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_154": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_155": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_156": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_157": { + "classification": "consistent", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "tomato", + "gt_center_y": 252.0, + "other_avg_y": 346.8333333333333, + "y_diff": -94.83333333333331, + "threshold": 15.0, + "all_objects": [ + [ + "tomato", + 252.0 + ], + [ + "lettuce", + 391.0 + ], + [ + "plate", + 291.0 + ], + [ + "spoon", + 358.5 + ] + ] + } + }, + "ai2thor_158": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_159": { + "classification": "consistent", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "soapbar", + "gt_center_y": 371.0, + "other_avg_y": 245.66666666666666, + "y_diff": 125.33333333333334, + "threshold": 15.0, + "all_objects": [ + [ + "towel", + 334.0 + ], + [ + "sink", + 204.0 + ], + [ + "countertop", + 199.0 + ], + [ + "soapbar", + 371.0 + ] + ] + } + }, + "ai2thor_160": { + "classification": "consistent", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "handtowel", + "gt_center_y": 155.5, + "other_avg_y": 334.5, + "y_diff": -179.0, + "threshold": 15.0, + "all_objects": [ + [ + "dishsponge", + 366.0 + ], + [ + "handtowel", + 155.5 + ], + [ + "cloth", + 325.5 + ], + [ + "spraybottle", + 312.0 + ] + ] + } + }, + "ai2thor_161": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_162": { + "classification": "consistent", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "floorlamp", + "gt_center_y": 38.0, + "other_avg_y": 273.1666666666667, + "y_diff": -235.16666666666669, + "threshold": 15.0, + "all_objects": [ + [ + "remotecontrol", + 340.0 + ], + [ + "plate", + 305.0 + ], + [ + "box", + 174.5 + ], + [ + "floorlamp", + 38.0 + ] + ] + } + }, + "ai2thor_163": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_164": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_165": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_166": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_167": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_168": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_169": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_170": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_171": { + "classification": "consistent", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "countertop", + "gt_center_y": 315.5, + "other_avg_y": 116.16666666666667, + "y_diff": 199.33333333333331, + "threshold": 15.0, + "all_objects": [ + [ + "microwave", + 27.5 + ], + [ + "cabinet", + 22.0 + ], + [ + "countertop", + 315.5 + ], + [ + "pot", + 299.0 + ] + ] + } + }, + "ai2thor_172": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_173": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_174": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_175": { + "classification": "consistent", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "cloth", + "gt_center_y": 403.5, + "other_avg_y": 275.6666666666667, + "y_diff": 127.83333333333331, + "threshold": 15.0, + "all_objects": [ + [ + "countertop", + 403.0 + ], + [ + "towel", + 148.5 + ], + [ + "cloth", + 403.5 + ], + [ + "showerdoor", + 275.5 + ] + ] + } + }, + "ai2thor_176": { + "classification": "consistent", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "chair", + "gt_center_y": 194.0, + "other_avg_y": 286.8333333333333, + "y_diff": -92.83333333333331, + "threshold": 15.0, + "all_objects": [ + [ + "chair", + 194.0 + ], + [ + "spatula", + 282.5 + ], + [ + "lettuce", + 276.0 + ], + [ + "plate", + 302.0 + ] + ] + } + }, + "ai2thor_177": { + "classification": "consistent", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "pan", + "gt_center_y": 311.0, + "other_avg_y": 139.83333333333334, + "y_diff": 171.16666666666666, + "threshold": 15.0, + "all_objects": [ + [ + "window", + 24.0 + ], + [ + "garbagecan", + 185.5 + ], + [ + "pan", + 311.0 + ], + [ + "soapbottle", + 210.0 + ] + ] + } + }, + "ai2thor_178": { + "classification": "consistent", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "spraybottle", + "gt_center_y": 367.0, + "other_avg_y": 265.1666666666667, + "y_diff": 101.83333333333331, + "threshold": 15.0, + "all_objects": [ + [ + "sidetable", + 375.0 + ], + [ + "tissuebox", + 332.0 + ], + [ + "handtowel", + 88.5 + ], + [ + "spraybottle", + 367.0 + ] + ] + } + }, + "ai2thor_179": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_180": { + "classification": "consistent", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "drawer", + "gt_center_y": 409.0, + "other_avg_y": 267.1666666666667, + "y_diff": 141.83333333333331, + "threshold": 15.0, + "all_objects": [ + [ + "drawer", + 409.0 + ], + [ + "lettuce", + 280.0 + ], + [ + "potato", + 294.5 + ], + [ + "microwave", + 227.0 + ] + ] + } + }, + "ai2thor_181": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_182": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_183": { + "classification": "consistent", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "cabinet", + "gt_center_y": 31.0, + "other_avg_y": 359.0, + "y_diff": -328.0, + "threshold": 15.0, + "all_objects": [ + [ + "potato", + 341.0 + ], + [ + "apple", + 370.0 + ], + [ + "cabinet", + 31.0 + ], + [ + "spatula", + 366.0 + ] + ] + } + }, + "ai2thor_184": { + "classification": "consistent", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "winebottle", + "gt_center_y": 217.5, + "other_avg_y": 327.0, + "y_diff": -109.5, + "threshold": 15.0, + "all_objects": [ + [ + "bread", + 348.5 + ], + [ + "kettle", + 277.0 + ], + [ + "bowl", + 355.5 + ], + [ + "winebottle", + 217.5 + ] + ] + } + }, + "ai2thor_185": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_186": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_187": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_188": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_189": { + "classification": "consistent", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "tomato", + "gt_center_y": 374.5, + "other_avg_y": 312.3333333333333, + "y_diff": 62.166666666666686, + "threshold": 15.0, + "all_objects": [ + [ + "kettle", + 318.0 + ], + [ + "tomato", + 374.5 + ], + [ + "glassbottle", + 343.0 + ], + [ + "spatula", + 276.0 + ] + ] + } + }, + "ai2thor_190": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_191": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_192": { + "classification": "consistent", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "plate", + "gt_center_y": 342.0, + "other_avg_y": 294.3333333333333, + "y_diff": 47.666666666666686, + "threshold": 15.0, + "all_objects": [ + [ + "spatula", + 300.0 + ], + [ + "apple", + 321.5 + ], + [ + "dishsponge", + 261.5 + ], + [ + "plate", + 342.0 + ] + ] + } + }, + "ai2thor_193": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_194": { + "classification": "counter", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "bread", + "gt_center_y": 248.5, + "other_avg_y": 204.66666666666666, + "y_diff": 43.83333333333334, + "threshold": 15.0, + "all_objects": [ + [ + "bread", + 248.5 + ], + [ + "countertop", + 189.5 + ], + [ + "soapbottle", + 289.5 + ], + [ + "microwave", + 135.0 + ] + ] + } + }, + "ai2thor_195": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_196": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_197": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_198": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_199": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_200": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_201": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_202": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_203": { + "classification": "consistent", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "vase", + "gt_center_y": 357.0, + "other_avg_y": 331.6666666666667, + "y_diff": 25.333333333333314, + "threshold": 15.0, + "all_objects": [ + [ + "vase", + 357.0 + ], + [ + "bed", + 327.0 + ], + [ + "sidetable", + 309.5 + ], + [ + "chair", + 358.5 + ] + ] + } + }, + "ai2thor_204": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_205": { + "classification": "consistent", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "winebottle", + "gt_center_y": 131.0, + "other_avg_y": 277.6666666666667, + "y_diff": -146.66666666666669, + "threshold": 15.0, + "all_objects": [ + [ + "bread", + 257.0 + ], + [ + "winebottle", + 131.0 + ], + [ + "bowl", + 210.0 + ], + [ + "dishsponge", + 366.0 + ] + ] + } + }, + "ai2thor_206": { + "classification": "consistent", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "egg", + "gt_center_y": 280.5, + "other_avg_y": 173.0, + "y_diff": 107.5, + "threshold": 15.0, + "all_objects": [ + [ + "pot", + 222.5 + ], + [ + "egg", + 280.5 + ], + [ + "garbagecan", + 143.5 + ], + [ + "soapbottle", + 153.0 + ] + ] + } + }, + "ai2thor_207": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_208": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_209": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_210": { + "classification": "consistent", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "lettuce", + "gt_center_y": 372.0, + "other_avg_y": 329.1666666666667, + "y_diff": 42.833333333333314, + "threshold": 15.0, + "all_objects": [ + [ + "spatula", + 325.5 + ], + [ + "potato", + 343.5 + ], + [ + "lettuce", + 372.0 + ], + [ + "dishsponge", + 318.5 + ] + ] + } + }, + "ai2thor_211": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_212": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_213": { + "classification": "ambiguous", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "bed", + "gt_center_y": 365.0, + "other_avg_y": 370.3333333333333, + "y_diff": -5.333333333333314, + "threshold": 15.0, + "all_objects": [ + [ + "bed", + 365.0 + ], + [ + "vase", + 406.5 + ], + [ + "laptop", + 322.5 + ], + [ + "sidetable", + 382.0 + ] + ] + } + }, + "ai2thor_214": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_215": { + "classification": "consistent", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "garbagecan", + "gt_center_y": 405.0, + "other_avg_y": 224.83333333333334, + "y_diff": 180.16666666666666, + "threshold": 15.0, + "all_objects": [ + [ + "sidetable", + 352.0 + ], + [ + "bowl", + 298.0 + ], + [ + "painting", + 24.5 + ], + [ + "garbagecan", + 405.0 + ] + ] + } + }, + "ai2thor_216": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_217": { + "classification": "consistent", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "lettuce", + "gt_center_y": 374.0, + "other_avg_y": 329.1666666666667, + "y_diff": 44.833333333333314, + "threshold": 15.0, + "all_objects": [ + [ + "dishsponge", + 318.5 + ], + [ + "spatula", + 325.5 + ], + [ + "lettuce", + 374.0 + ], + [ + "potato", + 343.5 + ] + ] + } + }, + "ai2thor_218": { + "classification": "consistent", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "potato", + "gt_center_y": 414.0, + "other_avg_y": 322.1666666666667, + "y_diff": 91.83333333333331, + "threshold": 15.0, + "all_objects": [ + [ + "sink", + 308.5 + ], + [ + "potato", + 414.0 + ], + [ + "lettuce", + 313.0 + ], + [ + "bread", + 345.0 + ] + ] + } + }, + "ai2thor_219": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_220": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_221": { + "classification": "consistent", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "plate", + "gt_center_y": 319.5, + "other_avg_y": 291.1666666666667, + "y_diff": 28.333333333333314, + "threshold": 15.0, + "all_objects": [ + [ + "pan", + 259.0 + ], + [ + "spatula", + 321.0 + ], + [ + "cup", + 293.5 + ], + [ + "plate", + 319.5 + ] + ] + } + }, + "ai2thor_222": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_223": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_224": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_225": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_226": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_227": { + "classification": "consistent", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "chair", + "gt_center_y": 351.0, + "other_avg_y": 262.6666666666667, + "y_diff": 88.33333333333331, + "threshold": 15.0, + "all_objects": [ + [ + "mug", + 272.0 + ], + [ + "bowl", + 221.5 + ], + [ + "alarmclock", + 294.5 + ], + [ + "chair", + 351.0 + ] + ] + } + }, + "ai2thor_228": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_229": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_230": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_231": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_232": { + "classification": "ambiguous", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "spraybottle", + "gt_center_y": 219.0, + "other_avg_y": 227.16666666666666, + "y_diff": -8.166666666666657, + "threshold": 15.0, + "all_objects": [ + [ + "spraybottle", + 219.0 + ], + [ + "toiletpaper", + 191.5 + ], + [ + "garbagecan", + 277.5 + ], + [ + "sink", + 212.5 + ] + ] + } + }, + "ai2thor_233": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_234": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_235": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_236": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_237": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_238": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_239": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_240": { + "classification": "ambiguous", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "spraybottle", + "gt_center_y": 219.0, + "other_avg_y": 232.66666666666666, + "y_diff": -13.666666666666657, + "threshold": 15.0, + "all_objects": [ + [ + "garbagecan", + 277.5 + ], + [ + "sink", + 212.5 + ], + [ + "tissuebox", + 208.0 + ], + [ + "spraybottle", + 219.0 + ] + ] + } + }, + "ai2thor_241": { + "classification": "consistent", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "soapbar", + "gt_center_y": 371.0, + "other_avg_y": 237.66666666666666, + "y_diff": 133.33333333333334, + "threshold": 15.0, + "all_objects": [ + [ + "soapbottle", + 268.0 + ], + [ + "spraybottle", + 208.0 + ], + [ + "toiletpaper", + 237.0 + ], + [ + "soapbar", + 371.0 + ] + ] + } + }, + "ai2thor_242": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_243": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_244": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_245": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_246": { + "classification": "consistent", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "cup", + "gt_center_y": 235.0, + "other_avg_y": 186.0, + "y_diff": 49.0, + "threshold": 15.0, + "all_objects": [ + [ + "glassbottle", + 101.0 + ], + [ + "pen", + 236.5 + ], + [ + "cup", + 235.0 + ], + [ + "tomato", + 220.5 + ] + ] + } + }, + "ai2thor_247": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_248": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_249": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_250": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_251": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_252": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_253": { + "classification": "consistent", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "glassbottle", + "gt_center_y": 324.0, + "other_avg_y": 292.3333333333333, + "y_diff": 31.666666666666686, + "threshold": 15.0, + "all_objects": [ + [ + "apple", + 332.0 + ], + [ + "lettuce", + 269.0 + ], + [ + "glassbottle", + 324.0 + ], + [ + "spatula", + 276.0 + ] + ] + } + }, + "ai2thor_254": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_255": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_256": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_257": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_258": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_259": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_260": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_261": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_262": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_263": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_264": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_265": { + "classification": "consistent", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "pan", + "gt_center_y": 311.0, + "other_avg_y": 139.83333333333334, + "y_diff": 171.16666666666666, + "threshold": 15.0, + "all_objects": [ + [ + "garbagecan", + 185.5 + ], + [ + "pan", + 311.0 + ], + [ + "window", + 24.0 + ], + [ + "soapbottle", + 210.0 + ] + ] + } + }, + "ai2thor_266": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_267": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_268": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_269": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_270": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_271": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_272": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_273": { + "classification": "consistent", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "alarmclock", + "gt_center_y": 204.5, + "other_avg_y": 256.3333333333333, + "y_diff": -51.833333333333314, + "threshold": 15.0, + "all_objects": [ + [ + "desklamp", + 180.5 + ], + [ + "alarmclock", + 204.5 + ], + [ + "cd", + 209.5 + ], + [ + "box", + 379.0 + ] + ] + } + }, + "ai2thor_274": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_275": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_276": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_277": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_278": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_279": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_280": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_281": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_282": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_283": { + "classification": "consistent", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "handtowelholder", + "gt_center_y": 70.0, + "other_avg_y": 311.5, + "y_diff": -241.5, + "threshold": 15.0, + "all_objects": [ + [ + "dishsponge", + 394.0 + ], + [ + "cart", + 385.0 + ], + [ + "handtowel", + 155.5 + ], + [ + "handtowelholder", + 70.0 + ] + ] + } + }, + "ai2thor_284": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_285": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_286": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_287": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_288": { + "classification": "ambiguous", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "lettuce", + "gt_center_y": 303.5, + "other_avg_y": 292.3333333333333, + "y_diff": 11.166666666666686, + "threshold": 15.0, + "all_objects": [ + [ + "ladle", + 286.5 + ], + [ + "spatula", + 339.5 + ], + [ + "pot", + 251.0 + ], + [ + "lettuce", + 303.5 + ] + ] + } + }, + "ai2thor_289": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_290": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_291": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_292": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_293": { + "classification": "consistent", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "sink", + "gt_center_y": 308.5, + "other_avg_y": 343.5, + "y_diff": -35.0, + "threshold": 15.0, + "all_objects": [ + [ + "potato", + 374.5 + ], + [ + "sink", + 308.5 + ], + [ + "lettuce", + 311.0 + ], + [ + "bread", + 345.0 + ] + ] + } + }, + "ai2thor_294": { + "classification": "consistent", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "tissuebox", + "gt_center_y": 372.5, + "other_avg_y": 160.5, + "y_diff": 212.0, + "threshold": 15.0, + "all_objects": [ + [ + "tissuebox", + 372.5 + ], + [ + "sidetable", + 375.0 + ], + [ + "handtowelholder", + 18.0 + ], + [ + "handtowel", + 88.5 + ] + ] + } + }, + "ai2thor_295": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_296": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_297": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_298": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_299": { + "classification": "consistent", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "sidetable", + "gt_center_y": 317.0, + "other_avg_y": 215.16666666666666, + "y_diff": 101.83333333333334, + "threshold": 15.0, + "all_objects": [ + [ + "bed", + 233.5 + ], + [ + "safe", + 206.0 + ], + [ + "desklamp", + 206.0 + ], + [ + "sidetable", + 317.0 + ] + ] + } + }, + "ai2thor_300": { + "classification": "consistent", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "coffeemachine", + "gt_center_y": 187.5, + "other_avg_y": 321.0, + "y_diff": -133.5, + "threshold": 15.0, + "all_objects": [ + [ + "coffeemachine", + 187.5 + ], + [ + "potato", + 272.5 + ], + [ + "soapbottle", + 310.0 + ], + [ + "apple", + 380.5 + ] + ] + } + }, + "ai2thor_301": { + "classification": "consistent", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "dishsponge", + "gt_center_y": 363.0, + "other_avg_y": 332.0, + "y_diff": 31.0, + "threshold": 15.0, + "all_objects": [ + [ + "dishsponge", + 363.0 + ], + [ + "knife", + 326.5 + ], + [ + "sink", + 400.0 + ], + [ + "pan", + 269.5 + ] + ] + } + }, + "ai2thor_302": { + "classification": "consistent", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "pan", + "gt_center_y": 311.0, + "other_avg_y": 165.33333333333334, + "y_diff": 145.66666666666666, + "threshold": 15.0, + "all_objects": [ + [ + "tomato", + 211.5 + ], + [ + "soapbottle", + 210.0 + ], + [ + "fridge", + 74.5 + ], + [ + "pan", + 311.0 + ] + ] + } + }, + "ai2thor_303": { + "classification": "consistent", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "tomato", + "gt_center_y": 190.0, + "other_avg_y": 342.5, + "y_diff": -152.5, + "threshold": 15.0, + "all_objects": [ + [ + "cabinet", + 419.0 + ], + [ + "tomato", + 190.0 + ], + [ + "apple", + 367.5 + ], + [ + "bread", + 241.0 + ] + ] + } + }, + "ai2thor_304": { + "classification": "consistent", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "garbagecan", + "gt_center_y": 370.0, + "other_avg_y": 115.66666666666667, + "y_diff": 254.33333333333331, + "threshold": 15.0, + "all_objects": [ + [ + "garbagecan", + 370.0 + ], + [ + "countertop", + 213.5 + ], + [ + "mirror", + 50.0 + ], + [ + "handtowel", + 83.5 + ] + ] + } + }, + "ai2thor_305": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_306": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_307": { + "classification": "consistent", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "mug", + "gt_center_y": 199.0, + "other_avg_y": 288.1666666666667, + "y_diff": -89.16666666666669, + "threshold": 15.0, + "all_objects": [ + [ + "drawer", + 407.0 + ], + [ + "microwave", + 177.5 + ], + [ + "countertop", + 280.0 + ], + [ + "mug", + 199.0 + ] + ] + } + }, + "ai2thor_308": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_309": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_310": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_311": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_312": { + "classification": "consistent", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "showerdoor", + "gt_center_y": 73.0, + "other_avg_y": 258.3333333333333, + "y_diff": -185.33333333333331, + "threshold": 15.0, + "all_objects": [ + [ + "papertowelroll", + 185.5 + ], + [ + "toiletpaperhanger", + 421.0 + ], + [ + "showerdoor", + 73.0 + ], + [ + "spraybottle", + 168.5 + ] + ] + } + }, + "ai2thor_313": { + "classification": "consistent", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "alarmclock", + "gt_center_y": 234.0, + "other_avg_y": 364.8333333333333, + "y_diff": -130.83333333333331, + "threshold": 15.0, + "all_objects": [ + [ + "book", + 303.5 + ], + [ + "keychain", + 398.0 + ], + [ + "alarmclock", + 234.0 + ], + [ + "cellphone", + 393.0 + ] + ] + } + }, + "ai2thor_314": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_315": { + "classification": "consistent", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "peppershaker", + "gt_center_y": 151.0, + "other_avg_y": 275.1666666666667, + "y_diff": -124.16666666666669, + "threshold": 15.0, + "all_objects": [ + [ + "microwave", + 260.5 + ], + [ + "pan", + 220.0 + ], + [ + "fork", + 345.0 + ], + [ + "peppershaker", + 151.0 + ] + ] + } + }, + "ai2thor_316": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_317": { + "classification": "consistent", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "soapbottle", + "gt_center_y": 173.5, + "other_avg_y": 245.33333333333334, + "y_diff": -71.83333333333334, + "threshold": 15.0, + "all_objects": [ + [ + "pot", + 209.5 + ], + [ + "soapbottle", + 173.5 + ], + [ + "cup", + 225.5 + ], + [ + "spatula", + 301.0 + ] + ] + } + }, + "ai2thor_318": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_319": { + "classification": "consistent", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "handtowel", + "gt_center_y": 88.5, + "other_avg_y": 255.16666666666666, + "y_diff": -166.66666666666666, + "threshold": 15.0, + "all_objects": [ + [ + "handtowel", + 88.5 + ], + [ + "tissuebox", + 372.5 + ], + [ + "handtowelholder", + 18.0 + ], + [ + "sidetable", + 375.0 + ] + ] + } + }, + "ai2thor_320": { + "classification": "consistent", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "laptop", + "gt_center_y": 81.0, + "other_avg_y": 155.83333333333334, + "y_diff": -74.83333333333334, + "threshold": 15.0, + "all_objects": [ + [ + "window", + 75.0 + ], + [ + "diningtable", + 112.0 + ], + [ + "vase", + 280.5 + ], + [ + "laptop", + 81.0 + ] + ] + } + }, + "ai2thor_321": { + "classification": "consistent", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "soapbottle", + "gt_center_y": 369.0, + "other_avg_y": 260.5, + "y_diff": 108.5, + "threshold": 15.0, + "all_objects": [ + [ + "soapbottle", + 369.0 + ], + [ + "mug", + 236.0 + ], + [ + "chair", + 305.0 + ], + [ + "tomato", + 240.5 + ] + ] + } + }, + "ai2thor_322": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_323": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_324": { + "classification": "consistent", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "bread", + "gt_center_y": 355.5, + "other_avg_y": 253.66666666666666, + "y_diff": 101.83333333333334, + "threshold": 15.0, + "all_objects": [ + [ + "ladle", + 330.5 + ], + [ + "apple", + 230.0 + ], + [ + "cup", + 200.5 + ], + [ + "bread", + 355.5 + ] + ] + } + }, + "ai2thor_325": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_326": { + "classification": "consistent", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "curtains", + "gt_center_y": 73.5, + "other_avg_y": 305.0, + "y_diff": -231.5, + "threshold": 15.0, + "all_objects": [ + [ + "sidetable", + 199.0 + ], + [ + "remotecontrol", + 429.0 + ], + [ + "sofa", + 287.0 + ], + [ + "curtains", + 73.5 + ] + ] + } + }, + "ai2thor_327": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_328": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_329": { + "classification": "ambiguous", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "peppershaker", + "gt_center_y": 347.5, + "other_avg_y": 334.1666666666667, + "y_diff": 13.333333333333314, + "threshold": 15.0, + "all_objects": [ + [ + "peppershaker", + 347.5 + ], + [ + "cup", + 310.0 + ], + [ + "dishsponge", + 376.5 + ], + [ + "ladle", + 316.0 + ] + ] + } + }, + "ai2thor_330": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_331": { + "classification": "consistent", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "potato", + "gt_center_y": 374.5, + "other_avg_y": 206.83333333333334, + "y_diff": 167.66666666666666, + "threshold": 15.0, + "all_objects": [ + [ + "bread", + 259.5 + ], + [ + "potato", + 374.5 + ], + [ + "fridge", + 302.5 + ], + [ + "cabinet", + 58.5 + ] + ] + } + }, + "ai2thor_332": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_333": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_334": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_335": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_336": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_337": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_338": { + "classification": "consistent", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "pan", + "gt_center_y": 205.5, + "other_avg_y": 348.0, + "y_diff": -142.5, + "threshold": 15.0, + "all_objects": [ + [ + "knife", + 340.5 + ], + [ + "egg", + 377.5 + ], + [ + "tomato", + 326.0 + ], + [ + "pan", + 205.5 + ] + ] + } + }, + "ai2thor_339": { + "classification": "consistent", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "spatula", + "gt_center_y": 331.0, + "other_avg_y": 304.3333333333333, + "y_diff": 26.666666666666686, + "threshold": 15.0, + "all_objects": [ + [ + "mug", + 318.5 + ], + [ + "spatula", + 331.0 + ], + [ + "fork", + 349.0 + ], + [ + "toaster", + 245.5 + ] + ] + } + }, + "ai2thor_340": { + "classification": "consistent", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "coffeemachine", + "gt_center_y": 83.0, + "other_avg_y": 258.6666666666667, + "y_diff": -175.66666666666669, + "threshold": 15.0, + "all_objects": [ + [ + "winebottle", + 127.5 + ], + [ + "coffeemachine", + 83.0 + ], + [ + "cup", + 300.0 + ], + [ + "cabinet", + 348.5 + ] + ] + } + }, + "ai2thor_341": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_342": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_343": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_344": { + "classification": "consistent", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "saltshaker", + "gt_center_y": 344.0, + "other_avg_y": 109.33333333333333, + "y_diff": 234.66666666666669, + "threshold": 15.0, + "all_objects": [ + [ + "fridge", + 55.0 + ], + [ + "chair", + 98.5 + ], + [ + "statue", + 174.5 + ], + [ + "saltshaker", + 344.0 + ] + ] + } + }, + "ai2thor_345": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_346": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_347": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_348": { + "classification": "consistent", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "bathtub", + "gt_center_y": 26.5, + "other_avg_y": 213.5, + "y_diff": -187.0, + "threshold": 15.0, + "all_objects": [ + [ + "bathtub", + 26.5 + ], + [ + "spraybottle", + 295.0 + ], + [ + "toiletpaperhanger", + 113.5 + ], + [ + "garbagecan", + 232.0 + ] + ] + } + }, + "ai2thor_349": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_350": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_351": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_352": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_353": { + "classification": "consistent", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "showerdoor", + "gt_center_y": 275.5, + "other_avg_y": 318.3333333333333, + "y_diff": -42.833333333333314, + "threshold": 15.0, + "all_objects": [ + [ + "towel", + 148.5 + ], + [ + "showerdoor", + 275.5 + ], + [ + "countertop", + 403.0 + ], + [ + "cloth", + 403.5 + ] + ] + } + }, + "ai2thor_354": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_355": { + "classification": "consistent", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "mug", + "gt_center_y": 280.0, + "other_avg_y": 344.6666666666667, + "y_diff": -64.66666666666669, + "threshold": 15.0, + "all_objects": [ + [ + "dishsponge", + 376.5 + ], + [ + "mug", + 280.0 + ], + [ + "cup", + 310.0 + ], + [ + "peppershaker", + 347.5 + ] + ] + } + }, + "ai2thor_356": { + "classification": "consistent", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "soapbottle", + "gt_center_y": 349.5, + "other_avg_y": 293.3333333333333, + "y_diff": 56.166666666666686, + "threshold": 15.0, + "all_objects": [ + [ + "spatula", + 384.0 + ], + [ + "bread", + 250.5 + ], + [ + "soapbottle", + 349.5 + ], + [ + "countertop", + 245.5 + ] + ] + } + }, + "ai2thor_357": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_358": { + "classification": "consistent", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "cellphone", + "gt_center_y": 393.0, + "other_avg_y": 265.5, + "y_diff": 127.5, + "threshold": 15.0, + "all_objects": [ + [ + "alarmclock", + 234.0 + ], + [ + "book", + 303.5 + ], + [ + "cellphone", + 393.0 + ], + [ + "vase", + 259.0 + ] + ] + } + }, + "ai2thor_359": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_360": { + "classification": "consistent", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "spatula", + "gt_center_y": 223.0, + "other_avg_y": 147.0, + "y_diff": 76.0, + "threshold": 15.0, + "all_objects": [ + [ + "lettuce", + 128.5 + ], + [ + "pen", + 161.0 + ], + [ + "chair", + 151.5 + ], + [ + "spatula", + 223.0 + ] + ] + } + }, + "ai2thor_361": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_362": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_363": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_364": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_365": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_366": { + "classification": "consistent", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "potato", + "gt_center_y": 374.5, + "other_avg_y": 206.83333333333334, + "y_diff": 167.66666666666666, + "threshold": 15.0, + "all_objects": [ + [ + "fridge", + 302.5 + ], + [ + "potato", + 374.5 + ], + [ + "bread", + 259.5 + ], + [ + "cabinet", + 58.5 + ] + ] + } + }, + "ai2thor_367": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_368": { + "classification": "consistent", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "bowl", + "gt_center_y": 332.5, + "other_avg_y": 220.0, + "y_diff": 112.5, + "threshold": 15.0, + "all_objects": [ + [ + "bowl", + 332.5 + ], + [ + "houseplant", + 101.5 + ], + [ + "spoon", + 263.0 + ], + [ + "tomato", + 295.5 + ] + ] + } + }, + "ai2thor_369": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_370": { + "classification": "consistent", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "chair", + "gt_center_y": 357.0, + "other_avg_y": 233.83333333333334, + "y_diff": 123.16666666666666, + "threshold": 15.0, + "all_objects": [ + [ + "window", + 137.5 + ], + [ + "chair", + 357.0 + ], + [ + "mug", + 330.5 + ], + [ + "tomato", + 233.5 + ] + ] + } + }, + "ai2thor_371": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_372": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_373": { + "classification": "consistent", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "cabinet", + "gt_center_y": 15.5, + "other_avg_y": 328.6666666666667, + "y_diff": -313.1666666666667, + "threshold": 15.0, + "all_objects": [ + [ + "apple", + 376.0 + ], + [ + "cabinet", + 15.5 + ], + [ + "mug", + 364.5 + ], + [ + "toaster", + 245.5 + ] + ] + } + }, + "ai2thor_374": { + "classification": "ambiguous", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "book", + "gt_center_y": 319.5, + "other_avg_y": 323.3333333333333, + "y_diff": -3.8333333333333144, + "threshold": 15.0, + "all_objects": [ + [ + "apple", + 349.0 + ], + [ + "book", + 319.5 + ], + [ + "peppershaker", + 386.5 + ], + [ + "cup", + 234.5 + ] + ] + } + }, + "ai2thor_375": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_376": { + "classification": "consistent", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "spatula", + "gt_center_y": 276.0, + "other_avg_y": 345.1666666666667, + "y_diff": -69.16666666666669, + "threshold": 15.0, + "all_objects": [ + [ + "tomato", + 374.5 + ], + [ + "spatula", + 276.0 + ], + [ + "kettle", + 318.0 + ], + [ + "glassbottle", + 343.0 + ] + ] + } + }, + "ai2thor_377": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_378": { + "classification": "consistent", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "plate", + "gt_center_y": 271.0, + "other_avg_y": 177.83333333333334, + "y_diff": 93.16666666666666, + "threshold": 15.0, + "all_objects": [ + [ + "glassbottle", + 185.0 + ], + [ + "plate", + 271.0 + ], + [ + "lettuce", + 150.0 + ], + [ + "soapbottle", + 198.5 + ] + ] + } + }, + "ai2thor_379": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_380": { + "classification": "consistent", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "mug", + "gt_center_y": 411.0, + "other_avg_y": 361.0, + "y_diff": 50.0, + "threshold": 15.0, + "all_objects": [ + [ + "mug", + 411.0 + ], + [ + "apple", + 322.5 + ], + [ + "saltshaker", + 359.5 + ], + [ + "knife", + 401.0 + ] + ] + } + }, + "ai2thor_381": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_382": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_383": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_384": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_385": { + "classification": "consistent", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "pan", + "gt_center_y": 351.0, + "other_avg_y": 265.1666666666667, + "y_diff": 85.83333333333331, + "threshold": 15.0, + "all_objects": [ + [ + "pan", + 351.0 + ], + [ + "plate", + 317.5 + ], + [ + "spatula", + 270.5 + ], + [ + "toaster", + 207.5 + ] + ] + } + }, + "ai2thor_386": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_387": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_388": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_389": { + "classification": "consistent", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "window", + "gt_center_y": 35.5, + "other_avg_y": 280.0, + "y_diff": -244.5, + "threshold": 15.0, + "all_objects": [ + [ + "window", + 35.5 + ], + [ + "apple", + 368.5 + ], + [ + "saltshaker", + 228.5 + ], + [ + "lettuce", + 243.0 + ] + ] + } + }, + "ai2thor_390": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_391": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_392": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_393": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_394": { + "classification": "consistent", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "cabinet", + "gt_center_y": 170.0, + "other_avg_y": 215.83333333333334, + "y_diff": -45.83333333333334, + "threshold": 15.0, + "all_objects": [ + [ + "fork", + 232.0 + ], + [ + "bread", + 179.0 + ], + [ + "cabinet", + 170.0 + ], + [ + "apple", + 236.5 + ] + ] + } + }, + "ai2thor_395": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_396": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_397": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_398": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_399": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_400": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_401": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_402": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_403": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_404": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_405": { + "classification": "consistent", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "window", + "gt_center_y": 58.0, + "other_avg_y": 189.33333333333334, + "y_diff": -131.33333333333334, + "threshold": 15.0, + "all_objects": [ + [ + "houseplant", + 101.5 + ], + [ + "vase", + 148.5 + ], + [ + "bowl", + 318.0 + ], + [ + "window", + 58.0 + ] + ] + } + }, + "ai2thor_406": { + "classification": "consistent", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "soapbottle", + "gt_center_y": 289.5, + "other_avg_y": 191.0, + "y_diff": 98.5, + "threshold": 15.0, + "all_objects": [ + [ + "countertop", + 189.5 + ], + [ + "microwave", + 135.0 + ], + [ + "bread", + 248.5 + ], + [ + "soapbottle", + 289.5 + ] + ] + } + }, + "ai2thor_407": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_408": { + "classification": "consistent", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "scrubbrush", + "gt_center_y": 160.5, + "other_avg_y": 248.66666666666666, + "y_diff": -88.16666666666666, + "threshold": 15.0, + "all_objects": [ + [ + "scrubbrush", + 160.5 + ], + [ + "toiletpaperhanger", + 161.5 + ], + [ + "plunger", + 212.5 + ], + [ + "soapbar", + 372.0 + ] + ] + } + }, + "ai2thor_409": { + "classification": "consistent", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "alarmclock", + "gt_center_y": 234.0, + "other_avg_y": 358.6666666666667, + "y_diff": -124.66666666666669, + "threshold": 15.0, + "all_objects": [ + [ + "alarmclock", + 234.0 + ], + [ + "cellphone", + 393.0 + ], + [ + "book", + 303.5 + ], + [ + "keychain", + 379.5 + ] + ] + } + }, + "ai2thor_410": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_411": { + "classification": "consistent", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "apple", + "gt_center_y": 370.0, + "other_avg_y": 246.0, + "y_diff": 124.0, + "threshold": 15.0, + "all_objects": [ + [ + "cabinet", + 31.0 + ], + [ + "spatula", + 366.0 + ], + [ + "apple", + 370.0 + ], + [ + "potato", + 341.0 + ] + ] + } + }, + "ai2thor_412": { + "classification": "consistent", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "potato", + "gt_center_y": 352.0, + "other_avg_y": 304.1666666666667, + "y_diff": 47.833333333333314, + "threshold": 15.0, + "all_objects": [ + [ + "tomato", + 272.0 + ], + [ + "potato", + 352.0 + ], + [ + "spatula", + 299.0 + ], + [ + "dishsponge", + 341.5 + ] + ] + } + }, + "ai2thor_413": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_414": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_415": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_416": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_417": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_418": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_419": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_420": { + "classification": "consistent", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "apple", + "gt_center_y": 373.5, + "other_avg_y": 178.0, + "y_diff": 195.5, + "threshold": 15.0, + "all_objects": [ + [ + "apple", + 373.5 + ], + [ + "bread", + 158.5 + ], + [ + "garbagecan", + 206.0 + ], + [ + "spatula", + 169.5 + ] + ] + } + }, + "ai2thor_421": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_422": { + "classification": "consistent", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "bowl", + "gt_center_y": 355.5, + "other_avg_y": 281.0, + "y_diff": 74.5, + "threshold": 15.0, + "all_objects": [ + [ + "bread", + 348.5 + ], + [ + "kettle", + 277.0 + ], + [ + "winebottle", + 217.5 + ], + [ + "bowl", + 355.5 + ] + ] + } + }, + "ai2thor_423": { + "classification": "consistent", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "fridge", + "gt_center_y": 55.0, + "other_avg_y": 205.66666666666666, + "y_diff": -150.66666666666666, + "threshold": 15.0, + "all_objects": [ + [ + "saltshaker", + 344.0 + ], + [ + "fridge", + 55.0 + ], + [ + "statue", + 174.5 + ], + [ + "chair", + 98.5 + ] + ] + } + }, + "ai2thor_424": { + "classification": "consistent", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "knife", + "gt_center_y": 364.0, + "other_avg_y": 240.5, + "y_diff": 123.5, + "threshold": 15.0, + "all_objects": [ + [ + "window", + 76.0 + ], + [ + "bread", + 319.0 + ], + [ + "apple", + 326.5 + ], + [ + "knife", + 364.0 + ] + ] + } + }, + "ai2thor_425": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_426": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_427": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_428": { + "classification": "consistent", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "bowl", + "gt_center_y": 319.0, + "other_avg_y": 102.66666666666667, + "y_diff": 216.33333333333331, + "threshold": 15.0, + "all_objects": [ + [ + "bowl", + 319.0 + ], + [ + "vase", + 148.5 + ], + [ + "window", + 58.0 + ], + [ + "houseplant", + 101.5 + ] + ] + } + }, + "ai2thor_429": { + "classification": "consistent", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "drawer", + "gt_center_y": 299.0, + "other_avg_y": 256.8333333333333, + "y_diff": 42.166666666666686, + "threshold": 15.0, + "all_objects": [ + [ + "diningtable", + 249.5 + ], + [ + "tomato", + 273.5 + ], + [ + "drawer", + 299.0 + ], + [ + "lettuce", + 247.5 + ] + ] + } + }, + "ai2thor_430": { + "classification": "consistent", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "tomato", + "gt_center_y": 279.0, + "other_avg_y": 367.0, + "y_diff": -88.0, + "threshold": 15.0, + "all_objects": [ + [ + "mug", + 359.5 + ], + [ + "bowl", + 352.5 + ], + [ + "apple", + 389.0 + ], + [ + "tomato", + 279.0 + ] + ] + } + }, + "ai2thor_431": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_432": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_433": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_434": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_435": { + "classification": "consistent", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "bread", + "gt_center_y": 130.5, + "other_avg_y": 237.16666666666666, + "y_diff": -106.66666666666666, + "threshold": 15.0, + "all_objects": [ + [ + "plate", + 172.5 + ], + [ + "bread", + 130.5 + ], + [ + "cup", + 292.5 + ], + [ + "lettuce", + 246.5 + ] + ] + } + }, + "ai2thor_436": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_437": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_438": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_439": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_440": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_441": { + "classification": "consistent", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "sidetable", + "gt_center_y": 375.0, + "other_avg_y": 159.66666666666666, + "y_diff": 215.33333333333334, + "threshold": 15.0, + "all_objects": [ + [ + "handtowelholder", + 18.0 + ], + [ + "tissuebox", + 372.5 + ], + [ + "sidetable", + 375.0 + ], + [ + "handtowel", + 88.5 + ] + ] + } + }, + "ai2thor_442": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_443": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_444": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_445": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_446": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_447": { + "classification": "ambiguous", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "potato", + "gt_center_y": 316.5, + "other_avg_y": 318.8333333333333, + "y_diff": -2.3333333333333144, + "threshold": 15.0, + "all_objects": [ + [ + "peppershaker", + 304.5 + ], + [ + "tomato", + 272.5 + ], + [ + "egg", + 379.5 + ], + [ + "potato", + 316.5 + ] + ] + } + }, + "ai2thor_448": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_449": { + "classification": "consistent", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "lettuce", + "gt_center_y": 284.0, + "other_avg_y": 238.16666666666666, + "y_diff": 45.83333333333334, + "threshold": 15.0, + "all_objects": [ + [ + "dishsponge", + 225.5 + ], + [ + "toaster", + 217.5 + ], + [ + "mug", + 271.5 + ], + [ + "lettuce", + 284.0 + ] + ] + } + }, + "ai2thor_450": { + "classification": "consistent", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "spoon", + "gt_center_y": 380.5, + "other_avg_y": 234.0, + "y_diff": 146.5, + "threshold": 15.0, + "all_objects": [ + [ + "butterknife", + 200.0 + ], + [ + "potato", + 223.0 + ], + [ + "sidetable", + 279.0 + ], + [ + "spoon", + 380.5 + ] + ] + } + }, + "ai2thor_451": { + "classification": "consistent", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "cup", + "gt_center_y": 292.5, + "other_avg_y": 118.0, + "y_diff": 174.5, + "threshold": 15.0, + "all_objects": [ + [ + "plate", + 172.5 + ], + [ + "bread", + 130.5 + ], + [ + "cup", + 292.5 + ], + [ + "soapbottle", + 51.0 + ] + ] + } + }, + "ai2thor_452": { + "classification": "consistent", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "sidetable", + "gt_center_y": 186.0, + "other_avg_y": 276.8333333333333, + "y_diff": -90.83333333333331, + "threshold": 15.0, + "all_objects": [ + [ + "coffeetable", + 339.0 + ], + [ + "sofa", + 220.0 + ], + [ + "sidetable", + 186.0 + ], + [ + "laptop", + 271.5 + ] + ] + } + }, + "ai2thor_453": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_454": { + "classification": "consistent", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "cup", + "gt_center_y": 218.0, + "other_avg_y": 288.8333333333333, + "y_diff": -70.83333333333331, + "threshold": 15.0, + "all_objects": [ + [ + "countertop", + 245.5 + ], + [ + "plate", + 352.0 + ], + [ + "cup", + 218.0 + ], + [ + "bread", + 269.0 + ] + ] + } + }, + "ai2thor_455": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_456": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_457": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_458": { + "classification": "consistent", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "alarmclock", + "gt_center_y": 303.0, + "other_avg_y": 252.33333333333334, + "y_diff": 50.66666666666666, + "threshold": 15.0, + "all_objects": [ + [ + "chair", + 424.0 + ], + [ + "bowl", + 20.0 + ], + [ + "alarmclock", + 303.0 + ], + [ + "laptop", + 313.0 + ] + ] + } + }, + "ai2thor_459": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_460": { + "classification": "counter", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "plate", + "gt_center_y": 371.0, + "other_avg_y": 277.0, + "y_diff": 94.0, + "threshold": 15.0, + "all_objects": [ + [ + "countertop", + 201.0 + ], + [ + "plate", + 371.0 + ], + [ + "diningtable", + 338.0 + ], + [ + "sidetable", + 292.0 + ] + ] + } + }, + "ai2thor_461": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_462": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_463": { + "classification": "ambiguous", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "sink", + "gt_center_y": 175.5, + "other_avg_y": 184.66666666666666, + "y_diff": -9.166666666666657, + "threshold": 15.0, + "all_objects": [ + [ + "cup", + 199.0 + ], + [ + "toaster", + 150.5 + ], + [ + "kettle", + 204.5 + ], + [ + "sink", + 175.5 + ] + ] + } + }, + "ai2thor_464": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_465": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_466": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_467": { + "classification": "consistent", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "desklamp", + "gt_center_y": 135.0, + "other_avg_y": 330.3333333333333, + "y_diff": -195.33333333333331, + "threshold": 15.0, + "all_objects": [ + [ + "desklamp", + 135.0 + ], + [ + "desk", + 302.0 + ], + [ + "book", + 270.0 + ], + [ + "chair", + 419.0 + ] + ] + } + }, + "ai2thor_468": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_469": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_470": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_471": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_472": { + "classification": "consistent", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "glassbottle", + "gt_center_y": 156.5, + "other_avg_y": 259.3333333333333, + "y_diff": -102.83333333333331, + "threshold": 15.0, + "all_objects": [ + [ + "lettuce", + 314.0 + ], + [ + "plate", + 362.5 + ], + [ + "houseplant", + 101.5 + ], + [ + "glassbottle", + 156.5 + ] + ] + } + }, + "ai2thor_473": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_474": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_475": { + "classification": "consistent", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "pan", + "gt_center_y": 201.5, + "other_avg_y": 339.3333333333333, + "y_diff": -137.83333333333331, + "threshold": 15.0, + "all_objects": [ + [ + "pan", + 201.5 + ], + [ + "spatula", + 412.0 + ], + [ + "bread", + 372.0 + ], + [ + "soapbottle", + 234.0 + ] + ] + } + }, + "ai2thor_476": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_477": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_478": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_479": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_480": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_481": { + "classification": "counter", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "toaster", + "gt_center_y": 146.5, + "other_avg_y": 229.33333333333334, + "y_diff": -82.83333333333334, + "threshold": 15.0, + "all_objects": [ + [ + "pan", + 303.5 + ], + [ + "spoon", + 187.0 + ], + [ + "coffeemachine", + 197.5 + ], + [ + "toaster", + 146.5 + ] + ] + } + }, + "ai2thor_482": { + "classification": "consistent", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "chair", + "gt_center_y": 194.0, + "other_avg_y": 286.8333333333333, + "y_diff": -92.83333333333331, + "threshold": 15.0, + "all_objects": [ + [ + "chair", + 194.0 + ], + [ + "plate", + 302.0 + ], + [ + "spatula", + 282.5 + ], + [ + "lettuce", + 276.0 + ] + ] + } + }, + "ai2thor_483": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_484": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_485": { + "classification": "consistent", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "cellphone", + "gt_center_y": 207.5, + "other_avg_y": 349.1666666666667, + "y_diff": -141.66666666666669, + "threshold": 15.0, + "all_objects": [ + [ + "mug", + 305.5 + ], + [ + "garbagecan", + 409.0 + ], + [ + "cellphone", + 207.5 + ], + [ + "chair", + 333.0 + ] + ] + } + }, + "ai2thor_486": { + "classification": "counter", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "alarmclock", + "gt_center_y": 257.5, + "other_avg_y": 322.3333333333333, + "y_diff": -64.83333333333331, + "threshold": 15.0, + "all_objects": [ + [ + "alarmclock", + 257.5 + ], + [ + "bowl", + 328.0 + ], + [ + "chair", + 392.0 + ], + [ + "cellphone", + 247.0 + ] + ] + } + }, + "ai2thor_487": { + "classification": "consistent", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "tomato", + "gt_center_y": 371.0, + "other_avg_y": 198.66666666666666, + "y_diff": 172.33333333333334, + "threshold": 15.0, + "all_objects": [ + [ + "tomato", + 371.0 + ], + [ + "apple", + 122.0 + ], + [ + "mug", + 215.5 + ], + [ + "knife", + 258.5 + ] + ] + } + }, + "ai2thor_488": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_489": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_490": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_491": { + "classification": "ambiguous", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "cup", + "gt_center_y": 295.5, + "other_avg_y": 299.8333333333333, + "y_diff": -4.333333333333314, + "threshold": 15.0, + "all_objects": [ + [ + "spatula", + 321.0 + ], + [ + "plate", + 319.5 + ], + [ + "pan", + 259.0 + ], + [ + "cup", + 295.5 + ] + ] + } + }, + "ai2thor_492": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_493": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_494": { + "classification": "consistent", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "fridge", + "gt_center_y": 73.5, + "other_avg_y": 231.0, + "y_diff": -157.5, + "threshold": 15.0, + "all_objects": [ + [ + "plate", + 277.5 + ], + [ + "tomato", + 227.0 + ], + [ + "fridge", + 73.5 + ], + [ + "potato", + 188.5 + ] + ] + } + }, + "ai2thor_495": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_496": { + "classification": "consistent", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "plate", + "gt_center_y": 367.5, + "other_avg_y": 293.6666666666667, + "y_diff": 73.83333333333331, + "threshold": 15.0, + "all_objects": [ + [ + "winebottle", + 262.5 + ], + [ + "fork", + 335.0 + ], + [ + "lettuce", + 283.5 + ], + [ + "plate", + 367.5 + ] + ] + } + }, + "ai2thor_497": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_498": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_499": { + "classification": "consistent", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "plate", + "gt_center_y": 373.5, + "other_avg_y": 139.33333333333334, + "y_diff": 234.16666666666666, + "threshold": 15.0, + "all_objects": [ + [ + "sidetable", + 171.0 + ], + [ + "plate", + 373.5 + ], + [ + "houseplant", + 71.0 + ], + [ + "pillow", + 176.0 + ] + ] + } + }, + "ai2thor_500": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_501": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_502": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_503": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_504": { + "classification": "consistent", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "cabinet", + "gt_center_y": 31.0, + "other_avg_y": 359.0, + "y_diff": -328.0, + "threshold": 15.0, + "all_objects": [ + [ + "apple", + 370.0 + ], + [ + "potato", + 341.0 + ], + [ + "spatula", + 366.0 + ], + [ + "cabinet", + 31.0 + ] + ] + } + }, + "ai2thor_505": { + "classification": "ambiguous", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "butterknife", + "gt_center_y": 204.0, + "other_avg_y": 205.83333333333334, + "y_diff": -1.8333333333333428, + "threshold": 15.0, + "all_objects": [ + [ + "coffeemachine", + 54.0 + ], + [ + "cabinet", + 372.5 + ], + [ + "potato", + 191.0 + ], + [ + "butterknife", + 204.0 + ] + ] + } + }, + "ai2thor_506": { + "classification": "consistent", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "laptop", + "gt_center_y": 295.5, + "other_avg_y": 153.66666666666666, + "y_diff": 141.83333333333334, + "threshold": 15.0, + "all_objects": [ + [ + "pillow", + 245.5 + ], + [ + "laptop", + 295.5 + ], + [ + "teddybear", + 189.5 + ], + [ + "painting", + 26.0 + ] + ] + } + }, + "ai2thor_507": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_508": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_509": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_510": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_511": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_512": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_513": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_514": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_515": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_516": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_517": { + "classification": "consistent", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "bowl", + "gt_center_y": 261.5, + "other_avg_y": 352.3333333333333, + "y_diff": -90.83333333333331, + "threshold": 15.0, + "all_objects": [ + [ + "potato", + 372.0 + ], + [ + "saltshaker", + 348.0 + ], + [ + "chair", + 337.0 + ], + [ + "bowl", + 261.5 + ] + ] + } + }, + "ai2thor_518": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_519": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_520": { + "classification": "consistent", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "lettuce", + "gt_center_y": 150.0, + "other_avg_y": 218.16666666666666, + "y_diff": -68.16666666666666, + "threshold": 15.0, + "all_objects": [ + [ + "soapbottle", + 198.5 + ], + [ + "lettuce", + 150.0 + ], + [ + "plate", + 271.0 + ], + [ + "glassbottle", + 185.0 + ] + ] + } + }, + "ai2thor_521": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_522": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_523": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_524": { + "classification": "consistent", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "toiletpaper", + "gt_center_y": 320.0, + "other_avg_y": 286.8333333333333, + "y_diff": 33.166666666666686, + "threshold": 15.0, + "all_objects": [ + [ + "toiletpaper", + 320.0 + ], + [ + "soapbottle", + 236.5 + ], + [ + "toiletpaperhanger", + 279.0 + ], + [ + "cabinet", + 345.0 + ] + ] + } + }, + "ai2thor_525": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_526": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_527": { + "classification": "consistent", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "lettuce", + "gt_center_y": 350.0, + "other_avg_y": 311.1666666666667, + "y_diff": 38.833333333333314, + "threshold": 15.0, + "all_objects": [ + [ + "tomato", + 300.0 + ], + [ + "lettuce", + 350.0 + ], + [ + "soapbottle", + 281.5 + ], + [ + "plate", + 352.0 + ] + ] + } + }, + "ai2thor_528": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_529": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_530": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_531": { + "classification": "consistent", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "mug", + "gt_center_y": 345.0, + "other_avg_y": 257.6666666666667, + "y_diff": 87.33333333333331, + "threshold": 15.0, + "all_objects": [ + [ + "stoveknob", + 271.5 + ], + [ + "cabinet", + 343.0 + ], + [ + "bread", + 158.5 + ], + [ + "mug", + 345.0 + ] + ] + } + }, + "ai2thor_532": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_533": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_534": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_535": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_536": { + "classification": "consistent", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "safe", + "gt_center_y": 206.0, + "other_avg_y": 252.16666666666666, + "y_diff": -46.16666666666666, + "threshold": 15.0, + "all_objects": [ + [ + "bed", + 233.5 + ], + [ + "sidetable", + 317.0 + ], + [ + "safe", + 206.0 + ], + [ + "desklamp", + 206.0 + ] + ] + } + }, + "ai2thor_537": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_538": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_539": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_540": { + "classification": "consistent", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "plate", + "gt_center_y": 180.0, + "other_avg_y": 83.83333333333333, + "y_diff": 96.16666666666667, + "threshold": 15.0, + "all_objects": [ + [ + "lettuce", + 130.5 + ], + [ + "garbagecan", + 87.0 + ], + [ + "plate", + 180.0 + ], + [ + "tomato", + 34.0 + ] + ] + } + }, + "ai2thor_541": { + "classification": "consistent", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "cellphone", + "gt_center_y": 316.0, + "other_avg_y": 225.66666666666666, + "y_diff": 90.33333333333334, + "threshold": 15.0, + "all_objects": [ + [ + "soapbottle", + 176.0 + ], + [ + "cellphone", + 316.0 + ], + [ + "pan", + 280.5 + ], + [ + "glassbottle", + 220.5 + ] + ] + } + }, + "ai2thor_542": { + "classification": "consistent", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "pan", + "gt_center_y": 108.0, + "other_avg_y": 341.8333333333333, + "y_diff": -233.83333333333331, + "threshold": 15.0, + "all_objects": [ + [ + "pan", + 108.0 + ], + [ + "butterknife", + 353.5 + ], + [ + "spatula", + 298.5 + ], + [ + "apple", + 373.5 + ] + ] + } + }, + "ai2thor_543": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_544": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_545": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_546": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_547": { + "classification": "counter", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "book", + "gt_center_y": 238.5, + "other_avg_y": 188.5, + "y_diff": 50.0, + "threshold": 15.0, + "all_objects": [ + [ + "houseplant", + 128.5 + ], + [ + "winebottle", + 185.5 + ], + [ + "kettle", + 251.5 + ], + [ + "book", + 238.5 + ] + ] + } + }, + "ai2thor_548": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_549": { + "classification": "counter", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "plate", + "gt_center_y": 415.0, + "other_avg_y": 362.1666666666667, + "y_diff": 52.833333333333314, + "threshold": 15.0, + "all_objects": [ + [ + "apple", + 384.0 + ], + [ + "plate", + 415.0 + ], + [ + "diningtable", + 379.5 + ], + [ + "sidetable", + 323.0 + ] + ] + } + }, + "ai2thor_550": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_551": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_552": { + "classification": "consistent", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "sofa", + "gt_center_y": 115.0, + "other_avg_y": 273.3333333333333, + "y_diff": -158.33333333333331, + "threshold": 15.0, + "all_objects": [ + [ + "bowl", + 249.5 + ], + [ + "sofa", + 115.0 + ], + [ + "vase", + 259.0 + ], + [ + "newspaper", + 311.5 + ] + ] + } + }, + "ai2thor_553": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_554": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_555": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_556": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_557": { + "classification": "counter", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "pot", + "gt_center_y": 168.0, + "other_avg_y": 49.0, + "y_diff": 119.0, + "threshold": 15.0, + "all_objects": [ + [ + "winebottle", + 49.5 + ], + [ + "mug", + 31.0 + ], + [ + "bread", + 66.5 + ], + [ + "pot", + 168.0 + ] + ] + } + }, + "ai2thor_558": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_559": { + "classification": "counter", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "toiletpaper", + "gt_center_y": 233.5, + "other_avg_y": 123.0, + "y_diff": 110.5, + "threshold": 15.0, + "all_objects": [ + [ + "mirror", + 39.5 + ], + [ + "toiletpaper", + 233.5 + ], + [ + "soapbottle", + 282.0 + ], + [ + "handtowel", + 47.5 + ] + ] + } + }, + "ai2thor_560": { + "classification": "ambiguous", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "bread", + "gt_center_y": 259.5, + "other_avg_y": 245.16666666666666, + "y_diff": 14.333333333333343, + "threshold": 15.0, + "all_objects": [ + [ + "cabinet", + 58.5 + ], + [ + "bread", + 259.5 + ], + [ + "fridge", + 302.5 + ], + [ + "potato", + 374.5 + ] + ] + } + }, + "ai2thor_561": { + "classification": "consistent", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "painting", + "gt_center_y": 27.0, + "other_avg_y": 328.8333333333333, + "y_diff": -301.8333333333333, + "threshold": 15.0, + "all_objects": [ + [ + "desklamp", + 242.5 + ], + [ + "alarmclock", + 318.0 + ], + [ + "cd", + 426.0 + ], + [ + "painting", + 27.0 + ] + ] + } + }, + "ai2thor_562": { + "classification": "consistent", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "bread", + "gt_center_y": 372.0, + "other_avg_y": 200.0, + "y_diff": 172.0, + "threshold": 15.0, + "all_objects": [ + [ + "toaster", + 164.5 + ], + [ + "bread", + 372.0 + ], + [ + "pan", + 201.5 + ], + [ + "soapbottle", + 234.0 + ] + ] + } + }, + "ai2thor_563": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_564": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_565": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_566": { + "classification": "consistent", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "mug", + "gt_center_y": 331.5, + "other_avg_y": 310.1666666666667, + "y_diff": 21.333333333333314, + "threshold": 15.0, + "all_objects": [ + [ + "mug", + 331.5 + ], + [ + "potato", + 294.5 + ], + [ + "drawer", + 409.0 + ], + [ + "microwave", + 227.0 + ] + ] + } + }, + "ai2thor_567": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_568": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_569": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_570": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_571": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_572": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_573": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_574": { + "classification": "counter", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "sidetable", + "gt_center_y": 323.0, + "other_avg_y": 392.8333333333333, + "y_diff": -69.83333333333331, + "threshold": 15.0, + "all_objects": [ + [ + "apple", + 384.0 + ], + [ + "diningtable", + 379.5 + ], + [ + "sidetable", + 323.0 + ], + [ + "plate", + 415.0 + ] + ] + } + }, + "ai2thor_575": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_576": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_577": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_578": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_579": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_580": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_581": { + "classification": "consistent", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "statue", + "gt_center_y": 247.0, + "other_avg_y": 151.0, + "y_diff": 96.0, + "threshold": 15.0, + "all_objects": [ + [ + "box", + 152.5 + ], + [ + "sofa", + 137.5 + ], + [ + "pillow", + 163.0 + ], + [ + "statue", + 247.0 + ] + ] + } + }, + "ai2thor_582": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_583": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_584": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_585": { + "classification": "consistent", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "window", + "gt_center_y": 58.0, + "other_avg_y": 189.66666666666666, + "y_diff": -131.66666666666666, + "threshold": 15.0, + "all_objects": [ + [ + "window", + 58.0 + ], + [ + "houseplant", + 101.5 + ], + [ + "vase", + 148.5 + ], + [ + "bowl", + 319.0 + ] + ] + } + }, + "ai2thor_586": { + "classification": "consistent", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "book", + "gt_center_y": 319.5, + "other_avg_y": 342.6666666666667, + "y_diff": -23.166666666666686, + "threshold": 15.0, + "all_objects": [ + [ + "book", + 319.5 + ], + [ + "peppershaker", + 386.5 + ], + [ + "cup", + 292.5 + ], + [ + "apple", + 349.0 + ] + ] + } + }, + "ai2thor_587": { + "classification": "consistent", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "toaster", + "gt_center_y": 164.5, + "other_avg_y": 269.1666666666667, + "y_diff": -104.66666666666669, + "threshold": 15.0, + "all_objects": [ + [ + "bread", + 372.0 + ], + [ + "pan", + 201.5 + ], + [ + "toaster", + 164.5 + ], + [ + "soapbottle", + 234.0 + ] + ] + } + }, + "ai2thor_588": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_589": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_590": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_591": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_592": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_593": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_594": { + "classification": "consistent", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "pan", + "gt_center_y": 370.5, + "other_avg_y": 319.6666666666667, + "y_diff": 50.833333333333314, + "threshold": 15.0, + "all_objects": [ + [ + "lettuce", + 257.5 + ], + [ + "pan", + 370.5 + ], + [ + "potato", + 334.0 + ], + [ + "saltshaker", + 367.5 + ] + ] + } + }, + "ai2thor_595": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_596": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_597": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_598": { + "classification": "consistent", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "soapbottle", + "gt_center_y": 349.5, + "other_avg_y": 293.3333333333333, + "y_diff": 56.166666666666686, + "threshold": 15.0, + "all_objects": [ + [ + "countertop", + 245.5 + ], + [ + "bread", + 250.5 + ], + [ + "spatula", + 384.0 + ], + [ + "soapbottle", + 349.5 + ] + ] + } + }, + "ai2thor_599": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_600": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_601": { + "classification": "consistent", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "plate", + "gt_center_y": 271.0, + "other_avg_y": 177.83333333333334, + "y_diff": 93.16666666666666, + "threshold": 15.0, + "all_objects": [ + [ + "lettuce", + 150.0 + ], + [ + "soapbottle", + 198.5 + ], + [ + "plate", + 271.0 + ], + [ + "glassbottle", + 185.0 + ] + ] + } + }, + "ai2thor_602": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_603": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_604": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_605": { + "classification": "consistent", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "chair", + "gt_center_y": 400.0, + "other_avg_y": 304.5, + "y_diff": 95.5, + "threshold": 15.0, + "all_objects": [ + [ + "mug", + 263.5 + ], + [ + "tissuebox", + 318.0 + ], + [ + "chair", + 400.0 + ], + [ + "alarmclock", + 332.0 + ] + ] + } + }, + "ai2thor_606": { + "classification": "consistent", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "sofa", + "gt_center_y": 216.5, + "other_avg_y": 174.16666666666666, + "y_diff": 42.33333333333334, + "threshold": 15.0, + "all_objects": [ + [ + "armchair", + 139.0 + ], + [ + "sidetable", + 174.0 + ], + [ + "pillow", + 209.5 + ], + [ + "sofa", + 216.5 + ] + ] + } + }, + "ai2thor_607": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_608": { + "classification": "consistent", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "chair", + "gt_center_y": 345.0, + "other_avg_y": 128.5, + "y_diff": 216.5, + "threshold": 15.0, + "all_objects": [ + [ + "drawer", + 89.0 + ], + [ + "bread", + 132.0 + ], + [ + "chair", + 345.0 + ], + [ + "spatula", + 164.5 + ] + ] + } + }, + "ai2thor_609": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_610": { + "classification": "ambiguous", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "toaster", + "gt_center_y": 261.5, + "other_avg_y": 273.3333333333333, + "y_diff": -11.833333333333314, + "threshold": 15.0, + "all_objects": [ + [ + "bread", + 248.0 + ], + [ + "toaster", + 261.5 + ], + [ + "potato", + 331.5 + ], + [ + "glassbottle", + 240.5 + ] + ] + } + }, + "ai2thor_611": { + "classification": "consistent", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "vase", + "gt_center_y": 280.5, + "other_avg_y": 89.33333333333333, + "y_diff": 191.16666666666669, + "threshold": 15.0, + "all_objects": [ + [ + "diningtable", + 112.0 + ], + [ + "vase", + 280.5 + ], + [ + "window", + 75.0 + ], + [ + "laptop", + 81.0 + ] + ] + } + }, + "ai2thor_612": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_613": { + "classification": "consistent", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "garbagecan", + "gt_center_y": 300.0, + "other_avg_y": 243.83333333333334, + "y_diff": 56.16666666666666, + "threshold": 15.0, + "all_objects": [ + [ + "garbagecan", + 300.0 + ], + [ + "handtowel", + 359.5 + ], + [ + "countertop", + 216.0 + ], + [ + "floorlamp", + 156.0 + ] + ] + } + }, + "ai2thor_614": { + "classification": "ambiguous", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "cup", + "gt_center_y": 290.0, + "other_avg_y": 294.6666666666667, + "y_diff": -4.666666666666686, + "threshold": 15.0, + "all_objects": [ + [ + "pot", + 235.0 + ], + [ + "cup", + 290.0 + ], + [ + "knife", + 318.0 + ], + [ + "butterknife", + 331.0 + ] + ] + } + }, + "ai2thor_615": { + "classification": "consistent", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "mug", + "gt_center_y": 328.0, + "other_avg_y": 306.1666666666667, + "y_diff": 21.833333333333314, + "threshold": 15.0, + "all_objects": [ + [ + "bread", + 286.5 + ], + [ + "mug", + 328.0 + ], + [ + "toaster", + 246.0 + ], + [ + "tomato", + 386.0 + ] + ] + } + }, + "ai2thor_616": { + "classification": "consistent", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "cup", + "gt_center_y": 295.0, + "other_avg_y": 226.33333333333334, + "y_diff": 68.66666666666666, + "threshold": 15.0, + "all_objects": [ + [ + "bowl", + 234.5 + ], + [ + "soapbottle", + 236.0 + ], + [ + "toaster", + 208.5 + ], + [ + "cup", + 295.0 + ] + ] + } + }, + "ai2thor_617": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_618": { + "classification": "consistent", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "alarmclock", + "gt_center_y": 304.5, + "other_avg_y": 357.8333333333333, + "y_diff": -53.333333333333314, + "threshold": 15.0, + "all_objects": [ + [ + "chair", + 422.0 + ], + [ + "mug", + 326.5 + ], + [ + "bowl", + 325.0 + ], + [ + "alarmclock", + 304.5 + ] + ] + } + }, + "ai2thor_619": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_620": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_621": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_622": { + "classification": "consistent", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "potato", + "gt_center_y": 331.5, + "other_avg_y": 250.0, + "y_diff": 81.5, + "threshold": 15.0, + "all_objects": [ + [ + "potato", + 331.5 + ], + [ + "bread", + 248.0 + ], + [ + "glassbottle", + 240.5 + ], + [ + "toaster", + 261.5 + ] + ] + } + }, + "ai2thor_623": { + "classification": "consistent", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "garbagecan", + "gt_center_y": 277.5, + "other_avg_y": 152.0, + "y_diff": 125.5, + "threshold": 15.0, + "all_objects": [ + [ + "mirror", + 24.5 + ], + [ + "sink", + 212.5 + ], + [ + "spraybottle", + 219.0 + ], + [ + "garbagecan", + 277.5 + ] + ] + } + }, + "ai2thor_624": { + "classification": "consistent", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "bowl", + "gt_center_y": 334.0, + "other_avg_y": 237.33333333333334, + "y_diff": 96.66666666666666, + "threshold": 15.0, + "all_objects": [ + [ + "bowl", + 334.0 + ], + [ + "egg", + 233.5 + ], + [ + "glassbottle", + 285.5 + ], + [ + "tomato", + 193.0 + ] + ] + } + }, + "ai2thor_625": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_626": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_627": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_628": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_629": { + "classification": "consistent", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "cup", + "gt_center_y": 310.0, + "other_avg_y": 334.6666666666667, + "y_diff": -24.666666666666686, + "threshold": 15.0, + "all_objects": [ + [ + "dishsponge", + 376.5 + ], + [ + "cup", + 310.0 + ], + [ + "mug", + 280.0 + ], + [ + "peppershaker", + 347.5 + ] + ] + } + }, + "ai2thor_630": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_631": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_632": { + "classification": "consistent", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "dishsponge", + "gt_center_y": 360.0, + "other_avg_y": 199.33333333333334, + "y_diff": 160.66666666666666, + "threshold": 15.0, + "all_objects": [ + [ + "dishsponge", + 360.0 + ], + [ + "pot", + 165.0 + ], + [ + "bread", + 163.5 + ], + [ + "lettuce", + 269.5 + ] + ] + } + }, + "ai2thor_633": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_634": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_635": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_636": { + "classification": "consistent", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "toaster", + "gt_center_y": 164.5, + "other_avg_y": 269.1666666666667, + "y_diff": -104.66666666666669, + "threshold": 15.0, + "all_objects": [ + [ + "bread", + 372.0 + ], + [ + "pan", + 201.5 + ], + [ + "soapbottle", + 234.0 + ], + [ + "toaster", + 164.5 + ] + ] + } + }, + "ai2thor_637": { + "classification": "consistent", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "window", + "gt_center_y": 35.5, + "other_avg_y": 280.8333333333333, + "y_diff": -245.33333333333331, + "threshold": 15.0, + "all_objects": [ + [ + "saltshaker", + 228.5 + ], + [ + "apple", + 371.0 + ], + [ + "lettuce", + 243.0 + ], + [ + "window", + 35.5 + ] + ] + } + }, + "ai2thor_638": { + "classification": "consistent", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "bread", + "gt_center_y": 246.0, + "other_avg_y": 305.3333333333333, + "y_diff": -59.333333333333314, + "threshold": 15.0, + "all_objects": [ + [ + "pan", + 294.0 + ], + [ + "plate", + 301.0 + ], + [ + "bread", + 246.0 + ], + [ + "lettuce", + 321.0 + ] + ] + } + }, + "ai2thor_639": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_640": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_641": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_642": { + "classification": "consistent", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "pillow", + "gt_center_y": 294.0, + "other_avg_y": 100.66666666666667, + "y_diff": 193.33333333333331, + "threshold": 15.0, + "all_objects": [ + [ + "box", + 183.5 + ], + [ + "houseplant", + 71.0 + ], + [ + "pillow", + 294.0 + ], + [ + "floorlamp", + 47.5 + ] + ] + } + }, + "ai2thor_643": { + "classification": "consistent", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "dishsponge", + "gt_center_y": 366.0, + "other_avg_y": 274.6666666666667, + "y_diff": 91.33333333333331, + "threshold": 15.0, + "all_objects": [ + [ + "dishsponge", + 366.0 + ], + [ + "spatula", + 278.5 + ], + [ + "pan", + 292.5 + ], + [ + "mug", + 253.0 + ] + ] + } + }, + "ai2thor_644": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_645": { + "classification": "consistent", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "microwave", + "gt_center_y": 160.5, + "other_avg_y": 309.0, + "y_diff": -148.5, + "threshold": 15.0, + "all_objects": [ + [ + "drawer", + 401.0 + ], + [ + "microwave", + 160.5 + ], + [ + "plate", + 238.5 + ], + [ + "spatula", + 287.5 + ] + ] + } + }, + "ai2thor_646": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_647": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_648": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_649": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_650": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_651": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_652": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_653": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_654": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_655": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_656": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_657": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_658": { + "classification": "counter", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "garbagecan", + "gt_center_y": 312.0, + "other_avg_y": 259.3333333333333, + "y_diff": 52.666666666666686, + "threshold": 15.0, + "all_objects": [ + [ + "egg", + 377.0 + ], + [ + "garbagecan", + 312.0 + ], + [ + "coffeemachine", + 121.5 + ], + [ + "drawer", + 279.5 + ] + ] + } + }, + "ai2thor_659": { + "classification": "consistent", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "toiletpaper", + "gt_center_y": 318.5, + "other_avg_y": 203.0, + "y_diff": 115.5, + "threshold": 15.0, + "all_objects": [ + [ + "mirror", + 65.0 + ], + [ + "toiletpaper", + 318.5 + ], + [ + "countertop", + 154.5 + ], + [ + "candle", + 389.5 + ] + ] + } + }, + "ai2thor_660": { + "classification": "ambiguous", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "tomato", + "gt_center_y": 362.5, + "other_avg_y": 372.0, + "y_diff": -9.5, + "threshold": 15.0, + "all_objects": [ + [ + "mug", + 387.0 + ], + [ + "tomato", + 362.5 + ], + [ + "potato", + 365.0 + ], + [ + "winebottle", + 364.0 + ] + ] + } + }, + "ai2thor_661": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_662": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_663": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_664": { + "classification": "consistent", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "apple", + "gt_center_y": 390.0, + "other_avg_y": 277.8333333333333, + "y_diff": 112.16666666666669, + "threshold": 15.0, + "all_objects": [ + [ + "apple", + 390.0 + ], + [ + "glassbottle", + 240.5 + ], + [ + "potato", + 331.5 + ], + [ + "toaster", + 261.5 + ] + ] + } + }, + "ai2thor_665": { + "classification": "ambiguous", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "sidetable", + "gt_center_y": 300.0, + "other_avg_y": 288.3333333333333, + "y_diff": 11.666666666666686, + "threshold": 15.0, + "all_objects": [ + [ + "sidetable", + 300.0 + ], + [ + "sofa", + 301.0 + ], + [ + "pillow", + 368.0 + ], + [ + "box", + 196.0 + ] + ] + } + }, + "ai2thor_666": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_667": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_668": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_669": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_670": { + "classification": "counter", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "vase", + "gt_center_y": 357.0, + "other_avg_y": 399.1666666666667, + "y_diff": -42.166666666666686, + "threshold": 15.0, + "all_objects": [ + [ + "baseballbat", + 424.0 + ], + [ + "chair", + 423.0 + ], + [ + "vase", + 357.0 + ], + [ + "sidetable", + 350.5 + ] + ] + } + }, + "ai2thor_671": { + "classification": "consistent", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "keychain", + "gt_center_y": 379.5, + "other_avg_y": 310.1666666666667, + "y_diff": 69.33333333333331, + "threshold": 15.0, + "all_objects": [ + [ + "cellphone", + 393.0 + ], + [ + "keychain", + 379.5 + ], + [ + "alarmclock", + 234.0 + ], + [ + "book", + 303.5 + ] + ] + } + }, + "ai2thor_672": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_673": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_674": { + "classification": "consistent", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "glassbottle", + "gt_center_y": 240.5, + "other_avg_y": 280.3333333333333, + "y_diff": -39.833333333333314, + "threshold": 15.0, + "all_objects": [ + [ + "toaster", + 261.5 + ], + [ + "bread", + 248.0 + ], + [ + "potato", + 331.5 + ], + [ + "glassbottle", + 240.5 + ] + ] + } + }, + "ai2thor_675": { + "classification": "consistent", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "bread", + "gt_center_y": 158.5, + "other_avg_y": 319.8333333333333, + "y_diff": -161.33333333333331, + "threshold": 15.0, + "all_objects": [ + [ + "stoveknob", + 271.5 + ], + [ + "cabinet", + 343.0 + ], + [ + "bread", + 158.5 + ], + [ + "mug", + 345.0 + ] + ] + } + }, + "ai2thor_676": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_677": { + "classification": "consistent", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "toaster", + "gt_center_y": 207.5, + "other_avg_y": 313.0, + "y_diff": -105.5, + "threshold": 15.0, + "all_objects": [ + [ + "spatula", + 270.5 + ], + [ + "toaster", + 207.5 + ], + [ + "pan", + 351.0 + ], + [ + "plate", + 317.5 + ] + ] + } + }, + "ai2thor_678": { + "classification": "consistent", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "alarmclock", + "gt_center_y": 385.5, + "other_avg_y": 338.5, + "y_diff": 47.0, + "threshold": 15.0, + "all_objects": [ + [ + "bed", + 347.0 + ], + [ + "alarmclock", + 385.5 + ], + [ + "cellphone", + 357.5 + ], + [ + "desklamp", + 311.0 + ] + ] + } + }, + "ai2thor_679": { + "classification": "consistent", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "microwave", + "gt_center_y": 178.0, + "other_avg_y": 353.3333333333333, + "y_diff": -175.33333333333331, + "threshold": 15.0, + "all_objects": [ + [ + "bread", + 373.0 + ], + [ + "countertop", + 280.0 + ], + [ + "drawer", + 407.0 + ], + [ + "microwave", + 178.0 + ] + ] + } + }, + "ai2thor_680": { + "classification": "consistent", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "soapbottle", + "gt_center_y": 275.5, + "other_avg_y": 215.33333333333334, + "y_diff": 60.16666666666666, + "threshold": 15.0, + "all_objects": [ + [ + "mug", + 243.0 + ], + [ + "coffeemachine", + 173.0 + ], + [ + "soapbottle", + 275.5 + ], + [ + "tomato", + 230.0 + ] + ] + } + }, + "ai2thor_681": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_682": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_683": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_684": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_685": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_686": { + "classification": "consistent", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "tomato", + "gt_center_y": 372.0, + "other_avg_y": 299.0, + "y_diff": 73.0, + "threshold": 15.0, + "all_objects": [ + [ + "pot", + 257.0 + ], + [ + "tomato", + 372.0 + ], + [ + "garbagecan", + 360.0 + ], + [ + "countertop", + 280.0 + ] + ] + } + }, + "ai2thor_687": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_688": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_689": { + "classification": "consistent", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "plate", + "gt_center_y": 302.0, + "other_avg_y": 250.83333333333334, + "y_diff": 51.16666666666666, + "threshold": 15.0, + "all_objects": [ + [ + "plate", + 302.0 + ], + [ + "spatula", + 282.5 + ], + [ + "chair", + 194.0 + ], + [ + "lettuce", + 276.0 + ] + ] + } + }, + "ai2thor_690": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_691": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_692": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_693": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_694": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_695": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_696": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_697": { + "classification": "counter", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "cup", + "gt_center_y": 283.5, + "other_avg_y": 330.3333333333333, + "y_diff": -46.833333333333314, + "threshold": 15.0, + "all_objects": [ + [ + "soapbottle", + 356.5 + ], + [ + "spatula", + 384.0 + ], + [ + "cup", + 283.5 + ], + [ + "bread", + 250.5 + ] + ] + } + }, + "ai2thor_698": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_699": { + "classification": "consistent", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "potato", + "gt_center_y": 214.0, + "other_avg_y": 195.5, + "y_diff": 18.5, + "threshold": 15.0, + "all_objects": [ + [ + "dishsponge", + 168.5 + ], + [ + "chair", + 255.5 + ], + [ + "potato", + 214.0 + ], + [ + "tomato", + 162.5 + ] + ] + } + }, + "ai2thor_700": { + "classification": "consistent", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "bread", + "gt_center_y": 376.5, + "other_avg_y": 218.5, + "y_diff": 158.0, + "threshold": 15.0, + "all_objects": [ + [ + "countertop", + 250.0 + ], + [ + "coffeemachine", + 143.0 + ], + [ + "butterknife", + 262.5 + ], + [ + "bread", + 376.5 + ] + ] + } + }, + "ai2thor_701": { + "classification": "consistent", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "dishsponge", + "gt_center_y": 366.0, + "other_avg_y": 264.3333333333333, + "y_diff": 101.66666666666669, + "threshold": 15.0, + "all_objects": [ + [ + "handtowel", + 155.5 + ], + [ + "dishsponge", + 366.0 + ], + [ + "cloth", + 325.5 + ], + [ + "spraybottle", + 312.0 + ] + ] + } + }, + "ai2thor_702": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_703": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_704": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_705": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_706": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_707": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_708": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_709": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_710": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_711": { + "classification": "consistent", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "kettle", + "gt_center_y": 268.5, + "other_avg_y": 358.5, + "y_diff": -90.0, + "threshold": 15.0, + "all_objects": [ + [ + "dishsponge", + 405.0 + ], + [ + "kettle", + 268.5 + ], + [ + "pot", + 335.5 + ], + [ + "cup", + 335.0 + ] + ] + } + }, + "ai2thor_712": { + "classification": "consistent", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "window", + "gt_center_y": 51.0, + "other_avg_y": 253.83333333333334, + "y_diff": -202.83333333333334, + "threshold": 15.0, + "all_objects": [ + [ + "chair", + 202.0 + ], + [ + "alarmclock", + 249.5 + ], + [ + "window", + 51.0 + ], + [ + "book", + 310.0 + ] + ] + } + }, + "ai2thor_713": { + "classification": "consistent", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "pan", + "gt_center_y": 351.0, + "other_avg_y": 265.1666666666667, + "y_diff": 85.83333333333331, + "threshold": 15.0, + "all_objects": [ + [ + "toaster", + 207.5 + ], + [ + "pan", + 351.0 + ], + [ + "plate", + 317.5 + ], + [ + "spatula", + 270.5 + ] + ] + } + }, + "ai2thor_714": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_715": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_716": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_717": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_718": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_719": { + "classification": "consistent", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "painting", + "gt_center_y": 26.0, + "other_avg_y": 243.5, + "y_diff": -217.5, + "threshold": 15.0, + "all_objects": [ + [ + "teddybear", + 189.5 + ], + [ + "painting", + 26.0 + ], + [ + "pillow", + 245.5 + ], + [ + "laptop", + 295.5 + ] + ] + } + }, + "ai2thor_720": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_721": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_722": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_723": { + "classification": "ambiguous", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "butterknife", + "gt_center_y": 275.0, + "other_avg_y": 278.5, + "y_diff": -3.5, + "threshold": 15.0, + "all_objects": [ + [ + "lettuce", + 251.0 + ], + [ + "potato", + 399.0 + ], + [ + "butterknife", + 275.0 + ], + [ + "coffeemachine", + 185.5 + ] + ] + } + }, + "ai2thor_724": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_725": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_726": { + "classification": "consistent", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "lettuce", + "gt_center_y": 375.0, + "other_avg_y": 297.6666666666667, + "y_diff": 77.33333333333331, + "threshold": 15.0, + "all_objects": [ + [ + "winebottle", + 177.5 + ], + [ + "tomato", + 343.5 + ], + [ + "garbagecan", + 372.0 + ], + [ + "lettuce", + 375.0 + ] + ] + } + }, + "ai2thor_727": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_728": { + "classification": "consistent", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "window", + "gt_center_y": 24.0, + "other_avg_y": 235.5, + "y_diff": -211.5, + "threshold": 15.0, + "all_objects": [ + [ + "garbagecan", + 185.5 + ], + [ + "window", + 24.0 + ], + [ + "pan", + 311.0 + ], + [ + "soapbottle", + 210.0 + ] + ] + } + }, + "ai2thor_729": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_730": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_731": { + "classification": "ambiguous", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "plate", + "gt_center_y": 188.5, + "other_avg_y": 192.66666666666666, + "y_diff": -4.166666666666657, + "threshold": 15.0, + "all_objects": [ + [ + "apple", + 239.5 + ], + [ + "plate", + 188.5 + ], + [ + "fork", + 291.5 + ], + [ + "window", + 47.0 + ] + ] + } + }, + "ai2thor_732": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_733": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_734": { + "classification": "consistent", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "garbagecan", + "gt_center_y": 348.0, + "other_avg_y": 189.33333333333334, + "y_diff": 158.66666666666666, + "threshold": 15.0, + "all_objects": [ + [ + "bread", + 179.5 + ], + [ + "garbagecan", + 348.0 + ], + [ + "chair", + 173.0 + ], + [ + "countertop", + 215.5 + ] + ] + } + }, + "ai2thor_735": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_736": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_737": { + "classification": "consistent", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "handtowel", + "gt_center_y": 88.5, + "other_avg_y": 349.6666666666667, + "y_diff": -261.1666666666667, + "threshold": 15.0, + "all_objects": [ + [ + "sidetable", + 375.0 + ], + [ + "tissuebox", + 372.5 + ], + [ + "handtowel", + 88.5 + ], + [ + "spraybottle", + 301.5 + ] + ] + } + }, + "ai2thor_738": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_739": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_740": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_741": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_742": { + "classification": "counter", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "cd", + "gt_center_y": 288.5, + "other_avg_y": 161.66666666666666, + "y_diff": 126.83333333333334, + "threshold": 15.0, + "all_objects": [ + [ + "cd", + 288.5 + ], + [ + "desklamp", + 144.0 + ], + [ + "alarmclock", + 261.5 + ], + [ + "laptop", + 79.5 + ] + ] + } + }, + "ai2thor_743": { + "classification": "consistent", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "cup", + "gt_center_y": 300.0, + "other_avg_y": 186.33333333333334, + "y_diff": 113.66666666666666, + "threshold": 15.0, + "all_objects": [ + [ + "coffeemachine", + 83.0 + ], + [ + "winebottle", + 127.5 + ], + [ + "cabinet", + 348.5 + ], + [ + "cup", + 300.0 + ] + ] + } + }, + "ai2thor_744": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_745": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_746": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_747": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_748": { + "classification": "consistent", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "peppershaker", + "gt_center_y": 386.5, + "other_avg_y": 301.0, + "y_diff": 85.5, + "threshold": 15.0, + "all_objects": [ + [ + "peppershaker", + 386.5 + ], + [ + "book", + 319.5 + ], + [ + "apple", + 349.0 + ], + [ + "cup", + 234.5 + ] + ] + } + }, + "ai2thor_749": { + "classification": "consistent", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "fridge", + "gt_center_y": 143.0, + "other_avg_y": 303.1666666666667, + "y_diff": -160.16666666666669, + "threshold": 15.0, + "all_objects": [ + [ + "drawer", + 322.0 + ], + [ + "garbagecan", + 225.0 + ], + [ + "fridge", + 143.0 + ], + [ + "cabinet", + 362.5 + ] + ] + } + }, + "ai2thor_750": { + "classification": "consistent", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "garbagecan", + "gt_center_y": 348.0, + "other_avg_y": 189.33333333333334, + "y_diff": 158.66666666666666, + "threshold": 15.0, + "all_objects": [ + [ + "bread", + 179.5 + ], + [ + "garbagecan", + 348.0 + ], + [ + "countertop", + 215.5 + ], + [ + "chair", + 173.0 + ] + ] + } + }, + "ai2thor_751": { + "classification": "consistent", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "pan", + "gt_center_y": 12.5, + "other_avg_y": 273.5, + "y_diff": -261.0, + "threshold": 15.0, + "all_objects": [ + [ + "pan", + 12.5 + ], + [ + "apple", + 373.5 + ], + [ + "garbagecan", + 204.0 + ], + [ + "chair", + 243.0 + ] + ] + } + }, + "ai2thor_752": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_753": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_754": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_755": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_756": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_757": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_758": { + "classification": "consistent", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "mirror", + "gt_center_y": 24.5, + "other_avg_y": 227.16666666666666, + "y_diff": -202.66666666666666, + "threshold": 15.0, + "all_objects": [ + [ + "toiletpaper", + 191.5 + ], + [ + "garbagecan", + 277.5 + ], + [ + "sink", + 212.5 + ], + [ + "mirror", + 24.5 + ] + ] + } + }, + "ai2thor_759": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_760": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_761": { + "classification": "consistent", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "mug", + "gt_center_y": 233.0, + "other_avg_y": 276.8333333333333, + "y_diff": -43.833333333333314, + "threshold": 15.0, + "all_objects": [ + [ + "bowl", + 234.0 + ], + [ + "lettuce", + 213.0 + ], + [ + "mug", + 233.0 + ], + [ + "plate", + 383.5 + ] + ] + } + }, + "ai2thor_762": { + "classification": "consistent", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "pan", + "gt_center_y": 248.0, + "other_avg_y": 174.0, + "y_diff": 74.0, + "threshold": 15.0, + "all_objects": [ + [ + "pan", + 248.0 + ], + [ + "glassbottle", + 159.0 + ], + [ + "cup", + 179.5 + ], + [ + "bowl", + 183.5 + ] + ] + } + }, + "ai2thor_763": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_764": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_765": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_766": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_767": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_768": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_769": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_770": { + "classification": "consistent", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "glassbottle", + "gt_center_y": 101.0, + "other_avg_y": 230.66666666666666, + "y_diff": -129.66666666666666, + "threshold": 15.0, + "all_objects": [ + [ + "tomato", + 220.5 + ], + [ + "pen", + 236.5 + ], + [ + "glassbottle", + 101.0 + ], + [ + "cup", + 235.0 + ] + ] + } + }, + "ai2thor_771": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_772": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_773": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_774": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_775": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_776": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_777": { + "classification": "consistent", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "bowl", + "gt_center_y": 185.5, + "other_avg_y": 271.3333333333333, + "y_diff": -85.83333333333331, + "threshold": 15.0, + "all_objects": [ + [ + "bowl", + 185.5 + ], + [ + "plate", + 245.5 + ], + [ + "lettuce", + 202.5 + ], + [ + "dishsponge", + 366.0 + ] + ] + } + }, + "ai2thor_778": { + "classification": "consistent", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "bowl", + "gt_center_y": 325.0, + "other_avg_y": 283.5, + "y_diff": 41.5, + "threshold": 15.0, + "all_objects": [ + [ + "boots", + 427.0 + ], + [ + "pencil", + 197.5 + ], + [ + "cellphone", + 226.0 + ], + [ + "bowl", + 325.0 + ] + ] + } + }, + "ai2thor_779": { + "classification": "consistent", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "potato", + "gt_center_y": 399.0, + "other_avg_y": 237.16666666666666, + "y_diff": 161.83333333333334, + "threshold": 15.0, + "all_objects": [ + [ + "potato", + 399.0 + ], + [ + "coffeemachine", + 185.5 + ], + [ + "butterknife", + 275.0 + ], + [ + "lettuce", + 251.0 + ] + ] + } + }, + "ai2thor_780": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_781": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_782": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_783": { + "classification": "consistent", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "alarmclock", + "gt_center_y": 261.5, + "other_avg_y": 170.66666666666666, + "y_diff": 90.83333333333334, + "threshold": 15.0, + "all_objects": [ + [ + "alarmclock", + 261.5 + ], + [ + "cd", + 288.5 + ], + [ + "desklamp", + 144.0 + ], + [ + "laptop", + 79.5 + ] + ] + } + }, + "ai2thor_784": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_785": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_786": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_787": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_788": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_789": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_790": { + "classification": "consistent", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "lettuce", + "gt_center_y": 257.5, + "other_avg_y": 357.3333333333333, + "y_diff": -99.83333333333331, + "threshold": 15.0, + "all_objects": [ + [ + "lettuce", + 257.5 + ], + [ + "saltshaker", + 367.5 + ], + [ + "potato", + 334.0 + ], + [ + "pan", + 370.5 + ] + ] + } + }, + "ai2thor_791": { + "classification": "consistent", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "soapbottle", + "gt_center_y": 254.5, + "other_avg_y": 292.0, + "y_diff": -37.5, + "threshold": 15.0, + "all_objects": [ + [ + "lettuce", + 250.0 + ], + [ + "cup", + 320.5 + ], + [ + "knife", + 305.5 + ], + [ + "soapbottle", + 254.5 + ] + ] + } + }, + "ai2thor_792": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_793": { + "classification": "consistent", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "book", + "gt_center_y": 310.0, + "other_avg_y": 167.5, + "y_diff": 142.5, + "threshold": 15.0, + "all_objects": [ + [ + "alarmclock", + 249.5 + ], + [ + "book", + 310.0 + ], + [ + "window", + 51.0 + ], + [ + "chair", + 202.0 + ] + ] + } + }, + "ai2thor_794": { + "classification": "consistent", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "apple", + "gt_center_y": 212.5, + "other_avg_y": 352.1666666666667, + "y_diff": -139.66666666666669, + "threshold": 15.0, + "all_objects": [ + [ + "apple", + 212.5 + ], + [ + "bowl", + 380.0 + ], + [ + "lettuce", + 376.5 + ], + [ + "ladle", + 300.0 + ] + ] + } + }, + "ai2thor_795": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_796": { + "classification": "consistent", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "lettuce", + "gt_center_y": 149.0, + "other_avg_y": 203.5, + "y_diff": -54.5, + "threshold": 15.0, + "all_objects": [ + [ + "lettuce", + 149.0 + ], + [ + "countertop", + 210.0 + ], + [ + "spatula", + 248.0 + ], + [ + "pot", + 152.5 + ] + ] + } + }, + "ai2thor_797": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_798": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_799": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_800": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_801": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_802": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_803": { + "classification": "counter", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "bread", + "gt_center_y": 236.5, + "other_avg_y": 322.0, + "y_diff": -85.5, + "threshold": 15.0, + "all_objects": [ + [ + "egg", + 430.0 + ], + [ + "pot", + 156.0 + ], + [ + "chair", + 380.0 + ], + [ + "bread", + 236.5 + ] + ] + } + }, + "ai2thor_804": { + "classification": "consistent", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "cloth", + "gt_center_y": 403.5, + "other_avg_y": 275.6666666666667, + "y_diff": 127.83333333333331, + "threshold": 15.0, + "all_objects": [ + [ + "countertop", + 403.0 + ], + [ + "showerdoor", + 275.5 + ], + [ + "towel", + 148.5 + ], + [ + "cloth", + 403.5 + ] + ] + } + }, + "ai2thor_805": { + "classification": "counter", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "plate", + "gt_center_y": 245.5, + "other_avg_y": 281.0, + "y_diff": -35.5, + "threshold": 15.0, + "all_objects": [ + [ + "plate", + 245.5 + ], + [ + "spatula", + 281.5 + ], + [ + "drawer", + 401.0 + ], + [ + "microwave", + 160.5 + ] + ] + } + }, + "ai2thor_806": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_807": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_808": { + "classification": "consistent", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "toiletpaper", + "gt_center_y": 191.5, + "other_avg_y": 171.5, + "y_diff": 20.0, + "threshold": 15.0, + "all_objects": [ + [ + "garbagecan", + 277.5 + ], + [ + "toiletpaper", + 191.5 + ], + [ + "mirror", + 24.5 + ], + [ + "sink", + 212.5 + ] + ] + } + }, + "ai2thor_809": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_810": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_811": { + "classification": "consistent", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "vase", + "gt_center_y": 406.5, + "other_avg_y": 356.5, + "y_diff": 50.0, + "threshold": 15.0, + "all_objects": [ + [ + "bed", + 365.0 + ], + [ + "vase", + 406.5 + ], + [ + "sidetable", + 382.0 + ], + [ + "laptop", + 322.5 + ] + ] + } + }, + "ai2thor_812": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_813": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_814": { + "classification": "consistent", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "mug", + "gt_center_y": 356.0, + "other_avg_y": 207.5, + "y_diff": 148.5, + "threshold": 15.0, + "all_objects": [ + [ + "mug", + 356.0 + ], + [ + "remotecontrol", + 251.0 + ], + [ + "sidetable", + 200.0 + ], + [ + "alarmclock", + 171.5 + ] + ] + } + }, + "ai2thor_815": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_816": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_817": { + "classification": "counter", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "cabinet", + "gt_center_y": 170.0, + "other_avg_y": 127.66666666666667, + "y_diff": 42.33333333333333, + "threshold": 15.0, + "all_objects": [ + [ + "cabinet", + 170.0 + ], + [ + "window", + 34.5 + ], + [ + "bread", + 205.0 + ], + [ + "garbagecan", + 143.5 + ] + ] + } + }, + "ai2thor_818": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_819": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_820": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_821": { + "classification": "consistent", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "soapbottle", + "gt_center_y": 348.5, + "other_avg_y": 317.5, + "y_diff": 31.0, + "threshold": 15.0, + "all_objects": [ + [ + "mug", + 297.0 + ], + [ + "dishsponge", + 389.5 + ], + [ + "spatula", + 266.0 + ], + [ + "soapbottle", + 348.5 + ] + ] + } + }, + "ai2thor_822": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_823": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_824": { + "classification": "consistent", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "lettuce", + "gt_center_y": 150.0, + "other_avg_y": 218.16666666666666, + "y_diff": -68.16666666666666, + "threshold": 15.0, + "all_objects": [ + [ + "glassbottle", + 185.0 + ], + [ + "plate", + 271.0 + ], + [ + "soapbottle", + 198.5 + ], + [ + "lettuce", + 150.0 + ] + ] + } + }, + "ai2thor_825": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_826": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_827": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_828": { + "classification": "consistent", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "apple", + "gt_center_y": 91.5, + "other_avg_y": 178.0, + "y_diff": -86.5, + "threshold": 15.0, + "all_objects": [ + [ + "spatula", + 169.5 + ], + [ + "apple", + 91.5 + ], + [ + "bread", + 158.5 + ], + [ + "garbagecan", + 206.0 + ] + ] + } + }, + "ai2thor_829": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_830": { + "classification": "consistent", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "peppershaker", + "gt_center_y": 347.5, + "other_avg_y": 322.1666666666667, + "y_diff": 25.333333333333314, + "threshold": 15.0, + "all_objects": [ + [ + "dishsponge", + 376.5 + ], + [ + "peppershaker", + 347.5 + ], + [ + "cup", + 310.0 + ], + [ + "mug", + 280.0 + ] + ] + } + }, + "ai2thor_831": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_832": { + "classification": "consistent", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "painting", + "gt_center_y": 24.5, + "other_avg_y": 351.6666666666667, + "y_diff": -327.1666666666667, + "threshold": 15.0, + "all_objects": [ + [ + "garbagecan", + 405.0 + ], + [ + "painting", + 24.5 + ], + [ + "sidetable", + 352.0 + ], + [ + "bowl", + 298.0 + ] + ] + } + }, + "ai2thor_833": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_834": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_835": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_836": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_837": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_838": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_839": { + "classification": "consistent", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "lettuce", + "gt_center_y": 283.5, + "other_avg_y": 321.6666666666667, + "y_diff": -38.166666666666686, + "threshold": 15.0, + "all_objects": [ + [ + "fork", + 335.0 + ], + [ + "winebottle", + 262.5 + ], + [ + "plate", + 367.5 + ], + [ + "lettuce", + 283.5 + ] + ] + } + }, + "ai2thor_840": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_841": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_842": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_843": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_844": { + "classification": "consistent", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "toaster", + "gt_center_y": 261.5, + "other_avg_y": 370.6666666666667, + "y_diff": -109.16666666666669, + "threshold": 15.0, + "all_objects": [ + [ + "spoon", + 374.5 + ], + [ + "egg", + 400.5 + ], + [ + "plate", + 337.0 + ], + [ + "toaster", + 261.5 + ] + ] + } + }, + "ai2thor_845": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_846": { + "classification": "consistent", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "glassbottle", + "gt_center_y": 240.5, + "other_avg_y": 280.3333333333333, + "y_diff": -39.833333333333314, + "threshold": 15.0, + "all_objects": [ + [ + "bread", + 248.0 + ], + [ + "potato", + 331.5 + ], + [ + "glassbottle", + 240.5 + ], + [ + "toaster", + 261.5 + ] + ] + } + }, + "ai2thor_847": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_848": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_849": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_850": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_851": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_852": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_853": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_854": { + "classification": "ambiguous", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "peppershaker", + "gt_center_y": 372.0, + "other_avg_y": 377.8333333333333, + "y_diff": -5.833333333333314, + "threshold": 15.0, + "all_objects": [ + [ + "peppershaker", + 372.0 + ], + [ + "mug", + 385.5 + ], + [ + "winebottle", + 364.0 + ], + [ + "ladle", + 384.0 + ] + ] + } + }, + "ai2thor_855": { + "classification": "counter", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "potato", + "gt_center_y": 191.0, + "other_avg_y": 210.16666666666666, + "y_diff": -19.166666666666657, + "threshold": 15.0, + "all_objects": [ + [ + "potato", + 191.0 + ], + [ + "butterknife", + 204.0 + ], + [ + "cabinet", + 372.5 + ], + [ + "coffeemachine", + 54.0 + ] + ] + } + }, + "ai2thor_856": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_857": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_858": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_859": { + "classification": "consistent", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "remotecontrol", + "gt_center_y": 337.0, + "other_avg_y": 319.3333333333333, + "y_diff": 17.666666666666686, + "threshold": 15.0, + "all_objects": [ + [ + "sidetable", + 289.0 + ], + [ + "pillow", + 368.0 + ], + [ + "sofa", + 301.0 + ], + [ + "remotecontrol", + 337.0 + ] + ] + } + }, + "ai2thor_860": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_861": { + "classification": "consistent", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "egg", + "gt_center_y": 377.0, + "other_avg_y": 237.66666666666666, + "y_diff": 139.33333333333334, + "threshold": 15.0, + "all_objects": [ + [ + "garbagecan", + 312.0 + ], + [ + "egg", + 377.0 + ], + [ + "drawer", + 279.5 + ], + [ + "coffeemachine", + 121.5 + ] + ] + } + }, + "ai2thor_862": { + "classification": "consistent", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "mug", + "gt_center_y": 361.5, + "other_avg_y": 399.1666666666667, + "y_diff": -37.666666666666686, + "threshold": 15.0, + "all_objects": [ + [ + "chair", + 423.0 + ], + [ + "baseballbat", + 424.0 + ], + [ + "mug", + 361.5 + ], + [ + "sidetable", + 350.5 + ] + ] + } + }, + "ai2thor_863": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_864": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_865": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_866": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_867": { + "classification": "consistent", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "sink", + "gt_center_y": 308.5, + "other_avg_y": 357.3333333333333, + "y_diff": -48.833333333333314, + "threshold": 15.0, + "all_objects": [ + [ + "sink", + 308.5 + ], + [ + "potato", + 414.0 + ], + [ + "bread", + 345.0 + ], + [ + "lettuce", + 313.0 + ] + ] + } + }, + "ai2thor_868": { + "classification": "consistent", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "dishsponge", + "gt_center_y": 395.0, + "other_avg_y": 320.3333333333333, + "y_diff": 74.66666666666669, + "threshold": 15.0, + "all_objects": [ + [ + "dishsponge", + 395.0 + ], + [ + "countertop", + 245.5 + ], + [ + "pan", + 342.0 + ], + [ + "apple", + 373.5 + ] + ] + } + }, + "ai2thor_869": { + "classification": "consistent", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "tomato", + "gt_center_y": 230.0, + "other_avg_y": 258.3333333333333, + "y_diff": -28.333333333333314, + "threshold": 15.0, + "all_objects": [ + [ + "coffeemachine", + 171.5 + ], + [ + "soapbottle", + 275.5 + ], + [ + "tomato", + 230.0 + ], + [ + "mug", + 328.0 + ] + ] + } + }, + "ai2thor_870": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_871": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_872": { + "classification": "consistent", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "tomato", + "gt_center_y": 295.5, + "other_avg_y": 214.16666666666666, + "y_diff": 81.33333333333334, + "threshold": 15.0, + "all_objects": [ + [ + "spoon", + 263.0 + ], + [ + "tomato", + 295.5 + ], + [ + "bowl", + 208.0 + ], + [ + "bread", + 171.5 + ] + ] + } + }, + "ai2thor_873": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_874": { + "classification": "consistent", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "toaster", + "gt_center_y": 208.5, + "other_avg_y": 255.16666666666666, + "y_diff": -46.66666666666666, + "threshold": 15.0, + "all_objects": [ + [ + "toaster", + 208.5 + ], + [ + "cup", + 295.0 + ], + [ + "bowl", + 234.5 + ], + [ + "soapbottle", + 236.0 + ] + ] + } + }, + "ai2thor_875": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_876": { + "classification": "consistent", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "toaster", + "gt_center_y": 164.5, + "other_avg_y": 269.1666666666667, + "y_diff": -104.66666666666669, + "threshold": 15.0, + "all_objects": [ + [ + "toaster", + 164.5 + ], + [ + "bread", + 372.0 + ], + [ + "pan", + 201.5 + ], + [ + "soapbottle", + 234.0 + ] + ] + } + }, + "ai2thor_877": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_878": { + "classification": "consistent", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "ladle", + "gt_center_y": 247.0, + "other_avg_y": 188.33333333333334, + "y_diff": 58.66666666666666, + "threshold": 15.0, + "all_objects": [ + [ + "bread", + 178.5 + ], + [ + "bowl", + 199.0 + ], + [ + "ladle", + 247.0 + ], + [ + "lettuce", + 187.5 + ] + ] + } + }, + "ai2thor_879": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_880": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_881": { + "classification": "counter", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "window", + "gt_center_y": 47.0, + "other_avg_y": 179.16666666666666, + "y_diff": -132.16666666666666, + "threshold": 15.0, + "all_objects": [ + [ + "lettuce", + 57.5 + ], + [ + "window", + 47.0 + ], + [ + "fork", + 291.5 + ], + [ + "plate", + 188.5 + ] + ] + } + }, + "ai2thor_882": { + "classification": "consistent", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "mirror", + "gt_center_y": 50.0, + "other_avg_y": 222.33333333333334, + "y_diff": -172.33333333333334, + "threshold": 15.0, + "all_objects": [ + [ + "garbagecan", + 370.0 + ], + [ + "handtowel", + 83.5 + ], + [ + "countertop", + 213.5 + ], + [ + "mirror", + 50.0 + ] + ] + } + }, + "ai2thor_883": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_884": { + "classification": "consistent", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "soapbar", + "gt_center_y": 372.0, + "other_avg_y": 166.16666666666666, + "y_diff": 205.83333333333334, + "threshold": 15.0, + "all_objects": [ + [ + "soapbar", + 372.0 + ], + [ + "spraybottle", + 35.0 + ], + [ + "garbagecan", + 420.0 + ], + [ + "soapbottle", + 43.5 + ] + ] + } + }, + "ai2thor_885": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_886": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_887": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_888": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_889": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_890": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_891": { + "classification": "consistent", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "cup", + "gt_center_y": 310.0, + "other_avg_y": 334.6666666666667, + "y_diff": -24.666666666666686, + "threshold": 15.0, + "all_objects": [ + [ + "dishsponge", + 376.5 + ], + [ + "cup", + 310.0 + ], + [ + "peppershaker", + 347.5 + ], + [ + "mug", + 280.0 + ] + ] + } + }, + "ai2thor_892": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_893": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_894": { + "classification": "consistent", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "sidetable", + "gt_center_y": 239.0, + "other_avg_y": 191.16666666666666, + "y_diff": 47.83333333333334, + "threshold": 15.0, + "all_objects": [ + [ + "bread", + 153.5 + ], + [ + "bowl", + 176.0 + ], + [ + "sidetable", + 239.0 + ], + [ + "mug", + 244.0 + ] + ] + } + }, + "ai2thor_895": { + "classification": "consistent", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "dishsponge", + "gt_center_y": 395.0, + "other_avg_y": 320.3333333333333, + "y_diff": 74.66666666666669, + "threshold": 15.0, + "all_objects": [ + [ + "dishsponge", + 395.0 + ], + [ + "pan", + 342.0 + ], + [ + "countertop", + 245.5 + ], + [ + "apple", + 373.5 + ] + ] + } + }, + "ai2thor_896": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_897": { + "classification": "consistent", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "desklamp", + "gt_center_y": 135.0, + "other_avg_y": 330.3333333333333, + "y_diff": -195.33333333333331, + "threshold": 15.0, + "all_objects": [ + [ + "desk", + 302.0 + ], + [ + "desklamp", + 135.0 + ], + [ + "book", + 270.0 + ], + [ + "chair", + 419.0 + ] + ] + } + }, + "ai2thor_898": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_899": { + "classification": "consistent", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "papertowelroll", + "gt_center_y": 233.0, + "other_avg_y": 257.3333333333333, + "y_diff": -24.333333333333314, + "threshold": 15.0, + "all_objects": [ + [ + "cloth", + 363.0 + ], + [ + "handtowel", + 110.5 + ], + [ + "dishsponge", + 298.5 + ], + [ + "papertowelroll", + 233.0 + ] + ] + } + }, + "ai2thor_900": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_901": { + "classification": "consistent", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "kettle", + "gt_center_y": 139.0, + "other_avg_y": 235.66666666666666, + "y_diff": -96.66666666666666, + "threshold": 15.0, + "all_objects": [ + [ + "kettle", + 139.0 + ], + [ + "cup", + 216.5 + ], + [ + "apple", + 270.0 + ], + [ + "butterknife", + 220.5 + ] + ] + } + }, + "ai2thor_902": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_903": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_904": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_905": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_906": { + "classification": "consistent", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "sidetable", + "gt_center_y": 186.0, + "other_avg_y": 276.8333333333333, + "y_diff": -90.83333333333331, + "threshold": 15.0, + "all_objects": [ + [ + "laptop", + 271.5 + ], + [ + "sofa", + 220.0 + ], + [ + "coffeetable", + 339.0 + ], + [ + "sidetable", + 186.0 + ] + ] + } + }, + "ai2thor_907": { + "classification": "consistent", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "watch", + "gt_center_y": 323.5, + "other_avg_y": 131.83333333333334, + "y_diff": 191.66666666666666, + "threshold": 15.0, + "all_objects": [ + [ + "television", + 79.0 + ], + [ + "coffeetable", + 203.5 + ], + [ + "sofa", + 113.0 + ], + [ + "watch", + 323.5 + ] + ] + } + }, + "ai2thor_908": { + "classification": "consistent", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "chair", + "gt_center_y": 151.5, + "other_avg_y": 170.83333333333334, + "y_diff": -19.333333333333343, + "threshold": 15.0, + "all_objects": [ + [ + "lettuce", + 128.5 + ], + [ + "pen", + 161.0 + ], + [ + "spatula", + 223.0 + ], + [ + "chair", + 151.5 + ] + ] + } + }, + "ai2thor_909": { + "classification": "consistent", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "cup", + "gt_center_y": 320.5, + "other_avg_y": 258.6666666666667, + "y_diff": 61.833333333333314, + "threshold": 15.0, + "all_objects": [ + [ + "cup", + 320.5 + ], + [ + "lettuce", + 234.5 + ], + [ + "bread", + 297.5 + ], + [ + "toaster", + 244.0 + ] + ] + } + }, + "ai2thor_910": { + "classification": "consistent", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "peppershaker", + "gt_center_y": 386.5, + "other_avg_y": 320.3333333333333, + "y_diff": 66.16666666666669, + "threshold": 15.0, + "all_objects": [ + [ + "apple", + 349.0 + ], + [ + "book", + 319.5 + ], + [ + "cup", + 292.5 + ], + [ + "peppershaker", + 386.5 + ] + ] + } + }, + "ai2thor_911": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_912": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_913": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_914": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_915": { + "classification": "consistent", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "sidetable", + "gt_center_y": 350.5, + "other_avg_y": 401.3333333333333, + "y_diff": -50.833333333333314, + "threshold": 15.0, + "all_objects": [ + [ + "chair", + 423.0 + ], + [ + "sidetable", + 350.5 + ], + [ + "vase", + 357.0 + ], + [ + "baseballbat", + 424.0 + ] + ] + } + }, + "ai2thor_916": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_917": { + "classification": "consistent", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "sidetable", + "gt_center_y": 289.0, + "other_avg_y": 335.3333333333333, + "y_diff": -46.333333333333314, + "threshold": 15.0, + "all_objects": [ + [ + "remotecontrol", + 337.0 + ], + [ + "sidetable", + 289.0 + ], + [ + "pillow", + 368.0 + ], + [ + "sofa", + 301.0 + ] + ] + } + }, + "ai2thor_918": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_919": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_920": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_921": { + "classification": "consistent", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "desklamp", + "gt_center_y": 161.0, + "other_avg_y": 357.3333333333333, + "y_diff": -196.33333333333331, + "threshold": 15.0, + "all_objects": [ + [ + "cd", + 371.0 + ], + [ + "desklamp", + 161.0 + ], + [ + "book", + 310.0 + ], + [ + "bed", + 391.0 + ] + ] + } + }, + "ai2thor_922": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_923": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_924": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_925": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_926": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_927": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_928": { + "classification": "consistent", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "pan", + "gt_center_y": 108.0, + "other_avg_y": 290.8333333333333, + "y_diff": -182.83333333333331, + "threshold": 15.0, + "all_objects": [ + [ + "apple", + 220.5 + ], + [ + "spatula", + 298.5 + ], + [ + "butterknife", + 353.5 + ], + [ + "pan", + 108.0 + ] + ] + } + }, + "ai2thor_929": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_930": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_931": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_932": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_933": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_934": { + "classification": "consistent", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "papertowelroll", + "gt_center_y": 233.0, + "other_avg_y": 257.6666666666667, + "y_diff": -24.666666666666686, + "threshold": 15.0, + "all_objects": [ + [ + "dishsponge", + 298.5 + ], + [ + "cloth", + 364.0 + ], + [ + "papertowelroll", + 233.0 + ], + [ + "handtowel", + 110.5 + ] + ] + } + }, + "ai2thor_935": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_936": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_937": { + "classification": "consistent", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "tissuebox", + "gt_center_y": 372.5, + "other_avg_y": 160.5, + "y_diff": 212.0, + "threshold": 15.0, + "all_objects": [ + [ + "handtowel", + 88.5 + ], + [ + "handtowelholder", + 18.0 + ], + [ + "tissuebox", + 372.5 + ], + [ + "sidetable", + 375.0 + ] + ] + } + }, + "ai2thor_938": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_939": { + "classification": "consistent", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "lettuce", + "gt_center_y": 247.5, + "other_avg_y": 274.0, + "y_diff": -26.5, + "threshold": 15.0, + "all_objects": [ + [ + "drawer", + 299.0 + ], + [ + "diningtable", + 249.5 + ], + [ + "tomato", + 273.5 + ], + [ + "lettuce", + 247.5 + ] + ] + } + }, + "ai2thor_940": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_941": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_942": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_943": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_944": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_945": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_946": { + "classification": "consistent", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "houseplant", + "gt_center_y": 101.5, + "other_avg_y": 290.6666666666667, + "y_diff": -189.16666666666669, + "threshold": 15.0, + "all_objects": [ + [ + "houseplant", + 101.5 + ], + [ + "tomato", + 326.0 + ], + [ + "knife", + 340.5 + ], + [ + "pan", + 205.5 + ] + ] + } + }, + "ai2thor_947": { + "classification": "consistent", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "tomato", + "gt_center_y": 363.0, + "other_avg_y": 266.0, + "y_diff": 97.0, + "threshold": 15.0, + "all_objects": [ + [ + "toaster", + 214.5 + ], + [ + "pan", + 264.0 + ], + [ + "potato", + 319.5 + ], + [ + "tomato", + 363.0 + ] + ] + } + }, + "ai2thor_948": { + "classification": "consistent", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "garbagecan", + "gt_center_y": 143.5, + "other_avg_y": 218.66666666666666, + "y_diff": -75.16666666666666, + "threshold": 15.0, + "all_objects": [ + [ + "egg", + 280.5 + ], + [ + "garbagecan", + 143.5 + ], + [ + "soapbottle", + 153.0 + ], + [ + "pot", + 222.5 + ] + ] + } + }, + "ai2thor_949": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_950": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_951": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_952": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_953": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_954": { + "classification": "consistent", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "toiletpaper", + "gt_center_y": 320.0, + "other_avg_y": 159.66666666666666, + "y_diff": 160.33333333333334, + "threshold": 15.0, + "all_objects": [ + [ + "mirror", + 47.0 + ], + [ + "scrubbrush", + 316.0 + ], + [ + "soapbottle", + 116.0 + ], + [ + "toiletpaper", + 320.0 + ] + ] + } + }, + "ai2thor_955": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_956": { + "classification": "consistent", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "glassbottle", + "gt_center_y": 159.0, + "other_avg_y": 203.66666666666666, + "y_diff": -44.66666666666666, + "threshold": 15.0, + "all_objects": [ + [ + "glassbottle", + 159.0 + ], + [ + "bowl", + 183.5 + ], + [ + "cup", + 179.5 + ], + [ + "pan", + 248.0 + ] + ] + } + }, + "ai2thor_957": { + "classification": "consistent", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "glassbottle", + "gt_center_y": 240.5, + "other_avg_y": 280.3333333333333, + "y_diff": -39.833333333333314, + "threshold": 15.0, + "all_objects": [ + [ + "bread", + 248.0 + ], + [ + "toaster", + 261.5 + ], + [ + "potato", + 331.5 + ], + [ + "glassbottle", + 240.5 + ] + ] + } + }, + "ai2thor_958": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_959": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_960": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_961": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_962": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_963": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_964": { + "classification": "consistent", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "glassbottle", + "gt_center_y": 240.5, + "other_avg_y": 280.3333333333333, + "y_diff": -39.833333333333314, + "threshold": 15.0, + "all_objects": [ + [ + "glassbottle", + 240.5 + ], + [ + "toaster", + 261.5 + ], + [ + "potato", + 331.5 + ], + [ + "bread", + 248.0 + ] + ] + } + }, + "ai2thor_965": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_966": { + "classification": "consistent", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "window", + "gt_center_y": 148.5, + "other_avg_y": 254.83333333333334, + "y_diff": -106.33333333333334, + "threshold": 15.0, + "all_objects": [ + [ + "window", + 148.5 + ], + [ + "chair", + 352.5 + ], + [ + "spoon", + 187.0 + ], + [ + "bread", + 225.0 + ] + ] + } + }, + "ai2thor_967": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_968": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_969": { + "classification": "counter", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "cup", + "gt_center_y": 303.0, + "other_avg_y": 351.6666666666667, + "y_diff": -48.666666666666686, + "threshold": 15.0, + "all_objects": [ + [ + "apple", + 349.0 + ], + [ + "cup", + 303.0 + ], + [ + "book", + 319.5 + ], + [ + "peppershaker", + 386.5 + ] + ] + } + }, + "ai2thor_970": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_971": { + "classification": "counter", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "chair", + "gt_center_y": 372.0, + "other_avg_y": 247.83333333333334, + "y_diff": 124.16666666666666, + "threshold": 15.0, + "all_objects": [ + [ + "laptop", + 215.0 + ], + [ + "chair", + 372.0 + ], + [ + "desklamp", + 182.0 + ], + [ + "shelf", + 346.5 + ] + ] + } + }, + "ai2thor_972": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_973": { + "classification": "consistent", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "mug", + "gt_center_y": 253.0, + "other_avg_y": 296.3333333333333, + "y_diff": -43.333333333333314, + "threshold": 15.0, + "all_objects": [ + [ + "lettuce", + 262.5 + ], + [ + "mug", + 253.0 + ], + [ + "toaster", + 196.5 + ], + [ + "butterknife", + 430.0 + ] + ] + } + }, + "ai2thor_974": { + "classification": "consistent", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "toiletpaper", + "gt_center_y": 191.5, + "other_avg_y": 171.5, + "y_diff": 20.0, + "threshold": 15.0, + "all_objects": [ + [ + "garbagecan", + 277.5 + ], + [ + "toiletpaper", + 191.5 + ], + [ + "sink", + 212.5 + ], + [ + "mirror", + 24.5 + ] + ] + } + }, + "ai2thor_975": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_976": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_977": { + "classification": "consistent", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "fridge", + "gt_center_y": 74.5, + "other_avg_y": 244.16666666666666, + "y_diff": -169.66666666666666, + "threshold": 15.0, + "all_objects": [ + [ + "tomato", + 211.5 + ], + [ + "pan", + 311.0 + ], + [ + "soapbottle", + 210.0 + ], + [ + "fridge", + 74.5 + ] + ] + } + }, + "ai2thor_978": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_979": { + "classification": "consistent", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "garbagecan", + "gt_center_y": 143.5, + "other_avg_y": 219.16666666666666, + "y_diff": -75.66666666666666, + "threshold": 15.0, + "all_objects": [ + [ + "soapbottle", + 153.0 + ], + [ + "pot", + 224.0 + ], + [ + "garbagecan", + 143.5 + ], + [ + "egg", + 280.5 + ] + ] + } + }, + "ai2thor_980": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_981": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_982": { + "classification": "consistent", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "dishsponge", + "gt_center_y": 360.0, + "other_avg_y": 203.5, + "y_diff": 156.5, + "threshold": 15.0, + "all_objects": [ + [ + "handtowel", + 155.5 + ], + [ + "cart", + 385.0 + ], + [ + "dishsponge", + 360.0 + ], + [ + "handtowelholder", + 70.0 + ] + ] + } + }, + "ai2thor_983": { + "classification": "consistent", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "peppershaker", + "gt_center_y": 347.5, + "other_avg_y": 322.1666666666667, + "y_diff": 25.333333333333314, + "threshold": 15.0, + "all_objects": [ + [ + "mug", + 280.0 + ], + [ + "dishsponge", + 376.5 + ], + [ + "peppershaker", + 347.5 + ], + [ + "cup", + 310.0 + ] + ] + } + }, + "ai2thor_984": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_985": { + "classification": "counter", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "plate", + "gt_center_y": 230.5, + "other_avg_y": 248.16666666666666, + "y_diff": -17.666666666666657, + "threshold": 15.0, + "all_objects": [ + [ + "microwave", + 160.5 + ], + [ + "apple", + 183.0 + ], + [ + "drawer", + 401.0 + ], + [ + "plate", + 230.5 + ] + ] + } + }, + "ai2thor_986": { + "classification": "consistent", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "pencil", + "gt_center_y": 197.5, + "other_avg_y": 326.0, + "y_diff": -128.5, + "threshold": 15.0, + "all_objects": [ + [ + "boots", + 427.0 + ], + [ + "pencil", + 197.5 + ], + [ + "bowl", + 325.0 + ], + [ + "cellphone", + 226.0 + ] + ] + } + }, + "ai2thor_987": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_988": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_989": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_990": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_991": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_992": { + "classification": "consistent", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "sidetable", + "gt_center_y": 375.0, + "other_avg_y": 254.16666666666666, + "y_diff": 120.83333333333334, + "threshold": 15.0, + "all_objects": [ + [ + "tissuebox", + 372.5 + ], + [ + "handtowel", + 88.5 + ], + [ + "sidetable", + 375.0 + ], + [ + "spraybottle", + 301.5 + ] + ] + } + }, + "ai2thor_993": { + "classification": "ambiguous", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "pot", + "gt_center_y": 216.0, + "other_avg_y": 205.16666666666666, + "y_diff": 10.833333333333343, + "threshold": 15.0, + "all_objects": [ + [ + "soapbottle", + 159.0 + ], + [ + "pot", + 216.0 + ], + [ + "spatula", + 219.0 + ], + [ + "lettuce", + 237.5 + ] + ] + } + }, + "ai2thor_994": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_995": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_996": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_997": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_998": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_999": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_1000": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_1001": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_1002": { + "classification": "counter", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "pot", + "gt_center_y": 32.0, + "other_avg_y": 192.16666666666666, + "y_diff": -160.16666666666666, + "threshold": 15.0, + "all_objects": [ + [ + "knife", + 176.5 + ], + [ + "cup", + 321.0 + ], + [ + "pot", + 32.0 + ], + [ + "bowl", + 79.0 + ] + ] + } + }, + "ai2thor_1003": { + "classification": "ambiguous", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "bread", + "gt_center_y": 259.5, + "other_avg_y": 245.16666666666666, + "y_diff": 14.333333333333343, + "threshold": 15.0, + "all_objects": [ + [ + "fridge", + 302.5 + ], + [ + "bread", + 259.5 + ], + [ + "potato", + 374.5 + ], + [ + "cabinet", + 58.5 + ] + ] + } + }, + "ai2thor_1004": { + "classification": "consistent", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "toaster", + "gt_center_y": 124.0, + "other_avg_y": 271.6666666666667, + "y_diff": -147.66666666666669, + "threshold": 15.0, + "all_objects": [ + [ + "countertop", + 179.5 + ], + [ + "toaster", + 124.0 + ], + [ + "garbagecan", + 267.5 + ], + [ + "tomato", + 368.0 + ] + ] + } + }, + "ai2thor_1005": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_1006": { + "classification": "consistent", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "pot", + "gt_center_y": 235.0, + "other_avg_y": 313.0, + "y_diff": -78.0, + "threshold": 15.0, + "all_objects": [ + [ + "cup", + 290.0 + ], + [ + "butterknife", + 331.0 + ], + [ + "knife", + 318.0 + ], + [ + "pot", + 235.0 + ] + ] + } + }, + "ai2thor_1007": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_1008": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_1009": { + "classification": "counter", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "apple", + "gt_center_y": 373.5, + "other_avg_y": 178.0, + "y_diff": 195.5, + "threshold": 15.0, + "all_objects": [ + [ + "spatula", + 169.5 + ], + [ + "garbagecan", + 206.0 + ], + [ + "bread", + 158.5 + ], + [ + "apple", + 373.5 + ] + ] + } + }, + "ai2thor_1010": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_1011": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_1012": { + "classification": "counter", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "chair", + "gt_center_y": 255.5, + "other_avg_y": 181.66666666666666, + "y_diff": 73.83333333333334, + "threshold": 15.0, + "all_objects": [ + [ + "dishsponge", + 168.5 + ], + [ + "potato", + 214.0 + ], + [ + "tomato", + 162.5 + ], + [ + "chair", + 255.5 + ] + ] + } + }, + "ai2thor_1013": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_1014": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_1015": { + "classification": "consistent", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "apple", + "gt_center_y": 302.0, + "other_avg_y": 389.5, + "y_diff": -87.5, + "threshold": 15.0, + "all_objects": [ + [ + "apple", + 302.0 + ], + [ + "bread", + 372.5 + ], + [ + "butterknife", + 400.0 + ], + [ + "garbagecan", + 396.0 + ] + ] + } + }, + "ai2thor_1016": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_1017": { + "classification": "consistent", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "cup", + "gt_center_y": 267.0, + "other_avg_y": 361.6666666666667, + "y_diff": -94.66666666666669, + "threshold": 15.0, + "all_objects": [ + [ + "soapbottle", + 362.0 + ], + [ + "lettuce", + 351.0 + ], + [ + "cup", + 267.0 + ], + [ + "bread", + 372.0 + ] + ] + } + }, + "ai2thor_1018": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_1019": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_1020": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_1021": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_1022": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_1023": { + "classification": "consistent", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "painting", + "gt_center_y": 26.0, + "other_avg_y": 243.5, + "y_diff": -217.5, + "threshold": 15.0, + "all_objects": [ + [ + "painting", + 26.0 + ], + [ + "pillow", + 245.5 + ], + [ + "teddybear", + 189.5 + ], + [ + "laptop", + 295.5 + ] + ] + } + }, + "ai2thor_1024": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_1025": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_1026": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_1027": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_1028": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_1029": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_1030": { + "classification": "consistent", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "lettuce", + "gt_center_y": 257.5, + "other_avg_y": 357.3333333333333, + "y_diff": -99.83333333333331, + "threshold": 15.0, + "all_objects": [ + [ + "pan", + 370.5 + ], + [ + "saltshaker", + 367.5 + ], + [ + "potato", + 334.0 + ], + [ + "lettuce", + 257.5 + ] + ] + } + }, + "ai2thor_1031": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_1032": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_1033": { + "classification": "consistent", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "bread", + "gt_center_y": 135.5, + "other_avg_y": 244.5, + "y_diff": -109.0, + "threshold": 15.0, + "all_objects": [ + [ + "fork", + 180.0 + ], + [ + "dishsponge", + 293.5 + ], + [ + "lettuce", + 260.0 + ], + [ + "bread", + 135.5 + ] + ] + } + }, + "ai2thor_1034": { + "classification": "consistent", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "mug", + "gt_center_y": 359.5, + "other_avg_y": 340.1666666666667, + "y_diff": 19.333333333333314, + "threshold": 15.0, + "all_objects": [ + [ + "mug", + 359.5 + ], + [ + "apple", + 389.0 + ], + [ + "bowl", + 352.5 + ], + [ + "tomato", + 279.0 + ] + ] + } + }, + "ai2thor_1035": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_1036": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_1037": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_1038": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_1039": { + "classification": "consistent", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "armchair", + "gt_center_y": 129.5, + "other_avg_y": 286.0, + "y_diff": -156.5, + "threshold": 15.0, + "all_objects": [ + [ + "coffeetable", + 181.0 + ], + [ + "armchair", + 129.5 + ], + [ + "tissuebox", + 304.5 + ], + [ + "keychain", + 372.5 + ] + ] + } + }, + "ai2thor_1040": { + "classification": "consistent", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "dresser", + "gt_center_y": 193.5, + "other_avg_y": 281.5, + "y_diff": -88.0, + "threshold": 15.0, + "all_objects": [ + [ + "pillow", + 285.5 + ], + [ + "dresser", + 193.5 + ], + [ + "book", + 327.5 + ], + [ + "laptop", + 231.5 + ] + ] + } + }, + "ai2thor_1041": { + "classification": "consistent", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "sofa", + "gt_center_y": 113.0, + "other_avg_y": 172.5, + "y_diff": -59.5, + "threshold": 15.0, + "all_objects": [ + [ + "statue", + 235.0 + ], + [ + "television", + 79.0 + ], + [ + "sofa", + 113.0 + ], + [ + "coffeetable", + 203.5 + ] + ] + } + }, + "ai2thor_1042": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_1043": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_1044": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_1045": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_1046": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_1047": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_1048": { + "classification": "consistent", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "remotecontrol", + "gt_center_y": 340.0, + "other_avg_y": 172.5, + "y_diff": 167.5, + "threshold": 15.0, + "all_objects": [ + [ + "remotecontrol", + 340.0 + ], + [ + "floorlamp", + 38.0 + ], + [ + "plate", + 305.0 + ], + [ + "box", + 174.5 + ] + ] + } + }, + "ai2thor_1049": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_1050": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_1051": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_1052": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_1053": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_1054": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_1055": { + "classification": "counter", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "remotecontrol", + "gt_center_y": 251.0, + "other_avg_y": 210.83333333333334, + "y_diff": 40.16666666666666, + "threshold": 15.0, + "all_objects": [ + [ + "alarmclock", + 171.5 + ], + [ + "mug", + 253.5 + ], + [ + "sidetable", + 207.5 + ], + [ + "remotecontrol", + 251.0 + ] + ] + } + }, + "ai2thor_1056": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_1057": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_1058": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_1059": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_1060": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_1061": { + "classification": "consistent", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "peppershaker", + "gt_center_y": 347.5, + "other_avg_y": 322.1666666666667, + "y_diff": 25.333333333333314, + "threshold": 15.0, + "all_objects": [ + [ + "dishsponge", + 376.5 + ], + [ + "mug", + 280.0 + ], + [ + "cup", + 310.0 + ], + [ + "peppershaker", + 347.5 + ] + ] + } + }, + "ai2thor_1062": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_1063": { + "classification": "counter", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "bowl", + "gt_center_y": 394.0, + "other_avg_y": 247.16666666666666, + "y_diff": 146.83333333333334, + "threshold": 15.0, + "all_objects": [ + [ + "countertop", + 216.0 + ], + [ + "cabinet", + 347.0 + ], + [ + "toaster", + 178.5 + ], + [ + "bowl", + 394.0 + ] + ] + } + }, + "ai2thor_1064": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_1065": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_1066": { + "classification": "counter", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "garbagecan", + "gt_center_y": 277.5, + "other_avg_y": 210.16666666666666, + "y_diff": 67.33333333333334, + "threshold": 15.0, + "all_objects": [ + [ + "tissuebox", + 226.5 + ], + [ + "garbagecan", + 277.5 + ], + [ + "toiletpaper", + 191.5 + ], + [ + "sink", + 212.5 + ] + ] + } + }, + "ai2thor_1067": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_1068": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_1069": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_1070": { + "classification": "consistent", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "drawer", + "gt_center_y": 374.0, + "other_avg_y": 179.0, + "y_diff": 195.0, + "threshold": 15.0, + "all_objects": [ + [ + "butterknife", + 183.5 + ], + [ + "spatula", + 177.5 + ], + [ + "apple", + 176.0 + ], + [ + "drawer", + 374.0 + ] + ] + } + }, + "ai2thor_1071": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_1072": { + "classification": "consistent", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "glassbottle", + "gt_center_y": 240.5, + "other_avg_y": 302.5, + "y_diff": -62.0, + "threshold": 15.0, + "all_objects": [ + [ + "glassbottle", + 240.5 + ], + [ + "bread", + 351.0 + ], + [ + "bowl", + 295.0 + ], + [ + "toaster", + 261.5 + ] + ] + } + }, + "ai2thor_1073": { + "classification": "counter", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "pillow", + "gt_center_y": 97.5, + "other_avg_y": 73.66666666666667, + "y_diff": 23.83333333333333, + "threshold": 15.0, + "all_objects": [ + [ + "teddybear", + 96.5 + ], + [ + "painting", + 25.5 + ], + [ + "pillow", + 97.5 + ], + [ + "laptop", + 99.0 + ] + ] + } + }, + "ai2thor_1074": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_1075": { + "classification": "consistent", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "statue", + "gt_center_y": 235.0, + "other_avg_y": 131.83333333333334, + "y_diff": 103.16666666666666, + "threshold": 15.0, + "all_objects": [ + [ + "statue", + 235.0 + ], + [ + "coffeetable", + 203.5 + ], + [ + "sofa", + 113.0 + ], + [ + "television", + 79.0 + ] + ] + } + }, + "ai2thor_1076": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_1077": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_1078": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_1079": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_1080": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_1081": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_1082": { + "classification": "consistent", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "glassbottle", + "gt_center_y": 220.5, + "other_avg_y": 281.3333333333333, + "y_diff": -60.833333333333314, + "threshold": 15.0, + "all_objects": [ + [ + "cellphone", + 316.0 + ], + [ + "pan", + 280.5 + ], + [ + "glassbottle", + 220.5 + ], + [ + "apple", + 247.5 + ] + ] + } + }, + "ai2thor_1083": { + "classification": "consistent", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "chair", + "gt_center_y": 396.0, + "other_avg_y": 269.5, + "y_diff": 126.5, + "threshold": 15.0, + "all_objects": [ + [ + "chair", + 396.0 + ], + [ + "alarmclock", + 247.5 + ], + [ + "book", + 238.5 + ], + [ + "shelf", + 322.5 + ] + ] + } + }, + "ai2thor_1084": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_1085": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_1086": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_1087": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_1088": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_1089": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_1090": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_1091": { + "classification": "consistent", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "pot", + "gt_center_y": 257.0, + "other_avg_y": 337.3333333333333, + "y_diff": -80.33333333333331, + "threshold": 15.0, + "all_objects": [ + [ + "garbagecan", + 360.0 + ], + [ + "tomato", + 372.0 + ], + [ + "countertop", + 280.0 + ], + [ + "pot", + 257.0 + ] + ] + } + }, + "ai2thor_1092": { + "classification": "consistent", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "mug", + "gt_center_y": 233.0, + "other_avg_y": 263.8333333333333, + "y_diff": -30.833333333333314, + "threshold": 15.0, + "all_objects": [ + [ + "dishsponge", + 276.0 + ], + [ + "soapbottle", + 255.0 + ], + [ + "microwave", + 260.5 + ], + [ + "mug", + 233.0 + ] + ] + } + }, + "ai2thor_1093": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_1094": { + "classification": "consistent", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "sink", + "gt_center_y": 380.5, + "other_avg_y": 244.5, + "y_diff": 136.0, + "threshold": 15.0, + "all_objects": [ + [ + "peppershaker", + 208.5 + ], + [ + "winebottle", + 226.0 + ], + [ + "drawer", + 299.0 + ], + [ + "sink", + 380.5 + ] + ] + } + }, + "ai2thor_1095": { + "classification": "consistent", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "remotecontrol", + "gt_center_y": 429.0, + "other_avg_y": 186.5, + "y_diff": 242.5, + "threshold": 15.0, + "all_objects": [ + [ + "sidetable", + 199.0 + ], + [ + "curtains", + 73.5 + ], + [ + "remotecontrol", + 429.0 + ], + [ + "sofa", + 287.0 + ] + ] + } + }, + "ai2thor_1096": { + "classification": "consistent", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "handtowelholder", + "gt_center_y": 70.0, + "other_avg_y": 302.1666666666667, + "y_diff": -232.16666666666669, + "threshold": 15.0, + "all_objects": [ + [ + "handtowelholder", + 70.0 + ], + [ + "handtowel", + 155.5 + ], + [ + "dishsponge", + 366.0 + ], + [ + "cart", + 385.0 + ] + ] + } + }, + "ai2thor_1097": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_1098": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_1099": { + "classification": "consistent", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "cup", + "gt_center_y": 200.5, + "other_avg_y": 305.3333333333333, + "y_diff": -104.83333333333331, + "threshold": 15.0, + "all_objects": [ + [ + "apple", + 230.0 + ], + [ + "cup", + 200.5 + ], + [ + "bread", + 355.5 + ], + [ + "ladle", + 330.5 + ] + ] + } + }, + "ai2thor_1100": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_1101": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_1102": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_1103": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_1104": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_1105": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_1106": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_1107": { + "classification": "consistent", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "houseplant", + "gt_center_y": 101.5, + "other_avg_y": 277.6666666666667, + "y_diff": -176.16666666666669, + "threshold": 15.0, + "all_objects": [ + [ + "vase", + 148.5 + ], + [ + "houseplant", + 101.5 + ], + [ + "bowl", + 318.0 + ], + [ + "apple", + 366.5 + ] + ] + } + }, + "ai2thor_1108": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_1109": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_1110": { + "classification": "consistent", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "knife", + "gt_center_y": 319.0, + "other_avg_y": 348.8333333333333, + "y_diff": -29.833333333333314, + "threshold": 15.0, + "all_objects": [ + [ + "knife", + 319.0 + ], + [ + "spatula", + 300.0 + ], + [ + "potato", + 395.5 + ], + [ + "lettuce", + 351.0 + ] + ] + } + }, + "ai2thor_1111": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_1112": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_1113": { + "classification": "consistent", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "butterknife", + "gt_center_y": 353.5, + "other_avg_y": 209.0, + "y_diff": 144.5, + "threshold": 15.0, + "all_objects": [ + [ + "pan", + 108.0 + ], + [ + "spatula", + 298.5 + ], + [ + "apple", + 220.5 + ], + [ + "butterknife", + 353.5 + ] + ] + } + }, + "ai2thor_1114": { + "classification": "consistent", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "glassbottle", + "gt_center_y": 330.5, + "other_avg_y": 213.66666666666666, + "y_diff": 116.83333333333334, + "threshold": 15.0, + "all_objects": [ + [ + "toaster", + 245.5 + ], + [ + "glassbottle", + 330.5 + ], + [ + "egg", + 380.0 + ], + [ + "cabinet", + 15.5 + ] + ] + } + }, + "ai2thor_1115": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_1116": { + "classification": "consistent", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "laptop", + "gt_center_y": 160.5, + "other_avg_y": 266.3333333333333, + "y_diff": -105.83333333333331, + "threshold": 15.0, + "all_objects": [ + [ + "mug", + 270.0 + ], + [ + "alarmclock", + 254.5 + ], + [ + "laptop", + 160.5 + ], + [ + "cd", + 274.5 + ] + ] + } + }, + "ai2thor_1117": { + "classification": "consistent", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "scrubbrush", + "gt_center_y": 160.5, + "other_avg_y": 248.66666666666666, + "y_diff": -88.16666666666666, + "threshold": 15.0, + "all_objects": [ + [ + "scrubbrush", + 160.5 + ], + [ + "toiletpaperhanger", + 161.5 + ], + [ + "plunger", + 212.5 + ], + [ + "soapbar", + 372.0 + ] + ] + } + }, + "ai2thor_1118": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_1119": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_1120": { + "classification": "counter", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "window", + "gt_center_y": 34.5, + "other_avg_y": 172.83333333333334, + "y_diff": -138.33333333333334, + "threshold": 15.0, + "all_objects": [ + [ + "bread", + 205.0 + ], + [ + "garbagecan", + 143.5 + ], + [ + "window", + 34.5 + ], + [ + "cabinet", + 170.0 + ] + ] + } + }, + "ai2thor_1121": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_1122": { + "classification": "consistent", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "ladle", + "gt_center_y": 317.0, + "other_avg_y": 385.8333333333333, + "y_diff": -68.83333333333331, + "threshold": 15.0, + "all_objects": [ + [ + "potato", + 372.5 + ], + [ + "bread", + 389.0 + ], + [ + "egg", + 396.0 + ], + [ + "ladle", + 317.0 + ] + ] + } + }, + "ai2thor_1123": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_1124": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_1125": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_1126": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_1127": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_1128": { + "classification": "consistent", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "tomato", + "gt_center_y": 373.0, + "other_avg_y": 288.3333333333333, + "y_diff": 84.66666666666669, + "threshold": 15.0, + "all_objects": [ + [ + "drawer", + 407.0 + ], + [ + "microwave", + 178.0 + ], + [ + "countertop", + 280.0 + ], + [ + "tomato", + 373.0 + ] + ] + } + }, + "ai2thor_1129": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_1130": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_1131": { + "classification": "consistent", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "apple", + "gt_center_y": 379.0, + "other_avg_y": 205.5, + "y_diff": 173.5, + "threshold": 15.0, + "all_objects": [ + [ + "pan", + 57.5 + ], + [ + "chair", + 346.0 + ], + [ + "garbagecan", + 213.0 + ], + [ + "apple", + 379.0 + ] + ] + } + }, + "ai2thor_1132": { + "classification": "counter", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "chair", + "gt_center_y": 358.5, + "other_avg_y": 331.1666666666667, + "y_diff": 27.333333333333314, + "threshold": 15.0, + "all_objects": [ + [ + "sidetable", + 309.5 + ], + [ + "vase", + 357.0 + ], + [ + "bed", + 327.0 + ], + [ + "chair", + 358.5 + ] + ] + } + }, + "ai2thor_1133": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_1134": { + "classification": "consistent", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "apple", + "gt_center_y": 270.0, + "other_avg_y": 192.0, + "y_diff": 78.0, + "threshold": 15.0, + "all_objects": [ + [ + "butterknife", + 220.5 + ], + [ + "kettle", + 139.0 + ], + [ + "apple", + 270.0 + ], + [ + "cup", + 216.5 + ] + ] + } + }, + "ai2thor_1135": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_1136": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_1137": { + "classification": "consistent", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "plate", + "gt_center_y": 383.5, + "other_avg_y": 226.66666666666666, + "y_diff": 156.83333333333334, + "threshold": 15.0, + "all_objects": [ + [ + "lettuce", + 213.0 + ], + [ + "mug", + 233.0 + ], + [ + "plate", + 383.5 + ], + [ + "bowl", + 234.0 + ] + ] + } + }, + "ai2thor_1138": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_1139": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_1140": { + "classification": "consistent", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "alarmclock", + "gt_center_y": 234.0, + "other_avg_y": 318.5, + "y_diff": -84.5, + "threshold": 15.0, + "all_objects": [ + [ + "alarmclock", + 234.0 + ], + [ + "cellphone", + 393.0 + ], + [ + "book", + 303.5 + ], + [ + "vase", + 259.0 + ] + ] + } + }, + "ai2thor_1141": { + "classification": "consistent", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "soapbottle", + "gt_center_y": 176.0, + "other_avg_y": 272.3333333333333, + "y_diff": -96.33333333333331, + "threshold": 15.0, + "all_objects": [ + [ + "cellphone", + 316.0 + ], + [ + "pan", + 280.5 + ], + [ + "glassbottle", + 220.5 + ], + [ + "soapbottle", + 176.0 + ] + ] + } + }, + "ai2thor_1142": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_1143": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_1144": { + "classification": "counter", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "pan", + "gt_center_y": 254.5, + "other_avg_y": 333.3333333333333, + "y_diff": -78.83333333333331, + "threshold": 15.0, + "all_objects": [ + [ + "drawer", + 353.5 + ], + [ + "garbagecan", + 257.5 + ], + [ + "cabinet", + 389.0 + ], + [ + "pan", + 254.5 + ] + ] + } + }, + "ai2thor_1145": { + "classification": "consistent", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "mirror", + "gt_center_y": 65.0, + "other_avg_y": 277.0, + "y_diff": -212.0, + "threshold": 15.0, + "all_objects": [ + [ + "candle", + 389.5 + ], + [ + "mirror", + 65.0 + ], + [ + "toiletpaper", + 287.0 + ], + [ + "countertop", + 154.5 + ] + ] + } + }, + "ai2thor_1146": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_1147": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_1148": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_1149": { + "classification": "consistent", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "tomato", + "gt_center_y": 368.0, + "other_avg_y": 190.33333333333334, + "y_diff": 177.66666666666666, + "threshold": 15.0, + "all_objects": [ + [ + "tomato", + 368.0 + ], + [ + "countertop", + 179.5 + ], + [ + "toaster", + 124.0 + ], + [ + "garbagecan", + 267.5 + ] + ] + } + }, + "ai2thor_1150": { + "classification": "consistent", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "plate", + "gt_center_y": 302.0, + "other_avg_y": 250.83333333333334, + "y_diff": 51.16666666666666, + "threshold": 15.0, + "all_objects": [ + [ + "chair", + 194.0 + ], + [ + "lettuce", + 276.0 + ], + [ + "spatula", + 282.5 + ], + [ + "plate", + 302.0 + ] + ] + } + }, + "ai2thor_1151": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_1152": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_1153": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_1154": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_1155": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_1156": { + "classification": "consistent", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "sidetable", + "gt_center_y": 369.0, + "other_avg_y": 397.0, + "y_diff": -28.0, + "threshold": 15.0, + "all_objects": [ + [ + "chair", + 422.0 + ], + [ + "alarmclock", + 345.0 + ], + [ + "sidetable", + 369.0 + ], + [ + "drawer", + 424.0 + ] + ] + } + }, + "ai2thor_1157": { + "classification": "consistent", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "toaster", + "gt_center_y": 207.5, + "other_avg_y": 313.0, + "y_diff": -105.5, + "threshold": 15.0, + "all_objects": [ + [ + "pan", + 351.0 + ], + [ + "spatula", + 270.5 + ], + [ + "toaster", + 207.5 + ], + [ + "plate", + 317.5 + ] + ] + } + }, + "ai2thor_1158": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_1159": { + "classification": "consistent", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "glassbottle", + "gt_center_y": 240.5, + "other_avg_y": 280.3333333333333, + "y_diff": -39.833333333333314, + "threshold": 15.0, + "all_objects": [ + [ + "bread", + 248.0 + ], + [ + "glassbottle", + 240.5 + ], + [ + "toaster", + 261.5 + ], + [ + "potato", + 331.5 + ] + ] + } + }, + "ai2thor_1160": { + "classification": "consistent", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "mug", + "gt_center_y": 263.5, + "other_avg_y": 350.0, + "y_diff": -86.5, + "threshold": 15.0, + "all_objects": [ + [ + "tissuebox", + 318.0 + ], + [ + "alarmclock", + 332.0 + ], + [ + "chair", + 400.0 + ], + [ + "mug", + 263.5 + ] + ] + } + }, + "ai2thor_1161": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_1162": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_1163": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_1164": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_1165": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_1166": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_1167": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_1168": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_1169": { + "classification": "consistent", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "sofa", + "gt_center_y": 52.5, + "other_avg_y": 202.66666666666666, + "y_diff": -150.16666666666666, + "threshold": 15.0, + "all_objects": [ + [ + "vase", + 208.5 + ], + [ + "sofa", + 52.5 + ], + [ + "remotecontrol", + 339.0 + ], + [ + "laptop", + 60.5 + ] + ] + } + }, + "ai2thor_1170": { + "classification": "consistent", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "sidetable", + "gt_center_y": 292.0, + "other_avg_y": 121.66666666666667, + "y_diff": 170.33333333333331, + "threshold": 15.0, + "all_objects": [ + [ + "mirror", + 20.5 + ], + [ + "coffeemachine", + 131.5 + ], + [ + "sidetable", + 292.0 + ], + [ + "soapbottle", + 213.0 + ] + ] + } + }, + "ai2thor_1171": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_1172": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_1173": { + "classification": "consistent", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "spoon", + "gt_center_y": 348.5, + "other_avg_y": 303.1666666666667, + "y_diff": 45.333333333333314, + "threshold": 15.0, + "all_objects": [ + [ + "spoon", + 348.5 + ], + [ + "fridge", + 326.0 + ], + [ + "pan", + 286.0 + ], + [ + "dishsponge", + 297.5 + ] + ] + } + }, + "ai2thor_1174": { + "classification": "consistent", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "sidetable", + "gt_center_y": 228.0, + "other_avg_y": 177.5, + "y_diff": 50.5, + "threshold": 15.0, + "all_objects": [ + [ + "bowl", + 163.0 + ], + [ + "bread", + 138.0 + ], + [ + "sidetable", + 228.0 + ], + [ + "mug", + 231.5 + ] + ] + } + }, + "ai2thor_1175": { + "classification": "consistent", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "pencil", + "gt_center_y": 197.5, + "other_avg_y": 326.0, + "y_diff": -128.5, + "threshold": 15.0, + "all_objects": [ + [ + "cellphone", + 226.0 + ], + [ + "pencil", + 197.5 + ], + [ + "boots", + 427.0 + ], + [ + "bowl", + 325.0 + ] + ] + } + }, + "ai2thor_1176": { + "classification": "counter", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "bed", + "gt_center_y": 397.0, + "other_avg_y": 324.5, + "y_diff": 72.5, + "threshold": 15.0, + "all_objects": [ + [ + "bed", + 397.0 + ], + [ + "tennisracket", + 385.0 + ], + [ + "bowl", + 212.5 + ], + [ + "watch", + 376.0 + ] + ] + } + }, + "ai2thor_1177": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_1178": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_1179": { + "classification": "consistent", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "dishsponge", + "gt_center_y": 225.5, + "other_avg_y": 257.6666666666667, + "y_diff": -32.166666666666686, + "threshold": 15.0, + "all_objects": [ + [ + "lettuce", + 284.0 + ], + [ + "toaster", + 217.5 + ], + [ + "dishsponge", + 225.5 + ], + [ + "mug", + 271.5 + ] + ] + } + }, + "ai2thor_1180": { + "classification": "consistent", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "bowl", + "gt_center_y": 249.5, + "other_avg_y": 292.1666666666667, + "y_diff": -42.666666666666686, + "threshold": 15.0, + "all_objects": [ + [ + "bowl", + 249.5 + ], + [ + "vase", + 259.0 + ], + [ + "newspaper", + 311.5 + ], + [ + "plate", + 306.0 + ] + ] + } + }, + "ai2thor_1181": { + "classification": "consistent", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "cd", + "gt_center_y": 274.5, + "other_avg_y": 307.3333333333333, + "y_diff": -32.833333333333314, + "threshold": 15.0, + "all_objects": [ + [ + "pen", + 311.5 + ], + [ + "cd", + 274.5 + ], + [ + "alarmclock", + 254.5 + ], + [ + "mug", + 356.0 + ] + ] + } + }, + "ai2thor_1182": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_1183": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_1184": { + "classification": "consistent", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "coffeetable", + "gt_center_y": 339.0, + "other_avg_y": 225.83333333333334, + "y_diff": 113.16666666666666, + "threshold": 15.0, + "all_objects": [ + [ + "sidetable", + 186.0 + ], + [ + "coffeetable", + 339.0 + ], + [ + "sofa", + 220.0 + ], + [ + "laptop", + 271.5 + ] + ] + } + }, + "ai2thor_1185": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_1186": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_1187": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_1188": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_1189": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_1190": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_1191": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_1192": { + "classification": "consistent", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "tomato", + "gt_center_y": 343.0, + "other_avg_y": 158.66666666666666, + "y_diff": 184.33333333333334, + "threshold": 15.0, + "all_objects": [ + [ + "tomato", + 343.0 + ], + [ + "knife", + 316.5 + ], + [ + "houseplant", + 101.5 + ], + [ + "window", + 58.0 + ] + ] + } + }, + "ai2thor_1193": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_1194": { + "classification": "consistent", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "lettuce", + "gt_center_y": 276.0, + "other_avg_y": 318.1666666666667, + "y_diff": -42.166666666666686, + "threshold": 15.0, + "all_objects": [ + [ + "tomato", + 370.0 + ], + [ + "plate", + 302.0 + ], + [ + "spatula", + 282.5 + ], + [ + "lettuce", + 276.0 + ] + ] + } + }, + "ai2thor_1195": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_1196": { + "classification": "counter", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "countertop", + "gt_center_y": 216.0, + "other_avg_y": 306.5, + "y_diff": -90.5, + "threshold": 15.0, + "all_objects": [ + [ + "bowl", + 394.0 + ], + [ + "toaster", + 178.5 + ], + [ + "countertop", + 216.0 + ], + [ + "cabinet", + 347.0 + ] + ] + } + }, + "ai2thor_1197": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_1198": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_1199": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_1200": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_1201": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_1202": { + "classification": "counter", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "garbagecan", + "gt_center_y": 230.0, + "other_avg_y": 302.6666666666667, + "y_diff": -72.66666666666669, + "threshold": 15.0, + "all_objects": [ + [ + "garbagecan", + 230.0 + ], + [ + "scrubbrush", + 335.0 + ], + [ + "plunger", + 253.0 + ], + [ + "toilet", + 320.0 + ] + ] + } + }, + "ai2thor_1203": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_1204": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_1205": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_1206": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_1207": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_1208": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_1209": { + "classification": "consistent", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "mug", + "gt_center_y": 253.0, + "other_avg_y": 312.3333333333333, + "y_diff": -59.333333333333314, + "threshold": 15.0, + "all_objects": [ + [ + "mug", + 253.0 + ], + [ + "spatula", + 278.5 + ], + [ + "pan", + 292.5 + ], + [ + "dishsponge", + 366.0 + ] + ] + } + }, + "ai2thor_1210": { + "classification": "consistent", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "soapbottle", + "gt_center_y": 282.0, + "other_avg_y": 106.83333333333333, + "y_diff": 175.16666666666669, + "threshold": 15.0, + "all_objects": [ + [ + "mirror", + 39.5 + ], + [ + "soapbottle", + 282.0 + ], + [ + "toiletpaper", + 233.5 + ], + [ + "handtowel", + 47.5 + ] + ] + } + }, + "ai2thor_1211": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_1212": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_1213": { + "classification": "ambiguous", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "sidetable", + "gt_center_y": 292.0, + "other_avg_y": 303.3333333333333, + "y_diff": -11.333333333333314, + "threshold": 15.0, + "all_objects": [ + [ + "plate", + 371.0 + ], + [ + "countertop", + 201.0 + ], + [ + "sidetable", + 292.0 + ], + [ + "diningtable", + 338.0 + ] + ] + } + }, + "ai2thor_1214": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_1215": { + "classification": "consistent", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "mug", + "gt_center_y": 25.0, + "other_avg_y": 104.0, + "y_diff": -79.0, + "threshold": 15.0, + "all_objects": [ + [ + "bowl", + 110.0 + ], + [ + "painting", + 31.5 + ], + [ + "mug", + 25.0 + ], + [ + "remotecontrol", + 170.5 + ] + ] + } + }, + "ai2thor_1216": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_1217": { + "classification": "consistent", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "floorlamp", + "gt_center_y": 48.5, + "other_avg_y": 281.1666666666667, + "y_diff": -232.66666666666669, + "threshold": 15.0, + "all_objects": [ + [ + "remotecontrol", + 342.0 + ], + [ + "floorlamp", + 48.5 + ], + [ + "ottoman", + 320.5 + ], + [ + "pillow", + 181.0 + ] + ] + } + }, + "ai2thor_1218": { + "classification": "consistent", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "apple", + "gt_center_y": 367.5, + "other_avg_y": 283.3333333333333, + "y_diff": 84.16666666666669, + "threshold": 15.0, + "all_objects": [ + [ + "bread", + 241.0 + ], + [ + "cabinet", + 419.0 + ], + [ + "tomato", + 190.0 + ], + [ + "apple", + 367.5 + ] + ] + } + }, + "ai2thor_1219": { + "classification": "counter", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "laptop", + "gt_center_y": 294.5, + "other_avg_y": 329.8333333333333, + "y_diff": -35.333333333333314, + "threshold": 15.0, + "all_objects": [ + [ + "bowl", + 294.5 + ], + [ + "laptop", + 294.5 + ], + [ + "statue", + 358.5 + ], + [ + "vase", + 336.5 + ] + ] + } + }, + "ai2thor_1220": { + "classification": "consistent", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "cloth", + "gt_center_y": 364.0, + "other_avg_y": 214.0, + "y_diff": 150.0, + "threshold": 15.0, + "all_objects": [ + [ + "handtowel", + 110.5 + ], + [ + "papertowelroll", + 233.0 + ], + [ + "dishsponge", + 298.5 + ], + [ + "cloth", + 364.0 + ] + ] + } + }, + "ai2thor_1221": { + "classification": "consistent", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "mug", + "gt_center_y": 412.0, + "other_avg_y": 335.6666666666667, + "y_diff": 76.33333333333331, + "threshold": 15.0, + "all_objects": [ + [ + "mug", + 412.0 + ], + [ + "bread", + 338.5 + ], + [ + "plate", + 315.5 + ], + [ + "soapbottle", + 353.0 + ] + ] + } + }, + "ai2thor_1222": { + "classification": "not_applicable", + "relation": "under" + }, + "ai2thor_1223": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_1224": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_1225": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_1226": { + "classification": "consistent", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "remotecontrol", + "gt_center_y": 429.0, + "other_avg_y": 235.66666666666666, + "y_diff": 193.33333333333334, + "threshold": 15.0, + "all_objects": [ + [ + "coffeetable", + 348.0 + ], + [ + "armchair", + 143.0 + ], + [ + "remotecontrol", + 429.0 + ], + [ + "sofa", + 216.0 + ] + ] + } + }, + "ai2thor_1227": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_1228": { + "classification": "consistent", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "tomato", + "gt_center_y": 362.0, + "other_avg_y": 344.5, + "y_diff": 17.5, + "threshold": 15.0, + "all_objects": [ + [ + "plate", + 293.0 + ], + [ + "tomato", + 362.0 + ], + [ + "egg", + 366.5 + ], + [ + "spoon", + 374.0 + ] + ] + } + }, + "ai2thor_1229": { + "classification": "not_applicable", + "relation": "above" + }, + "ai2thor_1230": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_1231": { + "classification": "not_applicable", + "relation": "left" + }, + "ai2thor_1232": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_1233": { + "classification": "counter", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "chair", + "gt_center_y": 424.0, + "other_avg_y": 294.5, + "y_diff": 129.5, + "threshold": 15.0, + "all_objects": [ + [ + "alarmclock", + 303.0 + ], + [ + "laptop", + 313.0 + ], + [ + "chair", + 424.0 + ], + [ + "book", + 267.5 + ] + ] + } + }, + "ai2thor_1234": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_1235": { + "classification": "ambiguous", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "book", + "gt_center_y": 319.5, + "other_avg_y": 323.3333333333333, + "y_diff": -3.8333333333333144, + "threshold": 15.0, + "all_objects": [ + [ + "book", + 319.5 + ], + [ + "apple", + 349.0 + ], + [ + "peppershaker", + 386.5 + ], + [ + "cup", + 234.5 + ] + ] + } + }, + "ai2thor_1236": { + "classification": "consistent", + "relation": "far", + "data_source": "ai2thor", + "details": { + "gt_object": "laptop", + "gt_center_y": 81.0, + "other_avg_y": 155.83333333333334, + "y_diff": -74.83333333333334, + "threshold": 15.0, + "all_objects": [ + [ + "diningtable", + 112.0 + ], + [ + "laptop", + 81.0 + ], + [ + "vase", + 280.5 + ], + [ + "window", + 75.0 + ] + ] + } + }, + "ai2thor_1237": { + "classification": "not_applicable", + "relation": "right" + }, + "ai2thor_1238": { + "classification": "consistent", + "relation": "close", + "data_source": "ai2thor", + "details": { + "gt_object": "peppershaker", + "gt_center_y": 347.5, + "other_avg_y": 322.1666666666667, + "y_diff": 25.333333333333314, + "threshold": 15.0, + "all_objects": [ + [ + "peppershaker", + 347.5 + ], + [ + "cup", + 310.0 + ], + [ + "mug", + 280.0 + ], + [ + "dishsponge", + 376.5 + ] + ] + } + }, + "scannet_0": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_1": { + "classification": "consistent", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "pillow", + "gt_center_y": 667.5, + "other_avg_y": 382.75, + "y_diff": 284.75, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "bookshelf", + 375.0 + ], + [ + "whiteboard", + 390.5 + ], + [ + "pillow", + 667.5 + ] + ] + } + }, + "scannet_2": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_3": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_4": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_5": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_6": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_7": { + "classification": "consistent", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "window", + "gt_center_y": 56.0, + "other_avg_y": 535.6666666666666, + "y_diff": -479.66666666666663, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "window", + 56.0 + ], + [ + "sofa", + 716.5 + ], + [ + "chair", + 198.0 + ], + [ + "cabinet", + 692.5 + ] + ] + } + }, + "scannet_8": { + "classification": "consistent", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "bookshelf", + "gt_center_y": 289.0, + "other_avg_y": 477.6666666666667, + "y_diff": -188.66666666666669, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "chair", + 725.5 + ], + [ + "box", + 481.0 + ], + [ + "bookshelf", + 289.0 + ], + [ + "paper", + 226.5 + ] + ] + } + }, + "scannet_9": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_10": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_11": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_12": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_13": { + "classification": "consistent", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "window", + "gt_center_y": 301.5, + "other_avg_y": 547.1666666666666, + "y_diff": -245.66666666666663, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "picture", + 125.5 + ], + [ + "window", + 301.5 + ], + [ + "chair", + 699.0 + ], + [ + "desk", + 817.0 + ] + ] + } + }, + "scannet_14": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_15": { + "classification": "consistent", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "box", + "gt_center_y": 834.0, + "other_avg_y": 303.25, + "y_diff": 530.75, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "chair", + 527.0 + ], + [ + "box", + 834.0 + ], + [ + "shelves", + 79.5 + ] + ] + } + }, + "scannet_16": { + "classification": "consistent", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "desk", + "gt_center_y": 658.0, + "other_avg_y": 518.1666666666666, + "y_diff": 139.83333333333337, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "cabinet", + 385.5 + ], + [ + "shelves", + 435.5 + ], + [ + "chair", + 733.5 + ], + [ + "desk", + 658.0 + ] + ] + } + }, + "scannet_17": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_18": { + "classification": "consistent", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "desk", + "gt_center_y": 119.0, + "other_avg_y": 371.75, + "y_diff": -252.75, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "cabinet", + 523.0 + ], + [ + "chair", + 220.5 + ], + [ + "desk", + 119.0 + ] + ] + } + }, + "scannet_19": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_20": { + "classification": "consistent", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "table", + "gt_center_y": 669.0, + "other_avg_y": 204.25, + "y_diff": 464.75, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "cabinet", + 221.5 + ], + [ + "whiteboard", + 187.0 + ], + [ + "table", + 669.0 + ] + ] + } + }, + "scannet_21": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_22": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_23": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_24": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_25": { + "classification": "consistent", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "pillow", + "gt_center_y": 910.5, + "other_avg_y": 691.75, + "y_diff": 218.75, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "whiteboard", + 700.5 + ], + [ + "pillow", + 910.5 + ], + [ + "bookshelf", + 683.0 + ] + ] + } + }, + "scannet_26": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_27": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_28": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_29": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_30": { + "classification": "consistent", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "window", + "gt_center_y": 149.5, + "other_avg_y": 699.0, + "y_diff": -549.5, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "desk", + 568.0 + ], + [ + "chair", + 751.0 + ], + [ + "dresser", + 778.0 + ], + [ + "window", + 149.5 + ] + ] + } + }, + "scannet_31": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_32": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_33": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_34": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_35": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_36": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_37": { + "classification": "counter", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "box", + "gt_center_y": 834.0, + "other_avg_y": 737.5, + "y_diff": 96.5, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "box", + 834.0 + ], + [ + "bag", + 680.5 + ], + [ + "desk", + 800.0 + ], + [ + "bed", + 732.0 + ] + ] + } + }, + "scannet_38": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_39": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_40": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_41": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_42": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_43": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_44": { + "classification": "consistent", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "chair", + "gt_center_y": 387.0, + "other_avg_y": 136.0, + "y_diff": 251.0, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "shelves", + 135.0 + ], + [ + "desk", + 171.5 + ], + [ + "chair", + 387.0 + ], + [ + "paper", + 101.5 + ] + ] + } + }, + "scannet_45": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_46": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_47": { + "classification": "consistent", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "cabinet", + "gt_center_y": 701.5, + "other_avg_y": 484.75, + "y_diff": 216.75, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "bag", + 728.5 + ], + [ + "cabinet", + 701.5 + ], + [ + "window", + 241.0 + ] + ] + } + }, + "scannet_48": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_49": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_50": { + "classification": "consistent", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "table", + "gt_center_y": 657.5, + "other_avg_y": 350.0, + "y_diff": 307.5, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "bed", + 659.0 + ], + [ + "table", + 657.5 + ], + [ + "shelves", + 307.0 + ], + [ + "curtain", + 84.0 + ] + ] + } + }, + "scannet_51": { + "classification": "consistent", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "shelves", + "gt_center_y": 113.0, + "other_avg_y": 395.6666666666667, + "y_diff": -282.6666666666667, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "shelves", + 113.0 + ], + [ + "chair", + 526.0 + ], + [ + "dresser", + 487.5 + ], + [ + "window", + 173.5 + ] + ] + } + }, + "scannet_52": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_53": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_54": { + "classification": "consistent", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "chair", + "gt_center_y": 841.5, + "other_avg_y": 490.5, + "y_diff": 351.0, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "chair", + 841.5 + ], + [ + "blinds", + 198.5 + ], + [ + "table", + 782.5 + ] + ] + } + }, + "scannet_55": { + "classification": "consistent", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "towel", + "gt_center_y": 528.5, + "other_avg_y": 76.25, + "y_diff": 452.25, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "bag", + 58.0 + ], + [ + "box", + 94.5 + ], + [ + "towel", + 528.5 + ] + ] + } + }, + "scannet_56": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_57": { + "classification": "consistent", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "table", + "gt_center_y": 750.0, + "other_avg_y": 338.5, + "y_diff": 411.5, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "shelves", + 245.0 + ], + [ + "table", + 750.0 + ], + [ + "curtain", + 201.0 + ], + [ + "bed", + 569.5 + ] + ] + } + }, + "scannet_58": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_59": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_60": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_61": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_62": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_63": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_64": { + "classification": "counter", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "box", + "gt_center_y": 704.5, + "other_avg_y": 811.0, + "y_diff": -106.5, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "chair", + 718.0 + ], + [ + "cabinet", + 904.0 + ], + [ + "box", + 704.5 + ] + ] + } + }, + "scannet_65": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_66": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_67": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_68": { + "classification": "consistent", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "desk", + "gt_center_y": 760.5, + "other_avg_y": 458.5, + "y_diff": 302.0, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "sofa", + 521.0 + ], + [ + "desk", + 760.5 + ], + [ + "pillow", + 396.0 + ] + ] + } + }, + "scannet_69": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_70": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_71": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_72": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_73": { + "classification": "consistent", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "bed", + "gt_center_y": 862.5, + "other_avg_y": 303.1666666666667, + "y_diff": 559.3333333333333, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "bed", + 862.5 + ], + [ + "chair", + 532.5 + ], + [ + "picture", + 110.0 + ], + [ + "curtain", + 267.0 + ] + ] + } + }, + "scannet_74": { + "classification": "ambiguous", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "bed", + "gt_center_y": 656.0, + "other_avg_y": 682.5, + "y_diff": -26.5, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "chair", + 780.0 + ], + [ + "picture", + 416.5 + ], + [ + "bed", + 656.0 + ], + [ + "table", + 851.0 + ] + ] + } + }, + "scannet_75": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_76": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_77": { + "classification": "consistent", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "cabinet", + "gt_center_y": 306.0, + "other_avg_y": 148.5, + "y_diff": 157.5, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "toilet", + 146.0 + ], + [ + "sink", + 55.5 + ], + [ + "shower curtain", + 244.0 + ], + [ + "cabinet", + 306.0 + ] + ] + } + }, + "scannet_78": { + "classification": "consistent", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "curtain", + "gt_center_y": 186.5, + "other_avg_y": 367.1666666666667, + "y_diff": -180.66666666666669, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "curtain", + 186.5 + ], + [ + "picture", + 69.5 + ], + [ + "refridgerator", + 308.5 + ], + [ + "cabinet", + 723.5 + ] + ] + } + }, + "scannet_79": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_80": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_81": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_82": { + "classification": "consistent", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "chair", + "gt_center_y": 607.5, + "other_avg_y": 301.5, + "y_diff": 306.0, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "refridgerator", + 313.5 + ], + [ + "chair", + 607.5 + ], + [ + "counter", + 289.5 + ] + ] + } + }, + "scannet_83": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_84": { + "classification": "consistent", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "table", + "gt_center_y": 849.5, + "other_avg_y": 92.75, + "y_diff": 756.75, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "shelves", + 75.0 + ], + [ + "table", + 849.5 + ], + [ + "window", + 110.5 + ] + ] + } + }, + "scannet_85": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_86": { + "classification": "consistent", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "night stand", + "gt_center_y": 542.0, + "other_avg_y": 782.75, + "y_diff": -240.75, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "night stand", + 542.0 + ], + [ + "bed", + 823.0 + ], + [ + "chair", + 742.5 + ] + ] + } + }, + "scannet_87": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_88": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_89": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_90": { + "classification": "consistent", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "curtain", + "gt_center_y": 188.0, + "other_avg_y": 652.5, + "y_diff": -464.5, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "cabinet", + 536.0 + ], + [ + "curtain", + 188.0 + ], + [ + "table", + 769.0 + ] + ] + } + }, + "scannet_91": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_92": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_93": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_94": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_95": { + "classification": "consistent", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "bed", + "gt_center_y": 863.5, + "other_avg_y": 519.5, + "y_diff": 344.0, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "window", + 296.5 + ], + [ + "bed", + 863.5 + ], + [ + "sofa", + 637.0 + ], + [ + "cabinet", + 625.0 + ] + ] + } + }, + "scannet_96": { + "classification": "consistent", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "table", + "gt_center_y": 478.5, + "other_avg_y": 269.0, + "y_diff": 209.5, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "table", + 478.5 + ], + [ + "bathtub", + 363.5 + ], + [ + "shower curtain", + 174.5 + ] + ] + } + }, + "scannet_97": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_98": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_99": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_100": { + "classification": "consistent", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "curtain", + "gt_center_y": 267.0, + "other_avg_y": 501.6666666666667, + "y_diff": -234.66666666666669, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "curtain", + 267.0 + ], + [ + "picture", + 110.0 + ], + [ + "chair", + 532.5 + ], + [ + "bed", + 862.5 + ] + ] + } + }, + "scannet_101": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_102": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_103": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_104": { + "classification": "consistent", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "window", + "gt_center_y": 193.0, + "other_avg_y": 540.75, + "y_diff": -347.75, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "shelves", + 276.0 + ], + [ + "window", + 193.0 + ], + [ + "chair", + 805.5 + ] + ] + } + }, + "scannet_105": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_106": { + "classification": "consistent", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "television", + "gt_center_y": 240.5, + "other_avg_y": 633.8333333333334, + "y_diff": -393.33333333333337, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "picture", + 367.5 + ], + [ + "dresser", + 655.0 + ], + [ + "bed", + 879.0 + ], + [ + "television", + 240.5 + ] + ] + } + }, + "scannet_107": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_108": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_109": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_110": { + "classification": "consistent", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "chair", + "gt_center_y": 630.5, + "other_avg_y": 368.0, + "y_diff": 262.5, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "bookshelf", + 304.0 + ], + [ + "desk", + 432.0 + ], + [ + "chair", + 630.5 + ] + ] + } + }, + "scannet_111": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_112": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_113": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_114": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_115": { + "classification": "consistent", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "towel", + "gt_center_y": 374.5, + "other_avg_y": 249.0, + "y_diff": 125.5, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "shower curtain", + 217.0 + ], + [ + "sink", + 195.0 + ], + [ + "towel", + 374.5 + ], + [ + "toilet", + 335.0 + ] + ] + } + }, + "scannet_116": { + "classification": "consistent", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "desk", + "gt_center_y": 171.5, + "other_avg_y": 441.3333333333333, + "y_diff": -269.8333333333333, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "table", + 748.0 + ], + [ + "sofa", + 295.5 + ], + [ + "desk", + 171.5 + ], + [ + "chair", + 280.5 + ] + ] + } + }, + "scannet_117": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_118": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_119": { + "classification": "consistent", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "bag", + "gt_center_y": 727.0, + "other_avg_y": 139.5, + "y_diff": 587.5, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "bag", + 727.0 + ], + [ + "lamp", + 130.5 + ], + [ + "desk", + 148.5 + ] + ] + } + }, + "scannet_120": { + "classification": "consistent", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "window", + "gt_center_y": 151.5, + "other_avg_y": 702.1666666666666, + "y_diff": -550.6666666666666, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "chair", + 520.5 + ], + [ + "desk", + 756.0 + ], + [ + "window", + 151.5 + ], + [ + "cabinet", + 830.0 + ] + ] + } + }, + "scannet_121": { + "classification": "consistent", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "window", + "gt_center_y": 197.5, + "other_avg_y": 706.6666666666666, + "y_diff": -509.16666666666663, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "sofa", + 721.0 + ], + [ + "desk", + 693.0 + ], + [ + "window", + 197.5 + ], + [ + "chair", + 706.0 + ] + ] + } + }, + "scannet_122": { + "classification": "consistent", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "towel", + "gt_center_y": 796.5, + "other_avg_y": 558.1666666666666, + "y_diff": 238.33333333333337, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "mirror", + 249.0 + ], + [ + "toilet", + 797.0 + ], + [ + "towel", + 796.5 + ], + [ + "sink", + 628.5 + ] + ] + } + }, + "scannet_123": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_124": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_125": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_126": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_127": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_128": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_129": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_130": { + "classification": "consistent", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "window", + "gt_center_y": 197.5, + "other_avg_y": 469.3333333333333, + "y_diff": -271.8333333333333, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "window", + 197.5 + ], + [ + "curtain", + 231.5 + ], + [ + "bag", + 619.5 + ], + [ + "towel", + 557.0 + ] + ] + } + }, + "scannet_131": { + "classification": "consistent", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "table", + "gt_center_y": 771.0, + "other_avg_y": 518.25, + "y_diff": 252.75, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "table", + 771.0 + ], + [ + "chair", + 739.0 + ], + [ + "picture", + 297.5 + ] + ] + } + }, + "scannet_132": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_133": { + "classification": "consistent", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "window", + "gt_center_y": 464.0, + "other_avg_y": 759.3333333333334, + "y_diff": -295.33333333333337, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "table", + 868.5 + ], + [ + "lamp", + 572.5 + ], + [ + "chair", + 837.0 + ], + [ + "window", + 464.0 + ] + ] + } + }, + "scannet_134": { + "classification": "consistent", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "table", + "gt_center_y": 665.0, + "other_avg_y": 217.25, + "y_diff": 447.75, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "cabinet", + 204.0 + ], + [ + "toilet", + 230.5 + ], + [ + "table", + 665.0 + ] + ] + } + }, + "scannet_135": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_136": { + "classification": "consistent", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "desk", + "gt_center_y": 763.5, + "other_avg_y": 680.3333333333334, + "y_diff": 83.16666666666663, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "desk", + 763.5 + ], + [ + "bed", + 689.0 + ], + [ + "chair", + 792.5 + ], + [ + "table", + 559.5 + ] + ] + } + }, + "scannet_137": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_138": { + "classification": "consistent", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "mirror", + "gt_center_y": 191.0, + "other_avg_y": 726.8333333333334, + "y_diff": -535.8333333333334, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "toilet", + 773.5 + ], + [ + "mirror", + 191.0 + ], + [ + "towel", + 782.0 + ], + [ + "sink", + 625.0 + ] + ] + } + }, + "scannet_139": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_140": { + "classification": "consistent", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "lamp", + "gt_center_y": 415.0, + "other_avg_y": 547.1666666666666, + "y_diff": -132.16666666666663, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "television", + 518.0 + ], + [ + "lamp", + 415.0 + ], + [ + "chair", + 816.5 + ], + [ + "picture", + 307.0 + ] + ] + } + }, + "scannet_141": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_142": { + "classification": "consistent", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "cabinet", + "gt_center_y": 659.5, + "other_avg_y": 416.5, + "y_diff": 243.0, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "window", + 193.5 + ], + [ + "cabinet", + 659.5 + ], + [ + "box", + 639.5 + ] + ] + } + }, + "scannet_143": { + "classification": "consistent", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "window", + "gt_center_y": 108.5, + "other_avg_y": 395.3333333333333, + "y_diff": -286.8333333333333, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "shelves", + 516.0 + ], + [ + "window", + 108.5 + ], + [ + "chair", + 316.0 + ], + [ + "table", + 354.0 + ] + ] + } + }, + "scannet_144": { + "classification": "consistent", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "table", + "gt_center_y": 479.0, + "other_avg_y": 207.0, + "y_diff": 272.0, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "bag", + 255.0 + ], + [ + "shelves", + 159.0 + ], + [ + "table", + 479.0 + ] + ] + } + }, + "scannet_145": { + "classification": "consistent", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "bag", + "gt_center_y": 702.0, + "other_avg_y": 329.5, + "y_diff": 372.5, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "bag", + 702.0 + ], + [ + "television", + 60.5 + ], + [ + "bed", + 598.5 + ] + ] + } + }, + "scannet_146": { + "classification": "consistent", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "window", + "gt_center_y": 115.5, + "other_avg_y": 479.6666666666667, + "y_diff": -364.1666666666667, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "table", + 512.0 + ], + [ + "window", + 115.5 + ], + [ + "sofa", + 518.5 + ], + [ + "chair", + 408.5 + ] + ] + } + }, + "scannet_147": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_148": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_149": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_150": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_151": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_152": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_153": { + "classification": "consistent", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "window", + "gt_center_y": 249.5, + "other_avg_y": 534.5, + "y_diff": -285.0, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "cabinet", + 849.0 + ], + [ + "chair", + 592.0 + ], + [ + "window", + 249.5 + ], + [ + "blinds", + 162.5 + ] + ] + } + }, + "scannet_154": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_155": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_156": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_157": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_158": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_159": { + "classification": "consistent", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "bookshelf", + "gt_center_y": 613.0, + "other_avg_y": 845.3333333333334, + "y_diff": -232.33333333333337, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "pillow", + 863.0 + ], + [ + "bookshelf", + 613.0 + ], + [ + "chair", + 907.0 + ], + [ + "sofa", + 766.0 + ] + ] + } + }, + "scannet_160": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_161": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_162": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_163": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_164": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_165": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_166": { + "classification": "counter", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "refridgerator", + "gt_center_y": 636.0, + "other_avg_y": 551.8333333333334, + "y_diff": 84.16666666666663, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "television", + 166.5 + ], + [ + "chair", + 716.5 + ], + [ + "refridgerator", + 636.0 + ], + [ + "table", + 772.5 + ] + ] + } + }, + "scannet_167": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_168": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_169": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_170": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_171": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_172": { + "classification": "consistent", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "refridgerator", + "gt_center_y": 140.0, + "other_avg_y": 495.0, + "y_diff": -355.0, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "refridgerator", + 140.0 + ], + [ + "sink", + 327.0 + ], + [ + "table", + 663.0 + ] + ] + } + }, + "scannet_173": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_174": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_175": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_176": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_177": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_178": { + "classification": "consistent", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "table", + "gt_center_y": 873.5, + "other_avg_y": 220.83333333333334, + "y_diff": 652.6666666666666, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "table", + 873.5 + ], + [ + "shelves", + 151.0 + ], + [ + "cabinet", + 271.5 + ], + [ + "refridgerator", + 240.0 + ] + ] + } + }, + "scannet_179": { + "classification": "consistent", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "curtain", + "gt_center_y": 126.0, + "other_avg_y": 639.6666666666666, + "y_diff": -513.6666666666666, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "cabinet", + 694.5 + ], + [ + "curtain", + 126.0 + ], + [ + "towel", + 810.5 + ], + [ + "picture", + 414.0 + ] + ] + } + }, + "scannet_180": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_181": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_182": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_183": { + "classification": "consistent", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "dresser", + "gt_center_y": 827.5, + "other_avg_y": 277.75, + "y_diff": 549.75, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "dresser", + 827.5 + ], + [ + "shelves", + 168.5 + ], + [ + "books", + 387.0 + ] + ] + } + }, + "scannet_184": { + "classification": "consistent", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "television", + "gt_center_y": 162.0, + "other_avg_y": 683.5, + "y_diff": -521.5, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "television", + 162.0 + ], + [ + "bed", + 852.0 + ], + [ + "cabinet", + 515.0 + ] + ] + } + }, + "scannet_185": { + "classification": "consistent", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "lamp", + "gt_center_y": 309.0, + "other_avg_y": 582.75, + "y_diff": -273.75, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "lamp", + 309.0 + ], + [ + "bookshelf", + 749.5 + ], + [ + "bag", + 416.0 + ] + ] + } + }, + "scannet_186": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_187": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_188": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_189": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_190": { + "classification": "consistent", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "chair", + "gt_center_y": 576.5, + "other_avg_y": 208.16666666666666, + "y_diff": 368.33333333333337, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "shelves", + 202.5 + ], + [ + "window", + 94.0 + ], + [ + "chair", + 576.5 + ], + [ + "bed", + 328.0 + ] + ] + } + }, + "scannet_191": { + "classification": "ambiguous", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "bag", + "gt_center_y": 667.0, + "other_avg_y": 675.5, + "y_diff": -8.5, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "bag", + 667.0 + ], + [ + "cabinet", + 685.0 + ], + [ + "counter", + 666.0 + ] + ] + } + }, + "scannet_192": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_193": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_194": { + "classification": "consistent", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "bed", + "gt_center_y": 335.0, + "other_avg_y": 142.5, + "y_diff": 192.5, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "bed", + 335.0 + ], + [ + "window", + 82.0 + ], + [ + "curtain", + 66.0 + ], + [ + "dresser", + 279.5 + ] + ] + } + }, + "scannet_195": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_196": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_197": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_198": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_199": { + "classification": "consistent", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "cabinet", + "gt_center_y": 146.5, + "other_avg_y": 270.75, + "y_diff": -124.25, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "cabinet", + 146.5 + ], + [ + "bag", + 228.5 + ], + [ + "chair", + 313.0 + ] + ] + } + }, + "scannet_200": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_201": { + "classification": "consistent", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "cabinet", + "gt_center_y": 124.0, + "other_avg_y": 568.3333333333334, + "y_diff": -444.33333333333337, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "picture", + 347.5 + ], + [ + "table", + 841.5 + ], + [ + "cabinet", + 124.0 + ], + [ + "desk", + 516.0 + ] + ] + } + }, + "scannet_202": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_203": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_204": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_205": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_206": { + "classification": "consistent", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "window", + "gt_center_y": 296.5, + "other_avg_y": 708.5, + "y_diff": -412.0, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "bed", + 863.5 + ], + [ + "sofa", + 637.0 + ], + [ + "window", + 296.5 + ], + [ + "cabinet", + 625.0 + ] + ] + } + }, + "scannet_207": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_208": { + "classification": "consistent", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "sofa", + "gt_center_y": 657.5, + "other_avg_y": 378.5, + "y_diff": 279.0, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "shelves", + 140.0 + ], + [ + "clothes", + 279.5 + ], + [ + "dresser", + 716.0 + ], + [ + "sofa", + 657.5 + ] + ] + } + }, + "scannet_209": { + "classification": "consistent", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "window", + "gt_center_y": 127.5, + "other_avg_y": 543.6666666666666, + "y_diff": -416.16666666666663, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "window", + 127.5 + ], + [ + "whiteboard", + 262.0 + ], + [ + "table", + 806.5 + ], + [ + "chair", + 562.5 + ] + ] + } + }, + "scannet_210": { + "classification": "consistent", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "pillow", + "gt_center_y": 243.5, + "other_avg_y": 349.5, + "y_diff": -106.0, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "pillow", + 243.5 + ], + [ + "night stand", + 399.5 + ], + [ + "clothes", + 299.5 + ] + ] + } + }, + "scannet_211": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_212": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_213": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_214": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_215": { + "classification": "consistent", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "bed", + "gt_center_y": 886.0, + "other_avg_y": 656.8333333333334, + "y_diff": 229.16666666666663, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "box", + 891.5 + ], + [ + "picture", + 420.5 + ], + [ + "dresser", + 658.5 + ], + [ + "bed", + 886.0 + ] + ] + } + }, + "scannet_216": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_217": { + "classification": "ambiguous", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "lamp", + "gt_center_y": 425.0, + "other_avg_y": 465.5, + "y_diff": -40.5, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "shelves", + 358.0 + ], + [ + "curtain", + 232.5 + ], + [ + "lamp", + 425.0 + ], + [ + "chair", + 806.0 + ] + ] + } + }, + "scannet_218": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_219": { + "classification": "consistent", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "bag", + "gt_center_y": 885.0, + "other_avg_y": 629.8333333333334, + "y_diff": 255.16666666666663, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "books", + 878.0 + ], + [ + "bag", + 885.0 + ], + [ + "chair", + 820.5 + ], + [ + "whiteboard", + 191.0 + ] + ] + } + }, + "scannet_220": { + "classification": "consistent", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "shelves", + "gt_center_y": 135.0, + "other_avg_y": 220.0, + "y_diff": -85.0, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "paper", + 101.5 + ], + [ + "chair", + 387.0 + ], + [ + "desk", + 171.5 + ], + [ + "shelves", + 135.0 + ] + ] + } + }, + "scannet_221": { + "classification": "consistent", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "picture", + "gt_center_y": 159.0, + "other_avg_y": 384.0, + "y_diff": -225.0, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "mirror", + 206.5 + ], + [ + "window", + 208.0 + ], + [ + "picture", + 159.0 + ], + [ + "cabinet", + 737.5 + ] + ] + } + }, + "scannet_222": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_223": { + "classification": "consistent", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "desk", + "gt_center_y": 711.0, + "other_avg_y": 147.0, + "y_diff": 564.0, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "window", + 150.0 + ], + [ + "desk", + 711.0 + ], + [ + "refridgerator", + 144.0 + ] + ] + } + }, + "scannet_224": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_225": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_226": { + "classification": "consistent", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "dresser", + "gt_center_y": 299.0, + "other_avg_y": 172.0, + "y_diff": 127.0, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "window", + 85.5 + ], + [ + "curtain", + 80.5 + ], + [ + "dresser", + 299.0 + ], + [ + "bed", + 350.0 + ] + ] + } + }, + "scannet_227": { + "classification": "ambiguous", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "sofa", + "gt_center_y": 325.5, + "other_avg_y": 284.25, + "y_diff": 41.25, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "cabinet", + 208.0 + ], + [ + "box", + 360.5 + ], + [ + "sofa", + 325.5 + ] + ] + } + }, + "scannet_228": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_229": { + "classification": "ambiguous", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "cabinet", + "gt_center_y": 689.5, + "other_avg_y": 685.6666666666666, + "y_diff": 3.8333333333333712, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "sink", + 535.0 + ], + [ + "bathtub", + 794.5 + ], + [ + "toilet", + 727.5 + ], + [ + "cabinet", + 689.5 + ] + ] + } + }, + "scannet_230": { + "classification": "consistent", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "shelves", + "gt_center_y": 243.5, + "other_avg_y": 763.8333333333334, + "y_diff": -520.3333333333334, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "bed", + 796.5 + ], + [ + "shelves", + 243.5 + ], + [ + "chair", + 813.0 + ], + [ + "table", + 682.0 + ] + ] + } + }, + "scannet_231": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_232": { + "classification": "consistent", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "chair", + "gt_center_y": 534.5, + "other_avg_y": 251.5, + "y_diff": 283.0, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "chair", + 534.5 + ], + [ + "cabinet", + 353.5 + ], + [ + "blinds", + 96.0 + ], + [ + "box", + 305.0 + ] + ] + } + }, + "scannet_233": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_234": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_235": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_236": { + "classification": "counter", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "box", + "gt_center_y": 834.0, + "other_avg_y": 737.5, + "y_diff": 96.5, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "desk", + 800.0 + ], + [ + "box", + 834.0 + ], + [ + "bed", + 732.0 + ], + [ + "bag", + 680.5 + ] + ] + } + }, + "scannet_237": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_238": { + "classification": "consistent", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "window", + "gt_center_y": 82.0, + "other_avg_y": 226.83333333333334, + "y_diff": -144.83333333333334, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "bed", + 335.0 + ], + [ + "dresser", + 279.5 + ], + [ + "curtain", + 66.0 + ], + [ + "window", + 82.0 + ] + ] + } + }, + "scannet_239": { + "classification": "ambiguous", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "shower curtain", + "gt_center_y": 169.0, + "other_avg_y": 187.66666666666666, + "y_diff": -18.666666666666657, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "shower curtain", + 169.0 + ], + [ + "toilet", + 268.5 + ], + [ + "cabinet", + 231.5 + ], + [ + "sink", + 63.0 + ] + ] + } + }, + "scannet_240": { + "classification": "consistent", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "desk", + "gt_center_y": 620.0, + "other_avg_y": 682.5, + "y_diff": -62.5, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "chair", + 780.0 + ], + [ + "table", + 851.0 + ], + [ + "picture", + 416.5 + ], + [ + "desk", + 620.0 + ] + ] + } + }, + "scannet_241": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_242": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_243": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_244": { + "classification": "consistent", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "towel", + "gt_center_y": 812.5, + "other_avg_y": 753.6666666666666, + "y_diff": 58.83333333333337, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "toilet", + 800.5 + ], + [ + "bathtub", + 800.5 + ], + [ + "towel", + 812.5 + ], + [ + "sink", + 660.0 + ] + ] + } + }, + "scannet_245": { + "classification": "consistent", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "chair", + "gt_center_y": 544.0, + "other_avg_y": 756.5, + "y_diff": -212.5, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "sofa", + 812.5 + ], + [ + "table", + 677.0 + ], + [ + "chair", + 544.0 + ], + [ + "cabinet", + 780.0 + ] + ] + } + }, + "scannet_246": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_247": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_248": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_249": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_250": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_251": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_252": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_253": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_254": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_255": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_256": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_257": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_258": { + "classification": "consistent", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "table", + "gt_center_y": 748.0, + "other_avg_y": 249.16666666666666, + "y_diff": 498.83333333333337, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "sofa", + 295.5 + ], + [ + "desk", + 171.5 + ], + [ + "table", + 748.0 + ], + [ + "chair", + 280.5 + ] + ] + } + }, + "scannet_259": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_260": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_261": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_262": { + "classification": "consistent", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "cabinet", + "gt_center_y": 221.5, + "other_avg_y": 428.0, + "y_diff": -206.5, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "whiteboard", + 187.0 + ], + [ + "table", + 669.0 + ], + [ + "cabinet", + 221.5 + ] + ] + } + }, + "scannet_263": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_264": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_265": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_266": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_267": { + "classification": "consistent", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "lamp", + "gt_center_y": 570.5, + "other_avg_y": 375.3333333333333, + "y_diff": 195.16666666666669, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "curtain", + 242.0 + ], + [ + "lamp", + 570.5 + ], + [ + "window", + 330.0 + ], + [ + "shelves", + 554.0 + ] + ] + } + }, + "scannet_268": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_269": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_270": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_271": { + "classification": "consistent", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "refridgerator", + "gt_center_y": 774.0, + "other_avg_y": 530.6666666666666, + "y_diff": 243.33333333333337, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "refridgerator", + 774.0 + ], + [ + "books", + 451.0 + ], + [ + "desk", + 462.0 + ], + [ + "chair", + 679.0 + ] + ] + } + }, + "scannet_272": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_273": { + "classification": "consistent", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "sofa", + "gt_center_y": 657.5, + "other_avg_y": 378.5, + "y_diff": 279.0, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "clothes", + 279.5 + ], + [ + "dresser", + 716.0 + ], + [ + "sofa", + 657.5 + ], + [ + "shelves", + 140.0 + ] + ] + } + }, + "scannet_274": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_275": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_276": { + "classification": "consistent", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "paper", + "gt_center_y": 347.5, + "other_avg_y": 215.0, + "y_diff": 132.5, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "window", + 137.0 + ], + [ + "paper", + 347.5 + ], + [ + "bookshelf", + 293.0 + ] + ] + } + }, + "scannet_277": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_278": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_279": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_280": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_281": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_282": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_283": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_284": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_285": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_286": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_287": { + "classification": "consistent", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "table", + "gt_center_y": 825.5, + "other_avg_y": 479.25, + "y_diff": 346.25, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "table", + 825.5 + ], + [ + "clothes", + 249.0 + ], + [ + "cabinet", + 709.5 + ] + ] + } + }, + "scannet_288": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_289": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_290": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_291": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_292": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_293": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_294": { + "classification": "consistent", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "window", + "gt_center_y": 166.5, + "other_avg_y": 450.1666666666667, + "y_diff": -283.6666666666667, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "window", + 166.5 + ], + [ + "pillow", + 401.0 + ], + [ + "table", + 488.0 + ], + [ + "chair", + 461.5 + ] + ] + } + }, + "scannet_295": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_296": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_297": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_298": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_299": { + "classification": "consistent", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "window", + "gt_center_y": 157.5, + "other_avg_y": 428.8333333333333, + "y_diff": -271.3333333333333, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "window", + 157.5 + ], + [ + "curtain", + 203.5 + ], + [ + "pillow", + 391.5 + ], + [ + "bed", + 691.5 + ] + ] + } + }, + "scannet_300": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_301": { + "classification": "ambiguous", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "cabinet", + "gt_center_y": 689.5, + "other_avg_y": 685.6666666666666, + "y_diff": 3.8333333333333712, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "toilet", + 727.5 + ], + [ + "sink", + 535.0 + ], + [ + "cabinet", + 689.5 + ], + [ + "bathtub", + 794.5 + ] + ] + } + }, + "scannet_302": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_303": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_304": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_305": { + "classification": "consistent", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "window", + "gt_center_y": 171.0, + "other_avg_y": 220.66666666666666, + "y_diff": -49.66666666666666, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "whiteboard", + 77.5 + ], + [ + "window", + 171.0 + ], + [ + "desk", + 416.5 + ], + [ + "bookshelf", + 168.0 + ] + ] + } + }, + "scannet_306": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_307": { + "classification": "consistent", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "refridgerator", + "gt_center_y": 371.5, + "other_avg_y": 600.75, + "y_diff": -229.25, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "refridgerator", + 371.5 + ], + [ + "cabinet", + 704.5 + ], + [ + "sink", + 497.0 + ] + ] + } + }, + "scannet_308": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_309": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_310": { + "classification": "consistent", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "towel", + "gt_center_y": 609.5, + "other_avg_y": 161.5, + "y_diff": 448.0, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "towel", + 609.5 + ], + [ + "mirror", + 205.0 + ], + [ + "bed", + 167.5 + ], + [ + "picture", + 112.0 + ] + ] + } + }, + "scannet_311": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_312": { + "classification": "consistent", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "shelves", + "gt_center_y": 283.0, + "other_avg_y": 136.5, + "y_diff": 146.5, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "shelves", + 283.0 + ], + [ + "bag", + 201.0 + ], + [ + "curtain", + 72.0 + ] + ] + } + }, + "scannet_313": { + "classification": "consistent", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "mirror", + "gt_center_y": 367.5, + "other_avg_y": 867.5, + "y_diff": -500.0, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "mirror", + 367.5 + ], + [ + "sink", + 828.5 + ], + [ + "towel", + 887.5 + ], + [ + "toilet", + 886.5 + ] + ] + } + }, + "scannet_314": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_315": { + "classification": "consistent", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "cabinet", + "gt_center_y": 249.0, + "other_avg_y": 722.1666666666666, + "y_diff": -473.16666666666663, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "picture", + 469.0 + ], + [ + "table", + 910.0 + ], + [ + "cabinet", + 249.0 + ], + [ + "sofa", + 787.5 + ] + ] + } + }, + "scannet_316": { + "classification": "consistent", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "table", + "gt_center_y": 428.5, + "other_avg_y": 139.75, + "y_diff": 288.75, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "table", + 428.5 + ], + [ + "window", + 123.0 + ], + [ + "cabinet", + 156.5 + ] + ] + } + }, + "scannet_317": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_318": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_319": { + "classification": "consistent", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "cabinet", + "gt_center_y": 807.5, + "other_avg_y": 521.6666666666666, + "y_diff": 285.83333333333337, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "cabinet", + 807.5 + ], + [ + "toilet", + 605.5 + ], + [ + "bathtub", + 817.0 + ], + [ + "window", + 142.5 + ] + ] + } + }, + "scannet_320": { + "classification": "consistent", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "cabinet", + "gt_center_y": 874.0, + "other_avg_y": 421.0, + "y_diff": 453.0, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "cabinet", + 874.0 + ], + [ + "window", + 295.0 + ], + [ + "box", + 547.0 + ] + ] + } + }, + "scannet_321": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_322": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_323": { + "classification": "consistent", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "shelves", + "gt_center_y": 305.0, + "other_avg_y": 197.5, + "y_diff": 107.5, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "lamp", + 151.0 + ], + [ + "sofa", + 244.0 + ], + [ + "shelves", + 305.0 + ] + ] + } + }, + "scannet_324": { + "classification": "consistent", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "table", + "gt_center_y": 855.0, + "other_avg_y": 591.0, + "y_diff": 264.0, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "desk", + 611.0 + ], + [ + "chair", + 783.0 + ], + [ + "picture", + 379.0 + ], + [ + "table", + 855.0 + ] + ] + } + }, + "scannet_325": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_326": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_327": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_328": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_329": { + "classification": "consistent", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "picture", + "gt_center_y": 104.0, + "other_avg_y": 766.75, + "y_diff": -662.75, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "counter", + 731.0 + ], + [ + "cabinet", + 802.5 + ], + [ + "picture", + 104.0 + ] + ] + } + }, + "scannet_330": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_331": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_332": { + "classification": "consistent", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "pillow", + "gt_center_y": 79.5, + "other_avg_y": 443.8333333333333, + "y_diff": -364.3333333333333, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "desk", + 506.5 + ], + [ + "chair", + 676.0 + ], + [ + "pillow", + 79.5 + ], + [ + "window", + 149.0 + ] + ] + } + }, + "scannet_333": { + "classification": "consistent", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "desk", + "gt_center_y": 171.5, + "other_avg_y": 441.3333333333333, + "y_diff": -269.8333333333333, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "chair", + 280.5 + ], + [ + "table", + 748.0 + ], + [ + "desk", + 171.5 + ], + [ + "sofa", + 295.5 + ] + ] + } + }, + "scannet_334": { + "classification": "consistent", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "table", + "gt_center_y": 750.0, + "other_avg_y": 338.5, + "y_diff": 411.5, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "shelves", + 245.0 + ], + [ + "table", + 750.0 + ], + [ + "bed", + 569.5 + ], + [ + "curtain", + 201.0 + ] + ] + } + }, + "scannet_335": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_336": { + "classification": "counter", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "bag", + "gt_center_y": 701.0, + "other_avg_y": 515.6666666666666, + "y_diff": 185.33333333333337, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "counter", + 731.0 + ], + [ + "picture", + 75.0 + ], + [ + "bag", + 701.0 + ], + [ + "cabinet", + 741.0 + ] + ] + } + }, + "scannet_337": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_338": { + "classification": "counter", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "window", + "gt_center_y": 101.5, + "other_avg_y": 653.8333333333334, + "y_diff": -552.3333333333334, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "cabinet", + 731.5 + ], + [ + "toilet", + 530.0 + ], + [ + "bathtub", + 700.0 + ], + [ + "window", + 101.5 + ] + ] + } + }, + "scannet_339": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_340": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_341": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_342": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_343": { + "classification": "consistent", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "paper", + "gt_center_y": 739.5, + "other_avg_y": 412.0, + "y_diff": 327.5, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "window", + 176.0 + ], + [ + "cabinet", + 648.0 + ], + [ + "paper", + 739.5 + ] + ] + } + }, + "scannet_344": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_345": { + "classification": "consistent", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "cabinet", + "gt_center_y": 306.0, + "other_avg_y": 532.75, + "y_diff": -226.75, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "person", + 512.5 + ], + [ + "cabinet", + 306.0 + ], + [ + "sofa", + 553.0 + ] + ] + } + }, + "scannet_346": { + "classification": "ambiguous", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "curtain", + "gt_center_y": 99.5, + "other_avg_y": 141.5, + "y_diff": -42.0, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "curtain", + 99.5 + ], + [ + "bag", + 126.0 + ], + [ + "box", + 227.0 + ], + [ + "bookshelf", + 71.5 + ] + ] + } + }, + "scannet_347": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_348": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_349": { + "classification": "consistent", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "chair", + "gt_center_y": 387.0, + "other_avg_y": 136.0, + "y_diff": 251.0, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "shelves", + 135.0 + ], + [ + "desk", + 171.5 + ], + [ + "chair", + 387.0 + ], + [ + "paper", + 101.5 + ] + ] + } + }, + "scannet_350": { + "classification": "consistent", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "night stand", + "gt_center_y": 481.5, + "other_avg_y": 198.0, + "y_diff": 283.5, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "pillow", + 256.5 + ], + [ + "window", + 139.5 + ], + [ + "night stand", + 481.5 + ] + ] + } + }, + "scannet_351": { + "classification": "consistent", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "bag", + "gt_center_y": 544.5, + "other_avg_y": 195.75, + "y_diff": 348.75, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "toilet", + 106.5 + ], + [ + "cabinet", + 285.0 + ], + [ + "bag", + 544.5 + ] + ] + } + }, + "scannet_352": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_353": { + "classification": "consistent", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "chair", + "gt_center_y": 885.0, + "other_avg_y": 539.8333333333334, + "y_diff": 345.16666666666663, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "paper", + 676.0 + ], + [ + "bag", + 576.5 + ], + [ + "chair", + 885.0 + ], + [ + "shelves", + 367.0 + ] + ] + } + }, + "scannet_354": { + "classification": "consistent", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "desk", + "gt_center_y": 363.5, + "other_avg_y": 246.33333333333334, + "y_diff": 117.16666666666666, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "sofa", + 395.0 + ], + [ + "lamp", + 250.0 + ], + [ + "window", + 94.0 + ], + [ + "desk", + 363.5 + ] + ] + } + }, + "scannet_355": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_356": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_357": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_358": { + "classification": "consistent", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "bookshelf", + "gt_center_y": 189.5, + "other_avg_y": 491.25, + "y_diff": -301.75, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "chair", + 549.5 + ], + [ + "pillow", + 433.0 + ], + [ + "bookshelf", + 189.5 + ] + ] + } + }, + "scannet_359": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_360": { + "classification": "consistent", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "window", + "gt_center_y": 79.5, + "other_avg_y": 510.0, + "y_diff": -430.5, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "window", + 79.5 + ], + [ + "chair", + 596.0 + ], + [ + "desk", + 424.0 + ] + ] + } + }, + "scannet_361": { + "classification": "consistent", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "box", + "gt_center_y": 605.0, + "other_avg_y": 382.8333333333333, + "y_diff": 222.16666666666669, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "cabinet", + 332.5 + ], + [ + "box", + 605.0 + ], + [ + "curtain", + 67.5 + ], + [ + "table", + 748.5 + ] + ] + } + }, + "scannet_362": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_363": { + "classification": "consistent", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "chair", + "gt_center_y": 725.5, + "other_avg_y": 332.1666666666667, + "y_diff": 393.3333333333333, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "chair", + 725.5 + ], + [ + "paper", + 226.5 + ], + [ + "box", + 481.0 + ], + [ + "bookshelf", + 289.0 + ] + ] + } + }, + "scannet_364": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_365": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_366": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_367": { + "classification": "consistent", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "window", + "gt_center_y": 92.5, + "other_avg_y": 290.6666666666667, + "y_diff": -198.16666666666669, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "window", + 92.5 + ], + [ + "bed", + 261.0 + ], + [ + "desk", + 240.5 + ], + [ + "chair", + 370.5 + ] + ] + } + }, + "scannet_368": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_369": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_370": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_371": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_372": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_373": { + "classification": "consistent", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "cabinet", + "gt_center_y": 523.0, + "other_avg_y": 169.75, + "y_diff": 353.25, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "cabinet", + 523.0 + ], + [ + "desk", + 119.0 + ], + [ + "chair", + 220.5 + ] + ] + } + }, + "scannet_374": { + "classification": "consistent", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "chair", + "gt_center_y": 495.0, + "other_avg_y": 185.75, + "y_diff": 309.25, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "chair", + 495.0 + ], + [ + "bookshelf", + 299.5 + ], + [ + "paper", + 72.0 + ] + ] + } + }, + "scannet_375": { + "classification": "consistent", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "bed", + "gt_center_y": 335.0, + "other_avg_y": 142.5, + "y_diff": 192.5, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "bed", + 335.0 + ], + [ + "curtain", + 66.0 + ], + [ + "window", + 82.0 + ], + [ + "dresser", + 279.5 + ] + ] + } + }, + "scannet_376": { + "classification": "consistent", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "shelves", + "gt_center_y": 170.5, + "other_avg_y": 586.0, + "y_diff": -415.5, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "bed", + 467.5 + ], + [ + "shelves", + 170.5 + ], + [ + "table", + 704.5 + ] + ] + } + }, + "scannet_377": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_378": { + "classification": "consistent", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "picture", + "gt_center_y": 75.0, + "other_avg_y": 724.3333333333334, + "y_diff": -649.3333333333334, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "picture", + 75.0 + ], + [ + "counter", + 731.0 + ], + [ + "cabinet", + 741.0 + ], + [ + "bag", + 701.0 + ] + ] + } + }, + "scannet_379": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_380": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_381": { + "classification": "consistent", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "pillow", + "gt_center_y": 131.5, + "other_avg_y": 295.6666666666667, + "y_diff": -164.16666666666669, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "sofa", + 230.5 + ], + [ + "cabinet", + 361.5 + ], + [ + "pillow", + 131.5 + ], + [ + "desk", + 295.0 + ] + ] + } + }, + "scannet_382": { + "classification": "consistent", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "shower curtain", + "gt_center_y": 202.5, + "other_avg_y": 283.1666666666667, + "y_diff": -80.66666666666669, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "shower curtain", + 202.5 + ], + [ + "bathtub", + 377.0 + ], + [ + "cabinet", + 241.0 + ], + [ + "toilet", + 231.5 + ] + ] + } + }, + "scannet_383": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_384": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_385": { + "classification": "counter", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "toilet", + "gt_center_y": 670.0, + "other_avg_y": 486.0, + "y_diff": 184.0, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "toilet", + 670.0 + ], + [ + "mirror", + 247.0 + ], + [ + "sink", + 725.0 + ] + ] + } + }, + "scannet_386": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_387": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_388": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_389": { + "classification": "counter", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "window", + "gt_center_y": 249.5, + "other_avg_y": 534.5, + "y_diff": -285.0, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "cabinet", + 849.0 + ], + [ + "blinds", + 162.5 + ], + [ + "chair", + 592.0 + ], + [ + "window", + 249.5 + ] + ] + } + }, + "scannet_390": { + "classification": "consistent", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "window", + "gt_center_y": 230.0, + "other_avg_y": 620.0, + "y_diff": -390.0, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "window", + 230.0 + ], + [ + "chair", + 518.5 + ], + [ + "desk", + 721.5 + ] + ] + } + }, + "scannet_391": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_392": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_393": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_394": { + "classification": "counter", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "chair", + "gt_center_y": 716.0, + "other_avg_y": 433.6666666666667, + "y_diff": 282.3333333333333, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "chair", + 716.0 + ], + [ + "window", + 244.0 + ], + [ + "desk", + 742.5 + ], + [ + "curtain", + 314.5 + ] + ] + } + }, + "scannet_395": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_396": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_397": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_398": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_399": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_400": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_401": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_402": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_403": { + "classification": "consistent", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "night stand", + "gt_center_y": 236.0, + "other_avg_y": 140.0, + "y_diff": 96.0, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "bed", + 161.0 + ], + [ + "table", + 119.0 + ], + [ + "night stand", + 236.0 + ] + ] + } + }, + "scannet_404": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_405": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_406": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_407": { + "classification": "consistent", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "cabinet", + "gt_center_y": 706.5, + "other_avg_y": 248.5, + "y_diff": 458.0, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "chair", + 225.0 + ], + [ + "desk", + 272.0 + ], + [ + "cabinet", + 706.5 + ] + ] + } + }, + "scannet_408": { + "classification": "consistent", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "shelves", + "gt_center_y": 516.0, + "other_avg_y": 259.5, + "y_diff": 256.5, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "window", + 108.5 + ], + [ + "chair", + 316.0 + ], + [ + "shelves", + 516.0 + ], + [ + "table", + 354.0 + ] + ] + } + }, + "scannet_409": { + "classification": "ambiguous", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "cabinet", + "gt_center_y": 241.0, + "other_avg_y": 270.3333333333333, + "y_diff": -29.333333333333314, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "cabinet", + 241.0 + ], + [ + "shower curtain", + 202.5 + ], + [ + "bathtub", + 377.0 + ], + [ + "toilet", + 231.5 + ] + ] + } + }, + "scannet_410": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_411": { + "classification": "counter", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "television", + "gt_center_y": 477.0, + "other_avg_y": 726.8333333333334, + "y_diff": -249.83333333333337, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "picture", + 537.0 + ], + [ + "television", + 477.0 + ], + [ + "dresser", + 867.0 + ], + [ + "cabinet", + 776.5 + ] + ] + } + }, + "scannet_412": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_413": { + "classification": "consistent", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "bag", + "gt_center_y": 722.5, + "other_avg_y": 524.0, + "y_diff": 198.5, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "shelves", + 710.0 + ], + [ + "curtain", + 400.0 + ], + [ + "bag", + 722.5 + ], + [ + "window", + 462.0 + ] + ] + } + }, + "scannet_414": { + "classification": "consistent", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "cabinet", + "gt_center_y": 340.5, + "other_avg_y": 562.75, + "y_diff": -222.25, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "bathtub", + 582.0 + ], + [ + "toilet", + 543.5 + ], + [ + "cabinet", + 340.5 + ] + ] + } + }, + "scannet_415": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_416": { + "classification": "consistent", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "whiteboard", + "gt_center_y": 294.0, + "other_avg_y": 815.8333333333334, + "y_diff": -521.8333333333334, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "shelves", + 877.5 + ], + [ + "whiteboard", + 294.0 + ], + [ + "desk", + 885.0 + ], + [ + "sofa", + 685.0 + ] + ] + } + }, + "scannet_417": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_418": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_419": { + "classification": "consistent", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "desk", + "gt_center_y": 416.5, + "other_avg_y": 138.83333333333334, + "y_diff": 277.66666666666663, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "bookshelf", + 168.0 + ], + [ + "desk", + 416.5 + ], + [ + "window", + 171.0 + ], + [ + "whiteboard", + 77.5 + ] + ] + } + }, + "scannet_420": { + "classification": "ambiguous", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "dresser", + "gt_center_y": 316.0, + "other_avg_y": 311.75, + "y_diff": 4.25, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "picture", + 65.0 + ], + [ + "box", + 558.5 + ], + [ + "dresser", + 316.0 + ] + ] + } + }, + "scannet_421": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_422": { + "classification": "consistent", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "lamp", + "gt_center_y": 523.0, + "other_avg_y": 582.8333333333334, + "y_diff": -59.83333333333337, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "mirror", + 308.0 + ], + [ + "night stand", + 663.5 + ], + [ + "dresser", + 777.0 + ], + [ + "lamp", + 523.0 + ] + ] + } + }, + "scannet_423": { + "classification": "consistent", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "shelves", + "gt_center_y": 148.5, + "other_avg_y": 556.5, + "y_diff": -408.0, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "sofa", + 659.5 + ], + [ + "refridgerator", + 453.5 + ], + [ + "shelves", + 148.5 + ] + ] + } + }, + "scannet_424": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_425": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_426": { + "classification": "consistent", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "bed", + "gt_center_y": 659.0, + "other_avg_y": 349.5, + "y_diff": 309.5, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "table", + 657.5 + ], + [ + "curtain", + 84.0 + ], + [ + "bed", + 659.0 + ], + [ + "shelves", + 307.0 + ] + ] + } + }, + "scannet_427": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_428": { + "classification": "consistent", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "pillow", + "gt_center_y": 402.0, + "other_avg_y": 223.0, + "y_diff": 179.0, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "pillow", + 402.0 + ], + [ + "bookshelf", + 294.5 + ], + [ + "whiteboard", + 151.5 + ] + ] + } + }, + "scannet_429": { + "classification": "consistent", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "sofa", + "gt_center_y": 553.0, + "other_avg_y": 409.25, + "y_diff": 143.75, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "cabinet", + 306.0 + ], + [ + "sofa", + 553.0 + ], + [ + "person", + 512.5 + ] + ] + } + }, + "scannet_430": { + "classification": "consistent", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "refridgerator", + "gt_center_y": 542.0, + "other_avg_y": 355.75, + "y_diff": 186.25, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "refridgerator", + 542.0 + ], + [ + "chair", + 325.5 + ], + [ + "clothes", + 386.0 + ] + ] + } + }, + "scannet_431": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_432": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_433": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_434": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_435": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_436": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_437": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_438": { + "classification": "consistent", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "curtain", + "gt_center_y": 64.0, + "other_avg_y": 611.1666666666666, + "y_diff": -547.1666666666666, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "curtain", + 64.0 + ], + [ + "box", + 713.0 + ], + [ + "cabinet", + 330.0 + ], + [ + "table", + 790.5 + ] + ] + } + }, + "scannet_439": { + "classification": "consistent", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "table", + "gt_center_y": 748.0, + "other_avg_y": 249.16666666666666, + "y_diff": 498.83333333333337, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "sofa", + 295.5 + ], + [ + "chair", + 280.5 + ], + [ + "desk", + 171.5 + ], + [ + "table", + 748.0 + ] + ] + } + }, + "scannet_440": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_441": { + "classification": "consistent", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "dresser", + "gt_center_y": 680.5, + "other_avg_y": 229.66666666666666, + "y_diff": 450.83333333333337, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "books", + 496.5 + ], + [ + "television", + 110.5 + ], + [ + "dresser", + 680.5 + ], + [ + "picture", + 82.0 + ] + ] + } + }, + "scannet_442": { + "classification": "consistent", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "bag", + "gt_center_y": 885.0, + "other_avg_y": 629.8333333333334, + "y_diff": 255.16666666666663, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "bag", + 885.0 + ], + [ + "books", + 878.0 + ], + [ + "whiteboard", + 191.0 + ], + [ + "chair", + 820.5 + ] + ] + } + }, + "scannet_443": { + "classification": "consistent", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "bed", + "gt_center_y": 828.0, + "other_avg_y": 503.75, + "y_diff": 324.25, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "curtain", + 232.0 + ], + [ + "cabinet", + 775.5 + ], + [ + "bed", + 828.0 + ] + ] + } + }, + "scannet_444": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_445": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_446": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_447": { + "classification": "consistent", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "sofa", + "gt_center_y": 697.0, + "other_avg_y": 329.8333333333333, + "y_diff": 367.1666666666667, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "window", + 147.0 + ], + [ + "sofa", + 697.0 + ], + [ + "chair", + 289.5 + ], + [ + "desk", + 553.0 + ] + ] + } + }, + "scannet_448": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_449": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_450": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_451": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_452": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_453": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_454": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_455": { + "classification": "consistent", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "window", + "gt_center_y": 107.5, + "other_avg_y": 216.0, + "y_diff": -108.5, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "pillow", + 246.5 + ], + [ + "whiteboard", + 137.0 + ], + [ + "clothes", + 264.5 + ], + [ + "window", + 107.5 + ] + ] + } + }, + "scannet_456": { + "classification": "counter", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "window", + "gt_center_y": 90.5, + "other_avg_y": 241.25, + "y_diff": -150.75, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "box", + 382.0 + ], + [ + "window", + 90.5 + ], + [ + "blinds", + 100.5 + ] + ] + } + }, + "scannet_457": { + "classification": "consistent", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "bag", + "gt_center_y": 311.0, + "other_avg_y": 73.5, + "y_diff": 237.5, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "sink", + 89.0 + ], + [ + "bag", + 311.0 + ], + [ + "mirror", + 58.0 + ] + ] + } + }, + "scannet_458": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_459": { + "classification": "ambiguous", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "sofa", + "gt_center_y": 244.0, + "other_avg_y": 228.0, + "y_diff": 16.0, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "sofa", + 244.0 + ], + [ + "lamp", + 151.0 + ], + [ + "shelves", + 305.0 + ] + ] + } + }, + "scannet_460": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_461": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_462": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_463": { + "classification": "consistent", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "mirror", + "gt_center_y": 70.5, + "other_avg_y": 408.75, + "y_diff": -338.25, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "toilet", + 412.5 + ], + [ + "sink", + 405.0 + ], + [ + "mirror", + 70.5 + ] + ] + } + }, + "scannet_464": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_465": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_466": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_467": { + "classification": "consistent", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "chair", + "gt_center_y": 654.0, + "other_avg_y": 251.0, + "y_diff": 403.0, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "curtain", + 210.0 + ], + [ + "refridgerator", + 474.5 + ], + [ + "chair", + 654.0 + ], + [ + "lamp", + 68.5 + ] + ] + } + }, + "scannet_468": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_469": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_470": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_471": { + "classification": "consistent", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "clothes", + "gt_center_y": 222.5, + "other_avg_y": 481.75, + "y_diff": -259.25, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "refridgerator", + 295.5 + ], + [ + "clothes", + 222.5 + ], + [ + "desk", + 668.0 + ] + ] + } + }, + "scannet_472": { + "classification": "consistent", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "table", + "gt_center_y": 841.5, + "other_avg_y": 329.1666666666667, + "y_diff": 512.3333333333333, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "desk", + 516.0 + ], + [ + "cabinet", + 124.0 + ], + [ + "picture", + 347.5 + ], + [ + "table", + 841.5 + ] + ] + } + }, + "scannet_473": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_474": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_475": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_476": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_477": { + "classification": "consistent", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "window", + "gt_center_y": 464.0, + "other_avg_y": 759.3333333333334, + "y_diff": -295.33333333333337, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "window", + 464.0 + ], + [ + "lamp", + 572.5 + ], + [ + "table", + 868.5 + ], + [ + "chair", + 837.0 + ] + ] + } + }, + "scannet_478": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_479": { + "classification": "consistent", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "cabinet", + "gt_center_y": 243.0, + "other_avg_y": 593.75, + "y_diff": -350.75, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "cabinet", + 243.0 + ], + [ + "bed", + 705.5 + ], + [ + "table", + 482.0 + ] + ] + } + }, + "scannet_480": { + "classification": "consistent", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "shelves", + "gt_center_y": 71.5, + "other_avg_y": 570.0, + "y_diff": -498.5, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "table", + 697.0 + ], + [ + "shelves", + 71.5 + ], + [ + "bed", + 443.0 + ] + ] + } + }, + "scannet_481": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_482": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_483": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_484": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_485": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_486": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_487": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_488": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_489": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_490": { + "classification": "consistent", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "chair", + "gt_center_y": 800.0, + "other_avg_y": 334.75, + "y_diff": 465.25, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "curtain", + 185.5 + ], + [ + "shelves", + 484.0 + ], + [ + "chair", + 800.0 + ] + ] + } + }, + "scannet_491": { + "classification": "counter", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "books", + "gt_center_y": 620.5, + "other_avg_y": 493.75, + "y_diff": 126.75, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "books", + 620.5 + ], + [ + "whiteboard", + 185.0 + ], + [ + "cabinet", + 802.5 + ] + ] + } + }, + "scannet_492": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_493": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_494": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_495": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_496": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_497": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_498": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_499": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_500": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_501": { + "classification": "ambiguous", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "desk", + "gt_center_y": 235.0, + "other_avg_y": 265.5, + "y_diff": -30.5, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "desk", + 235.0 + ], + [ + "sink", + 339.5 + ], + [ + "sofa", + 191.5 + ] + ] + } + }, + "scannet_502": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_503": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_504": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_505": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_506": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_507": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_508": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_509": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_510": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_511": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_512": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_513": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_514": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_515": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_516": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_517": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_518": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_519": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_520": { + "classification": "consistent", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "bookshelf", + "gt_center_y": 683.0, + "other_avg_y": 805.5, + "y_diff": -122.5, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "pillow", + 910.5 + ], + [ + "bookshelf", + 683.0 + ], + [ + "whiteboard", + 700.5 + ] + ] + } + }, + "scannet_521": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_522": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_523": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_524": { + "classification": "consistent", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "sofa", + "gt_center_y": 518.5, + "other_avg_y": 345.3333333333333, + "y_diff": 173.16666666666669, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "table", + 512.0 + ], + [ + "window", + 115.5 + ], + [ + "sofa", + 518.5 + ], + [ + "chair", + 408.5 + ] + ] + } + }, + "scannet_525": { + "classification": "consistent", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "whiteboard", + "gt_center_y": 191.0, + "other_avg_y": 861.1666666666666, + "y_diff": -670.1666666666666, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "books", + 878.0 + ], + [ + "whiteboard", + 191.0 + ], + [ + "chair", + 820.5 + ], + [ + "bag", + 885.0 + ] + ] + } + }, + "scannet_526": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_527": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_528": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_529": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_530": { + "classification": "consistent", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "television", + "gt_center_y": 111.5, + "other_avg_y": 477.6666666666667, + "y_diff": -366.1666666666667, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "shelves", + 207.0 + ], + [ + "television", + 111.5 + ], + [ + "sofa", + 761.0 + ], + [ + "chair", + 465.0 + ] + ] + } + }, + "scannet_531": { + "classification": "consistent", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "lamp", + "gt_center_y": 128.0, + "other_avg_y": 654.75, + "y_diff": -526.75, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "lamp", + 128.0 + ], + [ + "shelves", + 735.0 + ], + [ + "chair", + 574.5 + ] + ] + } + }, + "scannet_532": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_533": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_534": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_535": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_536": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_537": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_538": { + "classification": "consistent", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "shelves", + "gt_center_y": 102.0, + "other_avg_y": 246.66666666666666, + "y_diff": -144.66666666666666, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "desk", + 342.0 + ], + [ + "pillow", + 230.5 + ], + [ + "clothes", + 167.5 + ], + [ + "shelves", + 102.0 + ] + ] + } + }, + "scannet_539": { + "classification": "consistent", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "shelves", + "gt_center_y": 367.0, + "other_avg_y": 712.5, + "y_diff": -345.5, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "paper", + 676.0 + ], + [ + "chair", + 885.0 + ], + [ + "bag", + 576.5 + ], + [ + "shelves", + 367.0 + ] + ] + } + }, + "scannet_540": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_541": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_542": { + "classification": "consistent", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "window", + "gt_center_y": 147.0, + "other_avg_y": 513.1666666666666, + "y_diff": -366.16666666666663, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "sofa", + 697.0 + ], + [ + "chair", + 289.5 + ], + [ + "window", + 147.0 + ], + [ + "desk", + 553.0 + ] + ] + } + }, + "scannet_543": { + "classification": "consistent", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "books", + "gt_center_y": 107.5, + "other_avg_y": 201.0, + "y_diff": -93.5, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "books", + 107.5 + ], + [ + "cabinet", + 218.0 + ], + [ + "box", + 206.0 + ], + [ + "bookshelf", + 179.0 + ] + ] + } + }, + "scannet_544": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_545": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_546": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_547": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_548": { + "classification": "consistent", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "curtain", + "gt_center_y": 150.0, + "other_avg_y": 697.75, + "y_diff": -547.75, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "curtain", + 150.0 + ], + [ + "cabinet", + 585.0 + ], + [ + "table", + 810.5 + ] + ] + } + }, + "scannet_549": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_550": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_551": { + "classification": "ambiguous", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "bathtub", + "gt_center_y": 800.5, + "other_avg_y": 757.6666666666666, + "y_diff": 42.83333333333337, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "toilet", + 800.5 + ], + [ + "sink", + 660.0 + ], + [ + "bathtub", + 800.5 + ], + [ + "towel", + 812.5 + ] + ] + } + }, + "scannet_552": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_553": { + "classification": "consistent", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "sofa", + "gt_center_y": 770.0, + "other_avg_y": 567.75, + "y_diff": 202.25, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "cabinet", + 696.5 + ], + [ + "chair", + 439.0 + ], + [ + "sofa", + 770.0 + ] + ] + } + }, + "scannet_554": { + "classification": "consistent", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "chair", + "gt_center_y": 439.0, + "other_avg_y": 733.25, + "y_diff": -294.25, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "sofa", + 770.0 + ], + [ + "cabinet", + 696.5 + ], + [ + "chair", + 439.0 + ] + ] + } + }, + "scannet_555": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_556": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_557": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_558": { + "classification": "consistent", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "bed", + "gt_center_y": 676.0, + "other_avg_y": 297.25, + "y_diff": 378.75, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "refridgerator", + 284.5 + ], + [ + "bed", + 676.0 + ], + [ + "desk", + 310.0 + ] + ] + } + }, + "scannet_559": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_560": { + "classification": "consistent", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "chair", + "gt_center_y": 549.5, + "other_avg_y": 311.25, + "y_diff": 238.25, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "pillow", + 433.0 + ], + [ + "chair", + 549.5 + ], + [ + "bookshelf", + 189.5 + ] + ] + } + }, + "scannet_561": { + "classification": "consistent", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "cabinet", + "gt_center_y": 214.0, + "other_avg_y": 296.75, + "y_diff": -82.75, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "window", + 150.5 + ], + [ + "cabinet", + 214.0 + ], + [ + "table", + 443.0 + ] + ] + } + }, + "scannet_562": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_563": { + "classification": "consistent", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "sofa", + "gt_center_y": 652.5, + "other_avg_y": 411.8333333333333, + "y_diff": 240.66666666666669, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "mirror", + 137.5 + ], + [ + "sofa", + 652.5 + ], + [ + "chair", + 589.0 + ], + [ + "desk", + 509.0 + ] + ] + } + }, + "scannet_564": { + "classification": "consistent", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "bed", + "gt_center_y": 225.0, + "other_avg_y": 388.3333333333333, + "y_diff": -163.33333333333331, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "chair", + 155.5 + ], + [ + "clothes", + 811.0 + ], + [ + "table", + 198.5 + ], + [ + "bed", + 225.0 + ] + ] + } + }, + "scannet_565": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_566": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_567": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_568": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_569": { + "classification": "ambiguous", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "lamp", + "gt_center_y": 425.0, + "other_avg_y": 465.5, + "y_diff": -40.5, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "chair", + 806.0 + ], + [ + "shelves", + 358.0 + ], + [ + "curtain", + 232.5 + ], + [ + "lamp", + 425.0 + ] + ] + } + }, + "scannet_570": { + "classification": "counter", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "toilet", + "gt_center_y": 653.5, + "other_avg_y": 762.25, + "y_diff": -108.75, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "shower curtain", + 802.0 + ], + [ + "bathtub", + 722.5 + ], + [ + "toilet", + 653.5 + ] + ] + } + }, + "scannet_571": { + "classification": "consistent", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "table", + "gt_center_y": 291.5, + "other_avg_y": 77.5, + "y_diff": 214.0, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "table", + 291.5 + ], + [ + "books", + 71.5 + ], + [ + "pillow", + 83.5 + ] + ] + } + }, + "scannet_572": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_573": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_574": { + "classification": "consistent", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "clothes", + "gt_center_y": 446.5, + "other_avg_y": 535.0, + "y_diff": -88.5, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "clothes", + 446.5 + ], + [ + "chair", + 824.5 + ], + [ + "bag", + 245.5 + ] + ] + } + }, + "scannet_575": { + "classification": "consistent", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "chair", + "gt_center_y": 791.5, + "other_avg_y": 366.0, + "y_diff": 425.5, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "chair", + 791.5 + ], + [ + "night stand", + 523.5 + ], + [ + "lamp", + 208.5 + ] + ] + } + }, + "scannet_576": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_577": { + "classification": "consistent", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "window", + "gt_center_y": 127.0, + "other_avg_y": 439.0, + "y_diff": -312.0, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "shelves", + 265.5 + ], + [ + "window", + 127.0 + ], + [ + "bed", + 398.0 + ], + [ + "chair", + 653.5 + ] + ] + } + }, + "scannet_578": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_579": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_580": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_581": { + "classification": "consistent", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "towel", + "gt_center_y": 782.0, + "other_avg_y": 529.8333333333334, + "y_diff": 252.16666666666663, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "sink", + 625.0 + ], + [ + "towel", + 782.0 + ], + [ + "toilet", + 773.5 + ], + [ + "mirror", + 191.0 + ] + ] + } + }, + "scannet_582": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_583": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_584": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_585": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_586": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_587": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_588": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_589": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_590": { + "classification": "ambiguous", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "chair", + "gt_center_y": 715.5, + "other_avg_y": 761.5, + "y_diff": -46.0, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "pillow", + 722.0 + ], + [ + "chair", + 715.5 + ], + [ + "table", + 801.0 + ] + ] + } + }, + "scannet_591": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_592": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_593": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_594": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_595": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_596": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_597": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_598": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_599": { + "classification": "consistent", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "shelves", + "gt_center_y": 189.0, + "other_avg_y": 550.5, + "y_diff": -361.5, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "chair", + 466.0 + ], + [ + "shelves", + 189.0 + ], + [ + "cabinet", + 635.0 + ] + ] + } + }, + "scannet_600": { + "classification": "consistent", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "toilet", + "gt_center_y": 377.0, + "other_avg_y": 189.83333333333334, + "y_diff": 187.16666666666666, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "toilet", + 377.0 + ], + [ + "shower curtain", + 127.0 + ], + [ + "towel", + 332.5 + ], + [ + "sink", + 110.0 + ] + ] + } + }, + "scannet_601": { + "classification": "consistent", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "window", + "gt_center_y": 157.5, + "other_avg_y": 428.8333333333333, + "y_diff": -271.3333333333333, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "pillow", + 391.5 + ], + [ + "bed", + 691.5 + ], + [ + "curtain", + 203.5 + ], + [ + "window", + 157.5 + ] + ] + } + }, + "scannet_602": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_603": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_604": { + "classification": "consistent", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "desk", + "gt_center_y": 442.0, + "other_avg_y": 693.25, + "y_diff": -251.25, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "desk", + 442.0 + ], + [ + "cabinet", + 508.5 + ], + [ + "box", + 878.0 + ] + ] + } + }, + "scannet_605": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_606": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_607": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_608": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_609": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_610": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_611": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_612": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_613": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_614": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_615": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_616": { + "classification": "consistent", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "shelves", + "gt_center_y": 79.5, + "other_avg_y": 680.5, + "y_diff": -601.0, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "chair", + 527.0 + ], + [ + "box", + 834.0 + ], + [ + "shelves", + 79.5 + ] + ] + } + }, + "scannet_617": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_618": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_619": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_620": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_621": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_622": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_623": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_624": { + "classification": "consistent", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "refridgerator", + "gt_center_y": 519.5, + "other_avg_y": 741.0, + "y_diff": -221.5, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "bed", + 850.5 + ], + [ + "desk", + 680.5 + ], + [ + "refridgerator", + 519.5 + ], + [ + "chair", + 692.0 + ] + ] + } + }, + "scannet_625": { + "classification": "consistent", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "curtain", + "gt_center_y": 105.5, + "other_avg_y": 266.75, + "y_diff": -161.25, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "curtain", + 105.5 + ], + [ + "bookshelf", + 149.0 + ], + [ + "box", + 384.5 + ] + ] + } + }, + "scannet_626": { + "classification": "consistent", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "whiteboard", + "gt_center_y": 294.0, + "other_avg_y": 815.8333333333334, + "y_diff": -521.8333333333334, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "whiteboard", + 294.0 + ], + [ + "desk", + 885.0 + ], + [ + "shelves", + 877.5 + ], + [ + "sofa", + 685.0 + ] + ] + } + }, + "scannet_627": { + "classification": "consistent", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "window", + "gt_center_y": 241.5, + "other_avg_y": 538.25, + "y_diff": -296.75, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "sofa", + 851.0 + ], + [ + "window", + 241.5 + ], + [ + "picture", + 225.5 + ] + ] + } + }, + "scannet_628": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_629": { + "classification": "consistent", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "chair", + "gt_center_y": 725.5, + "other_avg_y": 332.1666666666667, + "y_diff": 393.3333333333333, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "box", + 481.0 + ], + [ + "bookshelf", + 289.0 + ], + [ + "paper", + 226.5 + ], + [ + "chair", + 725.5 + ] + ] + } + }, + "scannet_630": { + "classification": "consistent", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "window", + "gt_center_y": 101.5, + "other_avg_y": 653.8333333333334, + "y_diff": -552.3333333333334, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "window", + 101.5 + ], + [ + "cabinet", + 731.5 + ], + [ + "bathtub", + 700.0 + ], + [ + "toilet", + 530.0 + ] + ] + } + }, + "scannet_631": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_632": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_633": { + "classification": "consistent", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "chair", + "gt_center_y": 679.0, + "other_avg_y": 117.25, + "y_diff": 561.75, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "chair", + 679.0 + ], + [ + "picture", + 162.5 + ], + [ + "television", + 72.0 + ] + ] + } + }, + "scannet_634": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_635": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_636": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_637": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_638": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_639": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_640": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_641": { + "classification": "ambiguous", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "bed", + "gt_center_y": 261.0, + "other_avg_y": 234.5, + "y_diff": 26.5, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "window", + 92.5 + ], + [ + "chair", + 370.5 + ], + [ + "desk", + 240.5 + ], + [ + "bed", + 261.0 + ] + ] + } + }, + "scannet_642": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_643": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_644": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_645": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_646": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_647": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_648": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_649": { + "classification": "consistent", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "pillow", + "gt_center_y": 818.5, + "other_avg_y": 527.0, + "y_diff": 291.5, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "night stand", + 718.5 + ], + [ + "pillow", + 818.5 + ], + [ + "lamp", + 335.5 + ] + ] + } + }, + "scannet_650": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_651": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_652": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_653": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_654": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_655": { + "classification": "consistent", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "shelves", + "gt_center_y": 102.0, + "other_avg_y": 246.66666666666666, + "y_diff": -144.66666666666666, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "pillow", + 230.5 + ], + [ + "desk", + 342.0 + ], + [ + "shelves", + 102.0 + ], + [ + "clothes", + 167.5 + ] + ] + } + }, + "scannet_656": { + "classification": "consistent", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "cabinet", + "gt_center_y": 312.5, + "other_avg_y": 193.0, + "y_diff": 119.5, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "refridgerator", + 155.5 + ], + [ + "bathtub", + 198.0 + ], + [ + "table", + 225.5 + ], + [ + "cabinet", + 312.5 + ] + ] + } + }, + "scannet_657": { + "classification": "consistent", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "pillow", + "gt_center_y": 73.5, + "other_avg_y": 354.25, + "y_diff": -280.75, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "pillow", + 73.5 + ], + [ + "chair", + 220.0 + ], + [ + "table", + 488.5 + ] + ] + } + }, + "scannet_658": { + "classification": "consistent", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "cabinet", + "gt_center_y": 402.0, + "other_avg_y": 278.0, + "y_diff": 124.0, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "cabinet", + 402.0 + ], + [ + "shower curtain", + 305.0 + ], + [ + "toilet", + 251.0 + ] + ] + } + }, + "scannet_659": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_660": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_661": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_662": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_663": { + "classification": "counter", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "refridgerator", + "gt_center_y": 636.0, + "other_avg_y": 551.8333333333334, + "y_diff": 84.16666666666663, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "table", + 772.5 + ], + [ + "television", + 166.5 + ], + [ + "chair", + 716.5 + ], + [ + "refridgerator", + 636.0 + ] + ] + } + }, + "scannet_664": { + "classification": "consistent", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "chair", + "gt_center_y": 752.5, + "other_avg_y": 462.1666666666667, + "y_diff": 290.3333333333333, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "picture", + 144.0 + ], + [ + "chair", + 752.5 + ], + [ + "window", + 491.0 + ], + [ + "table", + 751.5 + ] + ] + } + }, + "scannet_665": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_666": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_667": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_668": { + "classification": "consistent", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "table", + "gt_center_y": 674.5, + "other_avg_y": 180.5, + "y_diff": 494.0, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "table", + 674.5 + ], + [ + "sofa", + 154.5 + ], + [ + "bookshelf", + 91.5 + ], + [ + "shelves", + 295.5 + ] + ] + } + }, + "scannet_669": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_670": { + "classification": "consistent", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "shelves", + "gt_center_y": 130.5, + "other_avg_y": 286.75, + "y_diff": -156.25, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "desk", + 245.5 + ], + [ + "shelves", + 130.5 + ], + [ + "dresser", + 328.0 + ] + ] + } + }, + "scannet_671": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_672": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_673": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_674": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_675": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_676": { + "classification": "consistent", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "window", + "gt_center_y": 86.5, + "other_avg_y": 511.25, + "y_diff": -424.75, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "refridgerator", + 301.0 + ], + [ + "table", + 721.5 + ], + [ + "window", + 86.5 + ] + ] + } + }, + "scannet_677": { + "classification": "consistent", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "cabinet", + "gt_center_y": 830.0, + "other_avg_y": 476.0, + "y_diff": 354.0, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "desk", + 756.0 + ], + [ + "cabinet", + 830.0 + ], + [ + "chair", + 520.5 + ], + [ + "window", + 151.5 + ] + ] + } + }, + "scannet_678": { + "classification": "consistent", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "bookshelf", + "gt_center_y": 730.5, + "other_avg_y": 329.1666666666667, + "y_diff": 401.3333333333333, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "lamp", + 187.5 + ], + [ + "box", + 485.0 + ], + [ + "bookshelf", + 730.5 + ], + [ + "bag", + 315.0 + ] + ] + } + }, + "scannet_679": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_680": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_681": { + "classification": "consistent", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "bed", + "gt_center_y": 783.0, + "other_avg_y": 261.5, + "y_diff": 521.5, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "cabinet", + 373.0 + ], + [ + "bed", + 783.0 + ], + [ + "lamp", + 135.5 + ], + [ + "mirror", + 276.0 + ] + ] + } + }, + "scannet_682": { + "classification": "consistent", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "refridgerator", + "gt_center_y": 496.5, + "other_avg_y": 307.0, + "y_diff": 189.5, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "clothes", + 354.0 + ], + [ + "lamp", + 260.0 + ], + [ + "refridgerator", + 496.5 + ] + ] + } + }, + "scannet_683": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_684": { + "classification": "consistent", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "picture", + "gt_center_y": 537.0, + "other_avg_y": 706.8333333333334, + "y_diff": -169.83333333333337, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "cabinet", + 776.5 + ], + [ + "television", + 477.0 + ], + [ + "dresser", + 867.0 + ], + [ + "picture", + 537.0 + ] + ] + } + }, + "scannet_685": { + "classification": "consistent", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "window", + "gt_center_y": 115.5, + "other_avg_y": 479.6666666666667, + "y_diff": -364.1666666666667, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "table", + 512.0 + ], + [ + "chair", + 408.5 + ], + [ + "window", + 115.5 + ], + [ + "sofa", + 518.5 + ] + ] + } + }, + "scannet_686": { + "classification": "consistent", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "window", + "gt_center_y": 168.5, + "other_avg_y": 690.8333333333334, + "y_diff": -522.3333333333334, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "sofa", + 544.0 + ], + [ + "bag", + 738.5 + ], + [ + "window", + 168.5 + ], + [ + "shelves", + 790.0 + ] + ] + } + }, + "scannet_687": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_688": { + "classification": "consistent", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "refridgerator", + "gt_center_y": 215.5, + "other_avg_y": 302.0, + "y_diff": -86.5, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "refridgerator", + 215.5 + ], + [ + "sink", + 229.0 + ], + [ + "counter", + 225.5 + ], + [ + "table", + 451.5 + ] + ] + } + }, + "scannet_689": { + "classification": "consistent", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "window", + "gt_center_y": 85.0, + "other_avg_y": 482.1666666666667, + "y_diff": -397.1666666666667, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "window", + 85.0 + ], + [ + "chair", + 311.5 + ], + [ + "sofa", + 320.5 + ], + [ + "cabinet", + 814.5 + ] + ] + } + }, + "scannet_690": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_691": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_692": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_693": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_694": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_695": { + "classification": "counter", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "sink", + "gt_center_y": 229.0, + "other_avg_y": 297.5, + "y_diff": -68.5, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "refridgerator", + 215.5 + ], + [ + "counter", + 225.5 + ], + [ + "sink", + 229.0 + ], + [ + "table", + 451.5 + ] + ] + } + }, + "scannet_696": { + "classification": "consistent", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "window", + "gt_center_y": 75.5, + "other_avg_y": 439.8333333333333, + "y_diff": -364.3333333333333, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "desk", + 325.5 + ], + [ + "window", + 75.5 + ], + [ + "sofa", + 422.5 + ], + [ + "bag", + 571.5 + ] + ] + } + }, + "scannet_697": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_698": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_699": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_700": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_701": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_702": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_703": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_704": { + "classification": "consistent", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "window", + "gt_center_y": 138.5, + "other_avg_y": 532.6666666666666, + "y_diff": -394.16666666666663, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "whiteboard", + 224.0 + ], + [ + "window", + 138.5 + ], + [ + "chair", + 728.5 + ], + [ + "desk", + 645.5 + ] + ] + } + }, + "scannet_705": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_706": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_707": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_708": { + "classification": "consistent", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "dresser", + "gt_center_y": 841.5, + "other_avg_y": 616.0, + "y_diff": 225.5, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "pillow", + 233.0 + ], + [ + "chair", + 830.5 + ], + [ + "desk", + 784.5 + ], + [ + "dresser", + 841.5 + ] + ] + } + }, + "scannet_709": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_710": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_711": { + "classification": "consistent", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "mirror", + "gt_center_y": 137.5, + "other_avg_y": 583.5, + "y_diff": -446.0, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "sofa", + 652.5 + ], + [ + "mirror", + 137.5 + ], + [ + "desk", + 509.0 + ], + [ + "chair", + 589.0 + ] + ] + } + }, + "scannet_712": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_713": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_714": { + "classification": "ambiguous", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "pillow", + "gt_center_y": 323.5, + "other_avg_y": 295.5, + "y_diff": 28.0, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "pillow", + 323.5 + ], + [ + "window", + 169.0 + ], + [ + "shelves", + 127.0 + ], + [ + "chair", + 590.5 + ] + ] + } + }, + "scannet_715": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_716": { + "classification": "consistent", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "desk", + "gt_center_y": 668.0, + "other_avg_y": 259.0, + "y_diff": 409.0, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "desk", + 668.0 + ], + [ + "refridgerator", + 295.5 + ], + [ + "clothes", + 222.5 + ] + ] + } + }, + "scannet_717": { + "classification": "consistent", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "whiteboard", + "gt_center_y": 122.0, + "other_avg_y": 452.25, + "y_diff": -330.25, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "whiteboard", + 122.0 + ], + [ + "window", + 146.0 + ], + [ + "chair", + 758.5 + ] + ] + } + }, + "scannet_718": { + "classification": "consistent", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "cabinet", + "gt_center_y": 802.5, + "other_avg_y": 402.75, + "y_diff": 399.75, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "cabinet", + 802.5 + ], + [ + "whiteboard", + 185.0 + ], + [ + "books", + 620.5 + ] + ] + } + }, + "scannet_719": { + "classification": "consistent", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "clothes", + "gt_center_y": 811.0, + "other_avg_y": 193.0, + "y_diff": 618.0, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "bed", + 225.0 + ], + [ + "chair", + 155.5 + ], + [ + "table", + 198.5 + ], + [ + "clothes", + 811.0 + ] + ] + } + }, + "scannet_720": { + "classification": "consistent", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "bookshelf", + "gt_center_y": 749.5, + "other_avg_y": 362.5, + "y_diff": 387.0, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "bookshelf", + 749.5 + ], + [ + "bag", + 416.0 + ], + [ + "lamp", + 309.0 + ] + ] + } + }, + "scannet_721": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_722": { + "classification": "consistent", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "dresser", + "gt_center_y": 876.0, + "other_avg_y": 609.1666666666666, + "y_diff": 266.83333333333337, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "dresser", + 876.0 + ], + [ + "box", + 528.0 + ], + [ + "table", + 731.0 + ], + [ + "shelves", + 568.5 + ] + ] + } + }, + "scannet_723": { + "classification": "consistent", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "shelves", + "gt_center_y": 151.0, + "other_avg_y": 461.6666666666667, + "y_diff": -310.6666666666667, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "cabinet", + 271.5 + ], + [ + "refridgerator", + 240.0 + ], + [ + "shelves", + 151.0 + ], + [ + "table", + 873.5 + ] + ] + } + }, + "scannet_724": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_725": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_726": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_727": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_728": { + "classification": "consistent", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "bed", + "gt_center_y": 437.5, + "other_avg_y": 552.75, + "y_diff": -115.25, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "bed", + 437.5 + ], + [ + "table", + 759.0 + ], + [ + "chair", + 346.5 + ] + ] + } + }, + "scannet_729": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_730": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_731": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_732": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_733": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_734": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_735": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_736": { + "classification": "consistent", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "whiteboard", + "gt_center_y": 191.0, + "other_avg_y": 861.1666666666666, + "y_diff": -670.1666666666666, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "whiteboard", + 191.0 + ], + [ + "chair", + 820.5 + ], + [ + "books", + 878.0 + ], + [ + "bag", + 885.0 + ] + ] + } + }, + "scannet_737": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_738": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_739": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_740": { + "classification": "consistent", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "television", + "gt_center_y": 72.0, + "other_avg_y": 420.75, + "y_diff": -348.75, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "television", + 72.0 + ], + [ + "picture", + 162.5 + ], + [ + "chair", + 679.0 + ] + ] + } + }, + "scannet_741": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_742": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_743": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_744": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_745": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_746": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_747": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_748": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_749": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_750": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_751": { + "classification": "ambiguous", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "sofa", + "gt_center_y": 766.0, + "other_avg_y": 794.3333333333334, + "y_diff": -28.33333333333337, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "chair", + 907.0 + ], + [ + "sofa", + 766.0 + ], + [ + "bookshelf", + 613.0 + ], + [ + "pillow", + 863.0 + ] + ] + } + }, + "scannet_752": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_753": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_754": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_755": { + "classification": "consistent", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "cabinet", + "gt_center_y": 156.5, + "other_avg_y": 275.75, + "y_diff": -119.25, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "window", + 123.0 + ], + [ + "cabinet", + 156.5 + ], + [ + "table", + 428.5 + ] + ] + } + }, + "scannet_756": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_757": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_758": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_759": { + "classification": "ambiguous", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "lamp", + "gt_center_y": 468.0, + "other_avg_y": 430.25, + "y_diff": 37.75, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "shelves", + 200.0 + ], + [ + "chair", + 660.5 + ], + [ + "lamp", + 468.0 + ] + ] + } + }, + "scannet_760": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_761": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_762": { + "classification": "ambiguous", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "clothes", + "gt_center_y": 434.0, + "other_avg_y": 462.5, + "y_diff": -28.5, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "desk", + 538.5 + ], + [ + "clothes", + 434.0 + ], + [ + "table", + 386.5 + ] + ] + } + }, + "scannet_763": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_764": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_765": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_766": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_767": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_768": { + "classification": "consistent", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "television", + "gt_center_y": 70.0, + "other_avg_y": 566.8333333333334, + "y_diff": -496.83333333333337, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "bag", + 772.5 + ], + [ + "television", + 70.0 + ], + [ + "bed", + 768.0 + ], + [ + "clothes", + 160.0 + ] + ] + } + }, + "scannet_769": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_770": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_771": { + "classification": "consistent", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "bed", + "gt_center_y": 691.5, + "other_avg_y": 250.83333333333334, + "y_diff": 440.66666666666663, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "window", + 157.5 + ], + [ + "pillow", + 391.5 + ], + [ + "curtain", + 203.5 + ], + [ + "bed", + 691.5 + ] + ] + } + }, + "scannet_772": { + "classification": "consistent", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "shelves", + "gt_center_y": 245.0, + "other_avg_y": 506.8333333333333, + "y_diff": -261.8333333333333, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "shelves", + 245.0 + ], + [ + "table", + 750.0 + ], + [ + "curtain", + 201.0 + ], + [ + "bed", + 569.5 + ] + ] + } + }, + "scannet_773": { + "classification": "counter", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "sofa", + "gt_center_y": 899.0, + "other_avg_y": 614.1666666666666, + "y_diff": 284.83333333333337, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "sofa", + 899.0 + ], + [ + "window", + 510.5 + ], + [ + "bookshelf", + 826.5 + ], + [ + "picture", + 505.5 + ] + ] + } + }, + "scannet_774": { + "classification": "consistent", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "bed", + "gt_center_y": 828.0, + "other_avg_y": 256.0, + "y_diff": 572.0, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "mirror", + 201.5 + ], + [ + "books", + 477.5 + ], + [ + "bed", + 828.0 + ], + [ + "picture", + 89.0 + ] + ] + } + }, + "scannet_775": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_776": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_777": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_778": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_779": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_780": { + "classification": "consistent", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "counter", + "gt_center_y": 298.0, + "other_avg_y": 133.25, + "y_diff": 164.75, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "counter", + 298.0 + ], + [ + "refridgerator", + 183.0 + ], + [ + "window", + 83.5 + ] + ] + } + }, + "scannet_781": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_782": { + "classification": "consistent", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "sofa", + "gt_center_y": 761.0, + "other_avg_y": 261.1666666666667, + "y_diff": 499.8333333333333, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "chair", + 465.0 + ], + [ + "shelves", + 207.0 + ], + [ + "television", + 111.5 + ], + [ + "sofa", + 761.0 + ] + ] + } + }, + "scannet_783": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_784": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_785": { + "classification": "consistent", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "bookshelf", + "gt_center_y": 730.5, + "other_avg_y": 329.1666666666667, + "y_diff": 401.3333333333333, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "bookshelf", + 730.5 + ], + [ + "lamp", + 187.5 + ], + [ + "box", + 485.0 + ], + [ + "bag", + 315.0 + ] + ] + } + }, + "scannet_786": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_787": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_788": { + "classification": "counter", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "bathtub", + "gt_center_y": 444.0, + "other_avg_y": 363.75, + "y_diff": 80.25, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "cabinet", + 221.5 + ], + [ + "toilet", + 506.0 + ], + [ + "bathtub", + 444.0 + ] + ] + } + }, + "scannet_789": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_790": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_791": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_792": { + "classification": "consistent", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "window", + "gt_center_y": 94.0, + "other_avg_y": 336.1666666666667, + "y_diff": -242.16666666666669, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "window", + 94.0 + ], + [ + "desk", + 363.5 + ], + [ + "lamp", + 250.0 + ], + [ + "sofa", + 395.0 + ] + ] + } + }, + "scannet_793": { + "classification": "counter", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "desk", + "gt_center_y": 328.0, + "other_avg_y": 702.0, + "y_diff": -374.0, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "cabinet", + 550.5 + ], + [ + "box", + 853.5 + ], + [ + "desk", + 328.0 + ] + ] + } + }, + "scannet_794": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_795": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_796": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_797": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_798": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_799": { + "classification": "consistent", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "cabinet", + "gt_center_y": 830.0, + "other_avg_y": 476.0, + "y_diff": 354.0, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "cabinet", + 830.0 + ], + [ + "desk", + 756.0 + ], + [ + "chair", + 520.5 + ], + [ + "window", + 151.5 + ] + ] + } + }, + "scannet_800": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_801": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_802": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_803": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_804": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_805": { + "classification": "consistent", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "window", + "gt_center_y": 330.0, + "other_avg_y": 455.5, + "y_diff": -125.5, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "curtain", + 242.0 + ], + [ + "window", + 330.0 + ], + [ + "shelves", + 554.0 + ], + [ + "lamp", + 570.5 + ] + ] + } + }, + "scannet_806": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_807": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_808": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_809": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_810": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_811": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_812": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_813": { + "classification": "counter", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "bag", + "gt_center_y": 728.5, + "other_avg_y": 471.25, + "y_diff": 257.25, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "window", + 241.0 + ], + [ + "bag", + 728.5 + ], + [ + "cabinet", + 701.5 + ] + ] + } + }, + "scannet_814": { + "classification": "consistent", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "bag", + "gt_center_y": 785.0, + "other_avg_y": 141.5, + "y_diff": 643.5, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "lamp", + 132.5 + ], + [ + "bag", + 785.0 + ], + [ + "desk", + 150.5 + ] + ] + } + }, + "scannet_815": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_816": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_817": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_818": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_819": { + "classification": "consistent", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "bed", + "gt_center_y": 796.5, + "other_avg_y": 579.5, + "y_diff": 217.0, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "shelves", + 243.5 + ], + [ + "chair", + 813.0 + ], + [ + "table", + 682.0 + ], + [ + "bed", + 796.5 + ] + ] + } + }, + "scannet_820": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_821": { + "classification": "consistent", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "window", + "gt_center_y": 101.5, + "other_avg_y": 653.8333333333334, + "y_diff": -552.3333333333334, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "window", + 101.5 + ], + [ + "cabinet", + 731.5 + ], + [ + "bathtub", + 700.0 + ], + [ + "toilet", + 530.0 + ] + ] + } + }, + "scannet_822": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_823": { + "classification": "consistent", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "window", + "gt_center_y": 139.5, + "other_avg_y": 369.0, + "y_diff": -229.5, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "pillow", + 256.5 + ], + [ + "window", + 139.5 + ], + [ + "night stand", + 481.5 + ] + ] + } + }, + "scannet_824": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_825": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_826": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_827": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_828": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_829": { + "classification": "consistent", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "chair", + "gt_center_y": 772.5, + "other_avg_y": 163.25, + "y_diff": 609.25, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "chair", + 772.5 + ], + [ + "bed", + 217.0 + ], + [ + "night stand", + 109.5 + ] + ] + } + }, + "scannet_830": { + "classification": "consistent", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "shelves", + "gt_center_y": 215.5, + "other_avg_y": 499.0, + "y_diff": -283.5, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "box", + 473.5 + ], + [ + "shelves", + 215.5 + ], + [ + "books", + 524.5 + ] + ] + } + }, + "scannet_831": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_832": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_833": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_834": { + "classification": "counter", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "television", + "gt_center_y": 102.0, + "other_avg_y": 165.0, + "y_diff": -63.0, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "television", + 102.0 + ], + [ + "picture", + 74.5 + ], + [ + "curtain", + 255.5 + ] + ] + } + }, + "scannet_835": { + "classification": "consistent", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "blinds", + "gt_center_y": 129.5, + "other_avg_y": 419.6666666666667, + "y_diff": -290.1666666666667, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "cabinet", + 407.0 + ], + [ + "box", + 341.5 + ], + [ + "blinds", + 129.5 + ], + [ + "chair", + 510.5 + ] + ] + } + }, + "scannet_836": { + "classification": "consistent", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "bag", + "gt_center_y": 570.0, + "other_avg_y": 412.25, + "y_diff": 157.75, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "bag", + 570.0 + ], + [ + "chair", + 571.0 + ], + [ + "cabinet", + 253.5 + ] + ] + } + }, + "scannet_837": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_838": { + "classification": "consistent", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "shelves", + "gt_center_y": 367.0, + "other_avg_y": 712.5, + "y_diff": -345.5, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "shelves", + 367.0 + ], + [ + "paper", + 676.0 + ], + [ + "bag", + 576.5 + ], + [ + "chair", + 885.0 + ] + ] + } + }, + "scannet_839": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_840": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_841": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_842": { + "classification": "consistent", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "window", + "gt_center_y": 85.0, + "other_avg_y": 482.1666666666667, + "y_diff": -397.1666666666667, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "sofa", + 320.5 + ], + [ + "cabinet", + 814.5 + ], + [ + "chair", + 311.5 + ], + [ + "window", + 85.0 + ] + ] + } + }, + "scannet_843": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_844": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_845": { + "classification": "consistent", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "bookshelf", + "gt_center_y": 447.0, + "other_avg_y": 605.5, + "y_diff": -158.5, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "bookshelf", + 447.0 + ], + [ + "whiteboard", + 421.0 + ], + [ + "sofa", + 656.5 + ], + [ + "pillow", + 739.0 + ] + ] + } + }, + "scannet_846": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_847": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_848": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_849": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_850": { + "classification": "consistent", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "blinds", + "gt_center_y": 96.0, + "other_avg_y": 397.6666666666667, + "y_diff": -301.6666666666667, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "chair", + 534.5 + ], + [ + "blinds", + 96.0 + ], + [ + "cabinet", + 353.5 + ], + [ + "box", + 305.0 + ] + ] + } + }, + "scannet_851": { + "classification": "counter", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "curtain", + "gt_center_y": 297.5, + "other_avg_y": 541.1666666666666, + "y_diff": -243.66666666666663, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "refridgerator", + 466.0 + ], + [ + "desk", + 377.5 + ], + [ + "curtain", + 297.5 + ], + [ + "bed", + 780.0 + ] + ] + } + }, + "scannet_852": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_853": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_854": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_855": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_856": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_857": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_858": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_859": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_860": { + "classification": "consistent", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "box", + "gt_center_y": 558.5, + "other_avg_y": 190.5, + "y_diff": 368.0, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "dresser", + 316.0 + ], + [ + "box", + 558.5 + ], + [ + "picture", + 65.0 + ] + ] + } + }, + "scannet_861": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_862": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_863": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_864": { + "classification": "consistent", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "window", + "gt_center_y": 108.5, + "other_avg_y": 395.3333333333333, + "y_diff": -286.8333333333333, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "chair", + 316.0 + ], + [ + "window", + 108.5 + ], + [ + "shelves", + 516.0 + ], + [ + "table", + 354.0 + ] + ] + } + }, + "scannet_865": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_866": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_867": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_868": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_869": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_870": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_871": { + "classification": "consistent", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "chair", + "gt_center_y": 526.0, + "other_avg_y": 258.0, + "y_diff": 268.0, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "dresser", + 487.5 + ], + [ + "window", + 173.5 + ], + [ + "chair", + 526.0 + ], + [ + "shelves", + 113.0 + ] + ] + } + }, + "scannet_872": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_873": { + "classification": "consistent", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "chair", + "gt_center_y": 596.0, + "other_avg_y": 251.75, + "y_diff": 344.25, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "desk", + 424.0 + ], + [ + "window", + 79.5 + ], + [ + "chair", + 596.0 + ] + ] + } + }, + "scannet_874": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_875": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_876": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_877": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_878": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_879": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_880": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_881": { + "classification": "consistent", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "pillow", + "gt_center_y": 233.0, + "other_avg_y": 818.8333333333334, + "y_diff": -585.8333333333334, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "desk", + 784.5 + ], + [ + "chair", + 830.5 + ], + [ + "dresser", + 841.5 + ], + [ + "pillow", + 233.0 + ] + ] + } + }, + "scannet_882": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_883": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_884": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_885": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_886": { + "classification": "counter", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "cabinet", + "gt_center_y": 776.5, + "other_avg_y": 627.0, + "y_diff": 149.5, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "picture", + 537.0 + ], + [ + "dresser", + 867.0 + ], + [ + "cabinet", + 776.5 + ], + [ + "television", + 477.0 + ] + ] + } + }, + "scannet_887": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_888": { + "classification": "ambiguous", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "bed", + "gt_center_y": 198.5, + "other_avg_y": 216.75, + "y_diff": -18.25, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "bed", + 198.5 + ], + [ + "dresser", + 295.0 + ], + [ + "table", + 138.5 + ] + ] + } + }, + "scannet_889": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_890": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_891": { + "classification": "consistent", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "bed", + "gt_center_y": 863.5, + "other_avg_y": 519.5, + "y_diff": 344.0, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "bed", + 863.5 + ], + [ + "window", + 296.5 + ], + [ + "sofa", + 637.0 + ], + [ + "cabinet", + 625.0 + ] + ] + } + }, + "scannet_892": { + "classification": "consistent", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "counter", + "gt_center_y": 110.5, + "other_avg_y": 596.1666666666666, + "y_diff": -485.66666666666663, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "sofa", + 711.0 + ], + [ + "clothes", + 724.0 + ], + [ + "counter", + 110.5 + ], + [ + "cabinet", + 353.5 + ] + ] + } + }, + "scannet_893": { + "classification": "consistent", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "shelves", + "gt_center_y": 159.5, + "other_avg_y": 313.0, + "y_diff": -153.5, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "table", + 310.0 + ], + [ + "chair", + 344.5 + ], + [ + "shelves", + 159.5 + ], + [ + "dresser", + 284.5 + ] + ] + } + }, + "scannet_894": { + "classification": "consistent", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "window", + "gt_center_y": 294.5, + "other_avg_y": 490.75, + "y_diff": -196.25, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "whiteboard", + 225.5 + ], + [ + "window", + 294.5 + ], + [ + "desk", + 756.0 + ] + ] + } + }, + "scannet_895": { + "classification": "consistent", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "window", + "gt_center_y": 56.0, + "other_avg_y": 535.6666666666666, + "y_diff": -479.66666666666663, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "chair", + 198.0 + ], + [ + "window", + 56.0 + ], + [ + "sofa", + 716.5 + ], + [ + "cabinet", + 692.5 + ] + ] + } + }, + "scannet_896": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_897": { + "classification": "consistent", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "pillow", + "gt_center_y": 233.0, + "other_avg_y": 818.8333333333334, + "y_diff": -585.8333333333334, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "dresser", + 841.5 + ], + [ + "desk", + 784.5 + ], + [ + "pillow", + 233.0 + ], + [ + "chair", + 830.5 + ] + ] + } + }, + "scannet_898": { + "classification": "consistent", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "counter", + "gt_center_y": 842.0, + "other_avg_y": 758.5, + "y_diff": 83.5, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "refridgerator", + 711.5 + ], + [ + "table", + 805.5 + ], + [ + "counter", + 842.0 + ] + ] + } + }, + "scannet_899": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_900": { + "classification": "consistent", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "bookshelf", + "gt_center_y": 730.5, + "other_avg_y": 329.1666666666667, + "y_diff": 401.3333333333333, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "lamp", + 187.5 + ], + [ + "bag", + 315.0 + ], + [ + "bookshelf", + 730.5 + ], + [ + "box", + 485.0 + ] + ] + } + }, + "scannet_901": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_902": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_903": { + "classification": "consistent", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "box", + "gt_center_y": 826.5, + "other_avg_y": 250.25, + "y_diff": 576.25, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "television", + 73.5 + ], + [ + "dresser", + 427.0 + ], + [ + "box", + 826.5 + ] + ] + } + }, + "scannet_904": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_905": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_906": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_907": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_908": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_909": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_910": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_911": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_912": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_913": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_914": { + "classification": "consistent", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "chair", + "gt_center_y": 758.5, + "other_avg_y": 134.0, + "y_diff": 624.5, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "whiteboard", + 122.0 + ], + [ + "chair", + 758.5 + ], + [ + "window", + 146.0 + ] + ] + } + }, + "scannet_915": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_916": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_917": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_918": { + "classification": "counter", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "window", + "gt_center_y": 252.0, + "other_avg_y": 723.25, + "y_diff": -471.25, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "sofa", + 703.5 + ], + [ + "window", + 252.0 + ], + [ + "desk", + 743.0 + ] + ] + } + }, + "scannet_919": { + "classification": "consistent", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "table", + "gt_center_y": 752.0, + "other_avg_y": 243.16666666666666, + "y_diff": 508.83333333333337, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "desk", + 261.5 + ], + [ + "chair", + 284.5 + ], + [ + "television", + 183.5 + ], + [ + "table", + 752.0 + ] + ] + } + }, + "scannet_920": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_921": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_922": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_923": { + "classification": "consistent", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "shelves", + "gt_center_y": 289.0, + "other_avg_y": 801.3333333333334, + "y_diff": -512.3333333333334, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "sofa", + 903.0 + ], + [ + "table", + 832.5 + ], + [ + "shelves", + 289.0 + ], + [ + "chair", + 668.5 + ] + ] + } + }, + "scannet_924": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_925": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_926": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_927": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_928": { + "classification": "consistent", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "sofa", + "gt_center_y": 518.5, + "other_avg_y": 345.3333333333333, + "y_diff": 173.16666666666669, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "window", + 115.5 + ], + [ + "sofa", + 518.5 + ], + [ + "chair", + 408.5 + ], + [ + "table", + 512.0 + ] + ] + } + }, + "scannet_929": { + "classification": "consistent", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "toilet", + "gt_center_y": 146.0, + "other_avg_y": 201.83333333333334, + "y_diff": -55.83333333333334, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "sink", + 55.5 + ], + [ + "toilet", + 146.0 + ], + [ + "shower curtain", + 244.0 + ], + [ + "cabinet", + 306.0 + ] + ] + } + }, + "scannet_930": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_931": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_932": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_933": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_934": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_935": { + "classification": "consistent", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "window", + "gt_center_y": 75.5, + "other_avg_y": 439.8333333333333, + "y_diff": -364.3333333333333, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "window", + 75.5 + ], + [ + "sofa", + 422.5 + ], + [ + "desk", + 325.5 + ], + [ + "bag", + 571.5 + ] + ] + } + }, + "scannet_936": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_937": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_938": { + "classification": "consistent", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "cabinet", + "gt_center_y": 737.5, + "other_avg_y": 191.16666666666666, + "y_diff": 546.3333333333334, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "mirror", + 206.5 + ], + [ + "picture", + 159.0 + ], + [ + "cabinet", + 737.5 + ], + [ + "window", + 208.0 + ] + ] + } + }, + "scannet_939": { + "classification": "consistent", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "cabinet", + "gt_center_y": 253.5, + "other_avg_y": 570.5, + "y_diff": -317.0, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "cabinet", + 253.5 + ], + [ + "bag", + 570.0 + ], + [ + "chair", + 571.0 + ] + ] + } + }, + "scannet_940": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_941": { + "classification": "consistent", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "dresser", + "gt_center_y": 302.0, + "other_avg_y": 192.66666666666666, + "y_diff": 109.33333333333334, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "bed", + 183.0 + ], + [ + "clothes", + 305.5 + ], + [ + "table", + 89.5 + ], + [ + "dresser", + 302.0 + ] + ] + } + }, + "scannet_942": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_943": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_944": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_945": { + "classification": "consistent", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "shower curtain", + "gt_center_y": 217.0, + "other_avg_y": 301.5, + "y_diff": -84.5, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "shower curtain", + 217.0 + ], + [ + "toilet", + 335.0 + ], + [ + "sink", + 195.0 + ], + [ + "towel", + 374.5 + ] + ] + } + }, + "scannet_946": { + "classification": "consistent", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "shelves", + "gt_center_y": 257.5, + "other_avg_y": 383.0, + "y_diff": -125.5, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "shelves", + 257.5 + ], + [ + "table", + 416.5 + ], + [ + "box", + 349.5 + ] + ] + } + }, + "scannet_947": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_948": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_949": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_950": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_951": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_952": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_953": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_954": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_955": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_956": { + "classification": "consistent", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "refridgerator", + "gt_center_y": 216.5, + "other_avg_y": 587.1666666666666, + "y_diff": -370.66666666666663, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "desk", + 652.0 + ], + [ + "bed", + 285.0 + ], + [ + "chair", + 824.5 + ], + [ + "refridgerator", + 216.5 + ] + ] + } + }, + "scannet_957": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_958": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_959": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_960": { + "classification": "consistent", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "lamp", + "gt_center_y": 135.5, + "other_avg_y": 477.3333333333333, + "y_diff": -341.8333333333333, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "bed", + 783.0 + ], + [ + "lamp", + 135.5 + ], + [ + "mirror", + 276.0 + ], + [ + "cabinet", + 373.0 + ] + ] + } + }, + "scannet_961": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_962": { + "classification": "consistent", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "bag", + "gt_center_y": 446.0, + "other_avg_y": 141.5, + "y_diff": 304.5, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "chair", + 117.0 + ], + [ + "desk", + 166.0 + ], + [ + "bag", + 446.0 + ] + ] + } + }, + "scannet_963": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_964": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_965": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_966": { + "classification": "consistent", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "chair", + "gt_center_y": 816.5, + "other_avg_y": 413.3333333333333, + "y_diff": 403.1666666666667, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "picture", + 307.0 + ], + [ + "television", + 518.0 + ], + [ + "chair", + 816.5 + ], + [ + "lamp", + 415.0 + ] + ] + } + }, + "scannet_967": { + "classification": "consistent", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "desk", + "gt_center_y": 873.0, + "other_avg_y": 477.75, + "y_diff": 395.25, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "desk", + 873.0 + ], + [ + "pillow", + 661.5 + ], + [ + "shelves", + 294.0 + ] + ] + } + }, + "scannet_968": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_969": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_970": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_971": { + "classification": "consistent", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "bag", + "gt_center_y": 571.5, + "other_avg_y": 274.5, + "y_diff": 297.0, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "sofa", + 422.5 + ], + [ + "bag", + 571.5 + ], + [ + "desk", + 325.5 + ], + [ + "window", + 75.5 + ] + ] + } + }, + "scannet_972": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_973": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_974": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_975": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_976": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_977": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_978": { + "classification": "counter", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "chair", + "gt_center_y": 780.0, + "other_avg_y": 641.1666666666666, + "y_diff": 138.83333333333337, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "chair", + 780.0 + ], + [ + "table", + 851.0 + ], + [ + "picture", + 416.5 + ], + [ + "bed", + 656.0 + ] + ] + } + }, + "scannet_979": { + "classification": "ambiguous", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "bed", + "gt_center_y": 702.5, + "other_avg_y": 710.3333333333334, + "y_diff": -7.833333333333371, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "bed", + 702.5 + ], + [ + "picture", + 526.0 + ], + [ + "chair", + 864.0 + ], + [ + "desk", + 741.0 + ] + ] + } + }, + "scannet_980": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_981": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_982": { + "classification": "consistent", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "lamp", + "gt_center_y": 187.5, + "other_avg_y": 510.1666666666667, + "y_diff": -322.6666666666667, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "bag", + 315.0 + ], + [ + "lamp", + 187.5 + ], + [ + "box", + 485.0 + ], + [ + "bookshelf", + 730.5 + ] + ] + } + }, + "scannet_983": { + "classification": "consistent", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "picture", + "gt_center_y": 76.0, + "other_avg_y": 605.75, + "y_diff": -529.75, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "picture", + 76.0 + ], + [ + "chair", + 837.0 + ], + [ + "pillow", + 374.5 + ] + ] + } + }, + "scannet_984": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_985": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_986": { + "classification": "consistent", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "chair", + "gt_center_y": 280.5, + "other_avg_y": 405.0, + "y_diff": -124.5, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "sofa", + 295.5 + ], + [ + "desk", + 171.5 + ], + [ + "chair", + 280.5 + ], + [ + "table", + 748.0 + ] + ] + } + }, + "scannet_987": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_988": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_989": { + "classification": "consistent", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "chair", + "gt_center_y": 344.5, + "other_avg_y": 251.33333333333334, + "y_diff": 93.16666666666666, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "chair", + 344.5 + ], + [ + "shelves", + 159.5 + ], + [ + "table", + 310.0 + ], + [ + "dresser", + 284.5 + ] + ] + } + }, + "scannet_990": { + "classification": "consistent", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "window", + "gt_center_y": 311.0, + "other_avg_y": 790.8333333333334, + "y_diff": -479.83333333333337, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "window", + 311.0 + ], + [ + "bag", + 704.0 + ], + [ + "shelves", + 842.0 + ], + [ + "sofa", + 826.5 + ] + ] + } + }, + "scannet_991": { + "classification": "consistent", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "sofa", + "gt_center_y": 683.5, + "other_avg_y": 364.75, + "y_diff": 318.75, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "desk", + 587.5 + ], + [ + "shelves", + 142.0 + ], + [ + "sofa", + 683.5 + ] + ] + } + }, + "scannet_992": { + "classification": "consistent", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "chair", + "gt_center_y": 657.5, + "other_avg_y": 146.33333333333334, + "y_diff": 511.16666666666663, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "chair", + 657.5 + ], + [ + "picture", + 142.0 + ], + [ + "lamp", + 100.0 + ], + [ + "television", + 197.0 + ] + ] + } + }, + "scannet_993": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_994": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_995": { + "classification": "consistent", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "chair", + "gt_center_y": 155.5, + "other_avg_y": 411.5, + "y_diff": -256.0, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "clothes", + 811.0 + ], + [ + "chair", + 155.5 + ], + [ + "table", + 198.5 + ], + [ + "bed", + 225.0 + ] + ] + } + }, + "scannet_996": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_997": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_998": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_999": { + "classification": "ambiguous", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "desk", + "gt_center_y": 289.5, + "other_avg_y": 242.0, + "y_diff": 47.5, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "curtain", + 58.5 + ], + [ + "bookshelf", + 208.0 + ], + [ + "books", + 459.5 + ], + [ + "desk", + 289.5 + ] + ] + } + }, + "scannet_1000": { + "classification": "consistent", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "box", + "gt_center_y": 713.0, + "other_avg_y": 394.8333333333333, + "y_diff": 318.1666666666667, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "curtain", + 64.0 + ], + [ + "table", + 790.5 + ], + [ + "cabinet", + 330.0 + ], + [ + "box", + 713.0 + ] + ] + } + }, + "scannet_1001": { + "classification": "consistent", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "shelves", + "gt_center_y": 289.0, + "other_avg_y": 561.6666666666666, + "y_diff": -272.66666666666663, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "shelves", + 289.0 + ], + [ + "table", + 832.5 + ], + [ + "chair", + 668.5 + ], + [ + "curtain", + 184.0 + ] + ] + } + }, + "scannet_1002": { + "classification": "ambiguous", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "pillow", + "gt_center_y": 289.5, + "other_avg_y": 274.5, + "y_diff": 15.0, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "pillow", + 289.5 + ], + [ + "night stand", + 399.0 + ], + [ + "lamp", + 150.0 + ] + ] + } + }, + "scannet_1003": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_1004": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_1005": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_1006": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_1007": { + "classification": "consistent", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "lamp", + "gt_center_y": 100.0, + "other_avg_y": 332.1666666666667, + "y_diff": -232.16666666666669, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "picture", + 142.0 + ], + [ + "lamp", + 100.0 + ], + [ + "chair", + 657.5 + ], + [ + "television", + 197.0 + ] + ] + } + }, + "scannet_1008": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_1009": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_1010": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_1011": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_1012": { + "classification": "consistent", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "chair", + "gt_center_y": 677.5, + "other_avg_y": 296.75, + "y_diff": 380.75, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "chair", + 677.5 + ], + [ + "window", + 121.5 + ], + [ + "cabinet", + 472.0 + ] + ] + } + }, + "scannet_1013": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_1014": { + "classification": "counter", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "bathtub", + "gt_center_y": 705.0, + "other_avg_y": 577.25, + "y_diff": 127.75, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "bathtub", + 705.0 + ], + [ + "sink", + 487.5 + ], + [ + "toilet", + 667.0 + ] + ] + } + }, + "scannet_1015": { + "classification": "consistent", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "chair", + "gt_center_y": 510.5, + "other_avg_y": 292.6666666666667, + "y_diff": 217.83333333333331, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "box", + 341.5 + ], + [ + "chair", + 510.5 + ], + [ + "blinds", + 129.5 + ], + [ + "cabinet", + 407.0 + ] + ] + } + }, + "scannet_1016": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_1017": { + "classification": "consistent", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "window", + "gt_center_y": 296.5, + "other_avg_y": 708.5, + "y_diff": -412.0, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "bed", + 863.5 + ], + [ + "sofa", + 637.0 + ], + [ + "cabinet", + 625.0 + ], + [ + "window", + 296.5 + ] + ] + } + }, + "scannet_1018": { + "classification": "consistent", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "chair", + "gt_center_y": 728.5, + "other_avg_y": 336.0, + "y_diff": 392.5, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "chair", + 728.5 + ], + [ + "window", + 138.5 + ], + [ + "desk", + 645.5 + ], + [ + "whiteboard", + 224.0 + ] + ] + } + }, + "scannet_1019": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_1020": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_1021": { + "classification": "counter", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "whiteboard", + "gt_center_y": 137.0, + "other_avg_y": 206.16666666666666, + "y_diff": -69.16666666666666, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "window", + 107.5 + ], + [ + "pillow", + 246.5 + ], + [ + "clothes", + 264.5 + ], + [ + "whiteboard", + 137.0 + ] + ] + } + }, + "scannet_1022": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_1023": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_1024": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_1025": { + "classification": "consistent", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "curtain", + "gt_center_y": 232.5, + "other_avg_y": 529.6666666666666, + "y_diff": -297.16666666666663, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "curtain", + 232.5 + ], + [ + "lamp", + 425.0 + ], + [ + "shelves", + 358.0 + ], + [ + "chair", + 806.0 + ] + ] + } + }, + "scannet_1026": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_1027": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_1028": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_1029": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_1030": { + "classification": "consistent", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "curtain", + "gt_center_y": 84.0, + "other_avg_y": 541.1666666666666, + "y_diff": -457.16666666666663, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "bed", + 659.0 + ], + [ + "curtain", + 84.0 + ], + [ + "shelves", + 307.0 + ], + [ + "table", + 657.5 + ] + ] + } + }, + "scannet_1031": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_1032": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_1033": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_1034": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_1035": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_1036": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_1037": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_1038": { + "classification": "consistent", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "table", + "gt_center_y": 416.5, + "other_avg_y": 303.5, + "y_diff": 113.0, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "shelves", + 257.5 + ], + [ + "table", + 416.5 + ], + [ + "box", + 349.5 + ] + ] + } + }, + "scannet_1039": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_1040": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_1041": { + "classification": "consistent", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "window", + "gt_center_y": 142.5, + "other_avg_y": 743.3333333333334, + "y_diff": -600.8333333333334, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "window", + 142.5 + ], + [ + "bathtub", + 817.0 + ], + [ + "toilet", + 605.5 + ], + [ + "cabinet", + 807.5 + ] + ] + } + }, + "scannet_1042": { + "classification": "ambiguous", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "desk", + "gt_center_y": 680.5, + "other_avg_y": 687.3333333333334, + "y_diff": -6.833333333333371, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "chair", + 692.0 + ], + [ + "desk", + 680.5 + ], + [ + "bed", + 850.5 + ], + [ + "refridgerator", + 519.5 + ] + ] + } + }, + "scannet_1043": { + "classification": "consistent", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "desk", + "gt_center_y": 312.0, + "other_avg_y": 399.5, + "y_diff": -87.5, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "chair", + 462.0 + ], + [ + "desk", + 312.0 + ], + [ + "whiteboard", + 337.0 + ] + ] + } + }, + "scannet_1044": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_1045": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_1046": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_1047": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_1048": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_1049": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_1050": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_1051": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_1052": { + "classification": "consistent", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "chair", + "gt_center_y": 751.0, + "other_avg_y": 354.5, + "y_diff": 396.5, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "lamp", + 324.5 + ], + [ + "television", + 384.5 + ], + [ + "chair", + 751.0 + ] + ] + } + }, + "scannet_1053": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_1054": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_1055": { + "classification": "consistent", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "bookshelf", + "gt_center_y": 201.0, + "other_avg_y": 423.0, + "y_diff": -222.0, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "whiteboard", + 190.0 + ], + [ + "bookshelf", + 201.0 + ], + [ + "chair", + 656.0 + ] + ] + } + }, + "scannet_1056": { + "classification": "consistent", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "chair", + "gt_center_y": 510.5, + "other_avg_y": 292.6666666666667, + "y_diff": 217.83333333333331, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "cabinet", + 407.0 + ], + [ + "box", + 341.5 + ], + [ + "blinds", + 129.5 + ], + [ + "chair", + 510.5 + ] + ] + } + }, + "scannet_1057": { + "classification": "consistent", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "table", + "gt_center_y": 772.5, + "other_avg_y": 506.3333333333333, + "y_diff": 266.1666666666667, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "chair", + 716.5 + ], + [ + "refridgerator", + 636.0 + ], + [ + "table", + 772.5 + ], + [ + "television", + 166.5 + ] + ] + } + }, + "scannet_1058": { + "classification": "consistent", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "dresser", + "gt_center_y": 841.5, + "other_avg_y": 616.0, + "y_diff": 225.5, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "dresser", + 841.5 + ], + [ + "pillow", + 233.0 + ], + [ + "chair", + 830.5 + ], + [ + "desk", + 784.5 + ] + ] + } + }, + "scannet_1059": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_1060": { + "classification": "consistent", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "bag", + "gt_center_y": 738.5, + "other_avg_y": 500.8333333333333, + "y_diff": 237.66666666666669, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "bag", + 738.5 + ], + [ + "shelves", + 790.0 + ], + [ + "window", + 168.5 + ], + [ + "sofa", + 544.0 + ] + ] + } + }, + "scannet_1061": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_1062": { + "classification": "consistent", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "table", + "gt_center_y": 663.0, + "other_avg_y": 233.5, + "y_diff": 429.5, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "table", + 663.0 + ], + [ + "sink", + 327.0 + ], + [ + "refridgerator", + 140.0 + ] + ] + } + }, + "scannet_1063": { + "classification": "counter", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "chair", + "gt_center_y": 679.0, + "other_avg_y": 562.3333333333334, + "y_diff": 116.66666666666663, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "desk", + 462.0 + ], + [ + "books", + 451.0 + ], + [ + "refridgerator", + 774.0 + ], + [ + "chair", + 679.0 + ] + ] + } + }, + "scannet_1064": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_1065": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_1066": { + "classification": "consistent", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "desk", + "gt_center_y": 745.5, + "other_avg_y": 261.6666666666667, + "y_diff": 483.8333333333333, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "desk", + 745.5 + ], + [ + "box", + 243.5 + ], + [ + "cabinet", + 423.0 + ], + [ + "window", + 118.5 + ] + ] + } + }, + "scannet_1067": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_1068": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_1069": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_1070": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_1071": { + "classification": "consistent", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "sink", + "gt_center_y": 405.0, + "other_avg_y": 241.5, + "y_diff": 163.5, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "mirror", + 70.5 + ], + [ + "toilet", + 412.5 + ], + [ + "sink", + 405.0 + ] + ] + } + }, + "scannet_1072": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_1073": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_1074": { + "classification": "counter", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "floor mat", + "gt_center_y": 841.5, + "other_avg_y": 777.1666666666666, + "y_diff": 64.33333333333337, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "bed", + 718.5 + ], + [ + "bag", + 873.0 + ], + [ + "floor mat", + 841.5 + ], + [ + "bookshelf", + 740.0 + ] + ] + } + }, + "scannet_1075": { + "classification": "consistent", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "window", + "gt_center_y": 240.0, + "other_avg_y": 392.8333333333333, + "y_diff": -152.83333333333331, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "mirror", + 277.5 + ], + [ + "picture", + 156.5 + ], + [ + "window", + 240.0 + ], + [ + "toilet", + 744.5 + ] + ] + } + }, + "scannet_1076": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_1077": { + "classification": "counter", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "clothes", + "gt_center_y": 526.0, + "other_avg_y": 450.75, + "y_diff": 75.25, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "shelves", + 266.0 + ], + [ + "clothes", + 526.0 + ], + [ + "dresser", + 635.5 + ] + ] + } + }, + "scannet_1078": { + "classification": "consistent", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "dresser", + "gt_center_y": 777.0, + "other_avg_y": 498.1666666666667, + "y_diff": 278.8333333333333, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "lamp", + 523.0 + ], + [ + "dresser", + 777.0 + ], + [ + "mirror", + 308.0 + ], + [ + "night stand", + 663.5 + ] + ] + } + }, + "scannet_1079": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_1080": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_1081": { + "classification": "consistent", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "bag", + "gt_center_y": 571.5, + "other_avg_y": 274.5, + "y_diff": 297.0, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "window", + 75.5 + ], + [ + "desk", + 325.5 + ], + [ + "sofa", + 422.5 + ], + [ + "bag", + 571.5 + ] + ] + } + }, + "scannet_1082": { + "classification": "consistent", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "bookshelf", + "gt_center_y": 547.0, + "other_avg_y": 669.5, + "y_diff": -122.5, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "bookshelf", + 547.0 + ], + [ + "pillow", + 815.0 + ], + [ + "whiteboard", + 524.0 + ] + ] + } + }, + "scannet_1083": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_1084": { + "classification": "consistent", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "desk", + "gt_center_y": 745.5, + "other_avg_y": 261.6666666666667, + "y_diff": 483.8333333333333, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "window", + 118.5 + ], + [ + "desk", + 745.5 + ], + [ + "cabinet", + 423.0 + ], + [ + "box", + 243.5 + ] + ] + } + }, + "scannet_1085": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_1086": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_1087": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_1088": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_1089": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_1090": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_1091": { + "classification": "consistent", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "window", + "gt_center_y": 268.5, + "other_avg_y": 734.5, + "y_diff": -466.0, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "table", + 720.0 + ], + [ + "shelves", + 894.5 + ], + [ + "pillow", + 589.0 + ], + [ + "window", + 268.5 + ] + ] + } + }, + "scannet_1092": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_1093": { + "classification": "consistent", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "window", + "gt_center_y": 121.5, + "other_avg_y": 574.75, + "y_diff": -453.25, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "window", + 121.5 + ], + [ + "cabinet", + 472.0 + ], + [ + "chair", + 677.5 + ] + ] + } + }, + "scannet_1094": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_1095": { + "classification": "consistent", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "cabinet", + "gt_center_y": 807.5, + "other_avg_y": 521.6666666666666, + "y_diff": 285.83333333333337, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "bathtub", + 817.0 + ], + [ + "window", + 142.5 + ], + [ + "toilet", + 605.5 + ], + [ + "cabinet", + 807.5 + ] + ] + } + }, + "scannet_1096": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_1097": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_1098": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_1099": { + "classification": "consistent", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "curtain", + "gt_center_y": 297.5, + "other_avg_y": 541.1666666666666, + "y_diff": -243.66666666666663, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "refridgerator", + 466.0 + ], + [ + "bed", + 780.0 + ], + [ + "desk", + 377.5 + ], + [ + "curtain", + 297.5 + ] + ] + } + }, + "scannet_1100": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_1101": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_1102": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_1103": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_1104": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_1105": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_1106": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_1107": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_1108": { + "classification": "counter", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "towel", + "gt_center_y": 434.5, + "other_avg_y": 578.75, + "y_diff": -144.25, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "towel", + 434.5 + ], + [ + "toilet", + 739.0 + ], + [ + "sink", + 418.5 + ] + ] + } + }, + "scannet_1109": { + "classification": "consistent", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "shower curtain", + "gt_center_y": 199.0, + "other_avg_y": 492.0, + "y_diff": -293.0, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "table", + 690.0 + ], + [ + "bathtub", + 432.0 + ], + [ + "shower curtain", + 199.0 + ], + [ + "toilet", + 354.0 + ] + ] + } + }, + "scannet_1110": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_1111": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_1112": { + "classification": "counter", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "window", + "gt_center_y": 169.0, + "other_avg_y": 347.0, + "y_diff": -178.0, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "chair", + 590.5 + ], + [ + "shelves", + 127.0 + ], + [ + "window", + 169.0 + ], + [ + "pillow", + 323.5 + ] + ] + } + }, + "scannet_1113": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_1114": { + "classification": "consistent", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "dresser", + "gt_center_y": 658.5, + "other_avg_y": 732.6666666666666, + "y_diff": -74.16666666666663, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "picture", + 420.5 + ], + [ + "bed", + 886.0 + ], + [ + "box", + 891.5 + ], + [ + "dresser", + 658.5 + ] + ] + } + }, + "scannet_1115": { + "classification": "consistent", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "shower curtain", + "gt_center_y": 136.0, + "other_avg_y": 341.0, + "y_diff": -205.0, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "shower curtain", + 136.0 + ], + [ + "toilet", + 244.0 + ], + [ + "bathtub", + 234.5 + ], + [ + "table", + 544.5 + ] + ] + } + }, + "scannet_1116": { + "classification": "counter", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "box", + "gt_center_y": 58.0, + "other_avg_y": 508.25, + "y_diff": -450.25, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "table", + 254.5 + ], + [ + "box", + 58.0 + ], + [ + "sofa", + 762.0 + ] + ] + } + }, + "scannet_1117": { + "classification": "consistent", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "window", + "gt_center_y": 296.5, + "other_avg_y": 708.5, + "y_diff": -412.0, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "cabinet", + 625.0 + ], + [ + "bed", + 863.5 + ], + [ + "window", + 296.5 + ], + [ + "sofa", + 637.0 + ] + ] + } + }, + "scannet_1118": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_1119": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_1120": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_1121": { + "classification": "counter", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "window", + "gt_center_y": 129.5, + "other_avg_y": 358.3333333333333, + "y_diff": -228.83333333333331, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "curtain", + 168.5 + ], + [ + "bag", + 509.0 + ], + [ + "window", + 129.5 + ], + [ + "towel", + 397.5 + ] + ] + } + }, + "scannet_1122": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_1123": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_1124": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_1125": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_1126": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_1127": { + "classification": "consistent", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "shelves", + "gt_center_y": 516.0, + "other_avg_y": 259.5, + "y_diff": 256.5, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "chair", + 316.0 + ], + [ + "shelves", + 516.0 + ], + [ + "window", + 108.5 + ], + [ + "table", + 354.0 + ] + ] + } + }, + "scannet_1128": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_1129": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_1130": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_1131": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_1132": { + "classification": "counter", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "toilet", + "gt_center_y": 727.5, + "other_avg_y": 673.0, + "y_diff": 54.5, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "bathtub", + 794.5 + ], + [ + "cabinet", + 689.5 + ], + [ + "toilet", + 727.5 + ], + [ + "sink", + 535.0 + ] + ] + } + }, + "scannet_1133": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_1134": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_1135": { + "classification": "consistent", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "bed", + "gt_center_y": 663.0, + "other_avg_y": 348.8333333333333, + "y_diff": 314.1666666666667, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "window", + 150.5 + ], + [ + "shelves", + 183.5 + ], + [ + "chair", + 712.5 + ], + [ + "bed", + 663.0 + ] + ] + } + }, + "scannet_1136": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_1137": { + "classification": "consistent", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "bookshelf", + "gt_center_y": 232.0, + "other_avg_y": 124.25, + "y_diff": 107.75, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "desk", + 73.5 + ], + [ + "chair", + 175.0 + ], + [ + "bookshelf", + 232.0 + ] + ] + } + }, + "scannet_1138": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_1139": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_1140": { + "classification": "consistent", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "shelves", + "gt_center_y": 243.5, + "other_avg_y": 763.8333333333334, + "y_diff": -520.3333333333334, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "bed", + 796.5 + ], + [ + "chair", + 813.0 + ], + [ + "shelves", + 243.5 + ], + [ + "table", + 682.0 + ] + ] + } + }, + "scannet_1141": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_1142": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_1143": { + "classification": "consistent", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "chair", + "gt_center_y": 785.5, + "other_avg_y": 414.0, + "y_diff": 371.5, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "window", + 153.5 + ], + [ + "cabinet", + 639.5 + ], + [ + "chair", + 785.5 + ], + [ + "desk", + 449.0 + ] + ] + } + }, + "scannet_1144": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_1145": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_1146": { + "classification": "consistent", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "picture", + "gt_center_y": 537.0, + "other_avg_y": 706.8333333333334, + "y_diff": -169.83333333333337, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "picture", + 537.0 + ], + [ + "cabinet", + 776.5 + ], + [ + "television", + 477.0 + ], + [ + "dresser", + 867.0 + ] + ] + } + }, + "scannet_1147": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_1148": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_1149": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_1150": { + "classification": "consistent", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "window", + "gt_center_y": 471.5, + "other_avg_y": 539.8333333333334, + "y_diff": -68.33333333333337, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "clothes", + 724.0 + ], + [ + "curtain", + 261.5 + ], + [ + "shelves", + 634.0 + ], + [ + "window", + 471.5 + ] + ] + } + }, + "scannet_1151": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_1152": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_1153": { + "classification": "counter", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "toilet", + "gt_center_y": 691.5, + "other_avg_y": 580.1666666666666, + "y_diff": 111.33333333333337, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "toilet", + 691.5 + ], + [ + "sink", + 798.0 + ], + [ + "mirror", + 160.0 + ], + [ + "towel", + 782.5 + ] + ] + } + }, + "scannet_1154": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_1155": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_1156": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_1157": { + "classification": "consistent", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "cabinet", + "gt_center_y": 635.0, + "other_avg_y": 327.5, + "y_diff": 307.5, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "cabinet", + 635.0 + ], + [ + "chair", + 466.0 + ], + [ + "shelves", + 189.0 + ] + ] + } + }, + "scannet_1158": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_1159": { + "classification": "consistent", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "table", + "gt_center_y": 690.0, + "other_avg_y": 328.3333333333333, + "y_diff": 361.6666666666667, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "toilet", + 354.0 + ], + [ + "shower curtain", + 199.0 + ], + [ + "table", + 690.0 + ], + [ + "bathtub", + 432.0 + ] + ] + } + }, + "scannet_1160": { + "classification": "consistent", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "window", + "gt_center_y": 208.0, + "other_avg_y": 367.6666666666667, + "y_diff": -159.66666666666669, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "cabinet", + 737.5 + ], + [ + "window", + 208.0 + ], + [ + "picture", + 159.0 + ], + [ + "mirror", + 206.5 + ] + ] + } + }, + "scannet_1161": { + "classification": "consistent", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "pillow", + "gt_center_y": 219.5, + "other_avg_y": 153.83333333333334, + "y_diff": 65.66666666666666, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "blinds", + 157.0 + ], + [ + "night stand", + 102.0 + ], + [ + "pillow", + 219.5 + ], + [ + "window", + 202.5 + ] + ] + } + }, + "scannet_1162": { + "classification": "consistent", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "chair", + "gt_center_y": 534.5, + "other_avg_y": 251.5, + "y_diff": 283.0, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "box", + 305.0 + ], + [ + "blinds", + 96.0 + ], + [ + "cabinet", + 353.5 + ], + [ + "chair", + 534.5 + ] + ] + } + }, + "scannet_1163": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_1164": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_1165": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_1166": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_1167": { + "classification": "ambiguous", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "bed", + "gt_center_y": 702.5, + "other_avg_y": 710.3333333333334, + "y_diff": -7.833333333333371, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "picture", + 526.0 + ], + [ + "chair", + 864.0 + ], + [ + "desk", + 741.0 + ], + [ + "bed", + 702.5 + ] + ] + } + }, + "scannet_1168": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_1169": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_1170": { + "classification": "consistent", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "window", + "gt_center_y": 145.0, + "other_avg_y": 598.0, + "y_diff": -453.0, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "table", + 712.5 + ], + [ + "chair", + 878.0 + ], + [ + "television", + 203.5 + ], + [ + "window", + 145.0 + ] + ] + } + }, + "scannet_1171": { + "classification": "consistent", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "curtain", + "gt_center_y": 178.5, + "other_avg_y": 324.0, + "y_diff": -145.5, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "curtain", + 178.5 + ], + [ + "desk", + 270.5 + ], + [ + "chair", + 377.5 + ] + ] + } + }, + "scannet_1172": { + "classification": "consistent", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "window", + "gt_center_y": 491.0, + "other_avg_y": 549.3333333333334, + "y_diff": -58.33333333333337, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "table", + 751.5 + ], + [ + "chair", + 752.5 + ], + [ + "picture", + 144.0 + ], + [ + "window", + 491.0 + ] + ] + } + }, + "scannet_1173": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_1174": { + "classification": "consistent", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "window", + "gt_center_y": 157.5, + "other_avg_y": 428.8333333333333, + "y_diff": -271.3333333333333, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "curtain", + 203.5 + ], + [ + "pillow", + 391.5 + ], + [ + "bed", + 691.5 + ], + [ + "window", + 157.5 + ] + ] + } + }, + "scannet_1175": { + "classification": "counter", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "shelves", + "gt_center_y": 367.0, + "other_avg_y": 712.5, + "y_diff": -345.5, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "shelves", + 367.0 + ], + [ + "paper", + 676.0 + ], + [ + "chair", + 885.0 + ], + [ + "bag", + 576.5 + ] + ] + } + }, + "scannet_1176": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_1177": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_1178": { + "classification": "consistent", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "shelves", + "gt_center_y": 140.0, + "other_avg_y": 551.0, + "y_diff": -411.0, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "shelves", + 140.0 + ], + [ + "dresser", + 716.0 + ], + [ + "clothes", + 279.5 + ], + [ + "sofa", + 657.5 + ] + ] + } + }, + "scannet_1179": { + "classification": "consistent", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "chair", + "gt_center_y": 785.5, + "other_avg_y": 414.0, + "y_diff": 371.5, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "desk", + 449.0 + ], + [ + "cabinet", + 639.5 + ], + [ + "chair", + 785.5 + ], + [ + "window", + 153.5 + ] + ] + } + }, + "scannet_1180": { + "classification": "consistent", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "refridgerator", + "gt_center_y": 195.5, + "other_avg_y": 286.8333333333333, + "y_diff": -91.33333333333331, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "towel", + 280.0 + ], + [ + "refridgerator", + 195.5 + ], + [ + "table", + 274.0 + ], + [ + "bathtub", + 306.5 + ] + ] + } + }, + "scannet_1181": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_1182": { + "classification": "consistent", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "dresser", + "gt_center_y": 777.0, + "other_avg_y": 498.1666666666667, + "y_diff": 278.8333333333333, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "mirror", + 308.0 + ], + [ + "lamp", + 523.0 + ], + [ + "dresser", + 777.0 + ], + [ + "night stand", + 663.5 + ] + ] + } + }, + "scannet_1183": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_1184": { + "classification": "consistent", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "cabinet", + "gt_center_y": 217.5, + "other_avg_y": 435.5, + "y_diff": -218.0, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "cabinet", + 217.5 + ], + [ + "toilet", + 377.0 + ], + [ + "bathtub", + 494.0 + ] + ] + } + }, + "scannet_1185": { + "classification": "consistent", + "relation": "far", + "data_source": "scannet", + "details": { + "gt_object": "curtain", + "gt_center_y": 126.0, + "other_avg_y": 639.6666666666666, + "y_diff": -513.6666666666666, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "cabinet", + 694.5 + ], + [ + "curtain", + 126.0 + ], + [ + "picture", + 414.0 + ], + [ + "towel", + 810.5 + ] + ] + } + }, + "scannet_1186": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_1187": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_1188": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_1189": { + "classification": "not_applicable", + "relation": "under" + }, + "scannet_1190": { + "classification": "consistent", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "dresser", + "gt_center_y": 712.5, + "other_avg_y": 151.0, + "y_diff": 561.5, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "dresser", + 712.5 + ], + [ + "curtain", + 78.0 + ], + [ + "shelves", + 224.0 + ] + ] + } + }, + "scannet_1191": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_1192": { + "classification": "not_applicable", + "relation": "right" + }, + "scannet_1193": { + "classification": "consistent", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "desk", + "gt_center_y": 416.5, + "other_avg_y": 138.83333333333334, + "y_diff": 277.66666666666663, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "desk", + 416.5 + ], + [ + "bookshelf", + 168.0 + ], + [ + "whiteboard", + 77.5 + ], + [ + "window", + 171.0 + ] + ] + } + }, + "scannet_1194": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_1195": { + "classification": "counter", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "mirror", + "gt_center_y": 277.5, + "other_avg_y": 380.3333333333333, + "y_diff": -102.83333333333331, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "mirror", + 277.5 + ], + [ + "window", + 240.0 + ], + [ + "toilet", + 744.5 + ], + [ + "picture", + 156.5 + ] + ] + } + }, + "scannet_1196": { + "classification": "not_applicable", + "relation": "above" + }, + "scannet_1197": { + "classification": "consistent", + "relation": "close", + "data_source": "scannet", + "details": { + "gt_object": "toilet", + "gt_center_y": 543.5, + "other_avg_y": 461.25, + "y_diff": 82.25, + "threshold": 48.400000000000006, + "all_objects": [ + [ + "cabinet", + 340.5 + ], + [ + "bathtub", + 582.0 + ], + [ + "toilet", + 543.5 + ] + ] + } + }, + "scannet_1198": { + "classification": "not_applicable", + "relation": "left" + }, + "scannet_1199": { + "classification": "not_applicable", + "relation": "under" + } +} \ No newline at end of file diff --git a/exp2a_embedding_analysis.py b/exp2a_embedding_analysis.py new file mode 100644 index 0000000000000000000000000000000000000000..eb015f5f0b13f6b74c3389a39eb16bdb01848181 --- /dev/null +++ b/exp2a_embedding_analysis.py @@ -0,0 +1,927 @@ +""" +Experiment 2-A: Image-conditioned Representation Analysis + +Goal: Verify Hypothesis 4 - that above/far and below/close are mapped to similar +positions in embedding space, while left/right are well-separated. + +Method: +1. Load EmbSpatialBench data grouped by spatial relation category +2. Extract hidden states from VLM (Vanilla vs. Scaled) for each sample +3. Compute average representation per category +4. Calculate cosine similarity between category pairs +5. Compare: Vanilla model (expected confusion) vs. Scaled model (expected separation) + +Expected Results: +- Vanilla: sim(above, far) > sim(left, right) and sim(below, close) > sim(left, right) +- Scaled: The gap should decrease, indicating better separation + +Supported Models: +- Molmo (native olmo checkpoint format) +- NVILA (llava.load format) +- Qwen2.5-VL (HuggingFace transformers format) +""" + +import os +import sys +import json +import argparse +import base64 +import logging +from io import BytesIO +from collections import defaultdict +from typing import Dict, List, Tuple, Optional, Any +from abc import ABC, abstractmethod + +import torch +import numpy as np +import pandas as pd +from PIL import Image +from tqdm import tqdm +import matplotlib.pyplot as plt +import seaborn as sns +from sklearn.metrics.pairwise import cosine_similarity + +# Setup logging +logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s') +logger = logging.getLogger(__name__) + + +# ============================================================================ +# Data Loading +# ============================================================================ + +def load_embspatial_data(tsv_path: str, samples_per_category: int = 50) -> Dict[str, List[dict]]: + """ + Load EmbSpatialBench data grouped by spatial relation category. + + Args: + tsv_path: Path to EmbSpatialBench TSV file + samples_per_category: Number of samples to use per category + + Returns: + Dictionary mapping category -> list of samples + """ + df = pd.read_csv(tsv_path, sep='\t') + + # Group by category + grouped_data = defaultdict(list) + + for _, row in df.iterrows(): + category = row['category'] + sample = { + 'index': row['index'], + 'image_base64': row['image'], + 'question': row['question'], + 'answer': row['answer'], + 'category': category, + 'options': { + 'A': row['A'], + 'B': row['B'], + 'C': row['C'], + 'D': row['D'] + } + } + grouped_data[category].append(sample) + + # Limit samples per category + for category in grouped_data: + if len(grouped_data[category]) > samples_per_category: + # Random sample + indices = np.random.choice( + len(grouped_data[category]), + samples_per_category, + replace=False + ) + grouped_data[category] = [grouped_data[category][i] for i in indices] + + logger.info(f"Loaded EmbSpatialBench data:") + for cat, samples in grouped_data.items(): + logger.info(f" {cat}: {len(samples)} samples") + + return dict(grouped_data) + + +def decode_base64_image(base64_str: str) -> Image.Image: + """Decode base64 string to PIL Image.""" + image_data = base64.b64decode(base64_str) + return Image.open(BytesIO(image_data)).convert('RGB') + + +# ============================================================================ +# Base Extractor Class +# ============================================================================ + +class BaseHiddenStateExtractor(ABC): + """Abstract base class for hidden state extraction.""" + + def __init__( + self, + model_path: str, + device: str = 'cuda', + target_layers: Optional[List[int]] = None + ): + self.model_path = model_path + self.device = device + self.hidden_states = {} + self.hooks = [] + + logger.info(f"Loading model from {model_path}...") + self._load_model() + + # Determine target layers + num_layers = self._get_num_layers() + if target_layers is None: + # Default: use middle layer + self.target_layers = [num_layers // 2] + else: + self.target_layers = target_layers + + logger.info(f"Model has {num_layers} layers. Target layers: {self.target_layers}") + self._register_hooks() + + @abstractmethod + def _load_model(self): + """Load the model. To be implemented by subclasses.""" + pass + + @abstractmethod + def _get_num_layers(self) -> int: + """Get number of transformer layers.""" + pass + + @abstractmethod + def _get_layer_module(self, layer_idx: int): + """Get the module for a specific layer.""" + pass + + @abstractmethod + def extract(self, image: Image.Image, question: str) -> Dict[int, torch.Tensor]: + """Extract hidden states for a single sample.""" + pass + + def _register_hooks(self): + """Register forward hooks to capture hidden states.""" + def make_hook(layer_idx): + def hook(module, input, output): + # Handle different output types + if isinstance(output, tuple): + hidden = output[0] + else: + hidden = output + + # Pool over sequence dimension (take last token) + if hidden.dim() == 3: + pooled = hidden[:, -1, :].detach().cpu().float() + else: + pooled = hidden.detach().cpu().float() + + self.hidden_states[layer_idx] = pooled + logger.debug(f" Captured layer {layer_idx}: shape={pooled.shape}") + return hook + + hooks_registered = 0 + for layer_idx in self.target_layers: + try: + module = self._get_layer_module(layer_idx) + if module is not None: + hook = module.register_forward_hook(make_hook(layer_idx)) + self.hooks.append(hook) + hooks_registered += 1 + logger.info(f" ✓ Registered hook on layer {layer_idx}") + else: + logger.warning(f" ✗ Layer {layer_idx} returned None") + except Exception as e: + logger.warning(f" ✗ Failed to register hook on layer {layer_idx}: {e}") + + if hooks_registered == 0: + raise ValueError(f"Failed to register any hooks! Target layers: {self.target_layers}") + + logger.info(f"Successfully registered {hooks_registered}/{len(self.target_layers)} hooks") + + def cleanup(self): + """Remove hooks and free memory.""" + for hook in self.hooks: + hook.remove() + self.hooks = [] + + if hasattr(self, 'model'): + del self.model + if hasattr(self, 'processor'): + del self.processor + torch.cuda.empty_cache() + + +# ============================================================================ +# Molmo Extractor (Native olmo format) +# ============================================================================ + +class MolmoExtractor(BaseHiddenStateExtractor): + """Hidden state extractor for Molmo models (native olmo format).""" + + def _load_model(self): + """Load Molmo model using native olmo library.""" + # Check for native checkpoint format + config_path = os.path.join(self.model_path, "config.yaml") + checkpoint_path = os.path.join(self.model_path, "model.pt") + + if os.path.exists(config_path) and os.path.exists(checkpoint_path): + self._load_native_model() + self.is_native = True + else: + self._load_hf_model() + self.is_native = False + + def _load_native_model(self): + """Load native olmo checkpoint.""" + from olmo.config import ModelConfig + from olmo.model import Molmo as NativeMolmoModel + from olmo.data.model_preprocessor import MultiModalPreprocessor + from olmo.data.data_formatter import DataFormatter + + # Prevent PyTorch UnpicklingError + _original_load = torch.load + def _unsafe_load_wrapper(*args, **kwargs): + if 'weights_only' not in kwargs: + kwargs['weights_only'] = False + return _original_load(*args, **kwargs) + torch.load = _unsafe_load_wrapper + + config_path = os.path.join(self.model_path, "config.yaml") + checkpoint_path = os.path.join(self.model_path, "model.pt") + + cfg = ModelConfig.load(config_path, key="model", validate_paths=False) + cfg.init_device = "cpu" + + self.model = NativeMolmoModel(cfg) + state_dict = torch.load(checkpoint_path, map_location="cpu") + self.model.load_state_dict(state_dict) + + self.model = self.model.to(self.device, dtype=torch.bfloat16).eval() + + self.tokenizer = cfg.get_tokenizer() + v_cfg = cfg.vision_backbone + h, w = cfg.llm_patches_per_crop() + + image_padding_mask = 2 if cfg.fix_image_padding else (1 if cfg.image_padding_embed else None) + + class SafeDataFormatter(DataFormatter): + def get_system_prompt(self, style, for_inference, messages, rng=None): + if style is None: + style = "User" + return super().get_system_prompt(style, for_inference, messages, rng) + + self.formatter = SafeDataFormatter( + prompt_templates=cfg.prompt_type, + message_format=cfg.message_formatting, + system_prompt=cfg.system_prompt_kind, + always_start_with_space=cfg.always_start_with_space, + default_inference_len=cfg.default_inference_len + ) + + self.preprocessor = MultiModalPreprocessor( + tokenizer=self.tokenizer, + normalize=str(v_cfg.image_model_type), + crop_mode=cfg.crop_mode, + max_crops=cfg.max_crops, + overlap_margins=cfg.overlap_margins, + resize=v_cfg.resize_mode, + use_col_tokens=cfg.use_col_tokens, + base_image_input_size=v_cfg.image_default_input_size, + image_pooling_w=cfg.image_pooling_w, + image_pooling_h=cfg.image_pooling_h, + image_token_length_w=w, + image_token_length_h=h, + image_patch_size=v_cfg.image_patch_size, + image_padding_mask=image_padding_mask, + pad_value=cfg.pad_value, + loss_token_weighting=cfg.multi_annotation_weighting, + ) + + logger.info(f"Loaded native Molmo model from {self.model_path}") + + def _load_hf_model(self): + """Load HuggingFace format model.""" + from transformers import AutoModelForCausalLM, AutoProcessor + + self.model = AutoModelForCausalLM.from_pretrained( + self.model_path, + torch_dtype=torch.bfloat16, + trust_remote_code=True, + device_map=self.device + ) + self.model.eval() + + self.processor = AutoProcessor.from_pretrained( + self.model_path, + trust_remote_code=True + ) + logger.info(f"Loaded HuggingFace Molmo model from {self.model_path}") + + def _get_num_layers(self) -> int: + """Get number of transformer layers.""" + if self.is_native: + return len(self.model.transformer.blocks) + else: + if hasattr(self.model, 'model') and hasattr(self.model.model, 'transformer'): + return len(self.model.model.transformer.blocks) + return 32 # Default fallback + + def _get_layer_module(self, layer_idx: int): + """Get the module for a specific layer.""" + if self.is_native: + return self.model.transformer.blocks[layer_idx] + else: + return self.model.model.transformer.blocks[layer_idx] + + def extract(self, image: Image.Image, question: str) -> Dict[int, torch.Tensor]: + """Extract hidden states for a single sample.""" + self.hidden_states = {} + + if self.is_native: + example = {"messages": [question], "image": image} + messages, _ = self.formatter(example, is_training=False, for_inference=True, rng=np.random) + image_np = np.array(image) + batch = self.preprocessor(image_np, messages, is_training=False, require_image_features=True) + + if 'input_ids' not in batch and 'input_tokens' in batch: + batch['input_ids'] = batch['input_tokens'] + + def to_tensor(x): + if isinstance(x, np.ndarray): + return torch.from_numpy(x) + return x + + input_ids = to_tensor(batch['input_ids']).unsqueeze(0).to(self.device) + if input_ids.dtype not in [torch.long, torch.int64]: + input_ids = input_ids.long() + + images_tensor = to_tensor(batch['images']).unsqueeze(0).to(self.device).to(dtype=torch.bfloat16) + image_masks = to_tensor(batch['image_masks']).unsqueeze(0).to(self.device).to(dtype=torch.bfloat16) + image_input_idx = to_tensor(batch['image_input_idx']).unsqueeze(0).to(self.device) + + with torch.inference_mode(): + with torch.autocast(device_type="cuda", enabled=True, dtype=torch.bfloat16): + # Just do forward pass to trigger hooks + _ = self.model( + input_ids=input_ids, + images=images_tensor, + image_masks=image_masks, + image_input_idx=image_input_idx, + ) + else: + inputs = self.processor.process(images=[image], text=question) + # Cast float tensors to bfloat16 to match model dtype + processed_inputs = {} + for k, v in inputs.items(): + v = v.to(self.device).unsqueeze(0) + if v.dtype == torch.float32: + v = v.to(dtype=torch.bfloat16) + processed_inputs[k] = v + + with torch.no_grad(): + _ = self.model(**processed_inputs) + + return self.hidden_states.copy() + + +# ============================================================================ +# NVILA Extractor +# ============================================================================ + +class NVILAExtractor(BaseHiddenStateExtractor): + """Hidden state extractor for NVILA models.""" + + def _load_model(self): + """Load NVILA model using llava.load.""" + # Handle import conflicts + original_sys_path = sys.path.copy() + sys.path = [p for p in sys.path if 'RoboRefer' not in p] + + modules_to_remove = [key for key in list(sys.modules.keys()) if 'llava' in key.lower()] + removed_modules = {} + for mod in modules_to_remove: + removed_modules[mod] = sys.modules.pop(mod) + + try: + import llava + from llava.media import Image as LLaVAImage + from llava import conversation as clib + except Exception as err: + sys.path = original_sys_path + for mod, module in removed_modules.items(): + sys.modules[mod] = module + raise RuntimeError(f"Failed to import llava: {err}") + + sys.path = original_sys_path + + self.LLaVAImage = LLaVAImage + self.clib = clib + + self.model = llava.load(self.model_path, model_base=None) + + # Get the underlying model for hook registration + # NVILA wraps the model, need to find the LLM backbone + self._find_llm_backbone() + + logger.info(f"Loaded NVILA model from {self.model_path}") + + def _find_llm_backbone(self): + """Find the LLM backbone module for hook registration.""" + # NVILA structure: Try multiple paths + candidates = [] + + # Path 1: model.llm.model.layers + if hasattr(self.model, 'llm'): + if hasattr(self.model.llm, 'model') and hasattr(self.model.llm.model, 'layers'): + candidates.append(('model.llm.model.layers', self.model.llm.model.layers)) + if hasattr(self.model.llm, 'layers'): + candidates.append(('model.llm.layers', self.model.llm.layers)) + + # Path 2: model.model.model.layers + if hasattr(self.model, 'model'): + if hasattr(self.model.model, 'model') and hasattr(self.model.model.model, 'layers'): + candidates.append(('model.model.model.layers', self.model.model.model.layers)) + if hasattr(self.model.model, 'layers'): + candidates.append(('model.model.layers', self.model.model.layers)) + + # Path 3: Search all named_modules + for name, module in self.model.named_modules(): + if name.endswith('.layers') and hasattr(module, '__len__') and len(module) > 0: + candidates.append((name, module)) + + if candidates: + # Use the first valid candidate + path, layers = candidates[0] + logger.info(f"Found LLM layers at: {path} (num_layers={len(layers)})") + self.llm_backbone = layers + self.layers_path = path + else: + logger.error("Could not find transformer layers in model!") + logger.info("Available modules:") + for name, _ in list(self.model.named_modules())[:20]: + logger.info(f" {name}") + raise ValueError("Could not locate transformer layers in NVILA model") + + def _get_num_layers(self) -> int: + """Get number of transformer layers.""" + if hasattr(self, 'llm_backbone') and hasattr(self.llm_backbone, '__len__'): + return len(self.llm_backbone) + return 24 # Default for NVILA-Lite-2B + + def _get_layer_module(self, layer_idx: int): + """Get the module for a specific layer.""" + if hasattr(self, 'llm_backbone') and hasattr(self.llm_backbone, '__getitem__'): + module = self.llm_backbone[layer_idx] + logger.info(f" Accessing layer {layer_idx}: {type(module).__name__}") + return module + + logger.error(f"Cannot access layer {layer_idx} - llm_backbone not properly initialized") + return None + + def extract(self, image: Image.Image, question: str) -> Dict[int, torch.Tensor]: + """Extract hidden states for a single sample.""" + self.hidden_states = {} + + # Save image to temp file for NVILA + import tempfile + with tempfile.NamedTemporaryFile(suffix='.png', delete=False) as f: + temp_path = f.name + image.save(temp_path) + + try: + prompt = [self.LLaVAImage(temp_path), question] + + # Forward pass through generate to trigger hooks + from transformers import GenerationConfig + gen_config = GenerationConfig(max_new_tokens=1, do_sample=False) + _ = self.model.generate_content(prompt, generation_config=gen_config) + finally: + os.unlink(temp_path) + + return self.hidden_states.copy() + + +# ============================================================================ +# Qwen2.5-VL Extractor +# ============================================================================ + +class Qwen25VLExtractor(BaseHiddenStateExtractor): + """Hidden state extractor for Qwen2.5-VL models.""" + + # Base model for loading processor (has chat_template) + BASE_MODEL = "Qwen/Qwen2.5-VL-3B-Instruct" + + def _load_model(self): + """Load Qwen2.5-VL model.""" + from transformers import Qwen2_5_VLForConditionalGeneration, AutoProcessor + + # Try with device_map first, fall back to manual .to() if accelerate not available + try: + self.model = Qwen2_5_VLForConditionalGeneration.from_pretrained( + self.model_path, + torch_dtype=torch.bfloat16, + device_map=self.device + ) + except ImportError: + logger.info("accelerate not available, loading model without device_map...") + self.model = Qwen2_5_VLForConditionalGeneration.from_pretrained( + self.model_path, + torch_dtype=torch.bfloat16, + ) + self.model = self.model.to(self.device) + + self.model.eval() + + # For fine-tuned models (local paths), load processor from base model + # because fine-tuned checkpoints may not have chat_template + if self.model_path.startswith('/'): + logger.info(f"Fine-tuned model detected, loading processor from base model: {self.BASE_MODEL}") + self.processor = AutoProcessor.from_pretrained(self.BASE_MODEL) + else: + self.processor = AutoProcessor.from_pretrained(self.model_path) + logger.info(f"Loaded Qwen2.5-VL model from {self.model_path}") + + def _get_num_layers(self) -> int: + """Get number of transformer layers.""" + return len(self.model.model.layers) + + def _get_layer_module(self, layer_idx: int): + """Get the module for a specific layer.""" + return self.model.model.layers[layer_idx] + + def extract(self, image: Image.Image, question: str) -> Dict[int, torch.Tensor]: + """Extract hidden states for a single sample.""" + self.hidden_states = {} + + # Build message format + messages = [ + { + "role": "user", + "content": [ + {"type": "image", "image": image}, + {"type": "text", "text": question} + ] + } + ] + + # Process input + text = self.processor.apply_chat_template( + messages, tokenize=False, add_generation_prompt=True + ) + + # Process image + from qwen_vl_utils import process_vision_info + image_inputs, video_inputs = process_vision_info(messages) + + inputs = self.processor( + text=[text], + images=image_inputs, + videos=video_inputs, + padding=True, + return_tensors="pt" + ) + inputs = inputs.to(self.device) + + with torch.no_grad(): + _ = self.model(**inputs) + + return self.hidden_states.copy() + + +# ============================================================================ +# Factory Function +# ============================================================================ + +def get_extractor(model_type: str, model_path: str, **kwargs) -> BaseHiddenStateExtractor: + """Factory function to create the appropriate extractor.""" + extractors = { + 'molmo': MolmoExtractor, + 'nvila': NVILAExtractor, + 'qwen': Qwen25VLExtractor, + } + + if model_type not in extractors: + raise ValueError(f"Unknown model type: {model_type}. Available: {list(extractors.keys())}") + + return extractors[model_type](model_path, **kwargs) + + +# ============================================================================ +# Analysis Functions +# ============================================================================ + +def extract_category_representations( + extractor: BaseHiddenStateExtractor, + data: Dict[str, List[dict]], + layer_idx: int +) -> Dict[str, np.ndarray]: + """ + Extract average hidden state representation per category. + """ + category_states = defaultdict(list) + + for category, samples in data.items(): + logger.info(f"Processing category: {category}") + success_count = 0 + for sample in tqdm(samples, desc=f" {category}"): + try: + image = decode_base64_image(sample['image_base64']) + hidden_states = extractor.extract(image, sample['question']) + + if layer_idx in hidden_states: + state = hidden_states[layer_idx].numpy().flatten() + if state.size > 0: # Check if state is not empty + category_states[category].append(state) + success_count += 1 + else: + logger.warning(f" Layer {layer_idx} not in hidden_states. Available: {list(hidden_states.keys())}") + except Exception as e: + logger.warning(f" Error processing sample {sample['index']}: {e}") + continue + + logger.info(f" {category}: Successfully extracted {success_count}/{len(samples)} samples") + + # Average per category + category_avg = {} + for category, states in category_states.items(): + if states: + category_avg[category] = np.mean(states, axis=0) + logger.info(f" {category}: {len(states)} samples, dim={category_avg[category].shape}") + else: + logger.error(f" {category}: No states collected!") + + if not category_avg: + raise ValueError("No representations were extracted! Check hook registration and model forward pass.") + + return category_avg + + +def compute_similarity_matrix( + representations: Dict[str, np.ndarray] +) -> pd.DataFrame: + """Compute pairwise cosine similarity between category representations.""" + categories = sorted(representations.keys()) + vectors = np.array([representations[cat] for cat in categories]) + sim_matrix = cosine_similarity(vectors) + return pd.DataFrame(sim_matrix, index=categories, columns=categories) + + +def analyze_hypothesis(sim_df: pd.DataFrame, model_name: str) -> dict: + """Analyze the similarity matrix to test Hypothesis 4.""" + results = {'model': model_name} + + pairs_to_check = { + 'above_far': ('above', 'far'), + 'under_close': ('under', 'close'), + 'left_right': ('left', 'right'), + } + + for pair_name, (cat1, cat2) in pairs_to_check.items(): + if cat1 in sim_df.index and cat2 in sim_df.columns: + sim = sim_df.loc[cat1, cat2] + results[f'sim_{pair_name}'] = sim + logger.info(f" {pair_name}: sim({cat1}, {cat2}) = {sim:.4f}") + else: + logger.warning(f" {cat1} or {cat2} not found in similarity matrix") + results[f'sim_{pair_name}'] = None + + # Calculate differences + if results.get('sim_above_far') and results.get('sim_left_right'): + results['diff_above_far_vs_left_right'] = results['sim_above_far'] - results['sim_left_right'] + + if results.get('sim_under_close') and results.get('sim_left_right'): + results['diff_under_close_vs_left_right'] = results['sim_under_close'] - results['sim_left_right'] + + return results + + +# ============================================================================ +# Visualization +# ============================================================================ + +def plot_similarity_heatmap(sim_df: pd.DataFrame, title: str, save_path: str): + """Plot and save similarity heatmap.""" + plt.figure(figsize=(10, 8)) + + category_order = ['left', 'right', 'above', 'far', 'under', 'close'] + available_order = [c for c in category_order if c in sim_df.index] + sim_df_ordered = sim_df.loc[available_order, available_order] + + sns.heatmap( + sim_df_ordered, + annot=True, + fmt='.3f', + cmap='RdYlBu_r', + center=0.5, + vmin=0, + vmax=1, + square=True, + linewidths=0.5, + cbar_kws={'label': 'Cosine Similarity'} + ) + + plt.title(title, fontsize=14, fontweight='bold') + plt.tight_layout() + plt.savefig(save_path, dpi=300, bbox_inches='tight') + plt.close() + logger.info(f"Saved heatmap: {save_path}") + + +def plot_comparison(results_list: List[dict], save_path: str): + """Plot comparison of similarity pairs across models.""" + pairs = ['sim_above_far', 'sim_under_close', 'sim_left_right'] + pair_labels = ['above-far', 'under-close', 'left-right'] + + fig, ax = plt.subplots(figsize=(12, 6)) + + x = np.arange(len(pairs)) + width = 0.8 / len(results_list) + + for i, result in enumerate(results_list): + model = result['model'] + values = [result.get(p, 0) or 0 for p in pairs] + offset = (i - len(results_list) / 2 + 0.5) * width + bars = ax.bar(x + offset, values, width, label=model) + + for bar, val in zip(bars, values): + if val: + ax.annotate( + f'{val:.3f}', + xy=(bar.get_x() + bar.get_width() / 2, bar.get_height()), + xytext=(0, 3), + textcoords='offset points', + ha='center', + va='bottom', + fontsize=8 + ) + + ax.set_ylabel('Cosine Similarity') + ax.set_title('Spatial Concept Similarity Comparison\n(Hypothesis 4: above-far & under-close should be > left-right for vanilla)') + ax.set_xticks(x) + ax.set_xticklabels(pair_labels) + ax.legend(loc='upper right', fontsize=8) + ax.set_ylim(0, 1) + ax.axhline(y=0.5, color='gray', linestyle='--', alpha=0.5) + + plt.tight_layout() + plt.savefig(save_path, dpi=300, bbox_inches='tight') + plt.close() + logger.info(f"Saved comparison plot: {save_path}") + + +# ============================================================================ +# Model Configurations +# ============================================================================ + +MODEL_CONFIGS = { + 'molmo': { + 'vanilla': 'allenai/Molmo-7B-O-0924', + '80k': '/data/shared/Qwen/molmo/outputs/data_scale_exp_80k/unshared', + '400k': '/data/shared/Qwen/molmo/outputs/data_scale_exp_400k/unshared', + '800k': '/data/shared/Qwen/molmo/outputs/data_scale_exp_800k/unshared', + '2m': '/data/shared/Qwen/molmo/outputs/data_scale_exp_2m/unshared', + }, + 'nvila': { + 'vanilla': '/data/shared/Qwen/mydisk/NVILA-Lite-2B', + '80k': '/data/shared/Qwen/mydisk/output/DATA/NVILA-Lite-2B-DATA_SCALE_EXP_80K-20251108_180221', + '400k': '/data/shared/Qwen/mydisk/output/DATA/NVILA-Lite-2B-DATA_SCALE_EXP_400K-20251108_180221', + '800k': '/data/shared/Qwen/mydisk/output/DATA/NVILA-Lite-2B-DATA_SCALE_EXP_800K-20251108_180221', + '2m': '/data/shared/Qwen/mydisk/output/DATA/NVILA-Lite-2B-DATA_SCALE_EXP_2M-20260205_003632', + }, + 'qwen': { + 'vanilla': 'Qwen/Qwen2.5-VL-3B-Instruct', + '80k': '/data/shared/Qwen/mydisk/output/Qwen/Qwen2.5-VL-3B-Instruct-data_scale_exp_80k-20251114_120221', + '400k': '/data/shared/Qwen/mydisk/output/Qwen/Qwen2.5-VL-3B-Instruct-data_scale_exp_400k-20251114_120221', + '800k': '/data/shared/Qwen/mydisk/output/Qwen/Qwen2.5-VL-3B-Instruct-data_scale_exp_800k-20251114_120221', + '2m': '/data/shared/Qwen/mydisk/output/Qwen/Qwen2.5-VL-3B-Instruct-data_scale_exp_2m-20260109_120517', + }, +} + + +# ============================================================================ +# Main +# ============================================================================ + +def main(): + parser = argparse.ArgumentParser(description='Experiment 2-A: Embedding Space Analysis') + parser.add_argument('--data_path', type=str, + default='/data/shared/Qwen/EmbSpatial-Bench/EmbSpatial-Bench.tsv', + help='Path to EmbSpatialBench TSV file') + parser.add_argument('--model_type', type=str, required=True, + choices=['molmo', 'nvila', 'qwen'], + help='Model type to analyze') + parser.add_argument('--scales', type=str, nargs='+', + default=['vanilla', '80k', '400k', '800k', '2m'], + help='Model scales to analyze') + parser.add_argument('--output_dir', type=str, + default='/data/shared/Qwen/experiments/exp2a_results', + help='Output directory') + parser.add_argument('--samples_per_category', type=int, default=50, + help='Number of samples per category') + parser.add_argument('--layer_idx', type=int, default=None, + help='Layer index to analyze (default: middle layer)') + parser.add_argument('--device', type=str, default='cuda', + help='Device to use') + parser.add_argument('--seed', type=int, default=42, + help='Random seed') + + args = parser.parse_args() + + # Set random seed + np.random.seed(args.seed) + torch.manual_seed(args.seed) + + # Create output directory + output_dir = os.path.join(args.output_dir, args.model_type) + os.makedirs(output_dir, exist_ok=True) + + # Load data + logger.info("\n=== Loading EmbSpatialBench Data ===") + data = load_embspatial_data(args.data_path, args.samples_per_category) + + results_list = [] + model_configs = MODEL_CONFIGS[args.model_type] + + for scale in args.scales: + if scale not in model_configs: + logger.warning(f"Scale {scale} not available for {args.model_type}, skipping...") + continue + + model_path = model_configs[scale] + + # Check if path exists + if not os.path.exists(model_path) and not model_path.startswith('Qwen/') and not model_path.startswith('allenai/'): + logger.warning(f"Model path not found: {model_path}, skipping...") + continue + + logger.info(f"\n=== Processing {args.model_type} - {scale} ===") + logger.info(f"Model path: {model_path}") + + try: + # Determine target layers + target_layers = [args.layer_idx] if args.layer_idx is not None else None + + extractor = get_extractor( + args.model_type, + model_path, + device=args.device, + target_layers=target_layers + ) + + # Use actual layer index + layer_idx = extractor.target_layers[0] + + # Extract representations + reps = extract_category_representations(extractor, data, layer_idx) + sim_df = compute_similarity_matrix(reps) + + logger.info(f"\n--- {scale} Model Similarity Matrix ---") + logger.info(f"\n{sim_df.round(3)}") + + # Analyze and save + model_name = f"{args.model_type}_{scale}" + results = analyze_hypothesis(sim_df, model_name) + results_list.append(results) + + # Save heatmap + plot_similarity_heatmap( + sim_df, + f'Spatial Concept Similarity - {args.model_type.upper()} ({scale})', + os.path.join(output_dir, f'heatmap_{scale}.png') + ) + + # Save similarity matrix + sim_df.to_csv(os.path.join(output_dir, f'similarity_{scale}.csv')) + + # Cleanup + extractor.cleanup() + + except Exception as e: + logger.error(f"Failed to process {args.model_type} - {scale}: {e}") + import traceback + traceback.print_exc() + continue + + # Plot comparison + if len(results_list) > 1: + plot_comparison(results_list, os.path.join(output_dir, 'comparison.png')) + + # Save results summary + if results_list: + results_df = pd.DataFrame(results_list) + results_df.to_csv(os.path.join(output_dir, 'results_summary.csv'), index=False) + + logger.info("\n=== Analysis Complete ===") + logger.info(f"Results saved to: {output_dir}") + + # Print summary + logger.info("\n--- Summary ---") + for result in results_list: + logger.info(f"\n{result['model']}:") + for key, val in result.items(): + if key != 'model' and val is not None: + logger.info(f" {key}: {val:.4f}") + + +if __name__ == '__main__': + main() diff --git a/generate_analysis_plots.py b/generate_analysis_plots.py new file mode 100644 index 0000000000000000000000000000000000000000..92c9248dbd962a338602a6afeb8312b4a73df0e0 --- /dev/null +++ b/generate_analysis_plots.py @@ -0,0 +1,352 @@ +import os +import argparse +import pandas as pd +import numpy as np +import matplotlib.pyplot as plt +import seaborn as sns +from matplotlib.lines import Line2D +import warnings + +warnings.simplefilter("ignore", UserWarning) + +SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__)) +OUTPUT_DIR = os.path.join(SCRIPT_DIR, "summarize_metrics", "plots") + +COLORS = { + 'Molmo': '#1f77b4', + 'NVILA': '#ff7f0e', + 'NVILA-ST': '#cc5500', + 'Qwen': '#2ca02c', + 'RoboRefer':'#d62728', +} +SCALE_ORDER = ['vanilla', '80k', '400k', '800k', '2M'] +ST_SCALE_ORDER = ['80k', '400k', '800k'] + +CUSTOM_LINES = [ + Line2D([0], [0], marker='o', color='w', markerfacecolor=COLORS['Molmo'], markersize=10, label='Molmo'), + Line2D([0], [0], marker='o', color='w', markerfacecolor=COLORS['NVILA'], markersize=10, label='NVILA'), + Line2D([0], [0], marker='o', color='w', markerfacecolor=COLORS['NVILA-ST'], markeredgecolor='black', markersize=11, label='NVILA-ST'), + Line2D([0], [0], marker='o', color='w', markerfacecolor=COLORS['Qwen'], markersize=10, label='Qwen'), + Line2D([0], [0], marker='*', color='w', markerfacecolor=COLORS['RoboRefer'],markeredgecolor='black', markersize=18, label='RoboRefer'), +] + + +def load_and_preprocess(path: str) -> pd.DataFrame: + df = pd.read_csv(path) + + df.rename(columns={ + 'EmbSpatial (con)': 'EmbSpatial Acc (con)', + 'EmbSpatial (ctr)': 'EmbSpatial Acc (ctr)', + 'CVBench3D (con)': 'CVBench3D Acc (con)', + 'CVBench3D (ctr)': 'CVBench3D Acc (ctr)', + }, inplace=True) + + for col in ['EmbSpatial Acc (con)', 'EmbSpatial Acc (ctr)', + 'CVBench3D Acc (con)', 'CVBench3D Acc (ctr)']: + if col in df.columns: + df[col] = (df[col].astype(str) + .str.replace('%', '', regex=False) + .replace('N/A', np.nan) + .astype(float)) + + def get_base(name): + if 'Molmo' in name: return 'Molmo' + if 'NVILA-ST'in name: return 'NVILA-ST' + if 'NVILA' in name: return 'NVILA' + if 'Qwen3' in name: return 'Qwen3' + if 'Qwen' in name: return 'Qwen' + if 'RoboRefer'in name:return 'RoboRefer' + return 'Other' + + def get_scale(name): + for s in ['vanilla', '80k', '400k', '800k', '2M']: + if s in name: + return s + return 'Special' + + df['Base'] = df['Model'].apply(get_base) + df['Scale'] = df['Model'].apply(get_scale) + df = df[df['Base'] != 'Qwen3'] + return df + + +# ── helpers ────────────────────────────────────────────────────────────────── + +def _draw_2d_arrows(df_src, base_list, x_col, y_col): + """Draw annotate arrows for a 2-D figure.""" + for base in base_list: + order = ST_SCALE_ORDER if base == 'NVILA-ST' else SCALE_ORDER + base_df = (df_src[(df_src['Base'] == base) & (df_src['Scale'].isin(order))] + .set_index('Scale').reindex(order) + .dropna(subset=[x_col, y_col])) + if len(base_df) < 2: + continue + ls = '--' if base == 'NVILA-ST' else '-' + for i in range(len(base_df) - 1): + x1, y1 = base_df.iloc[i][[x_col, y_col]] + x2, y2 = base_df.iloc[i + 1][[x_col, y_col]] + plt.annotate('', xy=(x2, y2), xytext=(x1, y1), + arrowprops=dict(arrowstyle="->", color=COLORS[base], + alpha=0.6, lw=1.8, ls=ls)) + + +def _draw_3d_arrows(ax, df_src, base_list, x_col, y_col, z_col): + """Draw arrows in a 3-D axes using quiver + dashed line for NVILA-ST.""" + for base in base_list: + order = ST_SCALE_ORDER if base == 'NVILA-ST' else SCALE_ORDER + base_df = (df_src[(df_src['Base'] == base) & (df_src['Scale'].isin(order))] + .set_index('Scale').reindex(order) + .dropna(subset=[x_col, y_col, z_col])) + if len(base_df) < 2: + continue + ls = '--' if base == 'NVILA-ST' else '-' + for i in range(len(base_df) - 1): + x1, y1, z1 = base_df.iloc[i][[x_col, y_col, z_col]] + x2, y2, z2 = base_df.iloc[i + 1][[x_col, y_col, z_col]] + dx, dy, dz = x2 - x1, y2 - y1, z2 - z1 + + # Draw the shaft as a line (supports dashes for NVILA-ST) + ax.plot([x1, x2], [y1, y2], [z1, z2], + color=COLORS[base], linestyle=ls, linewidth=2.0, alpha=0.6) + + # Draw an arrowhead at the end using quiver + tip_frac = 0.25 # arrowhead covers 25 % of segment + ax.quiver(x2 - tip_frac * dx, + y2 - tip_frac * dy, + z2 - tip_frac * dz, + tip_frac * dx, tip_frac * dy, tip_frac * dz, + color=COLORS[base], alpha=0.8, + arrow_length_ratio=1.0, linewidth=0) + + +# ── figures ────────────────────────────────────────────────────────────────── + +def figure1(df: pd.DataFrame, outdir: str): + """Figure 1: Two Paths of Spatial Representation (scatter + arrows).""" + plt.figure(figsize=(10, 8)) + + df_bases = df[df['Base'] != 'RoboRefer'] + sns.scatterplot(data=df_bases, x='Entanglement', y='Peak Dist', + hue='Base', palette=COLORS, s=100, alpha=0.8, + edgecolor='black', legend=False) + + # Arrows for all non-RoboRefer groups including NVILA-ST + _draw_2d_arrows(df, ['Molmo', 'NVILA', 'NVILA-ST', 'Qwen'], + 'Entanglement', 'Peak Dist') + + df_robo = df[df['Base'] == 'RoboRefer'] + if not df_robo.empty: + sns.scatterplot(data=df_robo, x='Entanglement', y='Peak Dist', + hue='Base', palette=COLORS, s=400, marker='*', + edgecolor='black', zorder=5, legend=False) + + plt.legend(handles=CUSTOM_LINES, title='Model Group', loc='upper right') + plt.title('Figure 1: The Two Paths of Spatial Representation\n' + '(Naive Scaling vs. Genuine Understanding)', + fontsize=14, fontweight='bold') + plt.xlabel('Entanglement Shortcut [Lower is Better]', fontsize=12) + plt.ylabel('Distance Representation (Dist SC) [Higher is Better]', fontsize=12) + plt.text(0.60, 0.05, + "Mechanism 1:\nNaive Scaling\n(More Data = More Entanglement)", + fontsize=12, transform=plt.gca().transAxes, + bbox=dict(facecolor='white', alpha=0.8, edgecolor='gray')) + plt.text(0.02, 0.72, + "Mechanism 2:\nGenuine Understanding\n(Break the Shortcut)", + fontsize=12, transform=plt.gca().transAxes, + bbox=dict(facecolor='white', alpha=0.8, edgecolor='gray')) + plt.tight_layout() + plt.savefig(os.path.join(outdir, 'figure1_two_paths_trajectory.png'), dpi=300) + plt.close() + + +def figure2(df: pd.DataFrame, outdir: str): + """Figure 2: Entanglement Paradox (line plot, NVILA-ST included).""" + df_scale = df[df['Base'] != 'RoboRefer'].copy() + df_scale = df_scale[df_scale['Scale'].isin(SCALE_ORDER)] + df_scale['Scale'] = pd.Categorical(df_scale['Scale'], + categories=SCALE_ORDER, ordered=True) + + plt.figure(figsize=(10, 6)) + + # Separate NVILA-ST for manual plotting to support dashed style + df_main = df_scale[df_scale['Base'] != 'NVILA-ST'] + df_st = df_scale[df_scale['Base'] == 'NVILA-ST'].sort_values('Scale') + + sns.lineplot(data=df_main, x='Scale', y='Entanglement', + hue='Base', style='Base', + palette={k: v for k, v in COLORS.items() if k != 'NVILA-ST'}, + marker='o', linewidth=2.5, markersize=8, legend='auto') + + # Overlay NVILA-ST as dashed line + if not df_st.empty: + ax = plt.gca() + ax.plot(df_st['Scale'].cat.codes if hasattr(df_st['Scale'], 'cat') else + [SCALE_ORDER.index(s) for s in df_st['Scale']], + df_st['Entanglement'], + color=COLORS['NVILA-ST'], linestyle='--', linewidth=2.5, + marker='o', markersize=8, label='NVILA-ST') + + df_robo = df[df['Base'] == 'RoboRefer'] + if not df_robo.empty: + robo_ent = df_robo['Entanglement'].values[0] + plt.axhline(y=robo_ent, color=COLORS['RoboRefer'], linestyle='--', + label=f'RoboRefer ({robo_ent:.4f})') + + plt.title('Figure 2: The Entanglement Paradox during Naive Scaling', + fontsize=14, fontweight='bold') + plt.ylabel('Entanglement', fontsize=12) + plt.xlabel('Fine-tuning Data Scale', fontsize=12) + plt.legend(title='Models', bbox_to_anchor=(1.05, 1), loc='upper left') + plt.tight_layout() + plt.savefig(os.path.join(outdir, 'figure2_entanglement_paradox.png'), dpi=300) + plt.close() + + +def figure4(df: pd.DataFrame, outdir: str): + """Figure 4: Consistent vs Counter Performance Gap (grouped bar).""" + acc_models = [ + 'Molmo vanilla', 'Molmo 2M', + 'NVILA vanilla', 'NVILA 2M', + 'NVILA-ST 80k', 'NVILA-ST 800k', + 'Qwen vanilla', 'Qwen 2M', + 'RoboRefer', + ] + available = [m for m in acc_models if m in df['Model'].values] + df_acc = df.set_index('Model').loc[available] + + x = np.arange(len(available)) + width = 0.35 + + fig, ax = plt.subplots(figsize=(14, 6)) + ax.bar(x - width / 2, df_acc['EmbSpatial Acc (con)'], width, + label='Consistent (Shortcut Works)', color='#2b83ba') + ax.bar(x + width / 2, df_acc['EmbSpatial Acc (ctr)'], width, + label='Counter (Shortcut Fails)', color='#d7191c') + + for i in range(len(available)): + con_val = df_acc['EmbSpatial Acc (con)'].iloc[i] + ctr_val = df_acc['EmbSpatial Acc (ctr)'].iloc[i] + if pd.isna(con_val) or pd.isna(ctr_val): + continue + gap = con_val - ctr_val + ax.plot([i - width / 2, i + width / 2], [con_val, ctr_val], + color='black', linestyle='-', linewidth=1.5, alpha=0.5) + ax.text(i, max(con_val, ctr_val) + 2, f'Gap: {gap:.1f}%p', + ha='center', fontsize=9, fontweight='bold') + + ax.set_ylabel('Accuracy (%)', fontsize=12) + ax.set_title('Figure 4: The Consistent vs. Counter Performance Gap', + fontsize=14, fontweight='bold') + ax.set_xticks(x) + ax.set_xticklabels(available, rotation=45, ha='right') + ax.legend() + plt.tight_layout() + plt.savefig(os.path.join(outdir, 'figure4_accuracy_gap.png'), dpi=300) + plt.close() + + +def figure5(df: pd.DataFrame, outdir: str): + """Figure 5: Peak Dist vs EmbSpatial Counter Accuracy (scatter + arrows). + + NVILA-ST has N/A accuracy in the default CSV; their points/arrows will + appear automatically if the data file contains numeric values for them. + """ + df_valid = df.dropna(subset=['EmbSpatial Acc (ctr)', 'Peak Dist']) + + plt.figure(figsize=(10, 8)) + + df_bases = df_valid[df_valid['Base'] != 'RoboRefer'] + sns.scatterplot(data=df_bases, x='Peak Dist', y='EmbSpatial Acc (ctr)', + hue='Base', palette=COLORS, s=150, + edgecolor='black', alpha=0.8, legend=False) + + # Arrows for all groups including NVILA-ST + _draw_2d_arrows(df_valid, ['Molmo', 'NVILA', 'NVILA-ST', 'Qwen'], + 'Peak Dist', 'EmbSpatial Acc (ctr)') + + df_robo = df_valid[df_valid['Base'] == 'RoboRefer'] + if not df_robo.empty: + sns.scatterplot(data=df_robo, x='Peak Dist', y='EmbSpatial Acc (ctr)', + hue='Base', palette=COLORS, s=400, marker='*', + edgecolor='black', zorder=5, legend=False) + + if len(df_valid) > 1: + corr = np.corrcoef(df_valid['Peak Dist'], df_valid['EmbSpatial Acc (ctr)'])[0, 1] + plt.text(0.05, 0.95, f"Pearson r = {corr:.2f}", + transform=plt.gca().transAxes, fontsize=14, fontweight='bold', + bbox=dict(facecolor='white', alpha=0.8, edgecolor='gray')) + + plt.legend(handles=CUSTOM_LINES, title='Model Group', loc='lower right') + plt.title('Figure 5: Distance SC is the strongest predictor of Counter Accuracy', + fontsize=14, fontweight='bold') + plt.xlabel('Distance Sign-Corrected Consistency (Peak Dist)', fontsize=12) + plt.ylabel('EmbSpatial Counter Accuracy (%)', fontsize=12) + plt.grid(True, linestyle='--', alpha=0.7) + plt.tight_layout() + plt.savefig(os.path.join(outdir, 'figure5_distSC_vs_counterAcc.png'), dpi=300) + plt.close() + + +def figure6(df: pd.DataFrame, outdir: str): + """Figure 6: 3-D scatter (Peak Dist × Entanglement × Counter Acc) with arrows.""" + df_valid = df.dropna(subset=['EmbSpatial Acc (ctr)', 'Peak Dist']) + + fig = plt.figure(figsize=(12, 10)) + ax = fig.add_subplot(111, projection='3d') + + for base_name in df_valid['Base'].unique(): + subset = df_valid[df_valid['Base'] == base_name] + c = COLORS.get(base_name, 'gray') + if base_name == 'RoboRefer': + ax.scatter(subset['Peak Dist'], subset['Entanglement'], + subset['EmbSpatial Acc (ctr)'], + c=c, s=300, marker='*', edgecolors='k', alpha=0.9, zorder=5) + else: + ax.scatter(subset['Peak Dist'], subset['Entanglement'], + subset['EmbSpatial Acc (ctr)'], + c=c, s=120, edgecolors='k', alpha=0.8) + + # Arrows (shaft + quiver arrowhead) for trajectory + _draw_3d_arrows(ax, df_valid, + ['Molmo', 'NVILA', 'NVILA-ST', 'Qwen'], + 'Peak Dist', 'Entanglement', 'EmbSpatial Acc (ctr)') + + ax.set_xlabel('Peak Dist SC', labelpad=10, fontsize=11) + ax.set_ylabel('Entanglement', labelpad=10, fontsize=11) + ax.set_zlabel('Counter Accuracy (%)', labelpad=10, fontsize=11) + ax.set_title('Figure 6: Navigating the Representation Space\n' + '(Dist SC vs. Entanglement vs. Counter Acc)', + fontweight='bold', fontsize=14) + ax.view_init(elev=20, azim=135) + plt.legend(handles=CUSTOM_LINES, title='Model Group', + loc='upper left', bbox_to_anchor=(1.05, 1)) + plt.tight_layout() + plt.savefig(os.path.join(outdir, 'figure6_3d_distSC_ent_counterAcc.png'), + dpi=300, bbox_inches='tight') + plt.close() + + +# ── main ───────────────────────────────────────────────────────────────────── + +def main(): + parser = argparse.ArgumentParser(description='Generate Spatial Representation Figures') + parser.add_argument('--data_path', type=str, required=True, + help='Path to the input CSV file') + args = parser.parse_args() + + df = load_and_preprocess(args.data_path) + + os.makedirs(OUTPUT_DIR, exist_ok=True) + sns.set_theme(style='whitegrid') + + figure1(df, OUTPUT_DIR) + figure2(df, OUTPUT_DIR) + figure4(df, OUTPUT_DIR) + figure5(df, OUTPUT_DIR) + figure6(df, OUTPUT_DIR) + + print(f"Saved figures to {OUTPUT_DIR}/") + + +if __name__ == '__main__': + main() diff --git a/heuristic_position_results.txt b/heuristic_position_results.txt new file mode 100644 index 0000000000000000000000000000000000000000..e6690053a3250013b3925ac7bcf4b1e9ccbe1b90 --- /dev/null +++ b/heuristic_position_results.txt @@ -0,0 +1,117 @@ +Loading EmbSpatial-Bench dataset... + +====================================================================== +2D Heuristic 답의 선택지 위치(A/B/C/D) 분포 분석 +====================================================================== + +Heuristic 정의: + FAR: center_y가 가장 작은 물체 (이미지 위쪽 = '가장 멀다') + CLOSE: center_y가 가장 큰 물체 (이미지 아래쪽 = '가장 가깝다') + +매칭 실패: 0개 (answer_options에 heuristic 물체가 없음) + +──────────────────────────────────────────────────────────── + FAR (n=594) +──────────────────────────────────────────────────────────── + + [Heuristic 답의 위치 분포] + Position Count Ratio + A 163 27.4% + B 157 26.4% + C 143 24.1% + D 131 22.1% + Std: 2.1%p + + [GT 답의 위치 분포] + Position Count Ratio + A 159 26.8% + B 156 26.3% + C 130 21.9% + D 149 25.1% + Std: 1.9%p + + Heuristic == GT: 383/594 (64.5%) + → 이 비율이 Consistent 샘플 비율과 유사해야 함 + +──────────────────────────────────────────────────────────── + CLOSE (n=612) +──────────────────────────────────────────────────────────── + + [Heuristic 답의 위치 분포] + Position Count Ratio + A 155 25.3% + B 149 24.3% + C 167 27.3% + D 141 23.0% + Std: 1.6%p + + [GT 답의 위치 분포] + Position Count Ratio + A 160 26.1% + B 134 21.9% + C 159 26.0% + D 159 26.0% + Std: 1.8%p + + Heuristic == GT: 398/612 (65.0%) + → 이 비율이 Consistent 샘플 비율과 유사해야 함 + +──────────────────────────────────────────────────────────── + FAR+CLOSE (n=1206) +──────────────────────────────────────────────────────────── + + [Heuristic 답의 위치 분포] + Position Count Ratio + A 318 26.4% + B 306 25.4% + C 310 25.7% + D 272 22.6% + Std: 1.5%p + + [GT 답의 위치 분포] + Position Count Ratio + A 319 26.5% + B 290 24.0% + C 289 24.0% + D 308 25.5% + Std: 1.0%p + + Heuristic == GT: 781/1206 (64.8%) + → 이 비율이 Consistent 샘플 비율과 유사해야 함 + +====================================================================== +Heuristic 답 위치 vs GT 답 위치 교차 분석 +====================================================================== + + FAR: Heuristic 위치별 GT 위치 분포 + (행: Heuristic 위치, 열: GT 위치) + + Heur\GT A B C D Total + ────────────────────────────────────────────────── + A 111(68%) 15(9%) 13(8%) 24(15%) 163 + B 12(8%) 106(68%) 18(11%) 21(13%) 157 + C 21(15%) 20(14%) 82(57%) 20(14%) 143 + D 15(11%) 15(11%) 17(13%) 84(64%) 131 + + CLOSE: Heuristic 위치별 GT 위치 분포 + (행: Heuristic 위치, 열: GT 위치) + + Heur\GT A B C D Total + ────────────────────────────────────────────────── + A 101(65%) 13(8%) 20(13%) 21(14%) 155 + B 16(11%) 93(62%) 20(13%) 20(13%) 149 + C 27(16%) 16(10%) 105(63%) 19(11%) 167 + D 16(11%) 12(9%) 14(10%) 99(70%) 141 + +====================================================================== +핵심 요약 +====================================================================== + + FAR heuristic 답 최다 위치: A (27.4%) + CLOSE heuristic 답 최다 위치: C (27.3%) + + FAR heuristic 답이 D 위치: 131/594 (22.1%) + CLOSE heuristic 답이 D 위치: 141/612 (23.0%) + + FAR heuristic 답의 D 위치 비율이 균등(22.1%)이므로, + D bias가 FAR에서 더 심한 것은 선택지 배치 때문이 아닌 다른 요인일 가능성 diff --git a/modified_experiments.md b/modified_experiments.md new file mode 100644 index 0000000000000000000000000000000000000000..d0de845f36e405110839d523f15e7793a9ebd529 --- /dev/null +++ b/modified_experiments.md @@ -0,0 +1,245 @@ +You are helping me restructure and fix my VLM spatial representation analysis experiments. Create all Python scripts and shell scripts under `/data/shared/Qwen/experiments/` with the following folder structure: + +``` +/data/shared/Qwen/experiments/ +├── correct_filter/ +│ ├── correct_filter_analysis.py +│ ├── run_molmo.sh +│ ├── run_nvila.sh +│ └── run_qwen.sh +└── swap_analysis/ + ├── swap_analysis.py + ├── run_molmo.sh + ├── run_nvila.sh + └── run_qwen.sh +``` + +--- + +## CONTEXT + +I'm studying how Vision-Language Models (VLMs) encode spatial concepts (left, right, above, under, far, close) in their hidden representations. I fine-tune models at different data scales (vanilla, 80k, 400k, 800k, 2m) and analyze how representations change. + +The dataset is EmbSpatial-Bench (TSV at `/data/shared/Qwen/EmbSpatial-Bench/EmbSpatial-Bench.tsv`). Each row has: index, image (base64), question, answer, category (left/right/above/under/far/close), A/B/C/D options. + +I use hooks on transformer layers to extract the last token's hidden state during the prefill pass (seq_len > 1 only). I then analyze cosine similarity between category-averaged representations. + +--- + +## EXISTING CODE TO REFERENCE + +The following files contain the current (buggy) implementations. Use them as the foundation — keep all working parts (model extractors, data loading, visualization helpers) and apply the fixes listed below. + +- **correct_filter**: `/data/shared/Qwen/experiments/exp2a_correct_filter/exp2a_correct_filter_analysis.py` +- **swap_analysis**: `/data/shared/Qwen/experiments/exp2a_swap_analysis/exp2a_swap_analysis.py` +- **bbox analysis reference**: `/data/shared/Qwen/experiments/analyze_counter_consistent.py` + +Read all of these files thoroughly before making any changes. + +--- + +## FIXES TO APPLY TO BOTH SCRIPTS + +### Fix 1: Add "Answer with only one word." to all prompts + +Current prompts produce free-form sentences like "The table is below the picture." instead of "under". This causes near-zero accuracy for some categories because `check_answer` looks for exact spatial keywords. + +**For pairwise (left/right/above/under):** +``` +Current: "Is the {obj1} to the left or right of the {obj2}?" +Fixed: "Is the {obj1} to the left or right of the {obj2}? Answer with only one word." +``` +``` +Current: "Is the {obj1} above or under the {obj2}?" +Fixed: "Is the {obj1} above or under the {obj2}? Answer with only one word." +``` + +**For distance (far/close):** +``` +Current: "Compared to {reference_object}, is {target_object} far or close from you?" +Fixed: "Compared to {reference_object}, is {target_object} far or close from you? Answer with only one word." +``` + +Apply this in ALL places where these prompts are constructed (both correct_filter and swap_analysis). + +### Fix 2: Expand answer matching to handle synonyms + +Even with the prompt fix, some models may still produce synonyms. Update `check_answer` to handle: +- "below" → under +- "beneath" → under +- "near" → close +- "nearby" → close +- "distant" → far + +--- + +## FIXES SPECIFIC TO correct_filter_analysis.py + +### Fix 3: Improved correct vs all comparison — trajectory plots + +Current code only compares correct-only vs all at a single representative layer, which can be misleading. Replace with trajectory plots across ALL layers: + +Generate these overlay trajectory plots for each scale: +1. **correct + all**: Two lines per pair (solid=correct, dashed=all) +2. **correct + incorrect**: Two lines per pair (solid=correct, dashed=incorrect) +3. **correct + incorrect + all**: Three lines per pair + +Key pairs to plot: +- above-far (hypothesis) +- under-close (hypothesis) +- left-right (control) +- above-under (within axis) +- far-close (within axis) + +Also generate cross-scale versions: for each pair, one panel per pair, lines colored by scale, separate figures for correct-only and all-samples. + +Keep the existing ablation summary (accuracy vs similarity) but use the trajectory-based comparison instead of single-layer comparison. + +--- + +## FIXES SPECIFIC TO swap_analysis.py + +### Fix 4: Fix cross-group quads index matching + +The `create_cross_group_quads` function fails because TSV `index` column values don't match HF dataset `question_id` values (type or format mismatch). All quads get `no_bbox`. + +Fix: After loading the HF dataset, print sample keys from both sources to debug. Try matching by: +1. Direct match (same type) +2. String cast: `str(tsv_index) == str(question_id)` +3. If format differs (e.g., TSV has int, HF has "question_XXXX"), build an explicit mapping + +Add a validation log: `"Matched X/Y indices between TSV and HF dataset"` so we can verify it works. + +### Fix 5: Fix delta consistency metric + +Current `compute_delta_consistency` computes within-GROUP pairwise cosine. This is wrong because opposite categories within a group (e.g., left and right) have opposite Δ directions, causing well-separated concepts to show LOW consistency. + +Replace with TWO metrics: + +**a) Within-category consistency**: Compute pairwise cosine among Δ vectors of the SAME category only (left Δs with left Δs, right Δs with right Δs). This measures whether same-concept swaps point in a consistent direction. + +**b) Sign-corrected group consistency**: For each group, pick one category as "canonical" (e.g., left for horizontal). Multiply the opposite category's Δ by -1 to align directions. Then compute pairwise cosine over the whole sign-corrected group. This measures whether the group has a consistent spatial axis. + +Canonical categories: left (horizontal), above (vertical), far (distance). + +Save both metrics. Generate plots for both (trajectory across layers, cross-scale comparison). + +### Fix 6: Add prediction stats visualization + +Current code saves `pred_stats_{scale}.json` but generates no plot. Add: +- Bar chart: for each group, bars showing acc_orig, acc_swap, acc_both, colored by scale +- Cross-scale line plot: acc_both trajectory across scales, per group + +### Fix 7: Generate Δ-based heatmap and trajectory (new analysis) + +Use per-category mean Δ vectors as "representations" and compute 6×6 cosine similarity matrix, same as exp2a_modified's heatmap. This removes additive template effects. + +For each scale × representative layers: +- Save `delta_heatmap_{scale}_L{layer}.png` +- Save `delta_similarity_{scale}_L{layer}.csv` + +Also generate cross-layer trajectory plot for key pairs using Δ-based similarity. + +Note: Within-group pairs (e.g., left vs right) should show cosine ≈ -1 if model discriminates well, since Δ_left ≈ -Δ_right. + +--- + +## MODEL CONFIGURATIONS + +```python +MODEL_CONFIGS = { + 'molmo': { + 'vanilla': 'allenai/Molmo-7B-O-0924', + '80k': '/data/shared/Qwen/molmo/outputs/data_scale_exp_80k/unshared', + '400k': '/data/shared/Qwen/molmo/outputs/data_scale_exp_400k/unshared', + '800k': '/data/shared/Qwen/molmo/outputs/data_scale_exp_800k/unshared', + '2m': '/data/shared/Qwen/molmo/outputs/data_scale_exp_2m/unshared', + }, + 'nvila': { + 'vanilla': '/data/shared/Qwen/mydisk/NVILA-Lite-2B', + '80k': '/data/shared/Qwen/mydisk/output/DATA/NVILA-Lite-2B-DATA_SCALE_EXP_80K-20251108_180221', + '400k': '/data/shared/Qwen/mydisk/output/DATA/NVILA-Lite-2B-DATA_SCALE_EXP_400K-20251108_180221', + '800k': '/data/shared/Qwen/mydisk/output/DATA/NVILA-Lite-2B-DATA_SCALE_EXP_800K-20251108_180221', + '2m': '/data/shared/Qwen/mydisk/output/DATA/NVILA-Lite-2B-DATA_SCALE_EXP_2M-20260205_003632', + 'roborefer': '/data/shared/Qwen/mydisk/RoboRefer_model', + }, + 'qwen': { + 'vanilla': 'Qwen/Qwen2.5-VL-3B-Instruct', + '80k': '/data/shared/Qwen/mydisk/output/Qwen/Qwen2.5-VL-3B-Instruct-data_scale_exp_80k-20251114_120221', + '400k': '/data/shared/Qwen/mydisk/output/Qwen/Qwen2.5-VL-3B-Instruct-data_scale_exp_400k-20251114_120221', + '800k': '/data/shared/Qwen/mydisk/output/Qwen/Qwen2.5-VL-3B-Instruct-data_scale_exp_800k-20251114_120221', + '2m': '/data/shared/Qwen/mydisk/output/Qwen/Qwen2.5-VL-3B-Instruct-data_scale_exp_2m-20260109_120517', + }, +} +``` + +--- + +## SHELL SCRIPT SPECIFICATIONS + +Each model gets its own run script. Pattern: + +**Molmo**: `PYTHON="conda run --no-capture-output -n molmo python"`, scales=(vanilla 80k 400k 800k 2m), GPUS=(0 1 2 3 4) + +**NVILA**: `PYTHON="conda run --no-capture-output -n vila python"`, scales=(vanilla 80k 400k 800k 2m roborefer), GPUS=(0 1 2 3 4 5) + +**Qwen**: `PYTHON="/usr/bin/python3"`, scales=(vanilla 80k 400k 800k 2m), GPUS=(0 1 2 3 4) + +Each script: +1. Launches each scale on a separate GPU in parallel with `--no-auto-roborefer` +2. Waits for all to finish, reports success/failure +3. Runs `--merge` mode to generate cross-scale plots +4. Logs go to `logs/{model}/{scale}.log` + +For swap_analysis, the merge step handles all cross-scale analyses automatically. + +--- + +## OUTPUT DIRECTORIES + +- correct_filter results: `/data/shared/Qwen/experiments/correct_filter/results/{model_type}/` +- swap_analysis results: `/data/shared/Qwen/experiments/swap_analysis/results/{model_type}/` + +--- + +## EXTRACTOR CLASSES + +Keep the existing extractor implementations (MolmoExtractor, NVILAExtractor, RoboReferExtractor, Qwen25VLExtractor) exactly as they are in the reference files. They work correctly. The key design: + +- Base class registers hooks on target layers +- Hook captures last token hidden state during prefill only (seq_len > 1) +- `extract_and_predict()` returns (hidden_states_dict, predicted_answer_text) in one forward pass +- MolmoExtractor handles both native (config.yaml + model.pt) and HuggingFace formats +- NVILAExtractor uses `llava` imports with sys.path manipulation to avoid conflicts +- RoboReferExtractor extends NVILAExtractor with different sys.path for RoboRefer +- Qwen25VLExtractor loads processor from base model for fine-tuned checkpoints + +--- + +## FIXES SPECIFIC TO swap_analysis.py (continued) + +### Fix 8: Category validity check + both-correct Δ filtering + +Some models predict the same answer for all samples in a category (e.g., always "close" for far questions), making Δ analysis meaningless for that category. + +**a) Category-level validity check**: After extracting predictions, compute per-category accuracy for both orig and swap. If either accuracy is below chance (50% for binary), mark that category as "unreliable" in logs and results. In the Δ-based heatmap and consistency plots, either exclude unreliable categories or annotate them with a warning (e.g., hatching or asterisk). + +**b) Both-correct filtering**: Add a `--both-correct-only` mode (default: compute BOTH filtered and unfiltered). For Δ analysis (consistency, Δ-based heatmap, cross-group alignment), also compute results using only pairs where BOTH orig and swap predictions are correct. This ensures Δ vectors come from pairs where the model actually distinguishes the spatial relation. + +Save results for both "all pairs" and "both-correct pairs" side by side. Generate comparison plots showing how filtering affects results. This is NOT the same as correct_filter experiment — we're not comparing correct vs incorrect representations, we're ensuring Δ vectors are meaningful. + +Report in summary: +- Per scale × category: n_total, n_both_correct, acc_orig, acc_swap, acc_both +- Flag categories where analysis may be unreliable + +--- + +## IMPORTANT NOTES + +- Do NOT create separate post-hoc scripts (compute_swap_cosine.py, compute_delta_consistency.py). All analyses — swap cosine (cos(orig, swap)), delta consistency (within-category and sign-corrected), Δ-based heatmaps, cross-group alignment, prediction stats plots — must be computed within swap_analysis.py itself. Per-scale analyses run during extraction. Cross-scale comparisons and any analyses that can be computed from saved intermediate files (NPZ, JSON) run during `--merge` mode. The shell script should only need to call swap_analysis.py (once per scale in parallel, then once with --merge). +- All scripts should support `--merge` mode that skips extraction and only generates cross-scale comparison plots from saved per-scale results +- swap_analysis: `--max-samples-per-category` default=200 +- correct_filter: loads ALL samples (no limit), balanced sampling after correct/incorrect split +- Use `matplotlib.use('Agg')` for headless environments +- Always `torch.cuda.empty_cache()` after each scale +- Save intermediate results per-scale so parallel execution works (each GPU saves independently, merge combines) \ No newline at end of file diff --git a/pca_new.py b/pca_new.py new file mode 100644 index 0000000000000000000000000000000000000000..49514031a25c1be8624ae6aedca41c5b302079d9 --- /dev/null +++ b/pca_new.py @@ -0,0 +1,307 @@ +""" +pca_new.py - Generate single-panel PCA visualizations from existing NPZ files. + +Accepts a path argument pointing to either: + - A single model directory (e.g. .../results_short_answer/nvila) + - A parent directory containing multiple model directories (e.g. .../results_short_answer) + +Use --3d to extract the rightmost panel from pca_3d/ plots → saves to pca_3d_new/. +Use --2d to extract the rightmost panel from pca/ plots → saves to pca_new/. + +Only the "Delta Vectors by Category" panel is produced (previously the rightmost of 3). +'under' has been renamed 'below' throughout. + +Usage: + python pca_new.py --3d /data/shared/Qwen/experiments/swap_analysis/results_short_answer + python pca_new.py --3d /data/shared/Qwen/experiments/swap_analysis/results_short_answer/nvila + python pca_new.py --2d /data/shared/Qwen/experiments/swap_analysis/results_short_answer + python pca_new.py --2d /data/shared/Qwen/experiments/swap_analysis/results_short_answer/nvila +""" + +import argparse +import os +import re +import numpy as np +import matplotlib +matplotlib.use('Agg') +import matplotlib.pyplot as plt +from mpl_toolkits.mplot3d import Axes3D # noqa: F401 +from sklearn.decomposition import PCA + +# ── Label / colour config ───────────────────────────────────────────────────── +CATEGORY_ORDER = ['left', 'right', 'above', 'below', 'far', 'close'] +GROUP_ORDER = ['horizontal', 'vertical', 'distance'] + +CAT_COLORS = { + 'above': '#2ca02c', 'below': '#98df8a', # horizontal → green + 'left': '#ff7f0e', 'right': '#ffbb78', # vertical → orange (was 'under') + 'far': '#9467bd', 'close': '#c5b0d5', # distance → purple +} +GROUP_COLORS = { + 'horizontal': '#2ca02c', + 'vertical': '#ff7f0e', + 'distance': '#9467bd', +} + +# ── Font / marker sizes ─────────────────────────────────────────────────────── +TITLE_FS = 22 # subplot title +AXIS_FS = 18 # axis labels (PC1 / PC2 / PC3) +TICK_FS = 14 # tick labels +LEGEND_FS = 16 # legend text +SUPTITLE_FS = 24 # figure-level suptitle +SCATTER_S = 30 # marker size + + +def _normalise_label(raw): + """Map 'under' → 'below'; everything else passes through unchanged.""" + return 'below' if str(raw) == 'under' else str(raw) + + +def scatter3d(ax, xs, ys, zs, c, label, alpha=0.55, s=SCATTER_S, marker='o'): + ax.scatter(xs, ys, zs, c=c, label=label, alpha=alpha, s=s, marker=marker) + + +def plot_pca_3d(vectors_npz_path, scale, model_type, save_dir): + """Generate single-panel 3D PCA figure (Delta Vectors by Category) per layer.""" + data = np.load(vectors_npz_path, allow_pickle=True) + layer_keys = [k for k in data.files if k.startswith('orig_L')] + layers = sorted([int(k.replace('orig_L', '')) for k in layer_keys]) + + if not layers: + print(f" [skip] No orig_L* keys found in {vectors_npz_path}") + return + + os.makedirs(save_dir, exist_ok=True) + + for layer in layers: + deltas = data.get(f'delta_L{layer}') + cats = data.get(f'categories_L{layer}') + + has_delta = (deltas is not None and len(deltas) >= 3) + if not has_delta: + print(f" [skip] Layer {layer}: no delta vectors") + continue + + # ── PCA on delta vectors ────────────────────────────────────────────── + pca_d = PCA(n_components=3) + delta_proj = pca_d.fit_transform(deltas) + ev = pca_d.explained_variance_ratio_ + + # ── Figure ──────────────────────────────────────────────────────────── + fig = plt.figure(figsize=(13, 10)) + ax = fig.add_subplot(111, projection='3d') + + if cats is not None: + for cat in CATEGORY_ORDER: + # support both 'under' (legacy) and 'below' in stored labels + mask = np.array([_normalise_label(c) == cat for c in cats]) + if not mask.any(): + continue + scatter3d(ax, + delta_proj[mask, 0], + delta_proj[mask, 1], + delta_proj[mask, 2], + c=CAT_COLORS.get(cat, 'gray'), + label=cat) + + ax.set_title('Delta Vectors by Category', fontsize=TITLE_FS, pad=12) + ax.set_xlabel(f'PC1 ({ev[0]:.1%})', fontsize=AXIS_FS, labelpad=25) + ax.set_ylabel(f'PC2 ({ev[1]:.1%})', fontsize=AXIS_FS, labelpad=25) + # set_zlabel is unreliable in 3D — use fig.text for guaranteed visibility + ax.set_zlabel('') + ax.tick_params(axis='both', labelsize=TICK_FS) + ax.legend(fontsize=LEGEND_FS, ncol=2, loc='upper right') + # ax.legend(fontsize=LEGEND_FS, ncol=1, loc='upper left', + # bbox_to_anchor=(1.02, 1.0), borderaxespad=0) + + # ── Draw everything so we can read accurate bbox positions ──────────── + fig.canvas.draw() + ax_pos = ax.get_position() # Bbox in figure-fraction coords + + # PC3 label: place with a bit of gap (0.04) from the axes right edge + pc3_x = ax_pos.x1 + 0.04 + fig.text( + pc3_x, + (ax_pos.y0 + ax_pos.y1) / 2, + f'PC3 ({ev[2]:.1%})', + fontsize=AXIS_FS, + va='center', ha='center', + rotation=90, + ) + + # Centre both titles over the axes area (not the full figure width) + ax_cx = (ax_pos.x0 + ax_pos.x1) / 2 + fig.suptitle( + f'{model_type.upper()} ({scale}) — L{layer}', + fontsize=SUPTITLE_FS, fontweight='bold', + x=ax_cx, y=1.01, + ) + # Re-centre the axes title (set_title is relative to axes, already centred; + # but the axes itself may be off-centre in the figure, so suptitle fix is enough) + + out_path = os.path.join(save_dir, f'pca_{scale}_L{layer}.png') + plt.savefig(out_path, dpi=200, bbox_inches='tight', pad_inches=0.5) + plt.close() + print(f" Saved {out_path}") + + +def plot_pca_2d(vectors_npz_path, scale, model_type, save_dir): + """Generate single-panel 2D PCA figure (Delta Vectors by Category) per layer.""" + data = np.load(vectors_npz_path, allow_pickle=True) + layer_keys = [k for k in data.files if k.startswith('orig_L')] + layers = sorted([int(k.replace('orig_L', '')) for k in layer_keys]) + + if not layers: + print(f" [skip] No orig_L* keys found in {vectors_npz_path}") + return + + os.makedirs(save_dir, exist_ok=True) + + for layer in layers: + deltas = data.get(f'delta_L{layer}') + cats = data.get(f'categories_L{layer}') + + has_delta = (deltas is not None and len(deltas) >= 2) + if not has_delta: + print(f" [skip] Layer {layer}: no delta vectors") + continue + + # ── PCA on delta vectors ────────────────────────────────────────────── + pca_d = PCA(n_components=2) + delta_proj = pca_d.fit_transform(deltas) + ev = pca_d.explained_variance_ratio_ + + # ── Figure ──────────────────────────────────────────────────────────── + fig, ax = plt.subplots(figsize=(10, 8)) + + if cats is not None: + for cat in CATEGORY_ORDER: + mask = np.array([_normalise_label(c) == cat for c in cats]) + if not mask.any(): + continue + ax.scatter(delta_proj[mask, 0], delta_proj[mask, 1], + c=CAT_COLORS.get(cat, 'gray'), + label=cat, alpha=0.55, s=SCATTER_S) + + ax.set_title('Delta Vectors by Category', fontsize=TITLE_FS, pad=12) + ax.set_xlabel(f'PC1 ({ev[0]:.1%})', fontsize=AXIS_FS) + ax.set_ylabel(f'PC2 ({ev[1]:.1%})', fontsize=AXIS_FS) + ax.tick_params(axis='both', labelsize=TICK_FS) + ax.legend(fontsize=LEGEND_FS, ncol=2, loc='upper right') + ax.grid(True, alpha=0.2) + + fig.suptitle( + f'{model_type.upper()} ({scale}) — L{layer}', + fontsize=SUPTITLE_FS, fontweight='bold', + ) + plt.tight_layout() + + out_path = os.path.join(save_dir, f'pca_{scale}_L{layer}.png') + plt.savefig(out_path, dpi=200, bbox_inches='tight', pad_inches=0.3) + plt.close() + print(f" Saved {out_path}") + + +def scale_from_npz_name(name): + """'vectors_80k.npz' -> '80k'""" + m = re.match(r'vectors_(.+)\.npz$', name) + return m.group(1) if m else None + + +def is_model_dir(path): + """Return True if path looks like a single model directory (has npz/ sub-dir).""" + return os.path.isdir(os.path.join(path, 'npz')) + + +def process_model(model_dir, mode): + """Process all scales for a single model directory. + + mode: '3d' → pca_3d/ → pca_3d_new/ (3D single-panel) + '2d' → pca/ → pca_new/ (2D single-panel) + """ + model = os.path.basename(model_dir) + npz_dir = os.path.join(model_dir, 'npz') + plots_dir = os.path.join(model_dir, 'plots') + + if not os.path.isdir(npz_dir): + print(f"[{model}] no npz/ dir, skipping") + return + if not os.path.isdir(plots_dir): + print(f"[{model}] no plots/ dir, skipping") + return + + npz_files = sorted( + f for f in os.listdir(npz_dir) + if f.startswith('vectors_') and f.endswith('.npz') + ) + if not npz_files: + print(f"[{model}] no vectors_*.npz files, skipping") + return + + if mode == '3d': + ref_dir_name = 'pca_3d' + new_dir_name = 'pca_3d_new' + plot_fn = plot_pca_3d + else: + ref_dir_name = 'pca' + new_dir_name = 'pca_new' + plot_fn = plot_pca_2d + + # Locate ref dirs to mirror structure into new sibling dir + ref_dirs = [] + for dirpath, dirnames, _ in os.walk(plots_dir): + if os.path.basename(dirpath) == ref_dir_name: + ref_dirs.append(dirpath) + + if not ref_dirs: + print(f"[{model}] no {ref_dir_name}/ dirs found under plots/, skipping") + return + + for npz_file in npz_files: + scale = scale_from_npz_name(npz_file) + if scale is None: + continue + npz_path = os.path.join(npz_dir, npz_file) + + for ref_dir in ref_dirs: + parent = os.path.dirname(ref_dir) # e.g. plots/all + out_dir = os.path.join(parent, new_dir_name) + print(f"[{model}] scale={scale} -> {out_dir}") + plot_fn(npz_path, scale, model, out_dir) + + +def main(): + parser = argparse.ArgumentParser( + description='Generate single-panel PCA plots (rightmost panel) from existing NPZ files.') + parser.add_argument('path', help='Model directory or parent directory containing model dirs') + group = parser.add_mutually_exclusive_group(required=True) + group.add_argument('--3d', dest='mode', action='store_const', const='3d', + help='Extract from pca_3d/ → pca_3d_new/ (3D Delta Vectors by Category)') + group.add_argument('--2d', dest='mode', action='store_const', const='2d', + help='Extract from pca/ → pca_new/ (2D Delta Vectors by Category)') + args = parser.parse_args() + + root = args.path.rstrip('/') + mode = args.mode + + if not os.path.isdir(root): + print(f"Error: '{root}' is not a directory.") + raise SystemExit(1) + + if is_model_dir(root): + # Single model directory supplied + process_model(root, mode) + else: + # Parent directory: iterate over sub-directories + processed = 0 + for name in sorted(os.listdir(root)): + sub = os.path.join(root, name) + if os.path.isdir(sub) and is_model_dir(sub): + process_model(sub, mode) + processed += 1 + if processed == 0: + print(f"No model directories (with npz/ sub-dir) found under '{root}'.") + + +if __name__ == '__main__': + main() \ No newline at end of file diff --git a/plot_entanglement.py b/plot_entanglement.py new file mode 100644 index 0000000000000000000000000000000000000000..d59ba0a7a8340d9f1288b2fb8d89cd7ab15a34fa --- /dev/null +++ b/plot_entanglement.py @@ -0,0 +1,341 @@ +#!/usr/bin/env python3 +"""Compute and plot VD/HD/HV entanglement metrics across all layers for all scales. + +Definitions (values come from the delta-similarity CSV heatmaps, where each cell is +the cosine similarity between the mean delta vector of row-category and col-category): + + VD-entanglement = 1/4 * (mean(above-far, below-close) - mean(above-close, below-far)) + HD-entanglement = 1/4 * (mean(left-far, right-close) - mean(left-close, right-far)) + HV-entanglement = 1/4 * (mean(left-above, right-below) - mean(left-below, right-above)) + + Note: 'below' is stored as 'under' in the CSV. The script handles both transparently. + +Positive value = the two axes are more entangled in the "expected" direction + (e.g. above↔far, left↔above) than in the "unexpected" direction. + +Single directory: color by scale (vanilla=blue, 80k=orange, …) +Multiple directories: color by model family, linestyle by scale + +Usage (single dir): + python plot_entanglement.py results_short_answer/molmo + python plot_entanglement.py results_short_answer/molmo --subset both_correct + +Usage (multiple dirs — compare families): + python plot_entanglement.py results_short_answer/molmo results_short_answer/nvila results_short_answer/qwen + python plot_entanglement.py results_short_answer/molmo results_short_answer/nvila --out-dir /tmp/compare +""" + +import argparse +import re +from pathlib import Path +from collections import defaultdict + +import numpy as np +import pandas as pd +import matplotlib +matplotlib.use('Agg') +import matplotlib.pyplot as plt + +# ── Scale ordering and colors (kept in sync with swap_analysis.py) ──────────── + +SCALE_ORDER = [ + 'vanilla', '80k', '80k-5pct', '80k-10pct', '80k-20pct', '80k-30pct', + '400k', '400k-5pct', '800k', '800k-5pct', '2m', 'roborefer', + 'molmo2', 'qwen3_32b', 'qwen3_235b', +] + +# Used in single-dir mode (one color per scale) +SCALE_COLORS = { + 'vanilla': '#1f77b4', '80k': '#ff7f0e', '400k': '#2ca02c', + '800k': '#d62728', '2m': '#9467bd', 'roborefer': '#8c564b', + 'molmo2': '#17becf', 'qwen3_32b': '#bcbd22', 'qwen3_235b':'#e377c2', + '80k-5pct': '#b2dfdb', '80k-10pct': '#00b894', '80k-20pct': '#00897b', + '80k-30pct': '#004d40', '400k-5pct': '#66bb6a', '800k-5pct': '#ef9a9a', +} + +SCALE_DISPLAY_NAMES = { + '80k-5pct': '80k 5%', '80k-10pct': '80k 10%', + '80k-20pct': '80k 20%', '80k-30pct': '80k 30%', + '400k-5pct': '400k 5%', '800k-5pct': '800k 5%', +} + +# Used in multi-dir mode (one color per model family, one linestyle per scale) +FAMILY_COLOR_CYCLE = [ + '#1f77b4', # blue + '#d62728', # red + '#2ca02c', # green + '#ff7f0e', # orange + '#9467bd', # purple + '#8c564b', # brown + '#e377c2', # pink + '#17becf', # cyan + '#bcbd22', # yellow-green +] + +SCALE_LINESTYLE_CYCLE = [ + 'solid', + 'dashed', + 'dotted', + 'dashdot', + (0, (5, 1)), # long dash + (0, (3, 1, 1, 1)), # dash-dot-dot + (0, (1, 1)), # dotted dense + (0, (5, 5)), # long dash sparse +] + +# ── CSV helpers ──────────────────────────────────────────────────────────────── + +_CSV_RE = re.compile(r'^delta_similarity_(.+)_L(\d+)_(all_pairs|both_correct)\.csv$') + + +def _loc(df: pd.DataFrame, row: str, col: str) -> float: + """Look up (row, col) with 'under' ↔ 'below' aliasing.""" + aliases = {'below': 'under', 'under': 'below'} + r = row if row in df.index else aliases.get(row, row) + c = col if col in df.columns else aliases.get(col, col) + if r not in df.index or c not in df.columns: + return float('nan') + return float(df.loc[r, c]) + + +def compute_entanglement(df: pd.DataFrame) -> dict: + """Compute VD, HD, HV entanglement from a 6×6 delta-similarity DataFrame. + + Each metric is the difference of two means of cosine similarities (range [-2, 2]), + divided by 4 to normalise to [-0.5, 0.5]. + """ + vd = (_loc(df, 'above', 'far') + _loc(df, 'below', 'close') - + _loc(df, 'above', 'close') - _loc(df, 'below', 'far')) / 4 + + hd = (_loc(df, 'left', 'far') + _loc(df, 'right', 'close') - + _loc(df, 'left', 'close') - _loc(df, 'right', 'far')) / 4 + + hv = (_loc(df, 'left', 'above') + _loc(df, 'right', 'below') - + _loc(df, 'left', 'below') - _loc(df, 'right', 'above')) / 4 + + return {'VD': vd, 'HD': hd, 'HV': hv} + + +def load_entanglement(csv_dir: Path, subset: str) -> dict: + """ + Returns: + {scale: {layer_int: {'VD': float, 'HD': float, 'HV': float}}} + """ + data = defaultdict(dict) + for fname in sorted(csv_dir.iterdir()): + m = _CSV_RE.match(fname.name) + if not m: + continue + scale, layer_str, file_subset = m.group(1), m.group(2), m.group(3) + if file_subset != subset: + continue + layer = int(layer_str) + try: + df = pd.read_csv(fname, index_col=0) + except Exception as e: + print(f" [warn] Could not read {fname.name}: {e}") + continue + data[scale][layer] = compute_entanglement(df) + return dict(data) + + +def _scale_sort_key(s): + return SCALE_ORDER.index(s) if s in SCALE_ORDER else 99 + + +# ── Plotting ────────────────────────────────────────────────────────────────── + +METRICS = [ + ('VD', 'Vertical-Distance Entanglement\nmean(above-far, below-close) − mean(above-close, below-far)'), + ('HD', 'Horizontal-Distance Entanglement\nmean(left-far, right-close) − mean(left-close, right-far)'), + # ('HV', 'HV-Entanglement\nmean(left-above, right-below) − mean(left-below, right-above)'), +] + + +def plot_entanglement_single(scale_data: dict, model_type: str, + subset: str, save_path: Path): + """Single directory: color by scale.""" + fig, axes = plt.subplots(1, 2, figsize=(12, 5)) + + for ax, (metric_key, metric_label) in zip(axes, METRICS): + for scale in SCALE_ORDER: + if scale not in scale_data: + continue + layer_dict = scale_data[scale] + layers = sorted(layer_dict.keys()) + vals = [layer_dict[l][metric_key] for l in layers] + if not any(np.isfinite(v) for v in vals): + continue + ax.plot( + layers, vals, '-', + color=SCALE_COLORS.get(scale, 'gray'), + label=SCALE_DISPLAY_NAMES.get(scale, scale), + linewidth=2, + ) + _style_ax(ax, metric_label) + + tag = 'Both-Correct' if subset == 'both_correct' else 'All Pairs' + fig.suptitle( + f'{model_type.upper()} — Entanglement Metrics Across Layers [{tag}]', + fontsize=13, fontweight='bold', + ) + _save(fig, save_path) + + +def plot_entanglement_multi(family_data: dict, subset: str, save_path: Path): + """Multiple directories: color by family, linestyle by scale.""" + # Collect all scales across all families (in canonical order) + all_scales = sorted( + {s for scales in family_data.values() for s in scales}, + key=_scale_sort_key, + ) + families = list(family_data.keys()) # preserve insertion order + + # Assign colors to families and linestyles to scales + family_color = {f: FAMILY_COLOR_CYCLE[i % len(FAMILY_COLOR_CYCLE)] + for i, f in enumerate(families)} + scale_ls = {s: SCALE_LINESTYLE_CYCLE[i % len(SCALE_LINESTYLE_CYCLE)] + for i, s in enumerate(all_scales)} + + fig, axes = plt.subplots(1, 2, figsize=(12, 5)) + + for ax, (metric_key, metric_label) in zip(axes, METRICS): + for family in families: + scale_data = family_data[family] + color = family_color[family] + for scale in all_scales: + if scale not in scale_data: + continue + layer_dict = scale_data[scale] + layers = sorted(layer_dict.keys()) + vals = [layer_dict[l][metric_key] for l in layers] + if not any(np.isfinite(v) for v in vals): + continue + scale_disp = SCALE_DISPLAY_NAMES.get(scale, scale) + ax.plot( + layers, vals, + color=color, + linestyle=scale_ls[scale], + label=f'{family} {scale_disp}', + linewidth=2, + ) + _style_ax(ax, metric_label) + + tag = 'Both-Correct' if subset == 'both_correct' else 'All Pairs' + title_families = ' vs '.join(f.upper() for f in families) + fig.suptitle( + f'{title_families} — Entanglement Metrics Across Layers [{tag}]', + fontsize=13, fontweight='bold', + ) + _save(fig, save_path) + + +def _style_ax(ax, title: str): + ax.axhline(y=0, color='gray', linestyle='--', alpha=0.5, linewidth=1) + ax.set_xlabel('Layer Index', fontsize=11) + ax.set_ylabel('Entanglement', fontsize=11) + ax.set_ylim(-1, 1) + ax.set_title(title, fontsize=10, fontweight='bold') + ax.legend(fontsize=9) + ax.grid(True, alpha=0.3) + + +def _save(fig, save_path: Path): + plt.tight_layout() + save_path.parent.mkdir(parents=True, exist_ok=True) + plt.savefig(save_path, dpi=300, bbox_inches='tight') + plt.close() + print(f"Saved: {save_path}") + + +# ── Main ────────────────────────────────────────────────────────────────────── + +def main(): + parser = argparse.ArgumentParser( + description='Plot VD/HD/HV entanglement metrics from saved delta-similarity CSVs.', + formatter_class=argparse.RawDescriptionHelpFormatter, + epilog=__doc__, + ) + parser.add_argument('results_dirs', nargs='+', type=str, + help='One or more results directories ' + '(e.g. results_short_answer/molmo results_short_answer/nvila)') + parser.add_argument('--subset', choices=['all_pairs', 'both_correct'], default='all_pairs', + help='Which CSV subset to use (default: all_pairs)') + parser.add_argument('--scales', nargs='+', default=None, + help='Restrict to these scales (default: all found)') + parser.add_argument('--out-dir', type=str, default=None, + help='Output directory. Single dir default: {results_dir}/plots/entanglement/. ' + 'Multi dir default: {common_parent}/entanglement_compare/') + args = parser.parse_args() + + # Resolve and validate all directories + dirs = [] + for p in args.results_dirs: + d = Path(p).resolve() + if not d.is_dir(): + parser.error(f'Directory not found: {d}') + csv_dir = d / 'csv' + if not csv_dir.is_dir(): + parser.error(f'No csv/ subdirectory in: {d}') + dirs.append(d) + + multi = len(dirs) > 1 + subset = args.subset + tag = 'Both-Correct' if subset == 'both_correct' else 'All Pairs' + + # Determine output path + if args.out_dir: + out_dir = Path(args.out_dir) + elif multi: + common = dirs[0].parent + out_dir = common / 'entanglement_compare' + else: + out_dir = dirs[0] / 'plots' / 'entanglement' + + print(f"Subset : {subset}") + print(f"Output dir : {out_dir}") + print() + + # Load data from all directories + family_data = {} # {model_type: {scale: {layer: entanglement}}} + for d in dirs: + model_type = d.name + scale_data = load_entanglement(d / 'csv', subset) + + if not scale_data: + print(f"[warn] No matching CSVs in {d}/csv — skipping") + continue + + if args.scales: + scale_data = {s: v for s, v in scale_data.items() if s in args.scales} + + found = sorted(scale_data.keys(), key=_scale_sort_key) + print(f" {model_type}: {len(found)} scales — {found}") + for s in found: + layers = sorted(scale_data[s].keys()) + deepest = layers[-1] + e = scale_data[s][deepest] + vd = f"{e['VD']:>7.4f}" if np.isfinite(e['VD']) else ' nan' + hd = f"{e['HD']:>7.4f}" if np.isfinite(e['HD']) else ' nan' + hv = f"{e['HV']:>7.4f}" if np.isfinite(e['HV']) else ' nan' + print(f" {s:<15} L{deepest:>2} VD={vd} HD={hd} HV={hv}") + + family_data[model_type] = scale_data + + if not family_data: + print("[error] No data loaded from any directory.") + return + + print() + if multi: + families_tag = '_'.join(family_data.keys()) + save_path = out_dir / f'entanglement_{families_tag}_{subset}.png' + plot_entanglement_multi(family_data, subset, save_path) + else: + model_type = list(family_data.keys())[0] + save_path = out_dir / f'entanglement_{subset}.png' + plot_entanglement_single(family_data[model_type], model_type, subset, save_path) + + +if __name__ == '__main__': + main() diff --git a/probe_distance_prompt.py b/probe_distance_prompt.py new file mode 100644 index 0000000000000000000000000000000000000000..22528df1aadb7588611bb2c5e93afff622650772 --- /dev/null +++ b/probe_distance_prompt.py @@ -0,0 +1,347 @@ +#!/usr/bin/env python3 +""" +probe_distance_prompt.py +======================== +far / close 질문 프롬프트를 바꿔가며 모든 모델의 응답을 비교하는 테스트 스크립트. + +QUESTION_TEMPLATE (아래)을 수정 후 실행: + python probe_distance_prompt.py --data_type real --model_type nvila + python probe_distance_prompt.py --data_type synthetic --model_type molmo + python probe_distance_prompt.py --data_type real --model_type nvila molmo qwen + +환경별 실행: + vila env → nvila 모델 + molmo env → molmo 모델 + system → qwen 모델 + +결과: logs/probe_distance/YYYYMMDD_HHMMSS_.log +""" + +import os, sys, json, random, argparse, gc +from datetime import datetime +from io import BytesIO +import base64 + +# ─── sys.path (swap_analysis import) ───────────────────────────────────────── +_HERE = os.path.dirname(os.path.abspath(__file__)) +_SA_DIR = os.path.join(_HERE, 'swap_analysis') +sys.path.insert(0, _SA_DIR) + +# ============================================================================= +# {subj} = 거리를 평가할 대상 객체 +# {ref} = 기준이 되는 참조 객체 +# ============================================================================= +# 선택지 순서를 샘플마다 교대해 A/B position bias를 상쇄 +# far_first (짝수 샘플): (A) far (B) close +# close_first (홀수 샘플): (A) close (B) far +_Q_BASE = "Compared to {ref}, is {subj} far or close from you? " +_Q_TAIL = "Answer with a single letter A or B." +QUESTION_TEMPLATES = { + 'far_first': _Q_BASE + "(A) far (B) close " + _Q_TAIL, + 'close_first': _Q_BASE + "(A) close (B) far " + _Q_TAIL, +} +# ============================================================================= + +N_SAMPLES = 10 # 카테고리(far / close)별 샘플 수 +SEED = 42 +REAL_TSV = '/data/shared/Qwen/EmbSpatial-Bench/EmbSpatial-Bench.tsv' +SYNTH_DIR = '/data/shared/Qwen/synthetic/2body' +OUTPUT_ROOT = os.path.join(_HERE, 'logs', 'probe_distance') + +# 정답 인식 동의어 (MCQ "(a)"/"(b)" 패턴은 check()에서 variant별로 동적 처리) +_SYNONYMS = { + 'far': ['farther', 'further', 'distant', 'far away', 'further away'], + 'close': ['closer', 'near', 'nearby', 'nearer'], +} + +# MCQ 선택지 매핑 (variant별): 어느 template을 썼는지에 따라 A/B가 달라짐 +_MCQ_LETTER = { + 'far_first': {'far': 'a', 'close': 'b'}, + 'close_first': {'close': 'a', 'far': 'b'}, +} + +OPPOSITE = {'far': 'close', 'close': 'far'} + + +# ============================================================================= +# 정답 체크 +# ============================================================================= + +def check(pred: str, expected: str, mcq_map: dict) -> bool: + """expected 단어 또는 MCQ 선택지(A/B)가 opposite보다 먼저 나오면 정답. + mcq_map: variant별 letter 매핑 (예: {'far': 'a', 'close': 'b'}) + """ + t = pred.strip().lower() + opposite = OPPOSITE[expected] + + exp_letter = mcq_map[expected] + opp_letter = mcq_map[opposite] + + # 단독 알파벳 선택지 응답 처리 (e.g. "A", "A.", "A)", "a") + if t in (exp_letter, exp_letter + '.', exp_letter + ')', exp_letter + ','): + return True + if t in (opp_letter, opp_letter + '.', opp_letter + ')', opp_letter + ','): + return False + + # MCQ 인라인 패턴 "(a)"/"(b)"은 variant에 따라 동적으로 결정 + mcq_exp = f'({exp_letter})' + mcq_opp = f'({opp_letter})' + + def earliest(word, extra=()): + pos = t.find(word) + for syn in list(_SYNONYMS.get(word, [])) + list(extra): + q = t.find(syn) + if q != -1: + pos = q if pos == -1 else min(pos, q) + return pos + + pe = earliest(expected, (mcq_exp,)) + po = earliest(opposite, (mcq_opp,)) + return pe != -1 and (po == -1 or pe < po) + + +# ============================================================================= +# 데이터 로딩 +# ============================================================================= + +def load_real_samples(n: int, seed: int): + """EmbSpatialBench TSV에서 far/close 샘플 각 n개 반환.""" + import swap_analysis as sa + rng = random.Random(seed) + pairs = sa.load_swap_pairs(REAL_TSV, seed=seed) + + def _valid(p): + """reference_object나 target_object가 'Unknown' 또는 비어있으면 제외.""" + for field in ('target_object', 'reference_object'): + v = p.get(field, '') + if not v or v.strip().lower() in ('unknown', 'n/a', ''): + return False + return True + + far_pairs = [p for p in pairs if p['category'] == 'far' and _valid(p)] + close_pairs = [p for p in pairs if p['category'] == 'close' and _valid(p)] + rng.shuffle(far_pairs) + rng.shuffle(close_pairs) + + samples = [] + for p in far_pairs[:n]: + samples.append({ + 'category': 'far', + 'subj': p['target_object'], + 'ref': p['reference_object'], + 'image_base64': p['image_base64'], + }) + for p in close_pairs[:n]: + samples.append({ + 'category': 'close', + 'subj': p['target_object'], + 'ref': p['reference_object'], + 'image_base64': p['image_base64'], + }) + return samples + + +def load_synthetic_samples(n: int, seed: int): + """synthetic/2body/far,close 에서 각 n개 반환.""" + rng = random.Random(seed) + samples = [] + for folder, cat in [('far', 'far'), ('close', 'close')]: + folder_path = os.path.join(SYNTH_DIR, folder) + json_path = os.path.join(folder_path, 'vqa.json') + with open(json_path) as f: + entries = json.load(f) + rng.shuffle(entries) + for entry in entries[:n]: + img_path = os.path.join(folder_path, entry['image']) + with open(img_path, 'rb') as f: + b64 = base64.b64encode(f.read()).decode('utf-8') + obj1 = entry['obj1'] + obj2 = entry['obj2'] + subj = f"{obj1['color']} {obj1['shape']}" + ref = f"{obj2['color']} {obj2['shape']}" + samples.append({ + 'category': cat, + 'subj': subj, + 'ref': ref, + 'image_base64': b64, + }) + return samples + + +# ============================================================================= +# 모델 스펙 목록 +# ============================================================================= + +def get_model_specs(model_type_filter=None): + """MODEL_CONFIGS 기반 (model_type, scale, path, cls_name) 목록 반환.""" + import swap_analysis as sa + + extractor_cls = { + 'molmo': 'MolmoExtractor', + 'nvila': 'NVILAExtractor', + 'qwen': 'Qwen25VLExtractor', + 'nvila_synthetic': 'NVILAExtractor', + } + specs = [] + for mtype, scales in sa.MODEL_CONFIGS.items(): + if model_type_filter and mtype not in model_type_filter: + continue + cls_name = extractor_cls.get(mtype) + if cls_name is None: + continue + for scale, path in scales.items(): + actual_cls = ( + 'RoboReferExtractor' + if mtype == 'nvila' and scale == 'roborefer' + else cls_name + ) + specs.append({ + 'model_type': mtype, + 'scale': scale, + 'path': path, + 'cls_name': actual_cls, + }) + return specs + + +# ============================================================================= +# 프로브 실행 +# ============================================================================= + +def probe_model(spec, samples, device, log_fh): + """한 모델/스케일에 대해 전체 샘플 inference 후 결과 출력.""" + import swap_analysis as sa + from PIL import Image + + def _img(b64): + return Image.open(BytesIO(base64.b64decode(b64))).convert('RGB') + + header = (f"\n{'━'*62}\n" + f" MODEL : {spec['model_type']} / {spec['scale']}\n" + f" PATH : {spec['path']}\n" + f"{'━'*62}") + _log(header, log_fh) + + # 모델 로드 + try: + cls = sa.EXTRACTOR_CLASSES.get(spec['cls_name']) + if cls is None: + _log(f" [SKIP] 알 수 없는 extractor: {spec['cls_name']}", log_fh) + return + # target_layers=[] → hidden state 수집 없이 prediction만 얻음 + extractor = cls(spec['path'], device=device, target_layers=[]) + except Exception as e: + _log(f" [SKIP] 모델 로드 실패: {e}", log_fh) + return + + correct = {'far': 0, 'close': 0} + total = {'far': 0, 'close': 0} + + # variant 교대: 짝수=far_first, 홀수=close_first → A/B position bias 상쇄 + for i, s in enumerate(samples): + variant = 'far_first' if i % 2 == 0 else 'close_first' + mcq_map = _MCQ_LETTER[variant] + question = QUESTION_TEMPLATES[variant].format(subj=s['subj'], ref=s['ref']) + try: + image = _img(s['image_base64']) + _, pred = extractor.extract_and_predict(image, question) + except Exception as e: + pred = f"[ERROR: {e}]" + + ok = check(pred, s['category'], mcq_map) + mark = '✅' if ok else '❌' + if ok: + correct[s['category']] += 1 + total[s['category']] += 1 + + line = (f" [{s['category']:5}][{variant}] subj={s['subj']!r:25s} ref={s['ref']!r}\n" + f" Q: {question}\n" + f" A: {pred!r} {mark}") + _log(line, log_fh) + + nf, nc = total['far'], total['close'] + summary = (f"\n ── SUMMARY ── " + f"far={correct['far']}/{nf} " + f"close={correct['close']}/{nc} " + f"total={correct['far']+correct['close']}/{nf+nc}\n") + _log(summary, log_fh) + + # 메모리 해제 + extractor.cleanup() + gc.collect() + try: + import torch + if torch.cuda.is_available(): + torch.cuda.empty_cache() + except ImportError: + pass + + +def _log(msg, fh): + print(msg) + fh.write(msg + '\n') + fh.flush() + + +# ============================================================================= +# Main +# ============================================================================= + +def main(): + parser = argparse.ArgumentParser( + description='far/close 프롬프트 엔지니어링 테스트 스크립트') + parser.add_argument('--data_type', choices=['real', 'synthetic'], required=True, + help='real=EmbSpatialBench, synthetic=synthetic/2body') + parser.add_argument('--model_type', nargs='+', default=None, + metavar='TYPE', + help='테스트할 모델 패밀리 (molmo / nvila / qwen). ' + '기본값: 설정된 전체 모델. 환경에 없는 모델은 자동 스킵.') + parser.add_argument('--n_samples', type=int, default=N_SAMPLES, + help=f'카테고리별 샘플 수 (기본값: {N_SAMPLES})') + parser.add_argument('--device', type=str, default='cuda') + parser.add_argument('--seed', type=int, default=SEED) + args = parser.parse_args() + + os.makedirs(OUTPUT_ROOT, exist_ok=True) + ts = datetime.now().strftime('%Y%m%d_%H%M%S') + model_tag = '_'.join(args.model_type) if args.model_type else 'all' + log_path = os.path.join(OUTPUT_ROOT, f'{args.data_type}_{model_tag}_{ts}.log') + + # 샘플 로딩 + if args.data_type == 'real': + samples = load_real_samples(args.n_samples, args.seed) + else: + samples = load_synthetic_samples(args.n_samples, args.seed) + + # 모델 스펙 + specs = get_model_specs(args.model_type) + if not specs: + print(f"[ERROR] 해당하는 모델이 없습니다: {args.model_type}") + sys.exit(1) + + with open(log_path, 'w', encoding='utf-8') as log_fh: + models_str = ', '.join(f"{s['model_type']}/{s['scale']}" for s in specs) + banner = ( + f"{'='*62}\n" + f"PROMPT TEMPLATES (A/B order alternated per sample):\n" + f" far_first : {QUESTION_TEMPLATES['far_first']}\n" + f" close_first: {QUESTION_TEMPLATES['close_first']}\n\n" + f"DATA : {args.data_type} | {args.n_samples} far + {args.n_samples} close " + f"(seed={args.seed})\n" + f"MODELS: {models_str}\n" + f"TIME : {datetime.now().strftime('%Y-%m-%d %H:%M:%S')}\n" + f"{'='*62}" + ) + _log(banner, log_fh) + + for spec in specs: + probe_model(spec, samples, args.device, log_fh) + + footer = (f"\n{'='*62}\n" + f"로그 저장 완료: {log_path}\n" + f"{'='*62}\n") + _log(footer, log_fh) + + +if __name__ == '__main__': + main() diff --git a/reorder_results.py b/reorder_results.py new file mode 100644 index 0000000000000000000000000000000000000000..4906507f39364d8be51bbf6f8cb79861df1633ee --- /dev/null +++ b/reorder_results.py @@ -0,0 +1,70 @@ +"""Reorder exp2a similarity CSVs and heatmaps to: left, right, above, under, far, close.""" + +import os +import glob +import pandas as pd +import matplotlib.pyplot as plt +import seaborn as sns + +DESIRED_ORDER = ["left", "right", "above", "under", "far", "close"] +RESULTS_DIR = "/data/shared/Qwen/experiments/exp2a_results" + + +def reorder_and_save_csv(csv_path): + """Read a similarity CSV, reorder rows/cols, overwrite.""" + df = pd.read_csv(csv_path, index_col=0) + + # Filter to only categories that exist in this CSV + order = [c for c in DESIRED_ORDER if c in df.columns] + df = df.loc[order, order] + + df.to_csv(csv_path) + print(f" Reordered CSV: {csv_path}") + return df + + +def draw_heatmap(df, png_path, title): + """Draw and save a heatmap from a similarity DataFrame.""" + fig, ax = plt.subplots(figsize=(8, 6)) + sns.heatmap( + df.astype(float), + annot=True, + fmt=".4f", + cmap="RdYlBu_r", + vmin=0.5, + vmax=1.0, + square=True, + linewidths=0.5, + ax=ax, + ) + ax.set_title(title, fontsize=14) + plt.tight_layout() + plt.savefig(png_path, dpi=150, bbox_inches="tight") + plt.close() + print(f" Saved heatmap: {png_path}") + + +def main(): + model_dirs = sorted(glob.glob(os.path.join(RESULTS_DIR, "*"))) + + for model_dir in model_dirs: + if not os.path.isdir(model_dir): + continue + model_name = os.path.basename(model_dir) + print(f"\n=== {model_name} ===") + + csv_files = sorted(glob.glob(os.path.join(model_dir, "similarity_*.csv"))) + for csv_path in csv_files: + scale = os.path.basename(csv_path).replace("similarity_", "").replace(".csv", "") + + df = reorder_and_save_csv(csv_path) + + png_path = os.path.join(model_dir, f"heatmap_{scale}.png") + title = f"{model_name} - {scale} (Cosine Similarity)" + draw_heatmap(df, png_path, title) + + print("\nDone.") + + +if __name__ == "__main__": + main() diff --git a/research_summary.md b/research_summary.md new file mode 100644 index 0000000000000000000000000000000000000000..8a6b681d919926e8709a586002fc3274e753fe7b --- /dev/null +++ b/research_summary.md @@ -0,0 +1,162 @@ +## 연구 요약: VLM의 2D Heuristic 의존성 분석 + +### 1. 연구 배경 및 가설 + +**2D Height-Depth Entanglement Heuristic:** + +- 이미지에서 **위쪽 (y 작음)** → 카메라에서 **멀다** +- 이미지에서 **아래쪽 (y 큼)** → 카메라에서 **가깝다** + +### 분류 기준 + +```python +# BBox 중심 y좌표 계산 +center_y = bbox[1] + bbox[3] / 2 + +# FAR 질문 (가장 먼 물체는?) +if GT_y < other_objects_avg_y: # 정답이 위쪽 → Consistent +if GT_y > other_objects_avg_y: # 정답이 아래쪽 → Counter + +# CLOSE 질문 (가장 가까운 물체는?) +if GT_y > other_objects_avg_y: # 정답이 아래쪽 → Consistent +if GT_y < other_objects_avg_y: # 정답이 위쪽 → Counter +``` + +**가설:** VLM이 FAR/CLOSE 질문에서 실제 3D 공간을 이해하는지, 아니면 2D heuristic에 의존하는지 검증 + +--- + +### 2. 실험 설계 + +**EmbSpatial-Bench FAR/CLOSE 샘플 분류:** + +| 분류 | 정의 | 샘플 수 | +| --- | --- | --- | +| **Consistent** | GT 정답이 2D heuristic과 일치 | 987 (81.8%) | +| **Counter** | GT 정답이 2D heuristic과 반대 | 132 (10.9%) | +| **Ambiguous** | Y좌표 차이가 threshold 미만 | 87 (7.2%) | + +**핵심 지표:** + +- **Accuracy Gap** = Consistent 정확도 - Counter 정확도 +- Gap이 클수록 → 2D heuristic 의존도 높음 +- Counter 정확도가 높을수록 → 진정한 3D 이해력 + +--- + +### 3. 실험 결과 + +#### 3.1 Model Comparison (Counter vs Consistent Accuracy) + +| Model | Consistent | Counter | Gap | +| --- | --- | --- | --- | +| **Molmo-7B (vanilla)** | 63.4% | 34.8% | +28.6%p | +| Molmo-7B (80k) | 60.3% | 29.5% | +30.7%p | +| Molmo-7B (400k) | 62.5% | 27.3% | +35.2%p | +| Molmo-7B (800k) | 64.8% | 34.8% | +30.0%p | +| Molmo-7B (2m) | 64.9% | 40.2% | +24.8%p | +| **NVILA-Lite-2B (vanilla)** | 15.2% | 8.3% | +6.9%p | +| NVILA-Lite-2B (80k) | 57.2% | 15.9% | +41.3%p | +| NVILA-Lite-2B (400k) | 60.7% | 34.1% | +26.6%p | +| NVILA-Lite-2B (800k) | 62.7% | 38.6% | +24.1%p | +| NVILA-Lite-2B (2m) | 60.3% | 40.9% | +19.4%p | +| **RoboRefer-2B-SFT** | 86.8% | 59.8% | +27.0%p | +| **Qwen2.5-VL-3B (vanilla)** | 54.4% | 32.6% | +21.8%p | +| Qwen2.5-VL-3B (80k) | 50.6% | 30.3% | +20.3%p | +| Qwen2.5-VL-3B (400k) | 52.4% | 27.3% | +25.1%p | +| Qwen2.5-VL-3B (800k) | 55.6% | 26.5% | +29.1%p | +| Qwen2.5-VL-3B (2m) | 60.5% | 24.2% | +36.2%p | + +#### 3.2 모델별 분석 + +**Molmo-7B:** Fine-tuning 초기(80k~400k)에 Counter 정확도가 오히려 하락(34.8% → 27.3%)했다가 데이터 증가와 함께 회복. 2m에서 Counter 40.2%, Gap 24.8%p로 가장 좋은 성능. Consistent 정확도는 전 구간에서 안정적(60~65%). + +**NVILA-Lite-2B:** Vanilla 모델의 전체 성능이 매우 낮음(15.2%/8.3%). Fine-tuning으로 급격한 성능 향상. 80k에서 Counter가 15.9%로 낮고 Gap이 41.3%p로 최대치지만, 데이터 증가에 따라 Counter가 꾸준히 상승하여 2m에서 40.9%, Gap 19.4%p로 전 모델 중 가장 낮은 Gap 달성. + +**RoboRefer-2B-SFT:** Counter 59.8%로 전 모델 중 최고. Consistent도 86.8%로 압도적. Gap은 27.0%p로 여전히 존재하나, 절대적인 Counter 정확도가 가장 높아 3D 이해 능력이 가장 우수. + +**Qwen2.5-VL-3B:** Fine-tuning이 역효과. 데이터가 늘수록 Counter 정확도가 하락(32.6% → 24.2%), Gap은 확대(21.8%p → 36.2%p). Consistent 정확도만 상승(54.4% → 60.5%)하여 2D heuristic 의존성이 오히려 강화됨. + +--- + +### 4. Prediction Bias 분석 (Sanity Check) + +> 분석 코드: `experiments/analyze_answer_bias.py` +> 결과 파일: `experiments/answer_bias_results.txt` + +#### 4.1 GT 정답 분포 + +GT 정답은 A/B/C/D 전체에 걸쳐 균형적 (Std ~1.0%p). Counter 샘플에서도 비교적 균형적 (A:25.8%, B:22.0%, C:23.5%, D:28.8%, Std 2.57%p). + +#### 4.2 모델 Prediction Bias (전체 문제, ALL subset) + +| Model | A% | B% | C% | D% | Pred Std | Pred Max | +| --- | --- | --- | --- | --- | --- | --- | +| **Molmo-7B (vanilla)** | 30.3 | 28.1 | 21.9 | 19.7 | 4.3%p | A(30.3%) | +| Molmo-7B (80k) | 28.0 | 24.1 | 28.4 | 19.5 | 3.6%p | C(28.4%) | +| Molmo-7B (400k) | 23.7 | 23.6 | 26.6 | 26.1 | 1.4%p | C(26.6%) | +| Molmo-7B (800k) | 19.9 | 21.1 | 27.0 | 32.0 | 4.9%p | D(32.0%) | +| Molmo-7B (2m) | 23.6 | 22.6 | 22.2 | 31.6 | 3.8%p | D(31.6%) | +| **NVILA-Lite-2B (vanilla)** | 32.0 | 26.3 | 19.1 | 22.6 | 4.8%p | A(32.0%) | +| NVILA-Lite-2B (80k) | 25.5 | 27.7 | 21.6 | 25.1 | 2.2%p | B(27.7%) | +| NVILA-Lite-2B (400k) | 24.4 | 23.3 | 24.9 | 27.4 | 1.5%p | D(27.4%) | +| NVILA-Lite-2B (800k) | 25.6 | 21.8 | 24.5 | 28.1 | 2.2%p | D(28.1%) | +| NVILA-Lite-2B (2m) | 27.7 | 21.5 | 24.5 | 26.3 | 2.3%p | A(27.7%) | +| **RoboRefer-2B-SFT** | 27.3 | 25.8 | 23.4 | 23.4 | 1.6%p | A(27.3%) | +| **Qwen2.5-VL-3B (vanilla)** | 18.7 | 23.7 | 25.8 | 31.8 | 4.7%p | D(31.8%) | +| Qwen2.5-VL-3B (80k) | 19.3 | 24.3 | 26.8 | 29.6 | 3.8%p | D(29.6%) | +| Qwen2.5-VL-3B (400k) | 20.2 | 22.7 | 26.5 | 30.6 | 3.9%p | D(30.6%) | +| Qwen2.5-VL-3B (800k) | 22.4 | 22.3 | 25.7 | 29.6 | 3.0%p | D(29.6%) | +| Qwen2.5-VL-3B (2m) | 24.5 | 22.8 | 26.4 | 26.3 | 1.5%p | C(26.4%) | + +**Prediction Bias 패턴:** +- **Molmo-7B**: Vanilla은 A bias → fine-tuning 후 D bias로 전환. 800k에서 D bias가 가장 심함 (32.0%, Std 4.9%p) +- **NVILA-Lite-2B**: Vanilla은 A bias → fine-tuning 후 점차 균형화. 400k부터 Std < 2.5%p로 비교적 균형 +- **RoboRefer-2B-SFT**: 전 모델 중 가장 균형적 (Std 1.6%p) +- **Qwen2.5-VL-3B**: 전 구간에서 D bias 존재. 2m에서 가장 균형적 (Std 1.5%p) + +#### 4.3 FAR+CLOSE Subset에서의 Prediction Bias + +FAR+CLOSE 문제에 한정한 bias는 전체(ALL)와 다를 수 있음: + +| Model | ALL Pred Std | FAR+CLOSE Pred Std | FAR+CLOSE Pred Max | +| --- | --- | --- | --- | +| Molmo-7B (vanilla) | 4.3%p | 1.9%p | A(27.3%) | +| Molmo-7B (800k) | 4.9%p | **9.8%p** | **D(40.8%)** | +| Molmo-7B (2m) | 3.8%p | **6.2%p** | **D(35.4%)** | +| NVILA-Lite-2B (80k) | 2.2%p | 4.2%p | A(30.1%) | +| NVILA-Lite-2B (800k) | 2.2%p | 4.3%p | A(31.6%) | +| NVILA-Lite-2B (2m) | 2.3%p | 4.2%p | A(31.4%) | +| RoboRefer-2B-SFT | 1.6%p | 2.7%p | A(29.4%) | +| Qwen2.5-VL-3B (vanilla) | 4.7%p | 5.8%p | D(34.2%) | +| Qwen2.5-VL-3B (2m) | 1.5%p | 2.8%p | D(27.4%) | + +**주요 발견**: Molmo-7B (800k)는 전체 문제에서 Pred Std 4.9%p이지만, FAR+CLOSE에서는 **9.8%p** (D=40.8%)로 급격히 악화. FAR만 보면 **11.7%p** (D=44.4%). 이는 FAR/CLOSE 문제에서 D를 과도하게 선택하는 경향이 있음을 보여줌. + +#### 4.4 Counter 정확도에 대한 Bias 영향 + +Counter 샘플에서 GT 위치별 정확도를 분석하여 prediction bias가 Counter 정확도를 인위적으로 높이는지 검증: + +| Model | Counter Acc | Pos Std | Min Pos Acc | 해석 | +| --- | --- | --- | --- | --- | +| Molmo-7B (800k) | 34.8% | 22.1%p | A=11.8% | D bias로 Counter Acc 부풀려짐 | +| Molmo-7B (2m) | 40.2% | 6.7%p | A=32.4% | 상대적으로 고른 분포 | +| NVILA-Lite-2B (800k) | 38.6% | 2.1%p | C=35.5% | 매우 고른 분포 - 진정한 3D 이해 | +| NVILA-Lite-2B (2m) | 40.9% | - | - | NVILA 계열 최고 Counter | +| RoboRefer-2B-SFT | 59.8% | 11.0%p | D=44.7% | 최고 Min Pos Acc - 가장 robust | +| Qwen2.5-VL-3B (2m) | 24.2% | 4.8%p | A=20.6% | 균형잡힌 bias지만 2D heuristic 의존 | + +- **Pos Std**: Counter 샘플에서 GT 위치(A/B/C/D)별 정확도의 표준편차. 낮을수록 bias에 덜 의존 +- **Min Pos Acc**: Counter GT 위치별 정확도 중 최저값. 높을수록 robust + +--- + +### 5. 핵심 결론 + +1. **모든 모델이 2D heuristic에 의존**: Counter vs Consistent Gap이 항상 양수 (+6.9%p ~ +41.3%p) +2. **Fine-tuning 효과는 모델마다 상이**: + - NVILA: 데이터 증가에 따라 Counter 정확도 꾸준히 상승, Gap 감소 → 3D 이해 개선 + - Molmo: 초기 하락 후 2m에서 회복, 하지만 D bias가 결과를 부분적으로 부풀림 + - Qwen: Fine-tuning이 오히려 2D heuristic 의존성 강화 → Counter 정확도 하락, Gap 확대 +3. **RoboRefer-2B-SFT가 가장 우수**: Counter 59.8%, Min Pos Acc 44.7%로 가장 robust한 3D 이해 +4. **Prediction bias 주의 필요**: Molmo-7B (800k)의 Counter 정확도 34.8%는 D bias (32.0%)에 의해 부풀려진 결과 (GT=D에서 68.4% vs GT=A에서 11.8%) diff --git a/run_exp2a.sh b/run_exp2a.sh new file mode 100644 index 0000000000000000000000000000000000000000..f99bb51452e4969ea0adfc0904d6b16cf7e872ca --- /dev/null +++ b/run_exp2a.sh @@ -0,0 +1,158 @@ +#!/bin/bash +# Run Experiment 2-A for all model types with proper conda environments +# +# Usage: +# ./run_exp2a.sh # Run all models +# ./run_exp2a.sh qwen # Run only Qwen +# ./run_exp2a.sh nvila # Run only NVILA +# ./run_exp2a.sh molmo # Run only Molmo + +set -e + +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +OUTPUT_DIR="/data/shared/Qwen/experiments/exp2a_results" +SAMPLES=50 # Samples per category +SEED=42 + +echo "==============================================" +echo "Experiment 2-A: Embedding Space Analysis" +echo "==============================================" +echo "Output directory: $OUTPUT_DIR" +echo "Samples per category: $SAMPLES" +echo "" + +# Initialize conda +source /root/miniconda3/etc/profile.d/conda.sh + +# Parse arguments +RUN_QWEN=false +RUN_NVILA=false +RUN_MOLMO=false + +if [ $# -eq 0 ]; then + RUN_QWEN=true + RUN_NVILA=true + RUN_MOLMO=true +else + for arg in "$@"; do + case $arg in + qwen) RUN_QWEN=true ;; + nvila) RUN_NVILA=true ;; + molmo) RUN_MOLMO=true ;; + *) echo "Unknown model: $arg. Use qwen, nvila, or molmo." ;; + esac + done +fi + +# Run for Qwen (no conda environment - deactivate all) +if [ "$RUN_QWEN" = true ]; then + echo "==============================================" + echo "Running Qwen2.5-VL experiments..." + echo "==============================================" + # Deactivate all conda environments to get to base system python + conda deactivate 2>/dev/null || true + conda deactivate 2>/dev/null || true + conda deactivate 2>/dev/null || true + + # Use system python directly + /root/miniconda3/bin/python "$SCRIPT_DIR/exp2a_embedding_analysis.py" \ + --model_type qwen \ + --scales vanilla 80k 400k 800k 2m \ + --output_dir "$OUTPUT_DIR" \ + --samples_per_category $SAMPLES \ + --seed $SEED +fi + +# Run for NVILA (vila conda environment) +if [ "$RUN_NVILA" = true ]; then + echo "==============================================" + echo "Running NVILA experiments..." + echo "==============================================" + conda activate vila + + python "$SCRIPT_DIR/exp2a_embedding_analysis.py" \ + --model_type nvila \ + --scales vanilla 80k 400k 800k 2m \ + --output_dir "$OUTPUT_DIR" \ + --samples_per_category $SAMPLES \ + --seed $SEED + + conda deactivate +fi + +# Run for Molmo (molmo conda environment) +if [ "$RUN_MOLMO" = true ]; then + echo "==============================================" + echo "Running Molmo experiments..." + echo "==============================================" + conda activate molmo + + python "$SCRIPT_DIR/exp2a_embedding_analysis.py" \ + --model_type molmo \ + --scales vanilla 80k 400k 800k \ + --output_dir "$OUTPUT_DIR" \ + --samples_per_category $SAMPLES \ + --seed $SEED + + conda deactivate +fi + +echo "" +echo "==============================================" +echo "Experiments completed!" +echo "Results saved to: $OUTPUT_DIR" +echo "==============================================" + +# Generate combined comparison plot (uses base python) +/root/miniconda3/bin/python - <<'EOF' +import os +import pandas as pd +import matplotlib.pyplot as plt +import numpy as np + +output_dir = "/data/shared/Qwen/experiments/exp2a_results" + +# Collect all results +all_results = [] +for model_type in ['qwen', 'nvila', 'molmo']: + summary_path = os.path.join(output_dir, model_type, 'results_summary.csv') + if os.path.exists(summary_path): + df = pd.read_csv(summary_path) + all_results.append(df) + +if all_results: + combined_df = pd.concat(all_results, ignore_index=True) + combined_df.to_csv(os.path.join(output_dir, 'all_results_summary.csv'), index=False) + + # Create combined comparison plot + pairs = ['sim_above_far', 'sim_under_close', 'sim_left_right'] + pair_labels = ['above-far', 'under-close', 'left-right'] + + fig, axes = plt.subplots(1, 3, figsize=(18, 6)) + + for ax, (pair, pair_label) in zip(axes, zip(pairs, pair_labels)): + for model_type in ['qwen', 'nvila', 'molmo']: + model_data = combined_df[combined_df['model'].str.startswith(model_type)] + if not model_data.empty: + scales = model_data['model'].str.replace(f'{model_type}_', '') + values = model_data[pair].values + ax.plot(scales, values, marker='o', label=model_type.upper(), linewidth=2) + + ax.set_title(f'{pair_label}', fontsize=12, fontweight='bold') + ax.set_xlabel('Training Scale') + ax.set_ylabel('Cosine Similarity') + ax.legend() + ax.set_ylim(0, 1) + ax.axhline(y=0.5, color='gray', linestyle='--', alpha=0.5) + ax.tick_params(axis='x', rotation=45) + + plt.suptitle('Spatial Concept Similarity Across Training Scales', fontsize=14, fontweight='bold') + plt.tight_layout() + plt.savefig(os.path.join(output_dir, 'all_models_comparison.png'), dpi=300, bbox_inches='tight') + plt.close() + + print(f"\nCombined results saved to {output_dir}/all_results_summary.csv") + print(f"Combined plot saved to {output_dir}/all_models_comparison.png") +else: + print("No results found to combine.") +EOF diff --git a/run_exp2a_molmo.sh b/run_exp2a_molmo.sh new file mode 100644 index 0000000000000000000000000000000000000000..eee0daf05ad38da754be63d9ca8df2f65af2a153 --- /dev/null +++ b/run_exp2a_molmo.sh @@ -0,0 +1,28 @@ +#!/bin/bash +# Run Experiment 2-A for Molmo +# Run this with: conda activate molmo && ./run_exp2a_molmo.sh + +set -e + +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +OUTPUT_DIR="/data/shared/Qwen/experiments/exp2a_results" +SAMPLES=${1:-50} # Default 50 samples per category +SEED=42 + +echo "==============================================" +echo "Experiment 2-A: Molmo" +echo "==============================================" +echo "Output directory: $OUTPUT_DIR" +echo "Samples per category: $SAMPLES" +echo "" + +python "$SCRIPT_DIR/exp2a_embedding_analysis.py" \ + --model_type molmo \ + --scales vanilla 80k 400k 800k \ + --output_dir "$OUTPUT_DIR" \ + --samples_per_category $SAMPLES \ + --seed $SEED + +echo "" +echo "Molmo experiments completed!" +echo "Results saved to: $OUTPUT_DIR/molmo" diff --git a/run_exp2a_nvila.sh b/run_exp2a_nvila.sh new file mode 100644 index 0000000000000000000000000000000000000000..18e3ddc0f7bba67ee650ffe2ffc8561ee83f020c --- /dev/null +++ b/run_exp2a_nvila.sh @@ -0,0 +1,28 @@ +#!/bin/bash +# Run Experiment 2-A for NVILA +# Run this with: conda activate vila && ./run_exp2a_nvila.sh + +set -e + +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +OUTPUT_DIR="/data/shared/Qwen/experiments/exp2a_results" +SAMPLES=${1:-50} # Default 50 samples per category +SEED=42 + +echo "==============================================" +echo "Experiment 2-A: NVILA" +echo "==============================================" +echo "Output directory: $OUTPUT_DIR" +echo "Samples per category: $SAMPLES" +echo "" + +python "$SCRIPT_DIR/exp2a_embedding_analysis.py" \ + --model_type nvila \ + --scales vanilla 80k 400k 800k 2m \ + --output_dir "$OUTPUT_DIR" \ + --samples_per_category $SAMPLES \ + --seed $SEED + +echo "" +echo "NVILA experiments completed!" +echo "Results saved to: $OUTPUT_DIR/nvila" diff --git a/run_exp2a_qwen.sh b/run_exp2a_qwen.sh new file mode 100644 index 0000000000000000000000000000000000000000..9286ae9ae5284034452d3d07557f418cfa20b39b --- /dev/null +++ b/run_exp2a_qwen.sh @@ -0,0 +1,28 @@ +#!/bin/bash +# Run Experiment 2-A for Qwen2.5-VL +# Run this WITHOUT any conda environment (conda deactivate multiple times) + +set -e + +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +OUTPUT_DIR="/data/shared/Qwen/experiments/exp2a_results" +SAMPLES=${1:-50} # Default 50 samples per category +SEED=42 + +echo "==============================================" +echo "Experiment 2-A: Qwen2.5-VL" +echo "==============================================" +echo "Output directory: $OUTPUT_DIR" +echo "Samples per category: $SAMPLES" +echo "" + +python "$SCRIPT_DIR/exp2a_embedding_analysis.py" \ + --model_type qwen \ + --scales vanilla 80k 400k 800k 2m \ + --output_dir "$OUTPUT_DIR" \ + --samples_per_category $SAMPLES \ + --seed $SEED + +echo "" +echo "Qwen experiments completed!" +echo "Results saved to: $OUTPUT_DIR/qwen" diff --git a/summarize_metrics.py b/summarize_metrics.py new file mode 100644 index 0000000000000000000000000000000000000000..15394f3b4fdaca7950d4702bde6196031c22a066 --- /dev/null +++ b/summarize_metrics.py @@ -0,0 +1,671 @@ +#!/usr/bin/env python3 +"""Extract metrics from JSON files and display as a table. + +Columns: + 1. Peak consistency - horizontal + 2. Peak consistency - vertical + 3. Peak consistency - distance + 4. Entanglement Layer (fixed layer per model family) + 5. Layer Horiz SC (Sign-corrected consistency at fixed layer) + 6. Layer Vert SC (Sign-corrected consistency at fixed layer) + 7. Layer Dist SC (Sign-corrected consistency at fixed layer) + 8. VD-Entanglement (at fixed layer per model family) + 9. EmbSpatial Accuracy - consistent + 10. EmbSpatial Accuracy - counter + 11. CV-Bench-3D Accuracy - consistent + 12. CV-Bench-3D Accuracy - counter +""" + +import argparse +import json +import re +from pathlib import Path + +import numpy as np +import pandas as pd + +# --------------------------------------------------------------------------- +# Display name and text-file model name mappings +# --------------------------------------------------------------------------- + +DISPLAY_NAMES = { + ("molmo", "vanilla"): "Molmo vanilla", + ("molmo", "80k"): "Molmo 80k", + ("molmo", "400k"): "Molmo 400k", + ("molmo", "800k"): "Molmo 800k", + ("molmo", "2m"): "Molmo 2M", + ("nvila", "vanilla"): "NVILA vanilla", + ("nvila", "80k"): "NVILA 80k", + ("nvila", "400k"): "NVILA 400k", + ("nvila", "800k"): "NVILA 800k", + ("nvila", "2m"): "NVILA 2M", + ("nvila", "roborefer"): "RoboRefer", + ("nvila_synthetic", "10pct"): "NVILA 10pct", + ("nvila_synthetic", "20pct"): "NVILA 20pct", + ("nvila_synthetic", "30pct"): "NVILA 30pct", + ("qwen", "vanilla"): "Qwen vanilla", + ("qwen", "80k"): "Qwen 80k", + ("qwen", "400k"): "Qwen 400k", + ("qwen", "800k"): "Qwen 800k", + ("qwen", "2m"): "Qwen 2M", + ("qwen_super", "qwen3_235b"): "Qwen3-235B", +} + +TEXT_FILE_MODEL_NAMES = { + ("molmo", "vanilla"): "molmo-7B-O-0924", + ("molmo", "80k"): "molmo-7B-O-0924-data_scale_exp_80k", + ("molmo", "400k"): "molmo-7B-O-0924-data_scale_exp_400k", + ("molmo", "800k"): "molmo-7B-O-0924-data_scale_exp_800k", + ("molmo", "2m"): "molmo-7B-O-0924-data_scale_exp_2m", + ("nvila", "vanilla"): "NVILA-Lite-2B", + ("nvila", "80k"): "NVILA-Lite-2B-data-scale-exp-80k", + ("nvila", "400k"): "NVILA-Lite-2B-data-scale-exp-400k", + ("nvila", "800k"): "NVILA-Lite-2B-data-scale-exp-800k", + ("nvila", "2m"): "NVILA-Lite-2B-data-scale-exp-2m", + ("nvila", "roborefer"): "RoboRefer-2B-SFT", + ("qwen", "vanilla"): "Qwen2.5-VL-3B-Instruct", + ("qwen", "80k"): "Qwen2.5-VL-3B-Instruct-data_scale_exp_80k", + ("qwen", "400k"): "Qwen2.5-VL-3B-Instruct-data_scale_exp_400k", + ("qwen", "800k"): "Qwen2.5-VL-3B-Instruct-data_scale_exp_800k", + ("qwen", "2m"): "Qwen2.5-VL-3B-Instruct-data_scale_exp_2m", + ("qwen_super", "qwen3_235b"): "Qwen3-VL-235B-A22B-Instruct", +} + +FOLDER_ORDER = ["molmo", "nvila", "nvila_synthetic", "qwen", "qwen_super"] +SCALE_ORDER = ["vanilla", "roborefer", "10pct", "20pct", "30pct", "80k", "400k", "800k", "2m", + "qwen3_235b"] + +# Fixed layer index used for entanglement per model family +FOLDER_TARGET_LAYER = { + "molmo": 23, + "nvila": 20, + "nvila_synthetic": 20, # same architecture as nvila + "qwen": 27, + "qwen_super": 87, # Qwen3-VL-235B-A22B-Instruct +} + +# Default extra model-family directories included in every run +_SWAP_ANALYSIS = Path("/data/shared/Qwen/experiments/swap_analysis") +DEFAULT_EXTRA_DIRS = [ + _SWAP_ANALYSIS / "results_0223" / "qwen_super", +] + +# --------------------------------------------------------------------------- +# JSON helpers +# --------------------------------------------------------------------------- + +def get_peak_consistency(json_file: Path) -> dict: + """Return peak mean value per dimension (horizontal/vertical/distance).""" + with open(json_file) as f: + data = json.load(f) + result = {} + for dim in ("horizontal", "vertical", "distance"): + vals = [v["mean"] for k, v in data.items() if k.startswith(f"{dim}_L")] + result[dim] = max(vals) if vals else None + return result + + +def get_layer_consistency(json_file: Path, layer: int) -> dict: + """Sign-corrected consistency for horiz/vert/dist at a specific layer.""" + with open(json_file) as f: + data = json.load(f) + result = {} + for dim in ("horizontal", "vertical", "distance"): + key = f"{dim}_L{layer}" + result[dim] = data[key]["mean"] if key in data else None + return result + + +def _loc(df: pd.DataFrame, row: str, col: str) -> float: + """Look up (row, col) with 'under' <-> 'below' aliasing.""" + aliases = {"below": "under", "under": "below"} + r = row if row in df.index else aliases.get(row, row) + c = col if col in df.columns else aliases.get(col, col) + if r not in df.index or c not in df.columns: + return float("nan") + return float(df.loc[r, c]) + + +def get_vd_entanglement(csv_dir: Path, scale: str, layer: int) -> float | None: + """Return VD-entanglement from delta_similarity_{scale}_L{layer}_all_pairs.csv. + + VD = (mean(above-far, below-close) - mean(above-close, below-far)) / 4 + """ + csv_file = csv_dir / f"delta_similarity_{scale}_L{layer}_all_pairs.csv" + if not csv_file.exists(): + return None + df = pd.read_csv(csv_file, index_col=0) + vd = ( + _loc(df, "above", "far") + _loc(df, "below", "close") + - _loc(df, "above", "close") - _loc(df, "below", "far") + ) / 4 + return float(vd) if np.isfinite(vd) else None + + +# --------------------------------------------------------------------------- +# Text file parser +# --------------------------------------------------------------------------- + +def parse_accuracy_text(text_file: Path) -> dict: + """Parse per-model TOTAL consistent/counter accuracies from a results text file. + + Returns: + dict mapping model_name -> {"consistent": float, "counter": float} + """ + content = text_file.read_text() + # Split on section headers like "Model: " + sections = re.split(r"={10,}\s*\nModel:\s*", content) + result = {} + for section in sections[1:]: + lines = section.splitlines() + model_name = lines[0].strip() + consistent = counter = None + for line in lines: + m = re.match(r"\s*TOTAL\s+consistent\s+(\d+)\s+(\d+)\s+([\d.]+)%", line) + if m: + consistent = float(m.group(3)) + m = re.match(r"\s*TOTAL\s+counter\s+(\d+)\s+(\d+)\s+([\d.]+)%", line) + if m: + counter = float(m.group(3)) + if model_name: + result[model_name] = {"consistent": consistent, "counter": counter} + return result + + +# --------------------------------------------------------------------------- +# Main +# --------------------------------------------------------------------------- + +def fmt(val, fmt_str=".4f", suffix=""): + return f"{val:{fmt_str}}{suffix}" if val is not None else "N/A" + + +def main(): + parser = argparse.ArgumentParser(description="Summarize metrics from JSON result files.") + parser.add_argument( + "folder", + nargs="?", + default="/data/shared/Qwen/experiments/swap_analysis/results_short_answer", + help="Root folder whose subdirectories are each treated as a model family", + ) + parser.add_argument( + "--extra-dirs", "-e", + nargs="+", + metavar="DIR", + default=[], + help="Additional individual model-family directories to include " + "(each dir's basename is used as the folder name)", + ) + parser.add_argument( + "--no-defaults", + action="store_true", + help="Do not automatically include the built-in extra directories (e.g. qwen_super)", + ) + args = parser.parse_args() + + root = Path(args.folder) + exp_dir = Path("/data/shared/Qwen/experiments") + + # Collect model-family directories to scan: + # 1. All subdirectories of the root folder + # 2. Built-in defaults (e.g. qwen_super) unless --no-defaults + # 3. Any explicitly provided --extra-dirs + model_dirs: list[Path] = [d for d in sorted(root.iterdir()) if d.is_dir()] + + extra = [] if args.no_defaults else [d for d in DEFAULT_EXTRA_DIRS if d.is_dir()] + extra += [Path(d) for d in args.extra_dirs] + # Avoid duplicates (same resolved path) + seen = {d.resolve() for d in model_dirs} + for d in extra: + if d.resolve() not in seen: + model_dirs.append(d) + seen.add(d.resolve()) + + # Parse text-file accuracies + embspatial = parse_accuracy_text(exp_dir / "counter_consistent_results_embspatial.txt") + cvbench3d = parse_accuracy_text(exp_dir / "counter_consistent_result_cvbench3d_depth.txt") + + rows = [] + for folder_dir in model_dirs: + if not folder_dir.is_dir(): + continue + folder_name = folder_dir.name + + # Find all sign_corrected_consistency_*_all_pairs.json under this folder + for json_file in sorted(folder_dir.rglob("sign_corrected_consistency_*_all_pairs.json")): + m = re.match(r"sign_corrected_consistency_(.+)_all_pairs\.json", json_file.name) + if not m: + continue + scale = m.group(1) + key = (folder_name, scale) + display = DISPLAY_NAMES.get(key, f"{folder_name} {scale}") + + # 1-3: Peak consistency + consistency = get_peak_consistency(json_file) + + # 4: Layer values and VD-Entanglement at the fixed layer for this model family + target_layer = FOLDER_TARGET_LAYER.get(folder_name) + csv_dir = json_file.parent.parent / "csv" + + layer_sc = ( + get_layer_consistency(json_file, target_layer) + if target_layer is not None + else {"horizontal": None, "vertical": None, "distance": None} + ) + + vd_entanglement = ( + get_vd_entanglement(csv_dir, scale, target_layer) + if (target_layer is not None and csv_dir.is_dir()) + else None + ) + + # 5-8: Text-file accuracies + text_model = TEXT_FILE_MODEL_NAMES.get(key) + emb_con = emb_ctr = cvb_con = cvb_ctr = None + if text_model: + if text_model in embspatial: + emb_con = embspatial[text_model]["consistent"] + emb_ctr = embspatial[text_model]["counter"] + if text_model in cvbench3d: + cvb_con = cvbench3d[text_model]["consistent"] + cvb_ctr = cvbench3d[text_model]["counter"] + + rows.append(dict( + folder=folder_name, scale=scale, display=display, + peak_horiz=consistency.get("horizontal"), + peak_vert=consistency.get("vertical"), + peak_dist=consistency.get("distance"), + layer_horiz=layer_sc["horizontal"], + layer_vert=layer_sc["vertical"], + layer_dist=layer_sc["distance"], + vd_entanglement=vd_entanglement, + emb_con=emb_con, emb_ctr=emb_ctr, + cvb_con=cvb_con, cvb_ctr=cvb_ctr, + )) + + # Sort by model family then scale + def sort_key(r): + fi = FOLDER_ORDER.index(r["folder"]) if r["folder"] in FOLDER_ORDER else 99 + si = SCALE_ORDER.index(r["scale"]) if r["scale"] in SCALE_ORDER else 99 + return (fi, si) + + rows.sort(key=sort_key) + + # Build table records + records = [] + for r in rows: + layer = FOLDER_TARGET_LAYER.get(r["folder"], "?") + records.append({ + "Model": r["display"], + "Peak Horiz": fmt(r["peak_horiz"]), + "Peak Vert": fmt(r["peak_vert"]), + "Peak Dist": fmt(r["peak_dist"]), + "Entanglement Layer": str(layer), + "Layer Horiz SC": fmt(r["layer_horiz"]), + "Layer Vert SC": fmt(r["layer_vert"]), + "Layer Dist SC": fmt(r["layer_dist"]), + "Entanglement": fmt(r["vd_entanglement"]), + "EmbSpatial (con)": fmt(r["emb_con"], ".1f", "%"), + "EmbSpatial (ctr)": fmt(r["emb_ctr"], ".1f", "%"), + "CVBench3D (con)": fmt(r["cvb_con"], ".1f", "%"), + "CVBench3D (ctr)": fmt(r["cvb_ctr"], ".1f", "%"), + }) + + if not records: + print("No data found.") + return + + df = pd.DataFrame(records) + print(df.to_string(index=False)) + + # Save to CSV: experiments/summarize_metrics/{parent_name}/{folder_name}.csv + csv_rel = Path(root.parent.name) / (root.name + ".csv") + csv_path = exp_dir / "summarize_metrics" / csv_rel + csv_path.parent.mkdir(parents=True, exist_ok=True) + df.to_csv(csv_path, index=False) + print(f"\nSaved: {csv_path}") + + +if __name__ == "__main__": + main() + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +# #!/usr/bin/env python3 +# """Extract metrics from JSON files and display as a table. + +# Columns: +# 1. Peak consistency - horizontal +# 2. Peak consistency - vertical +# 3. Peak consistency - distance +# 4. VD-Entanglement (at fixed layer per model family) +# 5. EmbSpatial Accuracy - consistent +# 6. EmbSpatial Accuracy - counter +# 7. CV-Bench-3D Accuracy - consistent +# 8. CV-Bench-3D Accuracy - counter +# """ + +# import argparse +# import json +# import re +# from pathlib import Path + +# import numpy as np +# import pandas as pd + +# # --------------------------------------------------------------------------- +# # Display name and text-file model name mappings +# # --------------------------------------------------------------------------- + +# DISPLAY_NAMES = { +# ("molmo", "vanilla"): "Molmo vanilla", +# ("molmo", "80k"): "Molmo 80k", +# ("molmo", "400k"): "Molmo 400k", +# ("molmo", "800k"): "Molmo 800k", +# ("molmo", "2m"): "Molmo 2M", +# ("nvila", "vanilla"): "NVILA vanilla", +# ("nvila", "80k"): "NVILA 80k", +# ("nvila", "400k"): "NVILA 400k", +# ("nvila", "800k"): "NVILA 800k", +# ("nvila", "2m"): "NVILA 2M", +# ("nvila", "roborefer"): "RoboRefer", +# ("nvila_synthetic", "10pct"): "NVILA 10pct", +# ("nvila_synthetic", "20pct"): "NVILA 20pct", +# ("nvila_synthetic", "30pct"): "NVILA 30pct", +# ("qwen", "vanilla"): "Qwen vanilla", +# ("qwen", "80k"): "Qwen 80k", +# ("qwen", "400k"): "Qwen 400k", +# ("qwen", "800k"): "Qwen 800k", +# ("qwen", "2m"): "Qwen 2M", +# ("qwen_super", "qwen3_235b"): "Qwen3-235B", +# } + +# TEXT_FILE_MODEL_NAMES = { +# ("molmo", "vanilla"): "molmo-7B-O-0924", +# ("molmo", "80k"): "molmo-7B-O-0924-data_scale_exp_80k", +# ("molmo", "400k"): "molmo-7B-O-0924-data_scale_exp_400k", +# ("molmo", "800k"): "molmo-7B-O-0924-data_scale_exp_800k", +# ("molmo", "2m"): "molmo-7B-O-0924-data_scale_exp_2m", +# ("nvila", "vanilla"): "NVILA-Lite-2B", +# ("nvila", "80k"): "NVILA-Lite-2B-data-scale-exp-80k", +# ("nvila", "400k"): "NVILA-Lite-2B-data-scale-exp-400k", +# ("nvila", "800k"): "NVILA-Lite-2B-data-scale-exp-800k", +# ("nvila", "2m"): "NVILA-Lite-2B-data-scale-exp-2m", +# ("nvila", "roborefer"): "RoboRefer-2B-SFT", +# ("qwen", "vanilla"): "Qwen2.5-VL-3B-Instruct", +# ("qwen", "80k"): "Qwen2.5-VL-3B-Instruct-data_scale_exp_80k", +# ("qwen", "400k"): "Qwen2.5-VL-3B-Instruct-data_scale_exp_400k", +# ("qwen", "800k"): "Qwen2.5-VL-3B-Instruct-data_scale_exp_800k", +# ("qwen", "2m"): "Qwen2.5-VL-3B-Instruct-data_scale_exp_2m", +# ("qwen_super", "qwen3_235b"): "Qwen3-VL-235B-A22B-Instruct", +# } + +# FOLDER_ORDER = ["molmo", "nvila", "nvila_synthetic", "qwen", "qwen_super"] +# SCALE_ORDER = ["vanilla", "roborefer", "10pct", "20pct", "30pct", "80k", "400k", "800k", "2m", +# "qwen3_235b"] + +# # Fixed layer index used for entanglement per model family +# FOLDER_TARGET_LAYER = { +# "molmo": 23, +# "nvila": 20, +# "nvila_synthetic": 20, # same architecture as nvila +# "qwen": 27, +# "qwen_super": 87, # Qwen3-VL-235B-A22B-Instruct +# } + +# # Default extra model-family directories included in every run +# _SWAP_ANALYSIS = Path("/data/shared/Qwen/experiments/swap_analysis") +# DEFAULT_EXTRA_DIRS = [ +# _SWAP_ANALYSIS / "results_0223" / "qwen_super", +# ] + +# # --------------------------------------------------------------------------- +# # JSON helpers +# # --------------------------------------------------------------------------- + +# def get_peak_consistency(json_file: Path) -> dict: +# """Return peak mean value per dimension (horizontal/vertical/distance).""" +# with open(json_file) as f: +# data = json.load(f) +# result = {} +# for dim in ("horizontal", "vertical", "distance"): +# vals = [v["mean"] for k, v in data.items() if k.startswith(f"{dim}_L")] +# result[dim] = max(vals) if vals else None +# return result + + +# def _loc(df: pd.DataFrame, row: str, col: str) -> float: +# """Look up (row, col) with 'under' <-> 'below' aliasing.""" +# aliases = {"below": "under", "under": "below"} +# r = row if row in df.index else aliases.get(row, row) +# c = col if col in df.columns else aliases.get(col, col) +# if r not in df.index or c not in df.columns: +# return float("nan") +# return float(df.loc[r, c]) + + +# def get_vd_entanglement(csv_dir: Path, scale: str, layer: int) -> float | None: +# """Return VD-entanglement from delta_similarity_{scale}_L{layer}_all_pairs.csv. + +# VD = (mean(above-far, below-close) - mean(above-close, below-far)) / 4 +# """ +# csv_file = csv_dir / f"delta_similarity_{scale}_L{layer}_all_pairs.csv" +# if not csv_file.exists(): +# return None +# df = pd.read_csv(csv_file, index_col=0) +# vd = ( +# _loc(df, "above", "far") + _loc(df, "below", "close") +# - _loc(df, "above", "close") - _loc(df, "below", "far") +# ) / 4 +# return float(vd) if np.isfinite(vd) else None + + +# # --------------------------------------------------------------------------- +# # Text file parser +# # --------------------------------------------------------------------------- + +# def parse_accuracy_text(text_file: Path) -> dict: +# """Parse per-model TOTAL consistent/counter accuracies from a results text file. + +# Returns: +# dict mapping model_name -> {"consistent": float, "counter": float} +# """ +# content = text_file.read_text() +# # Split on section headers like "Model: " +# sections = re.split(r"={10,}\s*\nModel:\s*", content) +# result = {} +# for section in sections[1:]: +# lines = section.splitlines() +# model_name = lines[0].strip() +# consistent = counter = None +# for line in lines: +# m = re.match(r"\s*TOTAL\s+consistent\s+(\d+)\s+(\d+)\s+([\d.]+)%", line) +# if m: +# consistent = float(m.group(3)) +# m = re.match(r"\s*TOTAL\s+counter\s+(\d+)\s+(\d+)\s+([\d.]+)%", line) +# if m: +# counter = float(m.group(3)) +# if model_name: +# result[model_name] = {"consistent": consistent, "counter": counter} +# return result + + +# # --------------------------------------------------------------------------- +# # Main +# # --------------------------------------------------------------------------- + +# def fmt(val, fmt_str=".4f", suffix=""): +# return f"{val:{fmt_str}}{suffix}" if val is not None else "N/A" + + +# def main(): +# parser = argparse.ArgumentParser(description="Summarize metrics from JSON result files.") +# parser.add_argument( +# "folder", +# nargs="?", +# default="/data/shared/Qwen/experiments/swap_analysis/results_short_answer", +# help="Root folder whose subdirectories are each treated as a model family", +# ) +# parser.add_argument( +# "--extra-dirs", "-e", +# nargs="+", +# metavar="DIR", +# default=[], +# help="Additional individual model-family directories to include " +# "(each dir's basename is used as the folder name)", +# ) +# parser.add_argument( +# "--no-defaults", +# action="store_true", +# help="Do not automatically include the built-in extra directories (e.g. qwen_super)", +# ) +# args = parser.parse_args() + +# root = Path(args.folder) +# exp_dir = Path("/data/shared/Qwen/experiments") + +# # Collect model-family directories to scan: +# # 1. All subdirectories of the root folder +# # 2. Built-in defaults (e.g. qwen_super) unless --no-defaults +# # 3. Any explicitly provided --extra-dirs +# model_dirs: list[Path] = [d for d in sorted(root.iterdir()) if d.is_dir()] + +# extra = [] if args.no_defaults else [d for d in DEFAULT_EXTRA_DIRS if d.is_dir()] +# extra += [Path(d) for d in args.extra_dirs] +# # Avoid duplicates (same resolved path) +# seen = {d.resolve() for d in model_dirs} +# for d in extra: +# if d.resolve() not in seen: +# model_dirs.append(d) +# seen.add(d.resolve()) + +# # Parse text-file accuracies +# embspatial = parse_accuracy_text(exp_dir / "counter_consistent_results_embspatial.txt") +# cvbench3d = parse_accuracy_text(exp_dir / "counter_consistent_result_cvbench3d_depth.txt") + +# rows = [] +# for folder_dir in model_dirs: +# if not folder_dir.is_dir(): +# continue +# folder_name = folder_dir.name + +# # Find all sign_corrected_consistency_*_all_pairs.json under this folder +# for json_file in sorted(folder_dir.rglob("sign_corrected_consistency_*_all_pairs.json")): +# m = re.match(r"sign_corrected_consistency_(.+)_all_pairs\.json", json_file.name) +# if not m: +# continue +# scale = m.group(1) +# key = (folder_name, scale) +# display = DISPLAY_NAMES.get(key, f"{folder_name} {scale}") + +# # 1-3: Peak consistency +# consistency = get_peak_consistency(json_file) + +# # 4: VD-Entanglement at the fixed layer for this model family +# target_layer = FOLDER_TARGET_LAYER.get(folder_name) +# csv_dir = json_file.parent.parent / "csv" +# vd_entanglement = ( +# get_vd_entanglement(csv_dir, scale, target_layer) +# if (target_layer is not None and csv_dir.is_dir()) +# else None +# ) + +# # 5-8: Text-file accuracies +# text_model = TEXT_FILE_MODEL_NAMES.get(key) +# emb_con = emb_ctr = cvb_con = cvb_ctr = None +# if text_model: +# if text_model in embspatial: +# emb_con = embspatial[text_model]["consistent"] +# emb_ctr = embspatial[text_model]["counter"] +# if text_model in cvbench3d: +# cvb_con = cvbench3d[text_model]["consistent"] +# cvb_ctr = cvbench3d[text_model]["counter"] + +# rows.append(dict( +# folder=folder_name, scale=scale, display=display, +# peak_horiz=consistency.get("horizontal"), +# peak_vert=consistency.get("vertical"), +# peak_dist=consistency.get("distance"), +# vd_entanglement=vd_entanglement, +# emb_con=emb_con, emb_ctr=emb_ctr, +# cvb_con=cvb_con, cvb_ctr=cvb_ctr, +# )) + +# # Sort by model family then scale +# def sort_key(r): +# fi = FOLDER_ORDER.index(r["folder"]) if r["folder"] in FOLDER_ORDER else 99 +# si = SCALE_ORDER.index(r["scale"]) if r["scale"] in SCALE_ORDER else 99 +# return (fi, si) + +# rows.sort(key=sort_key) + +# # Build table records +# records = [] +# for r in rows: +# layer = FOLDER_TARGET_LAYER.get(r["folder"], "?") +# records.append({ +# "Model": r["display"], +# "Peak Horiz": fmt(r["peak_horiz"]), +# "Peak Vert": fmt(r["peak_vert"]), +# "Peak Dist": fmt(r["peak_dist"]), +# "Entanglement Layer": str(layer), +# "Entanglement": fmt(r["vd_entanglement"]), +# "EmbSpatial (con)": fmt(r["emb_con"], ".1f", "%"), +# "EmbSpatial (ctr)": fmt(r["emb_ctr"], ".1f", "%"), +# "CVBench3D (con)": fmt(r["cvb_con"], ".1f", "%"), +# "CVBench3D (ctr)": fmt(r["cvb_ctr"], ".1f", "%"), +# }) + +# if not records: +# print("No data found.") +# return + +# df = pd.DataFrame(records) +# print(df.to_string(index=False)) + +# # Save to CSV: experiments/summarize_metrics/{parent_name}/{folder_name}.csv +# csv_rel = Path(root.parent.name) / (root.name + ".csv") +# csv_path = exp_dir / "summarize_metrics" / csv_rel +# csv_path.parent.mkdir(parents=True, exist_ok=True) +# df.to_csv(csv_path, index=False) +# print(f"\nSaved: {csv_path}") + + +# if __name__ == "__main__": +# main() diff --git a/summarize_metrics_updated.py b/summarize_metrics_updated.py new file mode 100644 index 0000000000000000000000000000000000000000..802c07987a0e996eca13f201060b0d84d50031d0 --- /dev/null +++ b/summarize_metrics_updated.py @@ -0,0 +1,719 @@ +#!/usr/bin/env python3 +"""Summarize metrics from swap_analysis_updated results. + +Directory layout expected: + {root}/short_answer/saved_data/{model_folder}/json/sign_corrected_consistency_{scale}_all_pairs.json + {root}/short_answer/saved_data/{model_folder}/csv/delta_similarity_{scale}_L{layer}_all_pairs.csv + + [Optional – requires separate extraction step] + {root}/short_answer/saved_data/{model_folder}/csv/delta_norm_{scale}_L{layer}_all_pairs.csv + Expected format: single-column CSV (index = relation label, column = mean norm) + ,norm + left,12.34 + right,11.89 + above,9.45 + below,9.12 + far,7.23 + close,7.58 + NOTE: delta_similarity CSVs contain cosine similarities only (no magnitude info). + To populate Norm columns, save raw delta vector norms during swap_analysis. + +Each model_folder encodes both the model family and data scale, e.g.: + molmo_vanilla, molmo_80k, nvila_800k, nvila_st_800k-st, nvila_synthetic_80k-5pct, qwen_2m + +Usage: + # All models (default) + python summarize_metrics_updated.py + + # Specific models + python summarize_metrics_updated.py molmo_2m nvila_800k nvila_st_800k-st +""" + +import argparse +import json +import re +from pathlib import Path + +import numpy as np +import pandas as pd + +# --------------------------------------------------------------------------- +# Constants +# --------------------------------------------------------------------------- + +ROOT = Path("/data/shared/Qwen/experiments/swap_analysis_updated") +SAVED_DATA = ROOT / "short_answer" / "saved_data" +# SAVED_DATA = ROOT / "short_answer_wo_norm" / "saved_data_wo_norm" +EXP_DIR = Path("/data/shared/Qwen/experiments") + +DISPLAY_NAMES = { + "molmo_vanilla": "Molmo vanilla", + "molmo_80k": "Molmo 80k", + "molmo_400k": "Molmo 400k", + "molmo_800k": "Molmo 800k", + "molmo_2m": "Molmo 2M", + "nvila_vanilla": "NVILA vanilla", + "nvila_80k": "NVILA 80k", + "nvila_400k": "NVILA 400k", + "nvila_800k": "NVILA 800k", + "nvila_2m": "NVILA 2M", + "nvila_roborefer": "RoboRefer", + "nvila_st_80k-st": "NVILA-ST 80k", + "nvila_st_400k-st": "NVILA-ST 400k", + "nvila_st_800k-st": "NVILA-ST 800k", + "nvila_synthetic_80k-5pct": "NVILA Syn 80k-5%", + "nvila_synthetic_80k-10pct": "NVILA Syn 80k-10%", + "nvila_synthetic_400k-5pct": "NVILA Syn 400k-5%", + "nvila_synthetic_800k-5pct": "NVILA Syn 800k-5%", + "qwen_vanilla": "Qwen vanilla", + "qwen_80k": "Qwen 80k", + "qwen_400k": "Qwen 400k", + "qwen_800k": "Qwen 800k", + "qwen_2m": "Qwen 2M", +} + +TEXT_FILE_MODEL_NAMES = { + "molmo_vanilla": "molmo-7B-O-0924", + "molmo_80k": "molmo-7B-O-0924-data_scale_exp_80k", + "molmo_400k": "molmo-7B-O-0924-data_scale_exp_400k", + "molmo_800k": "molmo-7B-O-0924-data_scale_exp_800k", + "molmo_2m": "molmo-7B-O-0924-data_scale_exp_2m", + "nvila_vanilla": "NVILA-Lite-2B", + "nvila_80k": "NVILA-Lite-2B-data-scale-exp-80k", + "nvila_400k": "NVILA-Lite-2B-data-scale-exp-400k", + "nvila_800k": "NVILA-Lite-2B-data-scale-exp-800k", + "nvila_2m": "NVILA-Lite-2B-data-scale-exp-2m", + "nvila_st_80k-st": "NVILA-Lite-2B-ST-80k-5pct", + "nvila_st_400k-st": "NVILA-Lite-2B-ST-400k-5pct", + "nvila_st_800k-st": "NVILA-Lite-2B-ST-800k-5pct", + "nvila_roborefer": "RoboRefer-2B-SFT", + "qwen_vanilla": "Qwen2.5-VL-3B-Instruct", + "qwen_80k": "Qwen2.5-VL-3B-Instruct-data_scale_exp_80k", + "qwen_400k": "Qwen2.5-VL-3B-Instruct-data_scale_exp_400k", + "qwen_800k": "Qwen2.5-VL-3B-Instruct-data_scale_exp_800k", + "qwen_2m": "Qwen2.5-VL-3B-Instruct-data_scale_exp_2m", +} + +FOLDER_ORDER = [ + "molmo_vanilla", "molmo_80k", "molmo_400k", "molmo_800k", "molmo_2m", + "nvila_vanilla", + "nvila_80k", "nvila_400k", "nvila_800k", "nvila_2m", + "nvila_st_80k-st", "nvila_st_400k-st", "nvila_st_800k-st", + "nvila_roborefer", + "nvila_synthetic_80k-5pct", "nvila_synthetic_80k-10pct", + "nvila_synthetic_400k-5pct", "nvila_synthetic_800k-5pct", + "qwen_vanilla", "qwen_80k", "qwen_400k", "qwen_800k", "qwen_2m", +] + + +def get_target_layer(folder_name: str) -> int | None: + if folder_name.startswith("molmo"): + return 23 + if folder_name.startswith("nvila"): + return 20 + if folder_name.startswith("qwen"): + return 27 + return None + + +def make_display_name(folder_name: str) -> str: + return DISPLAY_NAMES.get(folder_name, folder_name.replace("_", " ")) + + +# --------------------------------------------------------------------------- +# Metric helpers +# --------------------------------------------------------------------------- + +def get_peak_consistency(json_file: Path) -> dict: + """Peak sign-corrected consistency across all layers per axis.""" + with open(json_file) as f: + data = json.load(f) + result = {} + for dim in ("horizontal", "vertical", "distance"): + vals = [v["mean"] for k, v in data.items() if k.startswith(f"{dim}_L")] + result[dim] = max(vals) if vals else None + return result + + +def get_layer_consistency(json_file: Path, layer: int) -> dict: + """Sign-corrected consistency for horiz/vert/dist at a specific layer. + + JSON keys follow the pattern: "{dim}_L{layer}" e.g. "distance_L20" + Each value is {"mean": float, "std": float, "n": int}. + """ + with open(json_file) as f: + data = json.load(f) + result = {} + for dim in ("horizontal", "vertical", "distance"): + key = f"{dim}_L{layer}" + result[dim] = data[key]["mean"] if key in data else None + return result + + +def _loc(df: pd.DataFrame, row: str, col: str) -> float: + """Safe df.loc with below/under alias.""" + aliases = {"below": "under", "under": "below"} + r = row if row in df.index else aliases.get(row, row) + c = col if col in df.columns else aliases.get(col, col) + if r not in df.index or c not in df.columns: + return float("nan") + return float(df.loc[r, c]) + + +def get_vd_entanglement(csv_dir: Path, scale: str, layer: int) -> float | None: + """VD-entanglement from cosine similarity matrix. + + Formula: (cos(above,far) + cos(below,close) - cos(above,close) - cos(below,far)) / 4 + + File: delta_similarity_{scale}_L{layer}_all_pairs.csv + Format: 6×6 cosine similarity matrix, labels left/right/above/below/far/close. + """ + csv_file = csv_dir / f"delta_similarity_{scale}_L{layer}_all_pairs.csv" + if not csv_file.exists(): + return None + df = pd.read_csv(csv_file, index_col=0) + vd = ( + _loc(df, "above", "far") + _loc(df, "below", "close") + - _loc(df, "above", "close") - _loc(df, "below", "far") + ) / 4 + return float(vd) if np.isfinite(vd) else None + + +def get_delta_norms(csv_dir: Path, scale: str, layer: int) -> dict: + """Mean delta vector norms for horiz/vert/dist at a specific layer. + + Requires: delta_norm_{scale}_L{layer}_all_pairs.csv + This file is NOT produced by default — it must be generated by saving + np.linalg.norm(delta_vec) per relation during swap_analysis. + (delta_similarity CSVs contain only cosine similarities, no magnitude info.) + + Expected format: + ,norm + left,12.34 right,11.89 above,9.45 below,9.12 far,7.23 close,7.58 + + Returns all-None dict when file is absent (columns will show N/A). + """ + norm_file = csv_dir / f"delta_norm_{scale}_L{layer}_all_pairs.csv" + if not norm_file.exists(): + return {"horizontal": None, "vertical": None, "distance": None} + + df = pd.read_csv(norm_file, index_col=0) + + def _mean_norm(labels: list[str]) -> float | None: + vals = [] + for lbl in labels: + aliases = {"below": "under", "under": "below"} + row = lbl if lbl in df.index else aliases.get(lbl, lbl) + if row not in df.index: + continue + row_vals = df.loc[row].values.astype(float) + finite = row_vals[np.isfinite(row_vals)] + if finite.size > 0: + vals.append(float(np.mean(finite))) + return float(np.mean(vals)) if vals else None + + return { + "horizontal": _mean_norm(["left", "right"]), + "vertical": _mean_norm(["above", "below"]), + "distance": _mean_norm(["far", "close"]), + } + + +# --------------------------------------------------------------------------- +# Text file parser +# --------------------------------------------------------------------------- + +def parse_accuracy_text(text_file: Path) -> dict: + content = text_file.read_text() + sections = re.split(r"={10,}\s*\nModel:\s*", content) + result = {} + for section in sections[1:]: + lines = section.splitlines() + model_name = lines[0].strip() + consistent = counter = None + for line in lines: + m = re.match(r"\s*TOTAL\s+consistent\s+(\d+)\s+(\d+)\s+([\d.]+)%", line) + if m: + consistent = float(m.group(3)) + m = re.match(r"\s*TOTAL\s+counter\s+(\d+)\s+(\d+)\s+([\d.]+)%", line) + if m: + counter = float(m.group(3)) + if model_name: + result[model_name] = {"consistent": consistent, "counter": counter} + return result + + +# --------------------------------------------------------------------------- +# Main +# --------------------------------------------------------------------------- + +def fmt(val, fmt_str=".4f", suffix=""): + return f"{val:{fmt_str}}{suffix}" if val is not None else "N/A" + + +def main(): + parser = argparse.ArgumentParser( + description="Summarize metrics from swap_analysis_updated results.", + formatter_class=argparse.RawDescriptionHelpFormatter, + epilog=__doc__, + ) + parser.add_argument( + "models", + nargs="*", + metavar="MODEL_FOLDER", + help="Model folder names under saved_data/ (e.g. molmo_2m nvila_800k). " + "Default: all folders found.", + ) + args = parser.parse_args() + + if args.models: + model_dirs = [] + for name in args.models: + d = SAVED_DATA / name + if not d.is_dir(): + print(f"[warn] Not found, skipping: {d}") + else: + model_dirs.append(d) + else: + model_dirs = sorted(d for d in SAVED_DATA.iterdir() if d.is_dir()) + + embspatial = parse_accuracy_text(EXP_DIR / "counter_consistent_results_embspatial_all.txt") + cvbench3d = parse_accuracy_text(EXP_DIR / "counter_consistent_results_cvbench3d_all.txt") + + rows = [] + for model_dir in model_dirs: + folder_name = model_dir.name + json_dir = model_dir / "json" + csv_dir = model_dir / "csv" + + json_files = list(json_dir.glob("sign_corrected_consistency_*_all_pairs.json")) + if not json_files: + print(f"[warn] No consistency JSON in {json_dir}, skipping.") + continue + json_file = json_files[0] + m = re.match(r"sign_corrected_consistency_(.+)_all_pairs\.json", json_file.name) + if not m: + continue + scale = m.group(1) + + display = make_display_name(folder_name) + target_layer = get_target_layer(folder_name) + + # Peak consistency (across all layers) + peak = get_peak_consistency(json_file) + + # Consistency at target layer + layer_sc = ( + get_layer_consistency(json_file, target_layer) + if target_layer is not None + else {"horizontal": None, "vertical": None, "distance": None} + ) + + # VD-Entanglement at target layer + vd_entanglement = ( + get_vd_entanglement(csv_dir, scale, target_layer) + if (target_layer is not None and csv_dir.is_dir()) + else None + ) + + # Delta vector norms at target layer (N/A until delta_norm CSVs are generated) + norms = ( + get_delta_norms(csv_dir, scale, target_layer) + if (target_layer is not None and csv_dir.is_dir()) + else {"horizontal": None, "vertical": None, "distance": None} + ) + + # Task accuracy + text_model = TEXT_FILE_MODEL_NAMES.get(folder_name) + emb_con = emb_ctr = cvb_con = cvb_ctr = None + if text_model: + if text_model in embspatial: + emb_con = embspatial[text_model]["consistent"] + emb_ctr = embspatial[text_model]["counter"] + if text_model in cvbench3d: + cvb_con = cvbench3d[text_model]["consistent"] + cvb_ctr = cvbench3d[text_model]["counter"] + + rows.append(dict( + folder_name=folder_name, + display=display, + peak_horiz=peak.get("horizontal"), + peak_vert=peak.get("vertical"), + peak_dist=peak.get("distance"), + target_layer=target_layer, + layer_horiz=layer_sc["horizontal"], + layer_vert=layer_sc["vertical"], + layer_dist=layer_sc["distance"], + vd_entanglement=vd_entanglement, + norm_horiz=norms["horizontal"], + norm_vert=norms["vertical"], + norm_dist=norms["distance"], + emb_con=emb_con, emb_ctr=emb_ctr, + cvb_con=cvb_con, cvb_ctr=cvb_ctr, + )) + + if not rows: + print("No data found.") + return + + rows.sort(key=lambda r: FOLDER_ORDER.index(r["folder_name"]) + if r["folder_name"] in FOLDER_ORDER else 99) + + records = [] + for r in rows: + layer = r["target_layer"] if r["target_layer"] is not None else "?" + records.append({ + "Model": r["display"], + "Peak Horiz": fmt(r["peak_horiz"]), + "Peak Vert": fmt(r["peak_vert"]), + "Peak Dist": fmt(r["peak_dist"]), + "Ent. Layer": str(layer), + "Layer Horiz SC": fmt(r["layer_horiz"]), + "Layer Vert SC": fmt(r["layer_vert"]), + "Layer Dist SC": fmt(r["layer_dist"]), + "VD-Entanglement": fmt(r["vd_entanglement"]), + "Norm Horiz": fmt(r["norm_horiz"]), + "Norm Vert": fmt(r["norm_vert"]), + "Norm Dist": fmt(r["norm_dist"]), + "EmbSpatial (con)": fmt(r["emb_con"], ".1f", "%"), + "EmbSpatial (ctr)": fmt(r["emb_ctr"], ".1f", "%"), + "CVBench3D (con)": fmt(r["cvb_con"], ".1f", "%"), + "CVBench3D (ctr)": fmt(r["cvb_ctr"], ".1f", "%"), + }) + + df = pd.DataFrame(records) + print(df.to_string(index=False)) + + csv_path = EXP_DIR / "summarize_metrics" / "swap_analysis_updated" / "short_answer_including_norm.csv" + csv_path.parent.mkdir(parents=True, exist_ok=True) + df.to_csv(csv_path, index=False) + print(f"\nSaved: {csv_path}") + + +if __name__ == "__main__": + main() + + + + + + + + + + + + + + + + + + + + + + + + + +# #!/usr/bin/env python3 +# """Summarize metrics from swap_analysis_updated results. + +# Directory layout expected: +# {root}/short_answer/saved_data/{model_folder}/json/sign_corrected_consistency_{scale}_all_pairs.json +# {root}/short_answer/saved_data/{model_folder}/csv/delta_similarity_{scale}_L{layer}_all_pairs.csv + +# Each model_folder encodes both the model family and data scale, e.g.: +# molmo_vanilla, molmo_80k, nvila_800k, nvila_st_800k-st, nvila_synthetic_80k-5pct, qwen_2m + +# Usage: +# # All models (default) +# python summarize_metrics_updated.py + +# # Specific models +# python summarize_metrics_updated.py molmo_2m nvila_800k nvila_st_800k-st +# """ + +# import argparse +# import json +# import re +# from pathlib import Path + +# import numpy as np +# import pandas as pd + +# # --------------------------------------------------------------------------- +# # Constants +# # --------------------------------------------------------------------------- + +# ROOT = Path("/data/shared/Qwen/experiments/swap_analysis_updated") +# SAVED_DATA = ROOT / "short_answer" / "saved_data" +# EXP_DIR = Path("/data/shared/Qwen/experiments") + +# # Display names keyed by folder name +# DISPLAY_NAMES = { +# "molmo_vanilla": "Molmo vanilla", +# "molmo_80k": "Molmo 80k", +# "molmo_400k": "Molmo 400k", +# "molmo_800k": "Molmo 800k", +# "molmo_2m": "Molmo 2M", +# "nvila_vanilla": "NVILA vanilla", +# "nvila_80k": "NVILA 80k", +# "nvila_400k": "NVILA 400k", +# "nvila_800k": "NVILA 800k", +# "nvila_2m": "NVILA 2M", +# "nvila_roborefer": "RoboRefer", +# "nvila_st_80k-st": "NVILA-ST 80k", +# "nvila_st_400k-st": "NVILA-ST 400k", +# "nvila_st_800k-st": "NVILA-ST 800k", +# "nvila_synthetic_80k-5pct": "NVILA Syn 80k-5%", +# "nvila_synthetic_80k-10pct": "NVILA Syn 80k-10%", +# "nvila_synthetic_400k-5pct": "NVILA Syn 400k-5%", +# "nvila_synthetic_800k-5pct": "NVILA Syn 800k-5%", +# "qwen_vanilla": "Qwen vanilla", +# "qwen_80k": "Qwen 80k", +# "qwen_400k": "Qwen 400k", +# "qwen_800k": "Qwen 800k", +# "qwen_2m": "Qwen 2M", +# } + +# # Accuracy text-file model names keyed by folder name +# TEXT_FILE_MODEL_NAMES = { +# "molmo_vanilla": "molmo-7B-O-0924", +# "molmo_80k": "molmo-7B-O-0924-data_scale_exp_80k", +# "molmo_400k": "molmo-7B-O-0924-data_scale_exp_400k", +# "molmo_800k": "molmo-7B-O-0924-data_scale_exp_800k", +# "molmo_2m": "molmo-7B-O-0924-data_scale_exp_2m", +# "nvila_vanilla": "NVILA-Lite-2B", +# "nvila_80k": "NVILA-Lite-2B-data-scale-exp-80k", +# "nvila_400k": "NVILA-Lite-2B-data-scale-exp-400k", +# "nvila_800k": "NVILA-Lite-2B-data-scale-exp-800k", +# "nvila_2m": "NVILA-Lite-2B-data-scale-exp-2m", +# "nvila_st_80k-st": "NVILA-Lite-2B-ST-80k-5pct", +# "nvila_st_400k-st": "NVILA-Lite-2B-ST-400k-5pct", +# "nvila_st_800k-st": "NVILA-Lite-2B-ST-800k-5pct", +# "nvila_roborefer": "RoboRefer-2B-SFT", +# "qwen_vanilla": "Qwen2.5-VL-3B-Instruct", +# "qwen_80k": "Qwen2.5-VL-3B-Instruct-data_scale_exp_80k", +# "qwen_400k": "Qwen2.5-VL-3B-Instruct-data_scale_exp_400k", +# "qwen_800k": "Qwen2.5-VL-3B-Instruct-data_scale_exp_800k", +# "qwen_2m": "Qwen2.5-VL-3B-Instruct-data_scale_exp_2m", +# # nvila_st_* and nvila_synthetic_* not yet in accuracy text files +# } + +# # Canonical sort order (unknown folders appended at the end) +# FOLDER_ORDER = [ +# "molmo_vanilla", "molmo_80k", "molmo_400k", "molmo_800k", "molmo_2m", +# "nvila_vanilla", +# "nvila_80k", "nvila_400k", "nvila_800k", "nvila_2m", +# "nvila_st_80k-st", "nvila_st_400k-st", "nvila_st_800k-st", +# "nvila_roborefer", +# "nvila_synthetic_80k-5pct", "nvila_synthetic_80k-10pct", +# "nvila_synthetic_400k-5pct", "nvila_synthetic_800k-5pct", +# "qwen_vanilla", "qwen_80k", "qwen_400k", "qwen_800k", "qwen_2m", +# ] + + +# def get_target_layer(folder_name: str) -> int | None: +# """Return the fixed probe layer for entanglement, based on model family.""" +# if folder_name.startswith("molmo"): +# return 23 +# if folder_name.startswith("nvila"): +# return 20 +# if folder_name.startswith("qwen"): +# return 27 +# return None + + +# def make_display_name(folder_name: str) -> str: +# """Fall back display name for unrecognised folder names.""" +# return DISPLAY_NAMES.get(folder_name, folder_name.replace("_", " ")) + + +# # --------------------------------------------------------------------------- +# # Metric helpers (same formulas as summarize_metrics.py) +# # --------------------------------------------------------------------------- + +# def get_peak_consistency(json_file: Path) -> dict: +# with open(json_file) as f: +# data = json.load(f) +# result = {} +# for dim in ("horizontal", "vertical", "distance"): +# vals = [v["mean"] for k, v in data.items() if k.startswith(f"{dim}_L")] +# result[dim] = max(vals) if vals else None +# return result + + +# def _loc(df: pd.DataFrame, row: str, col: str) -> float: +# aliases = {"below": "under", "under": "below"} +# r = row if row in df.index else aliases.get(row, row) +# c = col if col in df.columns else aliases.get(col, col) +# if r not in df.index or c not in df.columns: +# return float("nan") +# return float(df.loc[r, c]) + + +# def get_vd_entanglement(csv_dir: Path, scale: str, layer: int) -> float | None: +# """VD = (cos(above,far) + cos(below,close) - cos(above,close) - cos(below,far)) / 4""" +# csv_file = csv_dir / f"delta_similarity_{scale}_L{layer}_all_pairs.csv" +# if not csv_file.exists(): +# return None +# df = pd.read_csv(csv_file, index_col=0) +# vd = ( +# _loc(df, "above", "far") + _loc(df, "below", "close") +# - _loc(df, "above", "close") - _loc(df, "below", "far") +# ) / 4 +# return float(vd) if np.isfinite(vd) else None + + +# # --------------------------------------------------------------------------- +# # Text file parser +# # --------------------------------------------------------------------------- + +# def parse_accuracy_text(text_file: Path) -> dict: +# content = text_file.read_text() +# sections = re.split(r"={10,}\s*\nModel:\s*", content) +# result = {} +# for section in sections[1:]: +# lines = section.splitlines() +# model_name = lines[0].strip() +# consistent = counter = None +# for line in lines: +# m = re.match(r"\s*TOTAL\s+consistent\s+(\d+)\s+(\d+)\s+([\d.]+)%", line) +# if m: +# consistent = float(m.group(3)) +# m = re.match(r"\s*TOTAL\s+counter\s+(\d+)\s+(\d+)\s+([\d.]+)%", line) +# if m: +# counter = float(m.group(3)) +# if model_name: +# result[model_name] = {"consistent": consistent, "counter": counter} +# return result + + +# # --------------------------------------------------------------------------- +# # Main +# # --------------------------------------------------------------------------- + +# def fmt(val, fmt_str=".4f", suffix=""): +# return f"{val:{fmt_str}}{suffix}" if val is not None else "N/A" + + +# def main(): +# parser = argparse.ArgumentParser( +# description="Summarize metrics from swap_analysis_updated results.", +# formatter_class=argparse.RawDescriptionHelpFormatter, +# epilog=__doc__, +# ) +# parser.add_argument( +# "models", +# nargs="*", +# metavar="MODEL_FOLDER", +# help="Model folder names under saved_data/ (e.g. molmo_2m nvila_800k). " +# "Default: all folders found.", +# ) +# args = parser.parse_args() + +# # Resolve model directories to process +# if args.models: +# model_dirs = [] +# for name in args.models: +# d = SAVED_DATA / name +# if not d.is_dir(): +# print(f"[warn] Not found, skipping: {d}") +# else: +# model_dirs.append(d) +# else: +# model_dirs = sorted(d for d in SAVED_DATA.iterdir() if d.is_dir()) + +# # Parse accuracy text files +# embspatial = parse_accuracy_text(EXP_DIR / "counter_consistent_results_embspatial_all.txt") +# cvbench3d = parse_accuracy_text(EXP_DIR / "counter_consistent_results_cvbench3d_all.txt") + +# rows = [] +# for model_dir in model_dirs: +# folder_name = model_dir.name +# json_dir = model_dir / "json" +# csv_dir = model_dir / "csv" + +# # Locate the sign_corrected_consistency JSON to extract scale +# json_files = list(json_dir.glob("sign_corrected_consistency_*_all_pairs.json")) +# if not json_files: +# print(f"[warn] No consistency JSON in {json_dir}, skipping.") +# continue +# json_file = json_files[0] +# m = re.match(r"sign_corrected_consistency_(.+)_all_pairs\.json", json_file.name) +# if not m: +# continue +# scale = m.group(1) + +# display = make_display_name(folder_name) +# target_layer = get_target_layer(folder_name) + +# # 1-3: Peak consistency +# consistency = get_peak_consistency(json_file) + +# # 4: VD-Entanglement at fixed layer +# vd_entanglement = ( +# get_vd_entanglement(csv_dir, scale, target_layer) +# if (target_layer is not None and csv_dir.is_dir()) +# else None +# ) + +# # 5-8: Accuracy from text files +# text_model = TEXT_FILE_MODEL_NAMES.get(folder_name) +# emb_con = emb_ctr = cvb_con = cvb_ctr = None +# if text_model: +# if text_model in embspatial: +# emb_con = embspatial[text_model]["consistent"] +# emb_ctr = embspatial[text_model]["counter"] +# if text_model in cvbench3d: +# cvb_con = cvbench3d[text_model]["consistent"] +# cvb_ctr = cvbench3d[text_model]["counter"] + +# rows.append(dict( +# folder_name=folder_name, display=display, +# peak_horiz=consistency.get("horizontal"), +# peak_vert=consistency.get("vertical"), +# peak_dist=consistency.get("distance"), +# target_layer=target_layer, +# vd_entanglement=vd_entanglement, +# emb_con=emb_con, emb_ctr=emb_ctr, +# cvb_con=cvb_con, cvb_ctr=cvb_ctr, +# )) + +# if not rows: +# print("No data found.") +# return + +# rows.sort(key=lambda r: FOLDER_ORDER.index(r["folder_name"]) +# if r["folder_name"] in FOLDER_ORDER else 99) + +# records = [] +# for r in rows: +# layer = r["target_layer"] if r["target_layer"] is not None else "?" +# records.append({ +# "Model": r["display"], +# "Peak Horiz": fmt(r["peak_horiz"]), +# "Peak Vert": fmt(r["peak_vert"]), +# "Peak Dist": fmt(r["peak_dist"]), +# "Entanglement Layer": str(layer), +# "Entanglement": fmt(r["vd_entanglement"]), +# "EmbSpatial (con)": fmt(r["emb_con"], ".1f", "%"), +# "EmbSpatial (ctr)": fmt(r["emb_ctr"], ".1f", "%"), +# "CVBench3D (con)": fmt(r["cvb_con"], ".1f", "%"), +# "CVBench3D (ctr)": fmt(r["cvb_ctr"], ".1f", "%"), +# }) + +# df = pd.DataFrame(records) +# print(df.to_string(index=False)) + +# # Save CSV to experiments/summarize_metrics/swap_analysis_updated/short_answer.csv +# csv_path = EXP_DIR / "summarize_metrics" / "swap_analysis_updated" / "short_answer.csv" +# csv_path.parent.mkdir(parents=True, exist_ok=True) +# df.to_csv(csv_path, index=False) +# print(f"\nSaved: {csv_path}") + + +# if __name__ == "__main__": +# main() diff --git a/swap_analysis/CODEBASE_OVERVIEW.md b/swap_analysis/CODEBASE_OVERVIEW.md new file mode 100644 index 0000000000000000000000000000000000000000..ae3ae7a5833d41f564a5f2086f740f5480553a20 --- /dev/null +++ b/swap_analysis/CODEBASE_OVERVIEW.md @@ -0,0 +1,253 @@ +# swap_analysis.py — Codebase Overview + +## Purpose + +Probes spatial understanding in VLMs (Molmo-7B, NVILA-Lite-2B, Qwen2.5-VL-3B) by analyzing +hidden representations extracted via forward hooks. The core idea is **swap pair analysis**: +two queries about the same image differ only in subject/reference order (e.g., "is A left of B?" +vs. "is B left of A?"), so their hidden-state difference (delta) should encode a consistent +spatial direction if the model truly understands the concept. + +--- + +## High-Level Flow + +``` +swap_analysis.py (main) +│ +├── Load swap pairs from TSV ──► paired questions + answers + images (base64) +├── Build HF bbox cache ──► enables cross-group quads (vertical × distance) +│ +└── For each scale (vanilla / 80k / 400k / 800k / 2m / roborefer): + │ + └── process_scale() + ├── Phase A: extract_swap_features() — run each pair through model × 2 + ├── Phase B: extract_cross_group_features() — run each quad × 4 + ├── Phase C: analysis (consistency, alignment, pred_stats) + ├── Phase D: save results to csv/ json/ npz/ + └── Phase E: per-scale plots +│ +└── --merge flag: run_merge() + ├── Load per-scale JSONs / CSVs + ├── Cross-scale consistency / alignment plots + └── Summary CSV + ablation plot +``` + +--- + +## Model Extractors + +All three extractors inherit from `BaseHiddenStateExtractor`. + +### Hook Mechanism (shared by all models) + +```python +# _make_hook() — registered on each transformer layer module +def hook_fn(module, input, output): + hidden = output[0] if isinstance(output, tuple) else output + if hidden.shape[1] > 1: # prefill pass only (not generation) + last_token = hidden[:, -1, :].detach().cpu().float() + self.hidden_states[layer_idx] = last_token.squeeze(0) +``` + +**Key points:** +- `shape[1] > 1` — skips single-token decoding steps; captures only the prefill pass +- `hidden[:, -1, :]` — takes the **last token** of the input sequence +- Result is a 1-D float32 CPU tensor stored in `self.hidden_states[layer_idx]` +- Hooks are registered once at init; `self.hidden_states` is reset before each forward call + +--- + +### MolmoExtractor (`allenai/Molmo-7B-O-0924`) + +| Item | Detail | +|---|---| +| **Format** | Native OLMo (config.yaml + model.pt) **or** HuggingFace | +| **Layer module path** | `model.transformer.blocks[i]` (native) / `model.model.transformer.blocks[i]` (HF) | +| **Number of layers** | 32 | +| **Tokenizer** | Loaded from `cfg.get_tokenizer()` (native) or `AutoTokenizer` | +| **Precision** | bfloat16 | + +**Inference:** +```python +inputs = self.processor.process(images=[image], text=question) +output = self.model.generate_from_batch(inputs, max_new_tokens=20, ...) +# hooks fire during the prefill of generate_from_batch +``` + +--- + +### NVILAExtractor (`Efficient-Large-Model/NVILA-Lite-2B`) + +| Item | Detail | +|---|---| +| **Library** | LLaVA-style (`llava` package) — `load_pretrained_model()` | +| **LLM backbone** | **Gemma-2-2B** → **28 layers** (L0–L27), not 24 | +| **Layer module path** | Dynamically discovered; searches `model.llm.model.layers`, `model.llm.layers`, `model.model.model.layers`, `model.model.layers` in order. Falls back to scanning all `named_modules()` for a `.layers` list. Stored as `self.llm_backbone`. | +| **Layer access** | `self.llm_backbone[i]` | +| **Tokenizer / processor** | `AutoTokenizer`, `AutoProcessor` loaded from model path | +| **Precision** | bfloat16 | + +**Why 28 layers?** NVILA-Lite-2B uses Gemma-2-2B as its language backbone, which has 28 +transformer blocks. The `24` that appears as a fallback default in the code is never actually +used because `_find_llm_backbone()` always succeeds. + +**Inference:** +```python +input_ids, images, image_sizes = prepare_inputs(tokenizer, processor, image, question) +output = model.generate(input_ids, images=images, ...) +``` + +--- + +### Qwen25VLExtractor (`Qwen/Qwen2.5-VL-3B-Instruct`) + +| Item | Detail | +|---|---| +| **Library** | `transformers.Qwen2_5_VLForConditionalGeneration` | +| **Layer module path** | `model.model.layers[i]` | +| **Number of layers** | 36 | +| **Processor** | `AutoProcessor` (loaded from base model path for fine-tuned checkpoints) | +| **Precision** | bfloat16 | + +**Inference:** +```python +messages = [{"role": "user", "content": [{"type": "image", ...}, {"type": "text", ...}]}] +text = processor.apply_chat_template(messages, add_generation_prompt=True) +inputs = processor(text=[text], images=image_inputs, return_tensors="pt") +output_ids = model.generate(**inputs, max_new_tokens=20, do_sample=False) +``` + +--- + +## Swap Pair Concept + +### Input Data + +Loaded from a TSV file. Each row contains: +- `image_base64` — scene image +- `original_question` / `swapped_question` — minimal pair differing in subject/reference order +- `original_answer` / `swapped_answer` — expected single-word answers (e.g., `left` / `right`) +- `category` — one of `left right above under far close` +- `group` — `horizontal` / `vertical` / `distance` +- `index`, `question_id` — identifiers for matching to the HuggingFace dataset cache + +### swap_record Structure + +```python +{ + 'index': int, + 'group': str, # 'horizontal' | 'vertical' | 'distance' + 'category': str, # 'left' | 'right' | 'above' | 'under' | 'far' | 'close' + 'pred_orig': str, # model output for original question + 'pred_swap': str, # model output for swapped question + 'is_correct_orig': bool, + 'is_correct_swap': bool, + 'hs_orig': {layer_idx: np.ndarray}, # hidden state vectors + 'hs_swap': {layer_idx: np.ndarray}, + 'delta': {layer_idx: np.ndarray}, # hs_swap[L] - hs_orig[L] +} +``` + +### Answer Checking + +```python +def check_answer(generated_text, expected_category): + # Find earliest position of expected word (+ synonyms) and opposite word + pos_exp = find_earliest_position(text, expected) + pos_opp = find_earliest_position(text, opposite) + return pos_exp != -1 and (pos_opp == -1 or pos_exp < pos_opp) +``` + +Synonyms handled: `under → [below, beneath]`, `close → [near, nearby]`, `far → [distant]` + +--- + +## Analysis Metrics + +### 1. Within-Category Consistency + +For each category and layer, compute mean pairwise cosine similarity among all delta vectors +of that category. High similarity means the model encodes the concept consistently. + +``` +similarity_matrix = cosine_similarity(delta_vectors) # shape: (n, n) +mean = upper_triangle(similarity_matrix).mean() +``` + +### 2. Sign-Corrected Group Consistency + +Flip deltas from the *opposite* category (e.g., flip `right` deltas by −1) so all deltas +point in the canonical direction (e.g., toward `left`). Then compute mean pairwise cosine +similarity across the entire group. + +``` +for each delta in group: + if category == opposite_category: d = -d +mean_pairwise_cosine(all_deltas) +``` + +### 3. Cross-Group Alignment (Vertical × Distance) + +Each **quad** provides two deltas from the same scene: +- `delta_vert`: hidden state difference for a vertical swap (above/under) +- `delta_dist`: hidden state difference for a distance swap (far/close) + +If `cosine(delta_vert, delta_dist)` is consistently positive, the model may conflate +vertical position with depth (perspective bias hypothesis). + +Significance is assessed with a **permutation test** (100 shuffles of distance deltas). + +--- + +## Saved Outputs (per model, per scale) + +``` +results/{model}/ +├── csv/ +│ ├── delta_similarity_{scale}_L{n}_all_pairs.csv # pairwise category similarity matrix +│ └── summary.csv +├── json/ +│ ├── pred_stats_{scale}.json # per-group accuracy (orig/swap/both) +│ ├── category_validity_{scale}.json # per-category accuracy + reliable flag +│ ├── sign_corrected_consistency_{scale}_{tag}.json # {group_L{n}: {mean, std, n}} +│ ├── within_cat_consistency_{scale}_{tag}.json # {cat_L{n}: {mean, std, n}} +│ └── cross_alignment_{scale}.json # {L{n}: {per_sample_mean, mean_delta_alignment, ...}} +├── npz/ +│ ├── vectors_{scale}.npz # orig/swap/delta vectors + metadata (5 rep layers) +│ └── cross_group_vectors_{scale}.npz # delta_vert / delta_dist per quad +└── plots/ + ├── all/ + │ ├── pca/ pca_{scale}_L{n}.png + │ ├── pca_3d/ pca_{scale}_L{n}.png (from pca_3d.py) + │ └── ... + ├── both_correct/ + ├── all_with_validity/ + └── accuracy/ (from accuracy_chart.py) +``` + +--- + +## Scales + +| Scale key | Samples seen | Global steps (batch=64) | +|---|---|---| +| `vanilla` | 0 (base model) | — | +| `80k` | 80,000 | 1,250 | +| `400k` | 400,000 | 6,250 | +| `800k` | 800,000 | 12,500 | +| `2m` | 2,000,000 | 31,250 | +| `roborefer` | NVILA only — RoboRefer fine-tuned | — | + +--- + +## Key Scripts in This Directory + +| Script | Purpose | +|---|---| +| `swap_analysis.py` | Main extraction + analysis + plotting | +| `unify_consistency_ylim.py` | Post-hoc: unify y-axis across scales for consistency plots | +| `pca_2d_recolor.py` | Post-hoc: overwrite 2D PCA plots with unified color scheme | +| `pca_3d.py` | Post-hoc: generate 3D PCA plots from existing NPZ files | +| `accuracy_chart.py` | Post-hoc: generate accuracy bar/trajectory plots from saved JSONs | +| `run_molmo.sh` / `run_nvila.sh` / `run_qwen.sh` | Shell wrappers for running all scales + merge | diff --git a/swap_analysis/accuracy_chart.py b/swap_analysis/accuracy_chart.py new file mode 100644 index 0000000000000000000000000000000000000000..789b34689f67d26997ea126d86d09f66e1c53324 --- /dev/null +++ b/swap_analysis/accuracy_chart.py @@ -0,0 +1,425 @@ +""" +accuracy_chart.py - Generate accuracy charts for swap_analysis from saved JSON data. + +Reads per-scale pred_stats_{scale}.json and category_validity_{scale}.json +from results/{model}/json/ and saves plots to results/{model}/plots/accuracy/. + +Output files per model: + accuracy_chart.png - combined summary (all panels) + accuracy_group_bars.png - per-group (orig/swap/both) bar chart across scales + accuracy_trajectory.png - both-correct trajectory line plot across scales + accuracy_category.png - per-category accuracy (orig vs swap) across scales + +Processes all models and all available scales by default. + +Usage: + python accuracy_chart.py +""" + +import os +import json +import re +import numpy as np +import matplotlib +matplotlib.use('Agg') +import matplotlib.pyplot as plt + +RESULTS_DIR = os.path.join(os.path.dirname(__file__), 'results') + +SCALE_ORDER = ['vanilla', '80k', '400k', '800k', '2m', 'roborefer'] +GROUP_ORDER = ['horizontal', 'vertical', 'distance'] +CATEGORY_ORDER = ['left', 'right', 'above', 'under', 'far', 'close'] + +SCALE_COLORS = { + 'vanilla': '#1f77b4', + '80k': '#ff7f0e', + '400k': '#2ca02c', + '800k': '#d62728', + '2m': '#9467bd', + 'roborefer':'#8c564b', +} +GROUP_COLORS = { + 'horizontal': '#2ca02c', + 'vertical': '#ff7f0e', + 'distance': '#9467bd', +} +# Category colors: same as pca_3d.py / pca_2d_recolor.py +CAT_COLORS = { + 'left': '#2ca02c', 'right': '#98df8a', + 'above': '#ff7f0e', 'under': '#ffbb78', + 'far': '#9467bd', 'close': '#c5b0d5', +} + + +# ── Data loading ────────────────────────────────────────────────────────────── + +def load_pred_stats(json_dir): + """Load all pred_stats_{scale}.json files. Returns list of dicts.""" + records = [] + for fname in os.listdir(json_dir): + m = re.match(r'pred_stats_(.+)\.json$', fname) + if not m: + continue + scale = m.group(1) + with open(os.path.join(json_dir, fname)) as f: + data = json.load(f) + data['scale'] = scale + records.append(data) + return records + + +def load_category_validity(json_dir): + """Load all category_validity_{scale}.json files. Returns {scale: dict}.""" + result = {} + for fname in os.listdir(json_dir): + m = re.match(r'category_validity_(.+)\.json$', fname) + if not m: + continue + scale = m.group(1) + with open(os.path.join(json_dir, fname)) as f: + result[scale] = json.load(f) + return result + + +# ── Individual plots ────────────────────────────────────────────────────────── + +def plot_group_bars(pred_stats, model_type, ax_list): + """ + Draw per-group (orig/swap/both) grouped bar chart across scales. + ax_list: list of 3 Axes (one per group). + """ + available = [s for s in SCALE_ORDER if any(d['scale'] == s for d in pred_stats)] + x = np.arange(3) # orig, swap, both + width = 0.8 / max(len(available), 1) + + for idx, group in enumerate(GROUP_ORDER): + ax = ax_list[idx] + for i, scale in enumerate(available): + entry = next((d for d in pred_stats if d['scale'] == scale), None) + if entry is None: + continue + vals = [ + entry.get(f'{group}_acc_orig', 0), + entry.get(f'{group}_acc_swap', 0), + entry.get(f'{group}_acc_both', 0), + ] + offset = (i - len(available) / 2 + 0.5) * width + ax.bar(x + offset, vals, width, + label=scale, color=SCALE_COLORS.get(scale, 'gray'), alpha=0.85) + ax.set_xticks(x) + ax.set_xticklabels(['orig', 'swap', 'both'], fontsize=10) + ax.set_ylabel('Accuracy', fontsize=9) + ax.set_title(f'{group.capitalize()}', fontweight='bold', fontsize=11, + color=GROUP_COLORS.get(group, 'black')) + ax.legend(fontsize=7, ncol=2) + ax.set_ylim(0, 1.15) + ax.axhline(y=0.5, color='gray', linestyle='--', alpha=0.5, linewidth=1) + ax.grid(True, alpha=0.3, axis='y') + + +def plot_both_trajectory(pred_stats, model_type, ax): + """Line plot: acc_both per group across scales.""" + available = [s for s in SCALE_ORDER if any(d['scale'] == s for d in pred_stats)] + x_ticks = range(len(available)) + + for group in GROUP_ORDER: + y_vals = [] + for scale in available: + entry = next((d for d in pred_stats if d['scale'] == scale), None) + y_vals.append(entry.get(f'{group}_acc_both', 0) if entry else 0) + ax.plot(x_ticks, y_vals, '-o', + color=GROUP_COLORS.get(group, 'gray'), + label=group, linewidth=2.5, markersize=7) + + # Overall both-correct + y_overall = [] + for scale in available: + entry = next((d for d in pred_stats if d['scale'] == scale), None) + y_overall.append(entry.get('overall_acc_both', 0) if entry else 0) + ax.plot(x_ticks, y_overall, '--s', + color='black', label='overall', linewidth=2, markersize=6, alpha=0.7) + + ax.set_xticks(list(x_ticks)) + ax.set_xticklabels(available, fontsize=9) + ax.set_xlabel('Scale', fontsize=9) + ax.set_ylabel('Accuracy (both correct)', fontsize=9) + ax.set_title('Both-Correct Accuracy Trajectory', fontweight='bold', fontsize=11) + ax.legend(fontsize=9) + ax.set_ylim(0, 1.05) + ax.axhline(y=0.5, color='gray', linestyle='--', alpha=0.5, linewidth=1) + ax.grid(True, alpha=0.3) + + +def plot_overall_trajectory(pred_stats, model_type, ax): + """Line plot: overall acc_orig/acc_swap/acc_both across scales.""" + available = [s for s in SCALE_ORDER if any(d['scale'] == s for d in pred_stats)] + x_ticks = range(len(available)) + + for metric, label, ls in [ + ('overall_acc_orig', 'orig', '-o'), + ('overall_acc_swap', 'swap', '-s'), + ('overall_acc_both', 'both', '-^'), + ]: + y_vals = [] + for scale in available: + entry = next((d for d in pred_stats if d['scale'] == scale), None) + y_vals.append(entry.get(metric, 0) if entry else 0) + ax.plot(x_ticks, y_vals, ls, label=label, linewidth=2.2, markersize=6) + + ax.set_xticks(list(x_ticks)) + ax.set_xticklabels(available, fontsize=9) + ax.set_xlabel('Scale', fontsize=9) + ax.set_ylabel('Overall Accuracy', fontsize=9) + ax.set_title('Overall Accuracy Trajectory', fontweight='bold', fontsize=11) + ax.legend(fontsize=9) + ax.set_ylim(0, 1.05) + ax.axhline(y=0.5, color='gray', linestyle='--', alpha=0.5, linewidth=1) + ax.grid(True, alpha=0.3) + + +def plot_category_accuracy(cat_validity, model_type, ax_orig, ax_swap, pred_stats=None): + """ + Heatmap-style grouped bars: per-category + overall acc_orig and acc_swap across scales. + ax_orig: Axes for acc_orig, ax_swap: Axes for acc_swap. + """ + available = [s for s in SCALE_ORDER if s in cat_validity] + cats_with_overall = CATEGORY_ORDER + ['overall'] + x = np.arange(len(cats_with_overall)) + width = 0.8 / max(len(available), 1) + + # overall metric keys in pred_stats + overall_metric = {'acc_orig': 'overall_acc_orig', 'acc_swap': 'overall_acc_swap'} + + for ax, metric, title in [ + (ax_orig, 'acc_orig', 'Per-Category Accuracy (orig)'), + (ax_swap, 'acc_swap', 'Per-Category Accuracy (swap)'), + ]: + for i, scale in enumerate(available): + cv = cat_validity[scale] + vals = [cv.get(cat, {}).get(metric, 0) for cat in CATEGORY_ORDER] + # Append overall value + if pred_stats is not None: + entry = next((d for d in pred_stats if d['scale'] == scale), None) + vals.append(entry.get(overall_metric[metric], 0) if entry else 0) + else: + vals.append(0) + offset = (i - len(available) / 2 + 0.5) * width + ax.bar(x + offset, vals, width, + label=scale, color=SCALE_COLORS.get(scale, 'gray'), alpha=0.85) + + # Shade per-category bars by group (background tint) + for j, cat in enumerate(CATEGORY_ORDER): + c = CAT_COLORS.get(cat, 'gray') + ax.axvspan(j - 0.45, j + 0.45, color=c, alpha=0.06, linewidth=0) + + # Vertical separator between categories and overall + sep = len(CATEGORY_ORDER) - 0.5 + ax.axvline(x=sep, color='black', linewidth=1.2, linestyle=':', alpha=0.6) + + ax.set_xticks(x) + ax.set_xticklabels(cats_with_overall, fontsize=9, rotation=15) + ax.set_ylabel('Accuracy', fontsize=9) + ax.set_title(title, fontweight='bold', fontsize=11) + ax.legend(fontsize=7, ncol=2) + ax.set_ylim(0, 1.15) + ax.axhline(y=0.5, color='gray', linestyle='--', alpha=0.5, linewidth=1) + ax.grid(True, alpha=0.3, axis='y') + + # Mark reliable/unreliable for last available scale (as reference) + if available: + last_scale = available[-1] + cv = cat_validity[last_scale] + for j, cat in enumerate(CATEGORY_ORDER): + reliable = cv.get(cat, {}).get('reliable', True) + if not reliable: + ax.text(j, 1.08, '✗', ha='center', va='center', + fontsize=9, color='red', fontweight='bold') + + +# ── Per-scale category bar chart ────────────────────────────────────────────── + +def plot_category_per_scale(cat_validity, model_type, save_dir, pred_stats=None): + """ + One figure per scale: side-by-side acc_orig and acc_swap per category + overall. + Saves category_accuracy_{scale}.png. + """ + overall_metric = {'acc_orig': 'overall_acc_orig', 'acc_swap': 'overall_acc_swap'} + cats_with_overall = CATEGORY_ORDER + ['overall'] + + for scale in sorted(cat_validity.keys(), key=lambda s: SCALE_ORDER.index(s) if s in SCALE_ORDER else 99): + cv = cat_validity[scale] + ps_entry = next((d for d in pred_stats if d['scale'] == scale), None) if pred_stats else None + + fig, axes = plt.subplots(1, 2, figsize=(16, 5)) + x = np.arange(len(cats_with_overall)) + width = 0.55 + + for ax, metric, title in [ + (axes[0], 'acc_orig', f'acc_orig ({scale})'), + (axes[1], 'acc_swap', f'acc_swap ({scale})'), + ]: + vals = [cv.get(cat, {}).get(metric, 0) for cat in CATEGORY_ORDER] + overall_val = ps_entry.get(overall_metric[metric], 0) if ps_entry else 0 + vals.append(overall_val) + colors = [CAT_COLORS.get(cat, 'gray') for cat in CATEGORY_ORDER] + ['#333333'] + bars = ax.bar(x, vals, width, color=colors, alpha=0.85, edgecolor='white') + + # Separator before overall + ax.axvline(x=len(CATEGORY_ORDER) - 0.5, color='black', linewidth=1.2, + linestyle=':', alpha=0.6) + + ax.set_xticks(x) + ax.set_xticklabels(cats_with_overall, fontsize=10) + ax.set_ylabel('Accuracy', fontsize=10) + ax.set_title(title, fontweight='bold', fontsize=12) + ax.set_ylim(0, 1.15) + ax.axhline(y=0.5, color='gray', linestyle='--', alpha=0.5) + ax.grid(True, alpha=0.3, axis='y') + for j, (bar, cat) in enumerate(zip(bars, cats_with_overall)): + reliable = cv.get(cat, {}).get('reliable', True) if cat != 'overall' else True + h = bar.get_height() + ax.text(bar.get_x() + bar.get_width() / 2, h + 0.02, + f'{h:.2f}' + ('' if reliable else ' ✗'), + ha='center', va='bottom', fontsize=8, + color='red' if not reliable else 'black') + + fig.suptitle(f'{model_type.upper()} - Category Accuracy ({scale})', + fontsize=13, fontweight='bold') + plt.tight_layout() + out = os.path.join(save_dir, f'category_accuracy_{scale}.png') + plt.savefig(out, dpi=200, bbox_inches='tight') + plt.close() + print(f" Saved {out}") + + +# ── Main chart builders ─────────────────────────────────────────────────────── + +def save_accuracy_group_bars(pred_stats, model_type, save_dir): + fig, axes = plt.subplots(1, 3, figsize=(21, 6)) + plot_group_bars(pred_stats, model_type, axes) + fig.suptitle(f'{model_type.upper()} - Prediction Accuracy by Group', + fontsize=15, fontweight='bold') + plt.tight_layout() + out = os.path.join(save_dir, 'accuracy_group_bars.png') + plt.savefig(out, dpi=200, bbox_inches='tight') + plt.close() + print(f" Saved {out}") + + +def save_accuracy_trajectory(pred_stats, model_type, save_dir): + fig, axes = plt.subplots(1, 2, figsize=(16, 6)) + plot_both_trajectory(pred_stats, model_type, axes[0]) + plot_overall_trajectory(pred_stats, model_type, axes[1]) + fig.suptitle(f'{model_type.upper()} - Accuracy Trajectory Across Scales', + fontsize=14, fontweight='bold') + plt.tight_layout() + out = os.path.join(save_dir, 'accuracy_trajectory.png') + plt.savefig(out, dpi=200, bbox_inches='tight') + plt.close() + print(f" Saved {out}") + + +def save_accuracy_category(cat_validity, model_type, save_dir, pred_stats=None): + fig, axes = plt.subplots(1, 2, figsize=(20, 6)) + plot_category_accuracy(cat_validity, model_type, axes[0], axes[1], pred_stats=pred_stats) + fig.suptitle(f'{model_type.upper()} - Per-Category Accuracy Across Scales', + fontsize=14, fontweight='bold') + plt.tight_layout() + out = os.path.join(save_dir, 'accuracy_category.png') + plt.savefig(out, dpi=200, bbox_inches='tight') + plt.close() + print(f" Saved {out}") + + +def save_accuracy_chart(pred_stats, cat_validity, model_type, save_dir): + """ + Combined summary figure (accuracy_chart.png): + Row 1: group bars x3 + Row 2: both-correct trajectory | overall trajectory | (cat orig + cat swap stacked) + Layout: 2 rows x 3 cols, last col splits into 2 sub-axes. + """ + fig = plt.figure(figsize=(24, 14)) + + # Row 1: group bars (3 cols) + ax_h = fig.add_subplot(3, 3, 1) + ax_v = fig.add_subplot(3, 3, 2) + ax_d = fig.add_subplot(3, 3, 3) + plot_group_bars(pred_stats, model_type, [ax_h, ax_v, ax_d]) + + # Row 2: trajectories + ax_traj_both = fig.add_subplot(3, 3, 4) + ax_traj_ovr = fig.add_subplot(3, 3, 5) + plot_both_trajectory(pred_stats, model_type, ax_traj_both) + plot_overall_trajectory(pred_stats, model_type, ax_traj_ovr) + + # Row 2 col 3: blank (placeholder for legend/note) + ax_note = fig.add_subplot(3, 3, 6) + ax_note.axis('off') + available_scales = [s for s in SCALE_ORDER if any(d['scale'] == s for d in pred_stats)] + note_lines = [f'Scales: {", ".join(available_scales)}', + '', '✗ = unreliable category', '-- = 0.5 chance level'] + ax_note.text(0.1, 0.6, '\n'.join(note_lines), transform=ax_note.transAxes, + fontsize=11, va='top', family='monospace') + + # Row 3: per-category accuracy (orig | swap) + ax_cat_orig = fig.add_subplot(3, 1, 3) + # Draw both cat panels in a sub-figure approach via twin + # (simplified: draw orig in bottom-left half, swap in bottom-right half) + ax_cat_orig.remove() + ax_co = fig.add_subplot(3, 2, 5) + ax_cs = fig.add_subplot(3, 2, 6) + plot_category_accuracy(cat_validity, model_type, ax_co, ax_cs, pred_stats=pred_stats) + + fig.suptitle(f'{model_type.upper()} — Accuracy Summary', + fontsize=17, fontweight='bold', y=1.01) + plt.tight_layout() + out = os.path.join(save_dir, 'accuracy_chart.png') + plt.savefig(out, dpi=200, bbox_inches='tight') + plt.close() + print(f" Saved {out}") + + +# ── Entry point ─────────────────────────────────────────────────────────────── + +def main(): + if not os.path.isdir(RESULTS_DIR): + print(f"Results directory not found: {RESULTS_DIR}") + return + + for model in sorted(os.listdir(RESULTS_DIR)): + model_dir = os.path.join(RESULTS_DIR, model) + if not os.path.isdir(model_dir): + continue + + json_dir = os.path.join(model_dir, 'json') + if not os.path.isdir(json_dir): + print(f"[{model}] no json/ dir, skipping") + continue + + pred_stats = load_pred_stats(json_dir) + cat_validity = load_category_validity(json_dir) + + if not pred_stats: + print(f"[{model}] no pred_stats files found, skipping") + continue + + # Sort by scale order + pred_stats.sort(key=lambda d: SCALE_ORDER.index(d['scale']) + if d['scale'] in SCALE_ORDER else 99) + + save_dir = os.path.join(model_dir, 'plots', 'accuracy') + os.makedirs(save_dir, exist_ok=True) + + print(f"\n[{model}] scales: {[d['scale'] for d in pred_stats]}") + save_accuracy_group_bars(pred_stats, model, save_dir) + save_accuracy_trajectory(pred_stats, model, save_dir) + if cat_validity: + save_accuracy_category(cat_validity, model, save_dir, pred_stats=pred_stats) + plot_category_per_scale(cat_validity, model, save_dir, pred_stats=pred_stats) + save_accuracy_chart(pred_stats, cat_validity, model, save_dir) + + print("\nDone.") + + +if __name__ == '__main__': + main() diff --git a/swap_analysis/heatmap_all_layers.py b/swap_analysis/heatmap_all_layers.py new file mode 100644 index 0000000000000000000000000000000000000000..8129f257d5a1e4cbb1cf23bc95763221ea7ef083 --- /dev/null +++ b/swap_analysis/heatmap_all_layers.py @@ -0,0 +1,198 @@ +""" +heatmap_all_layers.py — Generate delta-similarity heatmaps for ALL layers. + +Reads pre-computed delta_similarity_{scale}_L{layer}_{tag}.csv files and +generates heatmap plots for every layer. + +Before running, verifies that the NPZ file contains all expected layers. +If the NPZ is missing layers, the script warns and exits (no partial output). + +Output structure: + results/{model}/plots/all/heatmap/heatmap_{scale}_L{layer}_all_pairs.png + results/{model}/plots/all/heatmap/heatmap_{scale}_L{layer}_both_correct.png + +Usage: + python heatmap_all_layers.py --model qwen_super --scale qwen3_235b + python heatmap_all_layers.py --model qwen_super --scale qwen3_235b --overwrite + python heatmap_all_layers.py # all models, all scales +""" + +import argparse +import glob +import os +import re + +import matplotlib +matplotlib.use('Agg') +import numpy as np +import pandas as pd + +# Import plot function and color constants from the main pipeline +import sys +_HERE = os.path.dirname(os.path.abspath(__file__)) +if _HERE not in sys.path: + sys.path.insert(0, _HERE) + +from swap_analysis import plot_delta_heatmap, CATEGORY_ORDER + +RESULTS_DIR = os.path.join(_HERE, 'results') +TAGS = ['all_pairs', 'both_correct'] + + +# --------------------------------------------------------------------------- +# NPZ completeness check +# --------------------------------------------------------------------------- + +def check_npz_layers(npz_path: str): + """Return sorted list of layer indices present in the NPZ (via orig_L* keys). + Returns an empty list if the file doesn't exist or has no orig_L* keys. + """ + if not os.path.exists(npz_path): + return [] + data = np.load(npz_path, allow_pickle=True) + layer_keys = [k for k in data.files if k.startswith('orig_L')] + data.close() + return sorted(int(k.replace('orig_L', '')) for k in layer_keys) + + +def check_csv_layers(csv_dir: str, scale: str, tag: str): + """Return sorted list of layer indices that have a delta_similarity CSV.""" + pattern = os.path.join(csv_dir, f'delta_similarity_{scale}_L*_{tag}.csv') + files = glob.glob(pattern) + layers = [] + for fpath in files: + m = re.search(rf'delta_similarity_{re.escape(scale)}_L(\d+)_{re.escape(tag)}\.csv$', + os.path.basename(fpath)) + if m: + layers.append(int(m.group(1))) + return sorted(layers) + + +# --------------------------------------------------------------------------- +# Per-model/scale processing +# --------------------------------------------------------------------------- + +def process(model: str, scale: str, model_dir: str, overwrite: bool) -> int: + npz_path = os.path.join(model_dir, 'npz', f'vectors_{scale}.npz') + csv_dir = os.path.join(model_dir, 'csv') + out_dir = os.path.join(model_dir, 'plots', 'all', 'heatmap') + + # ── 1. Check NPZ completeness ──────────────────────────────────────────── + npz_layers = check_npz_layers(npz_path) + if not npz_layers: + print(f' [{model}/{scale}] NPZ not found or empty: {npz_path}') + return 0 + + # Cross-check: CSVs should cover the same layers for all_pairs + csv_layers = check_csv_layers(csv_dir, scale, 'all_pairs') + missing = set(npz_layers) - set(csv_layers) + if missing: + print(f' [{model}/{scale}] WARNING: {len(missing)} NPZ layers have no CSV ' + f'(e.g. L{sorted(missing)[:5]}). ' + f'Re-run inference to regenerate missing CSVs. Skipping.') + return 0 + + print(f' [{model}/{scale}] {len(npz_layers)} layers (L{npz_layers[0]}–L{npz_layers[-1]})') + os.makedirs(out_dir, exist_ok=True) + + # ── 2. Generate plots ──────────────────────────────────────────────────── + # Load category validity if available (for unreliable cat markers) + cat_validity = {} + cv_path = os.path.join(model_dir, 'json', f'category_validity_{scale}.json') + if os.path.exists(cv_path): + import json + with open(cv_path) as f: + cat_validity = json.load(f) + unreliable = [c for c, v in cat_validity.items() if not v.get('reliable', True)] + + saved = 0 + for i, layer in enumerate(npz_layers): + print(f' L{layer:>3} ({i+1}/{len(npz_layers)})', end='\r', flush=True) + + for tag in TAGS: + out_path = os.path.join(out_dir, f'heatmap_{scale}_L{layer}_{tag}.png') + if not overwrite and os.path.exists(out_path): + continue + + csv_path = os.path.join(csv_dir, f'delta_similarity_{scale}_L{layer}_{tag}.csv') + if not os.path.exists(csv_path): + continue # both_correct CSV may not exist for all layers + + df = pd.read_csv(csv_path, index_col=0) + # Ensure canonical category order (drop missing, keep order) + available = [c for c in CATEGORY_ORDER if c in df.index] + if not available: + continue + df = df.loc[available, available] + + title = (f'{model.upper()} ({scale}) — Delta Heatmap L{layer} ' + f'({"both-correct" if tag == "both_correct" else "all pairs"})') + cond_unreliable = unreliable if tag == 'all_pairs' else [] + plot_delta_heatmap(df, title, out_path, unreliable_cats=cond_unreliable) + saved += 1 + + print() # newline after progress + return saved + + +# --------------------------------------------------------------------------- +# Main +# --------------------------------------------------------------------------- + +def main(): + parser = argparse.ArgumentParser( + description='Generate delta-similarity heatmaps for all layers from pre-computed CSVs') + parser.add_argument('--model', help='Restrict to one model directory (e.g. qwen_super)') + parser.add_argument('--scale', help='Restrict to one scale (e.g. qwen3_235b)') + parser.add_argument('--overwrite', action='store_true', + help='Regenerate plots even if they already exist') + parser.add_argument('--results-dir', default=RESULTS_DIR, + help='Path to results/ directory') + args = parser.parse_args() + + results_dir = args.results_dir + if not os.path.isdir(results_dir): + print(f'Results directory not found: {results_dir}') + return + + model_dirs = sorted( + m for m in os.listdir(results_dir) + if os.path.isdir(os.path.join(results_dir, m)) + ) + if args.model: + model_dirs = [m for m in model_dirs if m == args.model] + if not model_dirs: + print(f"Model '{args.model}' not found in {results_dir}") + return + + total_saved = 0 + for model in model_dirs: + model_dir = os.path.join(results_dir, model) + npz_dir = os.path.join(model_dir, 'npz') + if not os.path.isdir(npz_dir): + continue + + npz_files = sorted( + f for f in os.listdir(npz_dir) + if f.startswith('vectors_') and f.endswith('.npz') + ) + if args.scale: + npz_files = [f for f in npz_files + if re.match(rf'vectors_{re.escape(args.scale)}\.npz$', f)] + if not npz_files: + print(f'[{model}] no matching NPZ files, skipping') + continue + + for npz_file in npz_files: + m = re.match(r'vectors_(.+)\.npz$', npz_file) + if not m: + continue + scale = m.group(1) + n = process(model, scale, model_dir, args.overwrite) + total_saved += n + + print(f'\nDone. Saved {total_saved} heatmap plots.') + + +if __name__ == '__main__': + main() diff --git a/swap_analysis/pca_2d_recolor.py b/swap_analysis/pca_2d_recolor.py new file mode 100644 index 0000000000000000000000000000000000000000..ea099851ee3aa886ff06916b854104cfe88ee9ba --- /dev/null +++ b/swap_analysis/pca_2d_recolor.py @@ -0,0 +1,185 @@ +""" +pca_2d_recolor.py - Overwrite existing 2D PCA plots with unified color mapping. + +Color scheme (matches pca_3d.py): + horizontal group / left, right → green (#2ca02c, #98df8a) + vertical group / above, under → orange (#ff7f0e, #ffbb78) + distance group / far, close → purple (#9467bd, #c5b0d5) + +Finds all results/{model}/plots/{condition}/pca/ directories, +reads results/{model}/npz/vectors_{scale}.npz, and overwrites +pca_{scale}_L{layer}.png files in place. + +Usage: + python pca_2d_recolor.py +""" + +import os +import re +import numpy as np +import matplotlib +matplotlib.use('Agg') +import matplotlib.pyplot as plt +from sklearn.decomposition import PCA + +RESULTS_DIR = os.path.join(os.path.dirname(__file__), 'results') + +CATEGORY_ORDER = ['left', 'right', 'above', 'under', 'far', 'close'] +GROUP_ORDER = ['horizontal', 'vertical', 'distance'] + +# Category colors match their group: horizontal=green, vertical=orange, distance=purple +CAT_COLORS = { + 'left': '#2ca02c', 'right': '#98df8a', # horizontal → green + 'above': '#ff7f0e', 'under': '#ffbb78', # vertical → orange + 'far': '#9467bd', 'close': '#c5b0d5', # distance → purple +} +GROUP_COLORS = { + 'horizontal': '#2ca02c', # green + 'vertical': '#ff7f0e', # orange + 'distance': '#9467bd', # purple +} + + +def plot_pca_2d(vectors_npz_path, scale, model_type, save_dir): + """Regenerate 2D PCA plots with unified color mapping and overwrite existing PNGs.""" + data = np.load(vectors_npz_path, allow_pickle=True) + layer_keys = [k for k in data.files if k.startswith('orig_L')] + layers = sorted([int(k.replace('orig_L', '')) for k in layer_keys]) + + if not layers: + print(f" [skip] No orig_L* keys in {vectors_npz_path}") + return + + for layer in layers: + out_path = os.path.join(save_dir, f'pca_{scale}_L{layer}.png') + if not os.path.exists(out_path): + # Only overwrite files that already exist + continue + + orig = data.get(f'orig_L{layer}') + swap = data.get(f'swap_L{layer}') + labels = data.get(f'labels_L{layer}') + deltas = data.get(f'delta_L{layer}') + cats = data.get(f'categories_L{layer}') + groups = data.get(f'groups_L{layer}') + + if orig is None or swap is None: + continue + + fig, axes = plt.subplots(1, 3, figsize=(24, 7)) + + # ── Panel 1: embeddings (orig + swap) ──────────────────────────────── + pca_emb = PCA(n_components=2) + all_vecs = np.vstack([orig, swap]) + all_proj = pca_emb.fit_transform(all_vecs) + orig_proj = all_proj[:len(orig)] + swap_proj = all_proj[len(orig):] + + ax = axes[0] + for cat in CATEGORY_ORDER: + mask = np.array([str(l) == cat for l in labels]) + if not mask.any(): + continue + c = CAT_COLORS.get(cat, 'gray') + ax.scatter(orig_proj[mask, 0], orig_proj[mask, 1], + c=c, label=f'{cat} (orig)', alpha=0.5, s=15, marker='o') + ax.scatter(swap_proj[mask, 0], swap_proj[mask, 1], + c=c, alpha=0.5, s=15, marker='x') + ax.set_title('Embeddings by Category\n(o=orig, x=swap)', fontsize=11) + ax.legend(fontsize=7, ncol=2) + ax.grid(True, alpha=0.2) + + # ── Panel 2: delta vectors by group ────────────────────────────────── + has_delta = (deltas is not None and len(deltas) >= 2) + ax = axes[1] + if has_delta: + pca_d = PCA(n_components=2) + delta_proj = pca_d.fit_transform(deltas) + if groups is not None: + for group in GROUP_ORDER: + mask = np.array([str(g) == group for g in groups]) + if not mask.any(): + continue + ax.scatter(delta_proj[mask, 0], delta_proj[mask, 1], + c=GROUP_COLORS.get(group, 'gray'), label=group, + alpha=0.5, s=15) + ax.set_title('Delta Vectors by Group', fontsize=11) + ax.legend(fontsize=9) + ax.grid(True, alpha=0.2) + else: + delta_proj = None + ax.set_title('Delta Vectors by Group\n(no data)', fontsize=11) + + # ── Panel 3: delta vectors by category ─────────────────────────────── + ax = axes[2] + if has_delta and cats is not None and delta_proj is not None: + for cat in CATEGORY_ORDER: + mask = np.array([str(c) == cat for c in cats]) + if not mask.any(): + continue + ax.scatter(delta_proj[mask, 0], delta_proj[mask, 1], + c=CAT_COLORS.get(cat, 'gray'), label=cat, + alpha=0.5, s=15) + ax.set_title('Delta Vectors by Category', fontsize=11) + ax.legend(fontsize=8, ncol=2) + ax.grid(True, alpha=0.2) + else: + ax.set_title('Delta Vectors by Category\n(no data)', fontsize=11) + + fig.suptitle(f'{model_type.upper()} ({scale}) - Layer {layer} - PCA', fontweight='bold') + plt.tight_layout() + plt.savefig(out_path, dpi=200, bbox_inches='tight') + plt.close() + print(f" Overwritten {out_path}") + + +def scale_from_npz_name(name): + m = re.match(r'vectors_(.+)\.npz$', name) + return m.group(1) if m else None + + +def main(): + if not os.path.isdir(RESULTS_DIR): + print(f"Results directory not found: {RESULTS_DIR}") + return + + for model in sorted(os.listdir(RESULTS_DIR)): + model_dir = os.path.join(RESULTS_DIR, model) + if not os.path.isdir(model_dir): + continue + + plots_dir = os.path.join(model_dir, 'plots') + npz_dir = os.path.join(model_dir, 'npz') + + if not os.path.isdir(plots_dir) or not os.path.isdir(npz_dir): + continue + + npz_files = sorted( + f for f in os.listdir(npz_dir) + if f.startswith('vectors_') and f.endswith('.npz') + ) + if not npz_files: + continue + + # Find all pca/ dirs under plots/ (all/, all_with_validity/, both_correct/, …) + pca_dirs = [] + for dirpath, _, _ in os.walk(plots_dir): + if os.path.basename(dirpath) == 'pca': + pca_dirs.append(dirpath) + + if not pca_dirs: + continue + + for npz_file in npz_files: + scale = scale_from_npz_name(npz_file) + if scale is None: + continue + npz_path = os.path.join(npz_dir, npz_file) + + for pca_dir in pca_dirs: + print(f"[{model}] scale={scale} pca_dir={pca_dir}") + plot_pca_2d(npz_path, scale, model, pca_dir) + + +if __name__ == '__main__': + main() diff --git a/swap_analysis/pca_3d.py b/swap_analysis/pca_3d.py new file mode 100644 index 0000000000000000000000000000000000000000..7f3351638229aee5f79fcc47f032aff2b9a174a2 --- /dev/null +++ b/swap_analysis/pca_3d.py @@ -0,0 +1,205 @@ +""" +pca_3d.py - Generate 3D PCA visualizations from existing NPZ files. + +Finds all results/{model}/plots/{condition}/pca/ directories and creates +corresponding results/{model}/plots/{condition}/pca_3d/ directories with +3D PCA plots computed from results/{model}/npz/vectors_{scale}.npz. + +Processes all models and all scales by default. + +Usage: + python pca_3d.py +""" + +import os +import re +import numpy as np +import matplotlib +matplotlib.use('Agg') +import matplotlib.pyplot as plt +from mpl_toolkits.mplot3d import Axes3D # noqa: F401 +from sklearn.decomposition import PCA + +RESULTS_DIR = os.path.join(os.path.dirname(__file__), 'results') + +CATEGORY_ORDER = ['left', 'right', 'above', 'under', 'far', 'close'] +GROUP_ORDER = ['horizontal', 'vertical', 'distance'] + +# Category colors match their group: horizontal=green, vertical=orange, distance=purple +CAT_COLORS = { + 'left': '#2ca02c', 'right': '#98df8a', # horizontal → green + 'above': '#ff7f0e', 'under': '#ffbb78', # vertical → orange + 'far': '#9467bd', 'close': '#c5b0d5', # distance → purple +} +GROUP_COLORS = { + 'horizontal': '#2ca02c', # green + 'vertical': '#ff7f0e', # orange + 'distance': '#9467bd', # purple +} + + +def scatter3d(ax, xs, ys, zs, c, label, alpha=0.45, s=12, marker='o'): + ax.scatter(xs, ys, zs, c=c, label=label, alpha=alpha, s=s, marker=marker) + + +def plot_pca_3d(vectors_npz_path, scale, model_type, save_dir): + """Generate 3-panel 3D PCA figure per layer and save to save_dir.""" + data = np.load(vectors_npz_path, allow_pickle=True) + layer_keys = [k for k in data.files if k.startswith('orig_L')] + layers = sorted([int(k.replace('orig_L', '')) for k in layer_keys]) + + if not layers: + print(f" [skip] No orig_L* keys found in {vectors_npz_path}") + return + + os.makedirs(save_dir, exist_ok=True) + + for layer in layers: + orig = data.get(f'orig_L{layer}') + swap = data.get(f'swap_L{layer}') + labels = data.get(f'labels_L{layer}') + deltas = data.get(f'delta_L{layer}') + cats = data.get(f'categories_L{layer}') + groups = data.get(f'groups_L{layer}') + + if orig is None or swap is None: + continue + + # ── Subplot 1: embeddings (orig + swap) ────────────────────────────── + pca_emb = PCA(n_components=3) + all_vecs = np.vstack([orig, swap]) + all_proj = pca_emb.fit_transform(all_vecs) + orig_proj = all_proj[:len(orig)] + swap_proj = all_proj[len(orig):] + ev1 = pca_emb.explained_variance_ratio_ + + # ── Subplot 2/3: delta vectors ──────────────────────────────────────── + has_delta = (deltas is not None and len(deltas) >= 3) + if has_delta: + pca_d = PCA(n_components=3) + delta_proj = pca_d.fit_transform(deltas) + ev2 = pca_d.explained_variance_ratio_ + else: + delta_proj = None + ev2 = None + + fig = plt.figure(figsize=(24, 8)) + + # ── Panel 1 ─────────────────────────────────────────────────────────── + ax1 = fig.add_subplot(131, projection='3d') + for cat in CATEGORY_ORDER: + mask = np.array([str(l) == cat for l in labels]) + if not mask.any(): + continue + c = CAT_COLORS.get(cat, 'gray') + scatter3d(ax1, orig_proj[mask, 0], orig_proj[mask, 1], orig_proj[mask, 2], + c=c, label=f'{cat} (orig)', marker='o') + scatter3d(ax1, swap_proj[mask, 0], swap_proj[mask, 1], swap_proj[mask, 2], + c=c, label=f'{cat} (swap)', marker='^') + ax1.set_title('Embeddings by Category\n(o=orig, ^=swap)', fontsize=10) + ax1.set_xlabel(f'PC1 ({ev1[0]:.1%})', fontsize=8) + ax1.set_ylabel(f'PC2 ({ev1[1]:.1%})', fontsize=8) + ax1.set_zlabel(f'PC3 ({ev1[2]:.1%})', fontsize=8) + ax1.legend(fontsize=6, ncol=2, loc='upper left') + + # ── Panel 2 ─────────────────────────────────────────────────────────── + ax2 = fig.add_subplot(132, projection='3d') + if has_delta and groups is not None: + for group in GROUP_ORDER: + mask = np.array([str(g) == group for g in groups]) + if not mask.any(): + continue + scatter3d(ax2, delta_proj[mask, 0], delta_proj[mask, 1], delta_proj[mask, 2], + c=GROUP_COLORS.get(group, 'gray'), label=group) + ax2.set_title('Delta Vectors by Group', fontsize=10) + ax2.set_xlabel(f'PC1 ({ev2[0]:.1%})', fontsize=8) + ax2.set_ylabel(f'PC2 ({ev2[1]:.1%})', fontsize=8) + ax2.set_zlabel(f'PC3 ({ev2[2]:.1%})', fontsize=8) + ax2.legend(fontsize=8) + else: + ax2.set_title('Delta Vectors by Group\n(no data)', fontsize=10) + + # ── Panel 3 ─────────────────────────────────────────────────────────── + ax3 = fig.add_subplot(133, projection='3d') + if has_delta and cats is not None: + for cat in CATEGORY_ORDER: + mask = np.array([str(c) == cat for c in cats]) + if not mask.any(): + continue + scatter3d(ax3, delta_proj[mask, 0], delta_proj[mask, 1], delta_proj[mask, 2], + c=CAT_COLORS.get(cat, 'gray'), label=cat) + ax3.set_title('Delta Vectors by Category', fontsize=10) + ax3.set_xlabel(f'PC1 ({ev2[0]:.1%})', fontsize=8) + ax3.set_ylabel(f'PC2 ({ev2[1]:.1%})', fontsize=8) + ax3.set_zlabel(f'PC3 ({ev2[2]:.1%})', fontsize=8) + ax3.legend(fontsize=7, ncol=2) + else: + ax3.set_title('Delta Vectors by Category\n(no data)', fontsize=10) + + fig.suptitle(f'{model_type.upper()} ({scale}) - Layer {layer} - 3D PCA', fontweight='bold') + plt.tight_layout() + out_path = os.path.join(save_dir, f'pca_{scale}_L{layer}.png') + plt.savefig(out_path, dpi=200, bbox_inches='tight') + plt.close() + print(f" Saved {out_path}") + + +def scale_from_npz_name(name): + """'vectors_80k.npz' -> '80k'""" + m = re.match(r'vectors_(.+)\.npz$', name) + return m.group(1) if m else None + + +def main(): + if not os.path.isdir(RESULTS_DIR): + print(f"Results directory not found: {RESULTS_DIR}") + return + + for model in sorted(os.listdir(RESULTS_DIR)): + model_dir = os.path.join(RESULTS_DIR, model) + if not os.path.isdir(model_dir): + continue + + plots_dir = os.path.join(model_dir, 'plots') + npz_dir = os.path.join(model_dir, 'npz') + + if not os.path.isdir(plots_dir): + print(f"[{model}] no plots/ dir, skipping") + continue + if not os.path.isdir(npz_dir): + print(f"[{model}] no npz/ dir, skipping") + continue + + npz_files = sorted( + f for f in os.listdir(npz_dir) + if f.startswith('vectors_') and f.endswith('.npz') + ) + if not npz_files: + print(f"[{model}] no vectors_*.npz files, skipping") + continue + + # Find all pca/ dirs under plots/ (handles all/ , all_with_validity/ , etc.) + pca_dirs = [] + for dirpath, dirnames, _ in os.walk(plots_dir): + if os.path.basename(dirpath) == 'pca': + pca_dirs.append(dirpath) + + if not pca_dirs: + print(f"[{model}] no pca/ dirs found under plots/, skipping") + continue + + for npz_file in npz_files: + scale = scale_from_npz_name(npz_file) + if scale is None: + continue + npz_path = os.path.join(npz_dir, npz_file) + + for pca_dir in pca_dirs: + parent = os.path.dirname(pca_dir) # e.g. plots/all + pca_3d_dir = os.path.join(parent, 'pca_3d') + print(f"[{model}] scale={scale} -> {pca_3d_dir}") + plot_pca_3d(npz_path, scale, model, pca_3d_dir) + + +if __name__ == '__main__': + main() diff --git a/swap_analysis/pca_all_layers.py b/swap_analysis/pca_all_layers.py new file mode 100644 index 0000000000000000000000000000000000000000..9017bc15a3c55eed0b1be11bc26b4b5f0538ebab --- /dev/null +++ b/swap_analysis/pca_all_layers.py @@ -0,0 +1,345 @@ +""" +pca_all_layers.py — Generate 2D and 3D PCA plots for ALL layers from existing NPZ files. + +For each results/{model}/npz/vectors_{scale}.npz, produces: + results/{model}/plots/all/pca/pca_{scale}_L{layer}.png (2D, 3-panel) + results/{model}/plots/all/pca_3d/pca_{scale}_L{layer}.png (3D, 3-panel) + +for every layer stored in the NPZ. + +NOTE: NPZ files must have all layers saved. If you only see 5 representative layers in +existing results, re-run the main pipeline — save_vectors_npz() now saves all layers. + +Usage: + python pca_all_layers.py # all models, all scales + python pca_all_layers.py --model qwen # one model, all scales + python pca_all_layers.py --model qwen --scale vanilla # one model, one scale + python pca_all_layers.py --overwrite # regenerate existing plots +""" + +import argparse +import os +import re + +import matplotlib +matplotlib.use('Agg') +import matplotlib.pyplot as plt +from mpl_toolkits.mplot3d import Axes3D # noqa: F401 +import numpy as np +from sklearn.decomposition import PCA + +# --------------------------------------------------------------------------- +# Constants +# --------------------------------------------------------------------------- + +RESULTS_DIR = os.path.join(os.path.dirname(__file__), 'results') + +CATEGORY_ORDER = ['left', 'right', 'above', 'under', 'far', 'close'] +GROUP_ORDER = ['horizontal', 'vertical', 'distance'] + +CAT_COLORS = { + 'left': '#ff7f0e', 'right': '#ffbb78', # horizontal → orange + 'above': '#2ca02c', 'under': '#98df8a', # vertical → green + 'far': '#9467bd', 'close': '#c5b0d5', # distance → purple +} +GROUP_COLORS = { + 'horizontal': '#ff7f0e', + 'vertical': '#2ca02c', + 'distance': '#9467bd', +} + + +# --------------------------------------------------------------------------- +# 2D PCA +# --------------------------------------------------------------------------- + +def _plot_2d(data, layer, scale, model, save_path): + orig = data.get(f'orig_L{layer}') + swap = data.get(f'swap_L{layer}') + labels = data.get(f'labels_L{layer}') + deltas = data.get(f'delta_L{layer}') + cats = data.get(f'categories_L{layer}') + groups = data.get(f'groups_L{layer}') + + if orig is None or swap is None: + return False + + fig, axes = plt.subplots(1, 3, figsize=(24, 7)) + + # ── Panel 1: embeddings ─────────────────────────────────────────────── + pca_emb = PCA(n_components=2) + all_proj = pca_emb.fit_transform(np.vstack([orig, swap])) + orig_proj = all_proj[:len(orig)] + swap_proj = all_proj[len(orig):] + ev = pca_emb.explained_variance_ratio_ + + ax = axes[0] + for cat in CATEGORY_ORDER: + mask = np.array([str(l) == cat for l in labels]) + if mask.any(): + ax.scatter(orig_proj[mask, 0], orig_proj[mask, 1], + c=CAT_COLORS.get(cat, 'gray'), label=f'{cat} (orig)', + alpha=0.5, s=15, marker='o') + ax.scatter(swap_proj[mask, 0], swap_proj[mask, 1], + c=CAT_COLORS.get(cat, 'gray'), + alpha=0.5, s=15, marker='x') + ax.set_title('Embeddings by Category\n(o=orig, x=swap)', fontsize=11) + ax.set_xlabel(f'PC1 ({ev[0]:.1%})', fontsize=9) + ax.set_ylabel(f'PC2 ({ev[1]:.1%})', fontsize=9) + ax.legend(fontsize=7, ncol=2) + ax.grid(True, alpha=0.2) + + # ── Panels 2+3: delta vectors ───────────────────────────────────────── + has_delta = deltas is not None and cats is not None and len(deltas) >= 2 + if has_delta: + pca_d = PCA(n_components=2) + delta_proj = pca_d.fit_transform(deltas) + ev_d = pca_d.explained_variance_ratio_ + + ax = axes[1] + if has_delta and groups is not None: + for group in GROUP_ORDER: + mask = np.array([str(g) == group for g in groups]) + if mask.any(): + ax.scatter(delta_proj[mask, 0], delta_proj[mask, 1], + c=GROUP_COLORS.get(group, 'gray'), label=group, + alpha=0.5, s=15) + ax.set_title('Delta Vectors by Group', fontsize=11) + ax.set_xlabel(f'PC1 ({ev_d[0]:.1%})', fontsize=9) + ax.set_ylabel(f'PC2 ({ev_d[1]:.1%})', fontsize=9) + ax.legend(fontsize=9) + ax.grid(True, alpha=0.2) + else: + ax.set_title('Delta Vectors by Group\n(no data)', fontsize=11) + + ax = axes[2] + if has_delta and cats is not None: + for cat in CATEGORY_ORDER: + mask = np.array([str(c) == cat for c in cats]) + if mask.any(): + ax.scatter(delta_proj[mask, 0], delta_proj[mask, 1], + c=CAT_COLORS.get(cat, 'gray'), label=cat, + alpha=0.5, s=15) + ax.set_title('Delta Vectors by Category', fontsize=11) + ax.set_xlabel(f'PC1 ({ev_d[0]:.1%})', fontsize=9) + ax.set_ylabel(f'PC2 ({ev_d[1]:.1%})', fontsize=9) + ax.legend(fontsize=8, ncol=2) + ax.grid(True, alpha=0.2) + else: + ax.set_title('Delta Vectors by Category\n(no data)', fontsize=11) + + fig.suptitle(f'{model.upper()} ({scale}) — Layer {layer} — 2D PCA', fontweight='bold') + plt.tight_layout() + plt.savefig(save_path, dpi=200, bbox_inches='tight') + plt.close() + return True + + +# --------------------------------------------------------------------------- +# 3D PCA +# --------------------------------------------------------------------------- + +def _plot_3d(data, layer, scale, model, save_path): + orig = data.get(f'orig_L{layer}') + swap = data.get(f'swap_L{layer}') + labels = data.get(f'labels_L{layer}') + deltas = data.get(f'delta_L{layer}') + cats = data.get(f'categories_L{layer}') + groups = data.get(f'groups_L{layer}') + + if orig is None or swap is None: + return False + + fig = plt.figure(figsize=(30, 8)) + + # ── Panel 1: embeddings ─────────────────────────────────────────────── + pca_emb = PCA(n_components=3) + all_proj = pca_emb.fit_transform(np.vstack([orig, swap])) + orig_proj = all_proj[:len(orig)] + swap_proj = all_proj[len(orig):] + ev1 = pca_emb.explained_variance_ratio_ + + ax1 = fig.add_subplot(131, projection='3d') + for cat in CATEGORY_ORDER: + mask = np.array([str(l) == cat for l in labels]) + if mask.any(): + ax1.scatter(orig_proj[mask, 0], orig_proj[mask, 1], orig_proj[mask, 2], + c=CAT_COLORS.get(cat, 'gray'), label=f'{cat} (orig)', + alpha=0.45, s=12, marker='o') + ax1.scatter(swap_proj[mask, 0], swap_proj[mask, 1], swap_proj[mask, 2], + c=CAT_COLORS.get(cat, 'gray'), label=f'{cat} (swap)', + alpha=0.45, s=12, marker='^') + ax1.set_title('Embeddings by Category\n(o=orig, ^=swap)', fontsize=10) + ax1.set_xlabel(f'PC1 ({ev1[0]:.1%})', fontsize=8) + ax1.set_ylabel(f'PC2 ({ev1[1]:.1%})', fontsize=8) + ax1.set_zlabel(f'PC3 ({ev1[2]:.1%})', fontsize=8) + ax1.legend(fontsize=6, ncol=2, loc='upper left') + + # ── Panels 2+3: delta vectors ───────────────────────────────────────── + has_delta = deltas is not None and len(deltas) >= 3 + if has_delta: + pca_d = PCA(n_components=3) + delta_proj = pca_d.fit_transform(deltas) + ev2 = pca_d.explained_variance_ratio_ + else: + delta_proj = None + ev2 = None + + ax2 = fig.add_subplot(132, projection='3d') + if has_delta and groups is not None: + for group in GROUP_ORDER: + mask = np.array([str(g) == group for g in groups]) + if mask.any(): + ax2.scatter(delta_proj[mask, 0], delta_proj[mask, 1], delta_proj[mask, 2], + c=GROUP_COLORS.get(group, 'gray'), label=group, + alpha=0.45, s=12) + ax2.set_title('Delta Vectors by Group', fontsize=10) + ax2.set_xlabel(f'PC1 ({ev2[0]:.1%})', fontsize=8) + ax2.set_ylabel(f'PC2 ({ev2[1]:.1%})', fontsize=8) + ax2.set_zlabel(f'PC3 ({ev2[2]:.1%})', fontsize=8) + ax2.legend(fontsize=8) + else: + ax2.set_title('Delta Vectors by Group\n(no data)', fontsize=10) + + ax3 = fig.add_subplot(133, projection='3d') + if has_delta and cats is not None: + for cat in CATEGORY_ORDER: + mask = np.array([str(c) == cat for c in cats]) + if mask.any(): + ax3.scatter(delta_proj[mask, 0], delta_proj[mask, 1], delta_proj[mask, 2], + c=CAT_COLORS.get(cat, 'gray'), label=cat, + alpha=0.45, s=12) + ax3.set_title('Delta Vectors by Category', fontsize=10) + ax3.set_xlabel(f'PC1 ({ev2[0]:.1%})', fontsize=8) + ax3.set_ylabel(f'PC2 ({ev2[1]:.1%})', fontsize=8) + ax3.set_zlabel(f'PC3 ({ev2[2]:.1%})', fontsize=8) + ax3.legend(fontsize=7, ncol=2) + else: + ax3.set_title('Delta Vectors by Category\n(no data)', fontsize=10) + + fig.suptitle(f'{model.upper()} ({scale}) — Layer {layer} — 3D PCA', fontweight='bold') + plt.tight_layout() + plt.savefig(save_path, dpi=200, bbox_inches='tight', pad_inches=0.4) + plt.close() + return True + + +# --------------------------------------------------------------------------- +# Per-NPZ processing +# --------------------------------------------------------------------------- + +def process_npz(npz_path, scale, model, plots_all_dir, overwrite=False): + data = np.load(npz_path, allow_pickle=True) + layer_keys = [k for k in data.files if k.startswith('orig_L')] + layers = sorted([int(k.replace('orig_L', '')) for k in layer_keys]) + + if not layers: + print(f' [skip] No orig_L* keys in {npz_path}') + return 0 + + print(f' [{model}] {scale}: {len(layers)} layers (L{layers[0]}–L{layers[-1]})') + + pca_2d_dir = os.path.join(plots_all_dir, 'pca') + pca_3d_dir = os.path.join(plots_all_dir, 'pca_3d') + os.makedirs(pca_2d_dir, exist_ok=True) + os.makedirs(pca_3d_dir, exist_ok=True) + + saved = 0 + for i, layer in enumerate(layers): + path_2d = os.path.join(pca_2d_dir, f'pca_{scale}_L{layer}.png') + path_3d = os.path.join(pca_3d_dir, f'pca_{scale}_L{layer}.png') + + skip_2d = not overwrite and os.path.exists(path_2d) + skip_3d = not overwrite and os.path.exists(path_3d) + + if skip_2d and skip_3d: + continue + + print(f' L{layer:>3} ({i+1}/{len(layers)})', end='\r', flush=True) + + if not skip_2d: + if _plot_2d(data, layer, scale, model, path_2d): + saved += 1 + + if not skip_3d: + if _plot_3d(data, layer, scale, model, path_3d): + saved += 1 + + print() # newline after progress + return saved + + +# --------------------------------------------------------------------------- +# Main +# --------------------------------------------------------------------------- + +def scale_from_name(filename): + m = re.match(r'vectors_(.+)\.npz$', filename) + return m.group(1) if m else None + + +def main(): + parser = argparse.ArgumentParser( + description='Generate 2D+3D PCA plots for all layers from NPZ files') + parser.add_argument('--model', + help='Restrict to this model directory (e.g. qwen)') + parser.add_argument('--scale', + help='Restrict to this scale (e.g. vanilla, 80k)') + parser.add_argument('--overwrite', action='store_true', + help='Regenerate plots even if they already exist') + parser.add_argument('--results-dir', default=RESULTS_DIR, + help='Path to results/ directory') + args = parser.parse_args() + + results_dir = args.results_dir + if not os.path.isdir(results_dir): + print(f'Results directory not found: {results_dir}') + return + + model_dirs = sorted( + m for m in os.listdir(results_dir) + if os.path.isdir(os.path.join(results_dir, m)) + ) + if args.model: + model_dirs = [m for m in model_dirs if m == args.model] + if not model_dirs: + print(f"Model '{args.model}' not found in {results_dir}") + return + + total_saved = 0 + total_npz = 0 + + for model in model_dirs: + model_dir = os.path.join(results_dir, model) + npz_dir = os.path.join(model_dir, 'npz') + plots_all_dir = os.path.join(model_dir, 'plots', 'all') + + if not os.path.isdir(npz_dir): + print(f'[{model}] no npz/ directory, skipping') + continue + + npz_files = sorted( + f for f in os.listdir(npz_dir) + if f.startswith('vectors_') and f.endswith('.npz') + ) + if args.scale: + npz_files = [f for f in npz_files if scale_from_name(f) == args.scale] + if not npz_files: + print(f'[{model}] no matching NPZ files, skipping') + continue + + for npz_file in npz_files: + scale = scale_from_name(npz_file) + if scale is None: + continue + npz_path = os.path.join(npz_dir, npz_file) + os.makedirs(plots_all_dir, exist_ok=True) + n = process_npz(npz_path, scale, model, plots_all_dir, overwrite=args.overwrite) + total_saved += n + total_npz += 1 + + print(f'\nDone. Processed {total_npz} NPZ file(s), saved {total_saved} plots.') + + +if __name__ == '__main__': + main() diff --git a/swap_analysis/run_molmo.sh b/swap_analysis/run_molmo.sh new file mode 100644 index 0000000000000000000000000000000000000000..30021066f825de61e0344314a7b121662d0bef72 --- /dev/null +++ b/swap_analysis/run_molmo.sh @@ -0,0 +1,59 @@ +#!/bin/bash +set -e + +SCRIPT="/data/shared/Qwen/experiments/swap_analysis/swap_analysis.py" +PYTHON="conda run --no-capture-output -n molmo python" +MODEL="molmo" +LOG_DIR="/data/shared/Qwen/experiments/swap_analysis/logs/${MODEL}" +mkdir -p "$LOG_DIR" + +# GPU plan: same as correct_filter (both run simultaneously) +# Molmo(25GB) + NVILA(8GB) on GPU 0-4 = ~66GB total per GPU +SCALES=("vanilla" "80k" "400k" "800k" "2m") +GPUS=(0 1 2 3 4) + +echo "=========================================" +echo " Molmo Swap Analysis: Launching ${#SCALES[@]} scales in parallel" +echo "=========================================" + +PIDS=() +for i in "${!SCALES[@]}"; do + scale="${SCALES[$i]}" + gpu="${GPUS[$i]}" + log="${LOG_DIR}/${scale}.log" + + echo "[GPU $gpu] $scale -> $log" + CUDA_VISIBLE_DEVICES=$gpu $PYTHON $SCRIPT \ + --model_type $MODEL \ + --scales $scale \ + --device cuda \ + --no-auto-roborefer \ + > "$log" 2>&1 & + PIDS+=($!) +done + +echo "" +echo "Waiting for all ${#PIDS[@]} processes..." +FAILED=0 +for i in "${!PIDS[@]}"; do + pid="${PIDS[$i]}" + scale="${SCALES[$i]}" + if wait $pid; then + echo "[DONE] $scale (PID $pid) - SUCCESS" + else + echo "[FAIL] $scale (PID $pid) - EXIT CODE $?" + FAILED=$((FAILED + 1)) + fi +done + +if [ $FAILED -gt 0 ]; then + echo "WARNING: $FAILED scale(s) failed. Check logs in $LOG_DIR" +fi + +echo "=========================================" +echo " Molmo Swap Analysis: Running merge" +echo "=========================================" +$PYTHON $SCRIPT --model_type $MODEL --merge --scales vanilla 80k 400k 800k 2m \ + 2>&1 | tee "${LOG_DIR}/merge.log" + +echo "ALL DONE: $MODEL" \ No newline at end of file diff --git a/swap_analysis/run_nvila.sh b/swap_analysis/run_nvila.sh new file mode 100644 index 0000000000000000000000000000000000000000..7a31ea51b5d09f27bd13db21a328f6a7bd6c29cf --- /dev/null +++ b/swap_analysis/run_nvila.sh @@ -0,0 +1,70 @@ +#!/bin/bash +set -e + +SCRIPT="/data/shared/Qwen/experiments/swap_analysis/swap_analysis.py" +PYTHON="conda run --no-capture-output -n vila python" +MODEL="nvila" +RESULTS_BASE="/data/shared/Qwen/experiments/swap_analysis/results" +LOG_DIR="/data/shared/Qwen/experiments/swap_analysis/logs/${MODEL}" +mkdir -p "$LOG_DIR" + +# GPU plan: NVILA(8GB) shares GPU 0-4 with Molmo(25GB), GPU 5 with Qwen vanilla(10GB) +SCALES=("vanilla" "80k" "400k" "800k" "2m" "roborefer") +GPUS=(2 3 4 5 6 7) + +echo "=========================================" +echo " NVILA Swap Analysis: Launching ${#SCALES[@]} scales in parallel" +echo "=========================================" + +PIDS=() +for i in "${!SCALES[@]}"; do + scale="${SCALES[$i]}" + gpu="${GPUS[$i]}" + log="${LOG_DIR}/${scale}.log" + + echo "[GPU $gpu] $scale -> $log" + CUDA_VISIBLE_DEVICES=$gpu $PYTHON $SCRIPT \ + --model_type $MODEL \ + --scales $scale \ + --device cuda \ + --no-auto-roborefer \ + > "$log" 2>&1 & + PIDS+=($!) +done + +echo "" +echo "Waiting for all ${#PIDS[@]} processes..." +FAILED=0 +for i in "${!PIDS[@]}"; do + pid="${PIDS[$i]}" + scale="${SCALES[$i]}" + if wait $pid; then + echo "[DONE] $scale (PID $pid) - SUCCESS" + else + echo "[FAIL] $scale (PID $pid) - EXIT CODE $?" + FAILED=$((FAILED + 1)) + fi +done + +if [ $FAILED -gt 0 ]; then + echo "WARNING: $FAILED scale(s) failed. Check logs in $LOG_DIR" +fi + +echo "=========================================" +echo " NVILA Swap Analysis: Merge 1/2 (without roborefer)" +echo "=========================================" +$PYTHON $SCRIPT --model_type $MODEL --merge \ + --scales vanilla 80k 400k 800k 2m \ + 2>&1 | tee "${LOG_DIR}/merge.log" + +echo "=========================================" +echo " NVILA Swap Analysis: Merge 2/2 (with roborefer)" +echo "=========================================" +$PYTHON $SCRIPT --model_type $MODEL --merge \ + --scales vanilla 80k 400k 800k 2m roborefer \ + --merge-output-dir "${RESULTS_BASE}/nvila_with_roborefer" \ + 2>&1 | tee "${LOG_DIR}/merge_with_roborefer.log" + +echo "ALL DONE: $MODEL" +echo "Results (no roborefer): ${RESULTS_BASE}/nvila/" +echo "Results (with roborefer): ${RESULTS_BASE}/nvila_with_roborefer/" \ No newline at end of file diff --git a/swap_analysis/run_nvila_synthetic_mix.sh b/swap_analysis/run_nvila_synthetic_mix.sh new file mode 100644 index 0000000000000000000000000000000000000000..9e091fd33857b12ad0307f8f0588a1493824c207 --- /dev/null +++ b/swap_analysis/run_nvila_synthetic_mix.sh @@ -0,0 +1,70 @@ +#!/bin/bash +set -e + +SCRIPT="/data/shared/Qwen/experiments/swap_analysis/swap_analysis.py" +PYTHON="conda run --no-capture-output -n vila python" +LOG_BASE="/data/shared/Qwen/experiments/swap_analysis/logs" + +# 6 models to run for nvila_synth_compare: +# vanilla / 80k / 400k → model_type=nvila (existing fine-tuned models) +# 80k-5pct / 80k-10pct / 400k-5pct → model_type=nvila_synthetic (new synthetic-mix models) +# +# GPU assignment (NVILA ~8GB each): +# GPU 0: nvila/vanilla GPU 1: nvila/80k +# GPU 2: nvila_synthetic/80k-5pct GPU 3: nvila_synthetic/80k-10pct +# GPU 4: nvila/400k GPU 5: nvila_synthetic/400k-5pct + +declare -a MODEL_TYPES=("nvila" "nvila" "nvila_synthetic" "nvila_synthetic" "nvila" "nvila_synthetic") +declare -a SCALES=( "vanilla" "80k" "80k-5pct" "80k-10pct" "400k" "400k-5pct") +declare -a GPUS=( 0 1 2 3 4 5) + +echo "=========================================" +echo " NVILA-Synthetic: Launching 6 models in parallel" +echo "=========================================" + +PIDS=() +for i in "${!SCALES[@]}"; do + mtype="${MODEL_TYPES[$i]}" + scale="${SCALES[$i]}" + gpu="${GPUS[$i]}" + log="${LOG_BASE}/${mtype}/${scale}.log" + mkdir -p "${LOG_BASE}/${mtype}" + + echo "[GPU $gpu] ${mtype}/${scale} -> $log" + CUDA_VISIBLE_DEVICES=$gpu $PYTHON $SCRIPT \ + --model_type $mtype \ + --scales $scale \ + --device cuda \ + --no-auto-roborefer \ + > "$log" 2>&1 & + PIDS+=($!) +done + +echo "" +echo "Waiting for all ${#PIDS[@]} processes..." +FAILED=0 +for i in "${!PIDS[@]}"; do + pid="${PIDS[$i]}" + label="${MODEL_TYPES[$i]}/${SCALES[$i]}" + if wait $pid; then + echo "[DONE] $label (PID $pid) - SUCCESS" + else + echo "[FAIL] $label (PID $pid) - EXIT CODE $?" + FAILED=$((FAILED + 1)) + fi +done + +if [ $FAILED -gt 0 ]; then + echo "WARNING: $FAILED process(es) failed. Check logs in $LOG_BASE" +fi + +echo "=========================================" +echo " NVILA-Synthetic: Merge (vanilla / 80k / 80k-5pct / 80k-10pct / 400k / 400k-5pct)" +echo "=========================================" +LOG_DIR_CMP="${LOG_BASE}/nvila_synth_compare" +mkdir -p "$LOG_DIR_CMP" +$PYTHON $SCRIPT --model_type nvila_synth_compare --merge \ + 2>&1 | tee "${LOG_DIR_CMP}/merge.log" + +echo "ALL DONE" +echo "Results: /data/shared/Qwen/experiments/swap_analysis/results/nvila_synth_compare/" diff --git a/swap_analysis/run_qwen.sh b/swap_analysis/run_qwen.sh new file mode 100644 index 0000000000000000000000000000000000000000..dd2cca319d829b6ba634735139671dcda3963535 --- /dev/null +++ b/swap_analysis/run_qwen.sh @@ -0,0 +1,60 @@ +#!/bin/bash +set -e + +SCRIPT="/data/shared/Qwen/experiments/swap_analysis/swap_analysis.py" +PYTHON="/usr/bin/python3" +MODEL="qwen" +LOG_DIR="/data/shared/Qwen/experiments/swap_analysis/logs/${MODEL}" +mkdir -p "$LOG_DIR" + +# GPU plan: Qwen(10GB) on GPU 5-7 +# GPU 5: Qwen vanilla(10) + NVILA roborefer(8) × 2 = 36GB +# GPU 6-7: 2 Qwen scales each = 40GB +SCALES=("vanilla" "80k" "400k" "800k" "2m") +GPUS=(5 6 6 7 7) + +echo "=========================================" +echo " Qwen Swap Analysis: Launching ${#SCALES[@]} scales in parallel" +echo "=========================================" + +PIDS=() +for i in "${!SCALES[@]}"; do + scale="${SCALES[$i]}" + gpu="${GPUS[$i]}" + log="${LOG_DIR}/${scale}.log" + + echo "[GPU $gpu] $scale -> $log" + CUDA_VISIBLE_DEVICES=$gpu $PYTHON $SCRIPT \ + --model_type $MODEL \ + --scales $scale \ + --device cuda \ + --no-auto-roborefer \ + > "$log" 2>&1 & + PIDS+=($!) +done + +echo "" +echo "Waiting for all ${#PIDS[@]} processes..." +FAILED=0 +for i in "${!PIDS[@]}"; do + pid="${PIDS[$i]}" + scale="${SCALES[$i]}" + if wait $pid; then + echo "[DONE] $scale (PID $pid) - SUCCESS" + else + echo "[FAIL] $scale (PID $pid) - EXIT CODE $?" + FAILED=$((FAILED + 1)) + fi +done + +if [ $FAILED -gt 0 ]; then + echo "WARNING: $FAILED scale(s) failed. Check logs in $LOG_DIR" +fi + +echo "=========================================" +echo " Qwen Swap Analysis: Running merge" +echo "=========================================" +$PYTHON $SCRIPT --model_type $MODEL --merge --scales vanilla 80k 400k 800k 2m \ + 2>&1 | tee "${LOG_DIR}/merge.log" + +echo "ALL DONE: $MODEL" \ No newline at end of file diff --git a/swap_analysis/swap_analysis copy.py b/swap_analysis/swap_analysis copy.py new file mode 100644 index 0000000000000000000000000000000000000000..3a5114f1ef6fa9fca5a12d18c3ed0734e56d889e --- /dev/null +++ b/swap_analysis/swap_analysis copy.py @@ -0,0 +1,3568 @@ +#!/usr/bin/env python3 +""" +Swap Analysis: Minimal Pair Probing for Spatial Representations + +Creates minimal pairs by swapping obj1<->obj2 in spatial questions: + Original: "Is A to the left or right of B?" -> left + Swapped: "Is B to the left or right of A?" -> right + +Supported model types +--------------------- + Legacy (Qwen2.5-VL-3B scale experiments): + molmo | nvila | qwen + New large models: + molmo_big : Molmo2-8B + qwen_big : Qwen3-VL-32B-Instruct + qwen_super : Qwen3-VL-235B-A22B-Instruct + big_trio : Molmo2-8B + RoboRefer + Qwen3-VL-32B + Merge-only (--merge required): + molmo_all : molmo (vanilla→2m) + molmo_big (molmo2) + qwen_all : qwen (vanilla→2m) + qwen_big (qwen3_32b) + +Usage examples +-------------- + # Legacy model (Qwen2.5-VL-3B scale) + python swap_analysis.py --model_type qwen + + # New large model (Qwen3-VL-32B) + conda run -n qwen3 python swap_analysis.py --model_type qwen_big + + # Cross-family merge (combine qwen + qwen_big results) + conda run -n qwen3 python swap_analysis.py --model_type qwen_all --merge + +Analyses: + 1. Difference vectors: delta = feature(swapped) - feature(original) + 2. Within-category delta consistency (do all left->right swaps point same direction?) + 3. Sign-corrected group consistency (align opposite categories by flipping) + 4. Cross-group delta alignment (delta_vertical vs delta_distance) for perspective bias + 5. Delta-based 6x6 similarity heatmap (mean delta per category as representation) + 6. Prediction stats visualization (bar chart + cross-scale trajectory) + 7. Both-correct filtering for delta analysis + 8. PCA visualization of per-sample embeddings + 9. Scaling effects on all of the above + +Fixes applied: + Fix 1: "Answer with only one word." appended to all prompts + Fix 2: Synonym handling (below/beneath->under, near/nearby->close, distant->far) + Fix 4: Cross-group quads index matching via string normalization + Fix 5: Within-category + sign-corrected delta consistency (replaces wrong group-level) + Fix 6: Prediction stats bar chart + cross-scale line plot + Fix 7: Delta-based 6x6 heatmap and trajectory + Fix 8: Category validity check + both-correct delta filtering +""" + +import os +import sys +import json +import argparse +import base64 +import logging +import random +import re +from io import BytesIO +from collections import defaultdict +from typing import Dict, List, Tuple, Optional, Any +from abc import ABC, abstractmethod + +import torch +import numpy as np +import pandas as pd +from PIL import Image +from tqdm import tqdm +import matplotlib +matplotlib.use('Agg') +import matplotlib.pyplot as plt +from mpl_toolkits.mplot3d import Axes3D # noqa: F401 +import seaborn as sns +from sklearn.metrics.pairwise import cosine_similarity +from sklearn.decomposition import PCA + +logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s') +logger = logging.getLogger(__name__) + +_HERE = os.path.dirname(os.path.abspath(__file__)) + +# ── Local HuggingFace cache helpers ────────────────────────────────────────── + +HF_HUB_DIR = '/data/shared/Qwen/mydisk/huggingface/hub' + + +def resolve_local_path(model_path: str) -> str: + """Return local snapshot path for a HF model ID if cached, else return the ID unchanged.""" + if os.path.isabs(model_path): + return model_path + cache_name = 'models--' + model_path.replace('/', '--') + snapshots_dir = os.path.join(HF_HUB_DIR, cache_name, 'snapshots') + if os.path.isdir(snapshots_dir): + snapshots = sorted(os.listdir(snapshots_dir)) + if snapshots: + local_path = os.path.join(snapshots_dir, snapshots[-1]) + logger.info(f"Local cache found: {model_path} → {local_path}") + return local_path + logger.warning( + f"Model not found in local cache: '{model_path}'\n" + f" Expected at: {snapshots_dir}\n" + f" Will fall back to online HuggingFace Hub download.\n" + f" To cache locally first: python -c \"from huggingface_hub import snapshot_download; " + f"snapshot_download('{model_path}', cache_dir='{HF_HUB_DIR}')\"" + ) + return model_path + + +def _setup_file_logging(model_type: str) -> str: + """Attach a per-model-type FileHandler to the root logger. + + Writes to /logs/{model_type}.log (append mode). + Returns the log file path. + """ + log_dir = os.path.join(_HERE, 'logs') + os.makedirs(log_dir, exist_ok=True) + log_path = os.path.join(log_dir, f'{model_type}.log') + fh = logging.FileHandler(log_path, mode='a', encoding='utf-8') + fh.setLevel(logging.INFO) + fh.setFormatter(logging.Formatter('%(asctime)s - %(levelname)s - %(message)s')) + logging.getLogger().addHandler(fh) + return log_path + + +# ============================================================================ +# Constants +# ============================================================================ + +CATEGORY_ORDER = ['left', 'right', 'above', 'below', 'far', 'close'] + +OPPOSITE_MAP = { + 'left': 'right', 'right': 'left', + 'above': 'below', 'below': 'above', + 'under': 'above', # short-mode vertical answer + 'far': 'close', 'close': 'far', +} + +# Opposite map for short-answer mode (vertical uses 'above'/'under', not 'above'/'below') +SHORT_OPPOSITE_MAP = { + 'left': 'right', 'right': 'left', + 'above': 'below', 'below': 'above', + 'far': 'close', 'close': 'far', +} + +GROUP_MAP = { + 'left': 'horizontal', 'right': 'horizontal', + 'above': 'vertical', 'below': 'vertical', + 'far': 'distance', 'close': 'distance', +} + +GROUP_ORDER = ['horizontal', 'vertical', 'distance'] + +# Fix 5: Canonical categories for sign-corrected consistency +CANONICAL_CATEGORIES = { + 'horizontal': 'left', + 'vertical': 'above', + 'distance': 'far', +} + +# Fix 2: Synonyms for answer matching +# 'below' is now primary; 'under'/'beneath' recognized as synonyms +SYNONYMS = { + 'below': ['under', 'beneath'], + 'close': ['near', 'nearby'], + 'far': ['distant'], +} + +# ── MCQ question templates (option order alternated per pair for A/B bias control) ── +_Q_TAIL_MCQ = "Answer with a single letter A or B." +MCQ_TEMPLATES = { + 'horizontal': { + 'left_first': "Is the {obj1} to the left or right of the {obj2}? (A) left (B) right " + _Q_TAIL_MCQ, + 'right_first': "Is the {obj1} to the left or right of the {obj2}? (A) right (B) left " + _Q_TAIL_MCQ, + }, + 'vertical': { + 'above_first': "Is the {obj1} above or below the {obj2}? (A) above (B) below " + _Q_TAIL_MCQ, + 'below_first': "Is the {obj1} above or below the {obj2}? (A) below (B) above " + _Q_TAIL_MCQ, + }, + 'distance': { + 'far_first': "Compared to {ref}, is {subj} far or close from you? (A) far (B) close " + _Q_TAIL_MCQ, + 'close_first': "Compared to {ref}, is {subj} far or close from you? (A) close (B) far " + _Q_TAIL_MCQ, + }, +} +MCQ_LETTER = { + 'horizontal': { + 'left_first': {'left': 'a', 'right': 'b'}, + 'right_first': {'left': 'b', 'right': 'a'}, + }, + 'vertical': { + 'above_first': {'above': 'a', 'below': 'b'}, + 'below_first': {'above': 'b', 'below': 'a'}, + }, + 'distance': { + 'far_first': {'far': 'a', 'close': 'b'}, + 'close_first': {'far': 'b', 'close': 'a'}, + }, +} + +SCALE_COLORS = { + 'vanilla': '#1f77b4', '80k': '#ff7f0e', '400k': '#2ca02c', + '800k': '#d62728', '2m': '#9467bd', 'roborefer':'#8c564b', + # New large models + 'molmo2': '#17becf', # cyan + 'qwen3_32b': '#bcbd22', # yellow-green + 'qwen3_235b': '#e377c2', # pink + # Synthetic-mix NVILA at 80k scale (shades of teal, light→dark by mix ratio) + '80k-5pct': '#b2dfdb', # very light teal + '80k-10pct': '#00b894', # teal + '80k-20pct': '#00897b', # darker teal + '80k-30pct': '#004d40', # deep teal + # Synthetic-mix NVILA at 400k scale + '400k-5pct': '#66bb6a', # light green (near 400k's #2ca02c) +} + +# Canonical scale ordering used by accuracy/ylim plots (add new scales here to control x-axis) +SCALE_ORDER = [ + 'vanilla', '80k', '80k-5pct', '80k-10pct', '80k-20pct', '80k-30pct', + '400k', '400k-5pct', '800k', '2m', 'roborefer', + 'molmo2', 'qwen3_32b', 'qwen3_235b', +] + +# Human-readable legend labels (only entries that differ from the key are needed) +SCALE_DISPLAY_NAMES = { + '80k-5pct': '80k 5%', + '80k-10pct': '80k 10%', + '80k-20pct': '80k 20%', + '80k-30pct': '80k 30%', + '400k-5pct': '400k 5%', +} +# Category colors aligned with group: horizontal=orange, vertical=green, distance=purple +CAT_COLORS = { + 'left': '#ff7f0e', 'right': '#ffbb78', # horizontal → orange + 'above': '#2ca02c', 'below': '#98df8a', # vertical → green + 'far': '#9467bd', 'close': '#c5b0d5', # distance → purple +} +GROUP_COLORS = { + 'horizontal': '#ff7f0e', + 'vertical': '#2ca02c', + 'distance': '#9467bd', +} + +# Short-answer (non-MCQ) question templates +SHORT_TEMPLATES = { + 'horizontal': "Is the {obj1} to the left or right of the {obj2}? Answer with only one word.", + 'vertical': "Is the {obj1} above or below the {obj2}? Answer with only one word.", + 'distance': "Compared to {ref}, is {subj} far or close from you? Answer with only one word.", +} + +MODEL_CONFIGS = { + 'molmo': { + 'vanilla': 'allenai/Molmo-7B-O-0924', + '80k': '/data/shared/Qwen/molmo/outputs/data_scale_exp_80k/unshared', + '400k': '/data/shared/Qwen/molmo/outputs/data_scale_exp_400k/unshared', + '800k': '/data/shared/Qwen/molmo/outputs/data_scale_exp_800k/unshared', + '2m': '/data/shared/Qwen/molmo/outputs/data_scale_exp_2m/unshared', + }, + 'nvila': { + 'vanilla': '/data/shared/Qwen/mydisk/NVILA-Lite-2B', + '80k': '/data/shared/Qwen/mydisk/output/DATA/NVILA-Lite-2B-DATA_SCALE_EXP_80K-20251108_180221', + '400k': '/data/shared/Qwen/mydisk/output/DATA/NVILA-Lite-2B-DATA_SCALE_EXP_400K-20251108_180221', + '800k': '/data/shared/Qwen/mydisk/output/DATA/NVILA-Lite-2B-DATA_SCALE_EXP_800K-20251108_180221', + '2m': '/data/shared/Qwen/mydisk/output/DATA/NVILA-Lite-2B-DATA_SCALE_EXP_2M-20260205_003632', + # '80k': '/data/shared/Qwen/mydisk/output/SINGLE/NVILA-Lite-2B-SINGLE_REFSPATIAL_16M-20260217_035008/checkpoint-1250', + # '400k': '/data/shared/Qwen/mydisk/output/SINGLE/NVILA-Lite-2B-SINGLE_REFSPATIAL_16M-20260217_035008/checkpoint-6250', + # '800k': '/data/shared/Qwen/mydisk/output/SINGLE/NVILA-Lite-2B-SINGLE_REFSPATIAL_16M-20260217_035008/checkpoint-12500', + # '2m': '/data/shared/Qwen/mydisk/output/SINGLE/NVILA-Lite-2B-SINGLE_REFSPATIAL_16M-20260217_035008/checkpoint-31250', + 'roborefer': '/data/shared/Qwen/mydisk/RoboRefer_model', + }, + 'qwen': { + 'vanilla': 'Qwen/Qwen2.5-VL-3B-Instruct', + '80k': '/data/shared/Qwen/mydisk/output/Qwen/Qwen2.5-VL-3B-Instruct-data_scale_exp_80k-20251114_120221', + '400k': '/data/shared/Qwen/mydisk/output/Qwen/Qwen2.5-VL-3B-Instruct-data_scale_exp_400k-20251114_120221', + '800k': '/data/shared/Qwen/mydisk/output/Qwen/Qwen2.5-VL-3B-Instruct-data_scale_exp_800k-20251114_120221', + '2m': '/data/shared/Qwen/mydisk/output/Qwen/Qwen2.5-VL-3B-Instruct-data_scale_exp_2m-20260109_120517', + }, + # NVILA trained with synthetic data mixed in at different ratios + 'nvila_synthetic': { + '80k-5pct': '/data/shared/Qwen/mydisk/output/SYNTHETIC/NVILA-Lite-2B-SYNTHETIC_MIX_5PCT_2M-20260226_023301/checkpoint-1250', + '80k-10pct': '/data/shared/Qwen/mydisk/output/SYNTHETIC/NVILA-Lite-2B-SYNTHETIC_MIX_10PCT_80K-20260224_234537', + '80k-20pct': '/data/shared/Qwen/mydisk/output/SYNTHETIC/NVILA-Lite-2B-SYNTHETIC_MIX_20PCT_80K-20260224_232347', + '80k-30pct': '/data/shared/Qwen/mydisk/output/SYNTHETIC/NVILA-Lite-2B-SYNTHETIC_MIX_30PCT_80K-20260224_232347', + '400k-5pct': '/data/shared/Qwen/mydisk/output/SYNTHETIC/NVILA-Lite-2B-SYNTHETIC_MIX_5PCT_2M-20260226_023301/checkpoint-6250', + }, +} + +# ── New large / cross-family models ────────────────────────────────────────── +# Each scale maps to (ExtractorClassName, HF-model-ID-or-absolute-path). +# resolve_local_path() converts HF IDs to local snapshot dirs when cached. +MODEL_CONFIGS_NEW = { + 'molmo_big': { + 'molmo2': ('Molmo2Extractor', 'allenai/Molmo2-8B'), + }, + 'qwen_big': { + 'qwen3_32b': ('Qwen3VLExtractor', 'Qwen/Qwen3-VL-32B-Instruct'), + }, + 'qwen_super': { + 'qwen3_235b': ('Qwen3VLExtractor', 'Qwen/Qwen3-VL-235B-A22B-Instruct'), + }, + 'big_trio': { + 'molmo2': ('Molmo2Extractor', 'allenai/Molmo2-8B'), + 'roborefer': ('RoboReferExtractor', '/data/shared/Qwen/mydisk/RoboRefer_model'), + 'qwen3_32b': ('Qwen3VLExtractor', 'Qwen/Qwen3-VL-32B-Instruct'), + }, +} + +# ── Merge-only: combine existing per-scale data from multiple source dirs ───── +MERGE_ONLY_CONFIGS = { + 'molmo_all': { + 'scale_order': ['vanilla', '80k', '400k', '800k', '2m', 'molmo2'], + 'scale_sources': { + 'vanilla': 'molmo', '80k': 'molmo', '400k': 'molmo', + '800k': 'molmo', '2m': 'molmo', 'molmo2': 'molmo_big', + }, + 'required_dirs': ['molmo', 'molmo_big'], + }, + 'qwen_all': { + 'scale_order': ['vanilla', '80k', '400k', '800k', '2m', 'qwen3_32b'], + 'scale_sources': { + 'vanilla': 'qwen', '80k': 'qwen', '400k': 'qwen', + '800k': 'qwen', '2m': 'qwen', 'qwen3_32b': 'qwen_big', + }, + 'required_dirs': ['qwen', 'qwen_big'], + }, + # Compare NVILA baselines against synthetic-mix checkpoints + 'nvila_synth_compare': { + 'scale_order': ['vanilla', '80k', '80k-5pct', '80k-10pct', '400k', '400k-5pct'], + 'scale_sources': { + 'vanilla': 'nvila', '80k': 'nvila', + '80k-5pct': 'nvila_synthetic', '80k-10pct': 'nvila_synthetic', + '400k': 'nvila', + '400k-5pct': 'nvila_synthetic', + }, + 'required_dirs': ['nvila', 'nvila_synthetic'], + }, +} + +# Default scale run order for new runnable types +SCALE_ORDERS_NEW = { + 'molmo_big': ['molmo2'], + 'qwen_big': ['qwen3_32b'], + 'qwen_super': ['qwen3_235b'], + 'big_trio': ['molmo2', 'roborefer', 'qwen3_32b'], +} + +ALL_MODEL_TYPES = ( + list(MODEL_CONFIGS.keys()) + + list(MODEL_CONFIGS_NEW.keys()) + + list(MERGE_ONLY_CONFIGS.keys()) +) + + +# ============================================================================ +# Data Loading & Swap Pair Creation +# ============================================================================ + +OBJECT_PATTERNS = [ + re.compile(r'between\s+(.+?)\s+and\s+(.+?)\s+in', re.IGNORECASE), + re.compile(r'of\s+(.+?)\s+and\s+(.+?)\s+in', re.IGNORECASE), + re.compile(r'positions\s+of\s+(.+?)\s+and\s+(.+?)\s+interact', re.IGNORECASE), + re.compile(r'How\s+are\s+(.+?)\s+and\s+(.+?)\s+positioned', re.IGNORECASE), + re.compile(r'arrangement\s+of\s+(.+?)\s+and\s+(.+?)\s+in', re.IGNORECASE), +] + + +def extract_objects(question: str) -> Tuple[str, str]: + for pattern in OBJECT_PATTERNS: + m = pattern.search(question) + if m: + return m.group(1).strip(), m.group(2).strip() + raise ValueError(f"Could not extract objects from: {question}") + + +def decode_base64_image(base64_str: str) -> Image.Image: + image_data = base64.b64decode(base64_str) + return Image.open(BytesIO(image_data)).convert('RGB') + + +# ============================================================================ +# Answer Matching (Fix 2: synonym support) +# ============================================================================ + +def find_earliest_position(text: str, word: str) -> int: + """Find earliest position of word or any of its synonyms in text.""" + positions = [] + pos = text.find(word) + if pos != -1: + positions.append(pos) + for syn in SYNONYMS.get(word, []): + pos = text.find(syn) + if pos != -1: + positions.append(pos) + return min(positions) if positions else -1 + + +def check_answer(generated_text: str, expected_category: str, mcq_map: dict = None) -> bool: + if not generated_text or not generated_text.strip(): + return False + text = generated_text.strip().lower() + expected = expected_category.lower() + opposite = OPPOSITE_MAP[expected] + + if mcq_map: + exp_letter = mcq_map.get(expected) + opp_letter = mcq_map.get(opposite) + # Standalone letter response (e.g. "A", "A.", "A)", "B") + if exp_letter and text in (exp_letter, exp_letter+'.', exp_letter+')', exp_letter+','): + return True + if opp_letter and text in (opp_letter, opp_letter+'.', opp_letter+')', opp_letter+','): + return False + else: + exp_letter = opp_letter = None + + # MCQ inline pattern "(a)"/"(b)" — variant-aware + mcq_exp = f'({exp_letter})' if exp_letter else None + mcq_opp = f'({opp_letter})' if opp_letter else None + + def earliest_with_mcq(word, mcq_pat=None): + positions = [] + pos = text.find(word) + if pos != -1: + positions.append(pos) + for syn in SYNONYMS.get(word, []): + pos = text.find(syn) + if pos != -1: + positions.append(pos) + if mcq_pat: + pos = text.find(mcq_pat) + if pos != -1: + positions.append(pos) + return min(positions) if positions else -1 + + pos_exp = earliest_with_mcq(expected, mcq_exp) + pos_opp = earliest_with_mcq(opposite, mcq_opp) + if pos_exp == -1: + return False + if pos_opp == -1: + return True + return pos_exp < pos_opp + + +# ============================================================================ +# Swap Pair Loading (Fix 1: prompt suffix) +# ============================================================================ + +def load_swap_pairs(tsv_path: str, seed: int = 42, filter_unknown: bool = True, + question_type: str = 'mcq') -> List[dict]: + """Load EmbSpatialBench TSV and create swap pairs for all samples. + + Args: + filter_unknown: If True (default), skip far/close pairs where target_object + is Unknown/empty, and remove Unknown/empty values from reference_object + candidates before sampling. Pairs with no valid candidates are dropped. + Use --no-filtering to disable. + question_type: 'mcq' (default) uses MCQ A/B templates with letter answers; + 'short' uses the original "Answer with only one word." format. + """ + rng = random.Random(seed) + df = pd.read_csv(tsv_path, sep='\t') + + pairs = [] + stats = defaultdict(lambda: {'total': 0, 'success': 0}) + + def _valid_obj(v): + return bool(v) and str(v).strip().lower() not in ('unknown', 'n/a', '') + + for _, row in df.iterrows(): + category = row['category'] + stats[category]['total'] += 1 + + try: + if category in ['left', 'right', 'above', 'under', 'below']: + obj1, obj2 = extract_objects(row['question']) + if category in ['left', 'right']: + grp = 'horizontal' + else: + grp = 'vertical' + + if question_type == 'short': + # Single-word format; normalize 'under' → 'below' + if category == 'under': + category = 'below' + tmpl = SHORT_TEMPLATES[grp] + pair = { + 'index': row['index'], + 'question_id': str(row['question_id']), + 'image_base64': row['image'], + 'original_question': tmpl.format(obj1=obj1, obj2=obj2), + 'swapped_question': tmpl.format(obj1=obj2, obj2=obj1), + 'original_answer': category, + 'swapped_answer': SHORT_OPPOSITE_MAP[category], + 'group': grp, + 'category': category, + 'obj1': obj1, 'obj2': obj2, + 'mcq_map': None, + } + else: + # MCQ format; normalize 'under' → 'below' + if category == 'under': + category = 'below' + variant = ('left_first' if grp == 'horizontal' else 'above_first') \ + if len(pairs) % 2 == 0 else \ + ('right_first' if grp == 'horizontal' else 'below_first') + tmpl = MCQ_TEMPLATES[grp][variant] + mcq_map = MCQ_LETTER[grp][variant] + pair = { + 'index': row['index'], + 'question_id': str(row['question_id']), + 'image_base64': row['image'], + 'original_question': tmpl.format(obj1=obj1, obj2=obj2), + 'swapped_question': tmpl.format(obj1=obj2, obj2=obj1), + 'original_answer': category, + 'swapped_answer': OPPOSITE_MAP[category], + 'group': GROUP_MAP[category], + 'category': category, + 'obj1': obj1, 'obj2': obj2, + 'mcq_map': mcq_map, + } + + elif category in ['far', 'close']: + answer_key = row['answer'] + options = {k: row[k] for k in ['A', 'B', 'C', 'D']} + target_object = options[answer_key] + candidates = [v for k, v in options.items() if k != answer_key] + + if filter_unknown: + if not _valid_obj(target_object): + continue + candidates = [v for v in candidates if _valid_obj(v)] + if not candidates: + continue + + reference_object = rng.choice(candidates) + + if question_type == 'short': + tmpl = SHORT_TEMPLATES['distance'] + pair = { + 'index': row['index'], + 'question_id': str(row['question_id']), + 'image_base64': row['image'], + 'original_question': tmpl.format(ref=reference_object, subj=target_object), + 'swapped_question': tmpl.format(ref=target_object, subj=reference_object), + 'original_answer': category, + 'swapped_answer': OPPOSITE_MAP[category], + 'group': 'distance', + 'category': category, + 'target_object': target_object, + 'reference_object': reference_object, + 'mcq_map': None, + } + else: + variant = 'far_first' if len(pairs) % 2 == 0 else 'close_first' + tmpl = MCQ_TEMPLATES['distance'][variant] + mcq_map = MCQ_LETTER['distance'][variant] + pair = { + 'index': row['index'], + 'question_id': str(row['question_id']), + 'image_base64': row['image'], + 'original_question': tmpl.format(ref=reference_object, subj=target_object), + 'swapped_question': tmpl.format(ref=target_object, subj=reference_object), + 'original_answer': category, + 'swapped_answer': OPPOSITE_MAP[category], + 'group': 'distance', + 'category': category, + 'target_object': target_object, + 'reference_object': reference_object, + 'mcq_map': mcq_map, + } + else: + continue + + pairs.append(pair) + stats[category]['success'] += 1 + + except Exception as e: + logger.warning(f"Failed to create swap pair for index {row['index']}: {e}") + continue + + logger.info("Swap pair creation stats:") + for cat in CATEGORY_ORDER: + s = stats[cat] + logger.info(f" {cat}: {s['success']}/{s['total']}") + logger.info(f" Total pairs: {len(pairs)}") + + return pairs + + +# ============================================================================ +# HF Bbox Cache (Fix 4: string-normalized keys) +# ============================================================================ + +def build_hf_bbox_cache(hf_dataset_name: str = 'FlagEval/EmbSpatial-Bench') -> Dict[str, dict]: + """Load HF dataset and build bbox lookup cache keyed by string-normalized question_id.""" + from datasets import load_dataset + logger.info(f"Loading HF dataset: {hf_dataset_name}") + ds = load_dataset(hf_dataset_name, split='test') + + cache = {} + for item in ds: + # Fix 4: Normalize key to string for consistent matching + qid = str(item['question_id']) + cache[qid] = { + 'objects': item['objects'], + 'relation': item['relation'], + 'data_source': item['data_source'], + 'answer': item['answer'], + 'answer_options': item['answer_options'], + } + + # Fix 4: Log sample keys for debugging + sample_keys = list(cache.keys())[:5] + logger.info(f"Built bbox cache: {len(cache)} entries (sample keys: {sample_keys})") + return cache + + +def get_bbox_center_y(bbox: list) -> float: + return bbox[1] + bbox[3] / 2 + + +def create_cross_group_quads( + swap_pairs: List[dict], + hf_cache: Dict[str, dict], + threshold_ratio: float = 0.05, + question_type: str = 'mcq', +) -> List[dict]: + """For far/close swap pairs, create additional vertical queries using bbox.""" + IMAGE_HEIGHTS = {'ai2thor': 300, 'mp3d': 480, 'scannet': 968} + + quads = [] + stats = {'total': 0, 'matched': 0, 'ambiguous': 0, 'no_bbox': 0} + + distance_pairs = [p for p in swap_pairs if p['group'] == 'distance'] + + # Fix 4: Use question_id (e.g. 'mp3d_0') to match HF dataset, not integer index + n_matched_keys = sum(1 for p in distance_pairs if p['question_id'] in hf_cache) + logger.info(f"Matched {n_matched_keys}/{len(distance_pairs)} question_ids between TSV and HF dataset") + + for pair in distance_pairs: + stats['total'] += 1 + qid = pair['question_id'] + + if qid not in hf_cache: + stats['no_bbox'] += 1 + continue + + hf_item = hf_cache[qid] + names = hf_item['objects']['name'] + bboxes = hf_item['objects']['bbox'] + + target = pair['target_object'] + reference = pair['reference_object'] + + target_bbox_y, ref_bbox_y = None, None + for name, bbox in zip(names, bboxes): + if name == target: + target_bbox_y = get_bbox_center_y(bbox) + if name == reference: + ref_bbox_y = get_bbox_center_y(bbox) + + if target_bbox_y is None or ref_bbox_y is None: + stats['no_bbox'] += 1 + continue + + image_height = IMAGE_HEIGHTS.get(hf_item['data_source'], 480) + threshold = image_height * threshold_ratio + y_diff = target_bbox_y - ref_bbox_y + + if abs(y_diff) < threshold: + stats['ambiguous'] += 1 + continue + + if target_bbox_y < ref_bbox_y: + vert_original_answer = 'above' + else: + vert_original_answer = 'below' + + if question_type == 'short': + vert_tmpl = SHORT_TEMPLATES['vertical'] + vert_mcq_map = None + vert_original_q = vert_tmpl.format(obj1=target, obj2=reference) + vert_swapped_q = vert_tmpl.format(obj1=reference, obj2=target) + vert_swapped_answer = SHORT_OPPOSITE_MAP[vert_original_answer] + else: + vert_variant = 'above_first' if len(quads) % 2 == 0 else 'below_first' + vert_tmpl = MCQ_TEMPLATES['vertical'][vert_variant] + vert_mcq_map = MCQ_LETTER['vertical'][vert_variant] + vert_original_q = vert_tmpl.format(obj1=target, obj2=reference) + vert_swapped_q = vert_tmpl.format(obj1=reference, obj2=target) + vert_swapped_answer = OPPOSITE_MAP[vert_original_answer] + + quad = { + 'index': pair['index'], + 'image_base64': pair['image_base64'], + 'dist_original_q': pair['original_question'], + 'dist_swapped_q': pair['swapped_question'], + 'dist_original_answer': pair['original_answer'], + 'dist_swapped_answer': pair['swapped_answer'], + 'dist_mcq_map': pair['mcq_map'], + 'vert_original_q': vert_original_q, + 'vert_swapped_q': vert_swapped_q, + 'vert_original_answer': vert_original_answer, + 'vert_swapped_answer': vert_swapped_answer, + 'vert_mcq_map': vert_mcq_map, + 'target_object': target, + 'reference_object': reference, + 'target_bbox_y': target_bbox_y, + 'ref_bbox_y': ref_bbox_y, + 'y_diff': y_diff, + 'data_source': hf_item['data_source'], + } + quads.append(quad) + stats['matched'] += 1 + + logger.info(f"Cross-group quads: {stats['matched']}/{stats['total']} " + f"(ambiguous={stats['ambiguous']}, no_bbox={stats['no_bbox']})") + return quads + + +# ============================================================================ +# Base Extractor +# ============================================================================ + +class BaseHiddenStateExtractor(ABC): + def __init__(self, model_path: str, device: str = 'cuda', target_layers: List[int] = None): + self.model_path = model_path + self.device = device + self.hidden_states = {} + self.hooks = [] + self._load_model() + num_layers = self._get_num_layers() + if target_layers is None: + self.target_layers = list(range(num_layers)) + logger.info(f"Model has {num_layers} layers. Extracting ALL.") + else: + self.target_layers = target_layers + self._register_hooks() + + def _register_hooks(self): + for layer_idx in self.target_layers: + module = self._get_layer_module(layer_idx) + if module is not None: + hook = module.register_forward_hook(self._make_hook(layer_idx)) + self.hooks.append(hook) + + def _make_hook(self, layer_idx: int): + def hook_fn(module, input, output): + if isinstance(output, tuple): + hidden = output[0] + else: + hidden = output + if hidden.shape[1] > 1: # prefill only + last_token = hidden[:, -1, :].detach().cpu().float() + self.hidden_states[layer_idx] = last_token.squeeze(0) + return hook_fn + + @abstractmethod + def _load_model(self): pass + @abstractmethod + def _get_num_layers(self) -> int: pass + @abstractmethod + def _get_layer_module(self, layer_idx: int): pass + @abstractmethod + def extract_and_predict(self, image: Image.Image, question: str) -> Tuple[Dict[int, torch.Tensor], str]: pass + + def cleanup(self): + for hook in self.hooks: + hook.remove() + self.hooks = [] + if hasattr(self, 'model'): + del self.model + if hasattr(self, 'processor'): + del self.processor + torch.cuda.empty_cache() + + +# ============================================================================ +# Molmo Extractor +# ============================================================================ + +class MolmoExtractor(BaseHiddenStateExtractor): + def _load_model(self): + config_path = os.path.join(self.model_path, "config.yaml") + checkpoint_path = os.path.join(self.model_path, "model.pt") + if os.path.exists(config_path) and os.path.exists(checkpoint_path): + self._load_native_model() + self.is_native = True + else: + self._load_hf_model() + self.is_native = False + + def _load_native_model(self): + from olmo.config import ModelConfig + from olmo.model import Molmo as NativeMolmoModel + from olmo.data.model_preprocessor import MultiModalPreprocessor + from olmo.data.data_formatter import DataFormatter + + _original_load = torch.load + def _unsafe_load_wrapper(*args, **kwargs): + if 'weights_only' not in kwargs: + kwargs['weights_only'] = False + return _original_load(*args, **kwargs) + torch.load = _unsafe_load_wrapper + + cfg = ModelConfig.load( + os.path.join(self.model_path, "config.yaml"), + key="model", validate_paths=False + ) + cfg.init_device = "cpu" + self.model = NativeMolmoModel(cfg) + state_dict = torch.load(os.path.join(self.model_path, "model.pt"), map_location="cpu") + self.model.load_state_dict(state_dict) + self.model = self.model.to(self.device, dtype=torch.bfloat16).eval() + self.tokenizer = cfg.get_tokenizer() + + v_cfg = cfg.vision_backbone + h, w = cfg.llm_patches_per_crop() + image_padding_mask = 2 if cfg.fix_image_padding else (1 if cfg.image_padding_embed else None) + + class SafeDataFormatter(DataFormatter): + def get_system_prompt(self, style, for_inference, messages, rng=None): + if style is None: + style = "User" + return super().get_system_prompt(style, for_inference, messages, rng) + + self.formatter = SafeDataFormatter( + prompt_templates=cfg.prompt_type, message_format=cfg.message_formatting, + system_prompt=cfg.system_prompt_kind, always_start_with_space=cfg.always_start_with_space, + default_inference_len=cfg.default_inference_len + ) + self.preprocessor = MultiModalPreprocessor( + tokenizer=self.tokenizer, normalize=str(v_cfg.image_model_type), + crop_mode=cfg.crop_mode, max_crops=cfg.max_crops, + overlap_margins=cfg.overlap_margins, resize=v_cfg.resize_mode, + use_col_tokens=cfg.use_col_tokens, base_image_input_size=v_cfg.image_default_input_size, + image_pooling_w=cfg.image_pooling_w, image_pooling_h=cfg.image_pooling_h, + image_token_length_w=w, image_token_length_h=h, + image_patch_size=v_cfg.image_patch_size, image_padding_mask=image_padding_mask, + pad_value=cfg.pad_value, loss_token_weighting=cfg.multi_annotation_weighting, + ) + logger.info(f"Loaded native Molmo from {self.model_path}") + + def _load_hf_model(self): + from transformers import AutoModelForCausalLM, AutoProcessor + self.model = AutoModelForCausalLM.from_pretrained( + self.model_path, torch_dtype=torch.bfloat16, + trust_remote_code=True, device_map=self.device + ).eval() + self.processor = AutoProcessor.from_pretrained(self.model_path, trust_remote_code=True) + logger.info(f"Loaded HF Molmo from {self.model_path}") + + def _get_num_layers(self) -> int: + if self.is_native: + return len(self.model.transformer.blocks) + if hasattr(self.model, 'model') and hasattr(self.model.model, 'transformer'): + return len(self.model.model.transformer.blocks) + return 32 + + def _get_layer_module(self, layer_idx: int): + if self.is_native: + return self.model.transformer.blocks[layer_idx] + return self.model.model.transformer.blocks[layer_idx] + + def extract_and_predict(self, image, question): + self.hidden_states = {} + if self.is_native: + example = {"messages": [question], "image": image} + messages, _ = self.formatter(example, is_training=False, for_inference=True, rng=np.random) + batch = self.preprocessor(np.array(image), messages, is_training=False, require_image_features=True) + if 'input_ids' not in batch and 'input_tokens' in batch: + batch['input_ids'] = batch['input_tokens'] + + def to_t(x): + return torch.from_numpy(x) if isinstance(x, np.ndarray) else x + + input_ids = to_t(batch['input_ids']).unsqueeze(0).to(self.device).long() + images_t = to_t(batch['images']).unsqueeze(0).to(self.device, dtype=torch.bfloat16) + image_masks = to_t(batch['image_masks']).unsqueeze(0).to(self.device, dtype=torch.bfloat16) + image_input_idx = to_t(batch['image_input_idx']).unsqueeze(0).to(self.device) + + with torch.inference_mode(), torch.autocast("cuda", dtype=torch.bfloat16): + gen = self.model.generate( + input_ids=input_ids, images=images_t, + image_masks=image_masks, image_input_idx=image_input_idx, + max_steps=20, beam_size=1, + ) + generated_ids = gen.token_ids[0, 0] + answer = self.tokenizer.decode(generated_ids.tolist()).strip() + for eos in ['<|endoftext|>', '', '<|end|>']: + answer = answer.replace(eos, '').strip() + else: + from transformers import GenerationConfig + inputs = self.processor.process(images=[image], text=question) + processed = {} + for k, v in inputs.items(): + v = v.to(self.device).unsqueeze(0) + if v.dtype == torch.float32: + v = v.to(dtype=torch.bfloat16) + processed[k] = v + with torch.no_grad(), torch.autocast("cuda", dtype=torch.bfloat16): + output = self.model.generate_from_batch( + processed, + GenerationConfig(max_new_tokens=20, stop_strings="<|endoftext|>"), + tokenizer=self.processor.tokenizer, + ) + input_len = processed['input_ids'].shape[1] + answer = self.processor.tokenizer.decode(output[0, input_len:], skip_special_tokens=True).strip() + + return self.hidden_states.copy(), answer + + +# ============================================================================ +# NVILA Extractor +# ============================================================================ + +class NVILAExtractor(BaseHiddenStateExtractor): + def _load_model(self): + original_sys_path = sys.path.copy() + sys.path = [p for p in sys.path if 'RoboRefer' not in p] + modules_to_remove = [k for k in list(sys.modules.keys()) if 'llava' in k.lower()] + removed = {m: sys.modules.pop(m) for m in modules_to_remove} + try: + import llava + from llava.media import Image as LLaVAImage + from llava import conversation as clib + except Exception as err: + sys.path = original_sys_path + for m, mod in removed.items(): + sys.modules[m] = mod + raise RuntimeError(f"Failed to import llava: {err}") + sys.path = original_sys_path + self.LLaVAImage = LLaVAImage + self.clib = clib + self.model = llava.load(self.model_path, model_base=None) + self._find_llm_backbone() + logger.info(f"Loaded NVILA from {self.model_path}") + + def _find_llm_backbone(self): + candidates = [] + if hasattr(self.model, 'llm'): + if hasattr(self.model.llm, 'model') and hasattr(self.model.llm.model, 'layers'): + candidates.append(self.model.llm.model.layers) + if hasattr(self.model.llm, 'layers'): + candidates.append(self.model.llm.layers) + if hasattr(self.model, 'model'): + if hasattr(self.model.model, 'model') and hasattr(self.model.model.model, 'layers'): + candidates.append(self.model.model.model.layers) + if hasattr(self.model.model, 'layers'): + candidates.append(self.model.model.layers) + for name, module in self.model.named_modules(): + if name.endswith('.layers') and hasattr(module, '__len__') and len(module) > 0: + candidates.append(module) + if candidates: + self.llm_backbone = candidates[0] + else: + raise ValueError("Could not locate transformer layers in NVILA model") + + def _get_num_layers(self) -> int: + return len(self.llm_backbone) if hasattr(self, 'llm_backbone') else 24 + + def _get_layer_module(self, layer_idx: int): + return self.llm_backbone[layer_idx] + + def extract_and_predict(self, image, question): + self.hidden_states = {} + import tempfile + with tempfile.NamedTemporaryFile(suffix='.png', delete=False) as f: + temp_path = f.name + image.save(temp_path) + try: + prompt = [self.LLaVAImage(temp_path), question] + from transformers import GenerationConfig + response = self.model.generate_content( + prompt, generation_config=GenerationConfig(max_new_tokens=20, do_sample=False) + ) + finally: + os.unlink(temp_path) + answer = str(response[0] if isinstance(response, list) else response).strip() + return self.hidden_states.copy(), answer + + +class RoboReferExtractor(NVILAExtractor): + ROBOREFER_PATH = '/data/shared/Qwen/RoboRefer' + + def _load_model(self): + original_sys_path = sys.path.copy() + if self.ROBOREFER_PATH not in sys.path: + sys.path.insert(0, self.ROBOREFER_PATH) + modules_to_remove = [k for k in list(sys.modules.keys()) if 'llava' in k.lower()] + removed = {m: sys.modules.pop(m) for m in modules_to_remove} + try: + import llava + from llava.media import Image as LLaVAImage + from llava import conversation as clib + except Exception as err: + sys.path = original_sys_path + for m, mod in removed.items(): + sys.modules[m] = mod + raise RuntimeError(f"Failed to import RoboRefer llava: {err}") + sys.path = original_sys_path + self.LLaVAImage = LLaVAImage + self.clib = clib + self.model = llava.load(self.model_path, model_base=None) + self._find_llm_backbone() + logger.info(f"Loaded RoboRefer from {self.model_path}") + + +# ============================================================================ +# Qwen2.5-VL Extractor +# ============================================================================ + +class Qwen25VLExtractor(BaseHiddenStateExtractor): + BASE_MODEL = "Qwen/Qwen2.5-VL-3B-Instruct" + + def _load_model(self): + from transformers import Qwen2_5_VLForConditionalGeneration, AutoProcessor + try: + self.model = Qwen2_5_VLForConditionalGeneration.from_pretrained( + self.model_path, torch_dtype=torch.bfloat16, device_map=self.device + ) + except ImportError: + self.model = Qwen2_5_VLForConditionalGeneration.from_pretrained( + self.model_path, torch_dtype=torch.bfloat16 + ).to(self.device) + self.model.eval() + if self.model_path.startswith('/'): + self.processor = AutoProcessor.from_pretrained(self.BASE_MODEL) + else: + self.processor = AutoProcessor.from_pretrained(self.model_path) + logger.info(f"Loaded Qwen2.5-VL from {self.model_path}") + + def _get_num_layers(self) -> int: + return len(self.model.model.layers) + + def _get_layer_module(self, layer_idx: int): + return self.model.model.layers[layer_idx] + + def extract_and_predict(self, image, question): + self.hidden_states = {} + messages = [{"role": "user", "content": [ + {"type": "image", "image": image}, + {"type": "text", "text": question} + ]}] + text = self.processor.apply_chat_template(messages, tokenize=False, add_generation_prompt=True) + from qwen_vl_utils import process_vision_info + image_inputs, video_inputs = process_vision_info(messages) + inputs = self.processor( + text=[text], images=image_inputs, videos=video_inputs, + padding=True, return_tensors="pt" + ).to(self.device) + with torch.no_grad(): + output_ids = self.model.generate(**inputs, max_new_tokens=20, do_sample=False) + input_len = inputs['input_ids'].shape[1] + answer = self.processor.tokenizer.decode(output_ids[0, input_len:], skip_special_tokens=True).strip() + return self.hidden_states.copy(), answer + + +# ============================================================================ +# New Extractors: Molmo2-8B and Qwen3-VL family +# ============================================================================ + +class Molmo2Extractor(BaseHiddenStateExtractor): + """Extractor for allenai/Molmo2-8B (AutoModelForImageTextToText, messages-dict input).""" + + def _load_model(self): + from transformers import AutoProcessor, AutoModelForImageTextToText + self.processor = AutoProcessor.from_pretrained(self.model_path, trust_remote_code=True) + self.model = AutoModelForImageTextToText.from_pretrained( + self.model_path, trust_remote_code=True, torch_dtype='auto', device_map='auto', + ).eval() + self._find_llm_layers() + logger.info(f"Loaded Molmo2 from {self.model_path}") + + def _find_llm_layers(self): + candidates = [ + ['model', 'layers'], + ['language_model', 'model', 'layers'], + ['model', 'model', 'layers'], + ] + for path in candidates: + obj = self.model + for attr in path: + obj = getattr(obj, attr, None) + if obj is None: + break + if obj is not None and hasattr(obj, '__len__') and len(obj) > 0: + self.llm_layers = obj + logger.info(f"Molmo2: layers at '{'.'.join(path)}', count={len(obj)}") + return + best, best_len = None, 0 + for name, module in self.model.named_modules(): + if name.endswith('.layers') and hasattr(module, '__len__') and len(module) > best_len: + best, best_len = module, len(module) + logger.info(f"Molmo2: layers via scan at '{name}', count={best_len}") + if best is not None: + self.llm_layers = best + return + raise ValueError("Could not find transformer layers in Molmo2 model") + + def _get_num_layers(self) -> int: + return len(self.llm_layers) + + def _get_layer_module(self, layer_idx: int): + return self.llm_layers[layer_idx] + + def extract_and_predict(self, image, question): + self.hidden_states = {} + messages = [{"role": "user", "content": [ + {"type": "image", "image": image}, + {"type": "text", "text": question}, + ]}] + inputs = self.processor.apply_chat_template( + messages, tokenize=True, add_generation_prompt=True, + return_tensors="pt", return_dict=True, + ) + inputs = {k: v.to(self.model.device) for k, v in inputs.items()} + with torch.inference_mode(): + generated_ids = self.model.generate(**inputs, max_new_tokens=20, do_sample=False) + input_len = inputs['input_ids'].shape[1] + answer = self.processor.tokenizer.decode( + generated_ids[0, input_len:], skip_special_tokens=True).strip() + return self.hidden_states.copy(), answer + + +class Qwen3VLExtractor(BaseHiddenStateExtractor): + """Extractor for Qwen3-VL family (32B dense, 235B MoE). + + Key differences from Qwen25VLExtractor: + - AutoModelForImageTextToText + trust_remote_code=True + - process_vision_info requires image_patch_size=16 + - processor call requires do_resize=False + - 32×32 px patches → different min/max_pixels + """ + + MIN_PIXELS = 256 * 32 * 32 # 262,144 (mp3d/scannet → natural res; ai2thor → ~256 tokens) + MAX_PIXELS = 16384 * 32 * 32 # 16,777,216 + + def _load_model(self): + from transformers import AutoProcessor, AutoModelForImageTextToText + self.processor = AutoProcessor.from_pretrained(self.model_path, trust_remote_code=True) + self.model = AutoModelForImageTextToText.from_pretrained( + self.model_path, trust_remote_code=True, torch_dtype='auto', + device_map='auto', attn_implementation='flash_attention_2', + ).eval() + self._find_llm_layers() + logger.info(f"Loaded Qwen3-VL from {self.model_path}") + + def _find_llm_layers(self): + candidates = [ + ['model', 'language_model', 'model', 'layers'], # Qwen3-VL expected + ['language_model', 'model', 'layers'], + ['model', 'model', 'layers'], + ['model', 'layers'], + ] + for path in candidates: + obj = self.model + for attr in path: + obj = getattr(obj, attr, None) + if obj is None: + break + if obj is not None and hasattr(obj, '__len__') and len(obj) > 0: + self.llm_layers = obj + logger.info(f"Qwen3-VL: layers at '{'.'.join(path)}', count={len(obj)}") + return + best, best_len = None, 0 + for name, module in self.model.named_modules(): + if name.endswith('.layers') and hasattr(module, '__len__') and len(module) > best_len: + best, best_len = module, len(module) + logger.info(f"Qwen3-VL: layers via scan at '{name}', count={best_len}") + if best is not None: + self.llm_layers = best + return + raise ValueError("Could not find transformer layers in Qwen3-VL model") + + def _get_num_layers(self) -> int: + return len(self.llm_layers) + + def _get_layer_module(self, layer_idx: int): + return self.llm_layers[layer_idx] + + def extract_and_predict(self, image, question): + self.hidden_states = {} + messages = [{"role": "user", "content": [ + {"type": "image", "image": image, + "min_pixels": self.MIN_PIXELS, "max_pixels": self.MAX_PIXELS}, + {"type": "text", "text": question}, + ]}] + text = self.processor.apply_chat_template(messages, tokenize=False, add_generation_prompt=True) + from qwen_vl_utils import process_vision_info + images, videos, _ = process_vision_info( + messages, image_patch_size=16, return_video_kwargs=True, return_video_metadata=True, + ) + inputs = self.processor( + text=text, images=images, videos=videos, do_resize=False, return_tensors="pt", + ).to(self.model.device) + with torch.no_grad(): + output_ids = self.model.generate(**inputs, max_new_tokens=20, do_sample=False) + input_len = inputs['input_ids'].shape[1] + answer = self.processor.tokenizer.decode( + output_ids[0, input_len:], skip_special_tokens=True).strip() + return self.hidden_states.copy(), answer + + +EXTRACTOR_CLASSES = { + 'MolmoExtractor': MolmoExtractor, + 'NVILAExtractor': NVILAExtractor, + 'RoboReferExtractor': RoboReferExtractor, + 'Qwen25VLExtractor': Qwen25VLExtractor, + 'Molmo2Extractor': Molmo2Extractor, + 'Qwen3VLExtractor': Qwen3VLExtractor, +} + + +def get_extractor(model_type: str, model_path: str = None, scale: str = None, **kwargs): + """Create an extractor for any model_type (legacy or new-large).""" + # New large models: (ExtractorClass, path) tuples in MODEL_CONFIGS_NEW + if model_type in MODEL_CONFIGS_NEW: + cls_name, raw_path = MODEL_CONFIGS_NEW[model_type][scale] + resolved = resolve_local_path(raw_path) + logger.info(f"Creating {cls_name} for scale='{scale}' from {resolved}") + return EXTRACTOR_CLASSES[cls_name](resolved, **kwargs) + # Legacy models + if model_type == 'nvila' and scale == 'roborefer': + return RoboReferExtractor(model_path, **kwargs) + legacy = { + 'molmo': MolmoExtractor, 'nvila': NVILAExtractor, 'qwen': Qwen25VLExtractor, + 'nvila_synthetic': NVILAExtractor, + } + return legacy[model_type](model_path, **kwargs) + + +# ============================================================================ +# Feature Extraction Pipeline +# ============================================================================ + +def run_single_query(extractor, image, question): + hidden_states, predicted = extractor.extract_and_predict(image, question) + result = {} + for layer_idx in extractor.target_layers: + if layer_idx in hidden_states: + state = hidden_states[layer_idx].numpy().flatten() + if state.size > 0: + result[layer_idx] = state + return result, predicted + + +def extract_swap_features( + extractor: BaseHiddenStateExtractor, + swap_pairs: List[dict], + max_samples_per_category: int = 0, +) -> List[dict]: + """Extract features for all swap pairs.""" + rng = random.Random(42) + + if max_samples_per_category > 0: + grouped = defaultdict(list) + for p in swap_pairs: + grouped[p['category']].append(p) + limited = [] + for cat in CATEGORY_ORDER: + samples = grouped[cat] + if len(samples) > max_samples_per_category: + samples = rng.sample(samples, max_samples_per_category) + limited.extend(samples) + swap_pairs = limited + + records = [] + for pair in tqdm(swap_pairs, desc="Swap pairs"): + try: + image = decode_base64_image(pair['image_base64']) + hs_orig, pred_orig = run_single_query(extractor, image, pair['original_question']) + hs_swap, pred_swap = run_single_query(extractor, image, pair['swapped_question']) + + is_correct_orig = check_answer(pred_orig, pair['original_answer'], pair['mcq_map']) + is_correct_swap = check_answer(pred_swap, pair['swapped_answer'], pair['mcq_map']) + + delta = {} + for layer_idx in extractor.target_layers: + if layer_idx in hs_orig and layer_idx in hs_swap: + delta[layer_idx] = hs_swap[layer_idx] - hs_orig[layer_idx] + + record = { + 'index': pair['index'], + 'group': pair['group'], + 'category': pair['category'], + 'original_answer': pair['original_answer'], + 'swapped_answer': pair['swapped_answer'], + 'pred_orig': pred_orig, + 'pred_swap': pred_swap, + 'is_correct_orig': is_correct_orig, + 'is_correct_swap': is_correct_swap, + 'hs_orig': hs_orig, + 'hs_swap': hs_swap, + 'delta': delta, + } + records.append(record) + + mark_o = "O" if is_correct_orig else "X" + mark_s = "O" if is_correct_swap else "X" + logger.info(f" #{pair['index']:<6} {pair['category']:<6} " + f"orig[{mark_o}]=\"{pred_orig[:40]}\" swap[{mark_s}]=\"{pred_swap[:40]}\"" + + (f" [{len(records)}/{len(swap_pairs)}]" if len(records) % 50 == 0 else "")) + + except Exception as e: + logger.warning(f"Error on index {pair['index']}: {e}") + continue + + logger.info(f"Extracted {len(records)} swap pair records") + + # Fix 8: Per-category accuracy logging + for cat in CATEGORY_ORDER: + cat_recs = [r for r in records if r['category'] == cat] + n = len(cat_recs) + if n == 0: + continue + c_orig = sum(1 for r in cat_recs if r['is_correct_orig']) + c_swap = sum(1 for r in cat_recs if r['is_correct_swap']) + c_both = sum(1 for r in cat_recs if r['is_correct_orig'] and r['is_correct_swap']) + logger.info(f" {cat:>6s} (n={n}): acc_orig={c_orig/n:.1%}, acc_swap={c_swap/n:.1%}, " + f"acc_both={c_both/n:.1%}") + + return records + + +def extract_cross_group_features( + extractor: BaseHiddenStateExtractor, + quads: List[dict], +) -> List[dict]: + """Extract features for cross-group quads (4 forward passes each).""" + records = [] + for quad in tqdm(quads, desc="Cross-group quads"): + try: + image = decode_base64_image(quad['image_base64']) + hs_d_orig, pred_d_orig = run_single_query(extractor, image, quad['dist_original_q']) + hs_d_swap, pred_d_swap = run_single_query(extractor, image, quad['dist_swapped_q']) + hs_v_orig, pred_v_orig = run_single_query(extractor, image, quad['vert_original_q']) + hs_v_swap, pred_v_swap = run_single_query(extractor, image, quad['vert_swapped_q']) + + delta_dist, delta_vert = {}, {} + for layer_idx in extractor.target_layers: + if layer_idx in hs_d_orig and layer_idx in hs_d_swap: + delta_dist[layer_idx] = hs_d_swap[layer_idx] - hs_d_orig[layer_idx] + if layer_idx in hs_v_orig and layer_idx in hs_v_swap: + delta_vert[layer_idx] = hs_v_swap[layer_idx] - hs_v_orig[layer_idx] + + record = { + 'index': quad['index'], + 'delta_dist': delta_dist, + 'delta_vert': delta_vert, + 'pred_d_orig': pred_d_orig, 'pred_d_swap': pred_d_swap, + 'pred_v_orig': pred_v_orig, 'pred_v_swap': pred_v_swap, + 'is_correct_d_orig': check_answer(pred_d_orig, quad['dist_original_answer'], quad['dist_mcq_map']), + 'is_correct_d_swap': check_answer(pred_d_swap, quad['dist_swapped_answer'], quad['dist_mcq_map']), + 'is_correct_v_orig': check_answer(pred_v_orig, quad['vert_original_answer'], quad['vert_mcq_map']), + 'is_correct_v_swap': check_answer(pred_v_swap, quad['vert_swapped_answer'], quad['vert_mcq_map']), + 'data_source': quad['data_source'], + } + records.append(record) + + tqdm.write(f" #{quad['index']:<6} dist=[{pred_d_orig[:20]}/{pred_d_swap[:20]}] " + f"vert=[{pred_v_orig[:20]}/{pred_v_swap[:20]}]") + + except Exception as e: + logger.warning(f"Error on cross-group index {quad['index']}: {e}") + continue + + logger.info(f"Extracted {len(records)} cross-group quad records") + return records + + +# ============================================================================ +# Analysis Functions +# ============================================================================ + +# Fix 5: Within-category + sign-corrected delta consistency + +def compute_delta_consistency(records: List[dict], target_layers: List[int]): + """Compute TWO types of delta consistency. + + Returns: + within_cat_results: {(category, layer) -> {mean, std, n}} + sign_corrected_results: {(group, layer) -> {mean, std, n}} + """ + within_cat_results = {} + sign_corrected_results = {} + + for group in GROUP_ORDER: + canonical = CANONICAL_CATEGORIES[group] + opposite = OPPOSITE_MAP[canonical] + group_recs = [r for r in records if r['group'] == group] + + for layer in target_layers: + # (a) Within-category consistency + for cat in [canonical, opposite]: + cat_deltas = [r['delta'][layer] for r in group_recs + if r['category'] == cat and layer in r['delta']] + if len(cat_deltas) >= 2: + arr = np.array(cat_deltas) + sim = cosine_similarity(arr) + upper = sim[np.triu_indices(len(cat_deltas), k=1)] + within_cat_results[(cat, layer)] = { + 'mean': float(np.mean(upper)), + 'std': float(np.std(upper)), + 'n': len(cat_deltas), + } + + # (b) Sign-corrected group consistency + all_deltas = [] + for r in group_recs: + if layer not in r['delta']: + continue + d = r['delta'][layer] + if r['category'] == opposite: + d = -d # flip to align with canonical direction + all_deltas.append(d) + + if len(all_deltas) >= 2: + arr = np.array(all_deltas) + sim = cosine_similarity(arr) + upper = sim[np.triu_indices(len(all_deltas), k=1)] + sign_corrected_results[(group, layer)] = { + 'mean': float(np.mean(upper)), + 'std': float(np.std(upper)), + 'n': len(all_deltas), + } + + return within_cat_results, sign_corrected_results + + +# Fix 7: Delta-based similarity matrix + +def compute_delta_similarity_matrix(records: List[dict], layer: int) -> Optional[pd.DataFrame]: + """Compute 6x6 cosine similarity using mean delta per category.""" + cat_deltas = {} + for cat in CATEGORY_ORDER: + deltas = [r['delta'][layer] for r in records if r['category'] == cat and layer in r['delta']] + if deltas: + cat_deltas[cat] = np.mean(deltas, axis=0) + + available = [c for c in CATEGORY_ORDER if c in cat_deltas] + if len(available) < 2: + return None + + vectors = np.array([cat_deltas[c] for c in available]) + sim = cosine_similarity(vectors) + return pd.DataFrame(sim, index=available, columns=available) + + +# Fix 8: Both-correct filtering + +def filter_both_correct(records: List[dict]) -> List[dict]: + """Filter to pairs where both orig and swap predictions are correct.""" + return [r for r in records if r['is_correct_orig'] and r['is_correct_swap']] + + +# Fix 8: Category validity check + +def check_category_validity(records: List[dict], scale: str) -> Dict[str, dict]: + """Check per-category accuracy and flag unreliable categories.""" + validity = {} + for cat in CATEGORY_ORDER: + cat_recs = [r for r in records if r['category'] == cat] + n = len(cat_recs) + if n == 0: + validity[cat] = {'n': 0, 'acc_orig': 0, 'acc_swap': 0, 'reliable': False} + continue + acc_orig = sum(1 for r in cat_recs if r['is_correct_orig']) / n + acc_swap = sum(1 for r in cat_recs if r['is_correct_swap']) / n + reliable = acc_orig >= 0.5 and acc_swap >= 0.5 + validity[cat] = { + 'n': n, 'acc_orig': acc_orig, 'acc_swap': acc_swap, + 'reliable': reliable, + } + if not reliable: + logger.warning(f" [!] Category '{cat}' unreliable at scale={scale}: " + f"acc_orig={acc_orig:.1%}, acc_swap={acc_swap:.1%}") + return validity + + +def compute_cross_group_alignment(quad_records: List[dict], target_layers: List[int]) -> dict: + results = {} + for layer in target_layers: + per_sample = [] + delta_verts, delta_dists = [], [] + + for rec in quad_records: + if layer in rec['delta_vert'] and layer in rec['delta_dist']: + dv = rec['delta_vert'][layer] + dd = rec['delta_dist'][layer] + norm_v, norm_d = np.linalg.norm(dv), np.linalg.norm(dd) + if norm_v > 1e-10 and norm_d > 1e-10: + per_sample.append(float(np.dot(dv, dd) / (norm_v * norm_d))) + delta_verts.append(dv) + delta_dists.append(dd) + + if not per_sample: + continue + + mean_dv = np.mean(delta_verts, axis=0) + mean_dd = np.mean(delta_dists, axis=0) + norm_mv, norm_md = np.linalg.norm(mean_dv), np.linalg.norm(mean_dd) + mean_alignment = float(np.dot(mean_dv, mean_dd) / (norm_mv * norm_md + 1e-10)) + + rng = np.random.RandomState(42) + perm_alignments = [] + for _ in range(100): + shuffled_dd = [delta_dists[i] for i in rng.permutation(len(delta_dists))] + perm_cos = [] + for dv, dd in zip(delta_verts, shuffled_dd): + nv, nd = np.linalg.norm(dv), np.linalg.norm(dd) + if nv > 1e-10 and nd > 1e-10: + perm_cos.append(np.dot(dv, dd) / (nv * nd)) + perm_alignments.append(np.mean(perm_cos)) + + results[layer] = { + 'per_sample_mean': float(np.mean(per_sample)), + 'per_sample_std': float(np.std(per_sample)), + 'mean_delta_alignment': mean_alignment, + 'permutation_mean': float(np.mean(perm_alignments)), + 'permutation_std': float(np.std(perm_alignments)), + 'n_samples': len(per_sample), + } + return results + + +def compute_prediction_stats(records: List[dict], scale: str) -> dict: + stats = {'scale': scale} + total_correct_orig, total_correct_swap, total_both, total_n = 0, 0, 0, 0 + + for group in GROUP_ORDER: + group_recs = [r for r in records if r['group'] == group] + n = len(group_recs) + c_orig = sum(1 for r in group_recs if r['is_correct_orig']) + c_swap = sum(1 for r in group_recs if r['is_correct_swap']) + c_both = sum(1 for r in group_recs if r['is_correct_orig'] and r['is_correct_swap']) + stats[f'{group}_n'] = n + stats[f'{group}_acc_orig'] = c_orig / n if n > 0 else 0 + stats[f'{group}_acc_swap'] = c_swap / n if n > 0 else 0 + stats[f'{group}_acc_both'] = c_both / n if n > 0 else 0 + total_correct_orig += c_orig + total_correct_swap += c_swap + total_both += c_both + total_n += n + + stats['overall_acc_orig'] = total_correct_orig / total_n if total_n > 0 else 0 + stats['overall_acc_swap'] = total_correct_swap / total_n if total_n > 0 else 0 + stats['overall_acc_both'] = total_both / total_n if total_n > 0 else 0 + stats['overall_n'] = total_n + return stats + + +# ============================================================================ +# Saving & Loading +# ============================================================================ + +def get_representative_layers(all_layers, n=5): + if len(all_layers) <= n: + return list(all_layers) + indices = np.linspace(0, len(all_layers) - 1, n, dtype=int) + return [all_layers[i] for i in indices] + + +def save_scale_results( + scale, swap_records, quad_records, + within_cat_consistency, sign_corrected_consistency, + cross_alignment, pred_stats, target_layers, + category_validity, delta_heatmaps, + output_dir, both_correct_tag="all_pairs", +): + """Save all per-scale results to disk.""" + csv_dir = os.path.join(output_dir, 'csv') + json_dir = os.path.join(output_dir, 'json') + os.makedirs(csv_dir, exist_ok=True) + os.makedirs(json_dir, exist_ok=True) + + # 1. Predictions CSV (tagged so all_pairs and both_correct don't overwrite each other) + pred_rows = [] + for r in swap_records: + pred_rows.append({ + 'index': r['index'], 'group': r['group'], 'category': r['category'], + 'pred_orig': r['pred_orig'], 'pred_swap': r['pred_swap'], + 'is_correct_orig': r['is_correct_orig'], 'is_correct_swap': r['is_correct_swap'], + }) + pd.DataFrame(pred_rows).to_csv( + os.path.join(csv_dir, f'predictions_{scale}_{both_correct_tag}.csv'), index=False) + + # 2. Within-category consistency JSON + wc_data = {} + for (cat, layer), vals in within_cat_consistency.items(): + wc_data[f'{cat}_L{layer}'] = vals + with open(os.path.join(json_dir, f'within_cat_consistency_{scale}_{both_correct_tag}.json'), 'w') as f: + json.dump(wc_data, f, indent=2) + + # 3. Sign-corrected consistency JSON + sc_data = {} + for (group, layer), vals in sign_corrected_consistency.items(): + sc_data[f'{group}_L{layer}'] = vals + with open(os.path.join(json_dir, f'sign_corrected_consistency_{scale}_{both_correct_tag}.json'), 'w') as f: + json.dump(sc_data, f, indent=2) + + # 4. Cross-group alignment JSON + alignment_data = {} + for layer, vals in cross_alignment.items(): + alignment_data[f'L{layer}'] = vals + with open(os.path.join(json_dir, f'cross_alignment_{scale}.json'), 'w') as f: + json.dump(alignment_data, f, indent=2) + + # 5. Prediction stats JSON + with open(os.path.join(json_dir, f'pred_stats_{scale}.json'), 'w') as f: + json.dump(pred_stats, f, indent=2) + + # 6. Category validity JSON (Fix 8) + with open(os.path.join(json_dir, f'category_validity_{scale}.json'), 'w') as f: + json.dump(category_validity, f, indent=2) + + # 7. Delta heatmap CSVs (Fix 7) + for layer, df in delta_heatmaps.items(): + if df is not None: + df.to_csv(os.path.join(csv_dir, f'delta_similarity_{scale}_L{layer}_{both_correct_tag}.csv')) + + logger.info(f"Saved results for scale={scale} ({both_correct_tag}) to {output_dir}") + + +def save_vectors_npz(scale, swap_records, quad_records, target_layers, output_dir): + """Save ALL vectors with correctness metadata to NPZ (once per scale). + + This enables post-hoc filtering (both_correct, all_with_validity) from saved data. + """ + rep_layers = list(target_layers) # save ALL layers (not just 5 representative) + delta_data = {} + for layer in rep_layers: + groups_list, categories_list, vectors = [], [], [] + orig_vecs, swap_vecs, labels = [], [], [] + correct_orig_list, correct_swap_list, indices_list = [], [], [] + for r in swap_records: + if layer in r['delta']: + groups_list.append(r['group']) + categories_list.append(r['category']) + vectors.append(r['delta'][layer]) + correct_orig_list.append(r['is_correct_orig']) + correct_swap_list.append(r['is_correct_swap']) + indices_list.append(r['index']) + if layer in r['hs_orig'] and layer in r['hs_swap']: + orig_vecs.append(r['hs_orig'][layer]) + swap_vecs.append(r['hs_swap'][layer]) + labels.append(r['category']) + if vectors: + delta_data[f'delta_L{layer}'] = np.array(vectors) + delta_data[f'groups_L{layer}'] = np.array(groups_list) + delta_data[f'categories_L{layer}'] = np.array(categories_list) + delta_data[f'is_correct_orig_L{layer}'] = np.array(correct_orig_list) + delta_data[f'is_correct_swap_L{layer}'] = np.array(correct_swap_list) + delta_data[f'indices_L{layer}'] = np.array(indices_list) + if orig_vecs: + delta_data[f'orig_L{layer}'] = np.array(orig_vecs) + delta_data[f'swap_L{layer}'] = np.array(swap_vecs) + delta_data[f'labels_L{layer}'] = np.array(labels) + + npz_dir = os.path.join(output_dir, 'npz') + os.makedirs(npz_dir, exist_ok=True) + np.savez_compressed(os.path.join(npz_dir, f'vectors_{scale}.npz'), **delta_data) + logger.info(f"Saved vectors NPZ with correctness metadata for scale={scale}") + + # Cross-group delta vectors + if quad_records: + cg_data = {} + for layer in rep_layers: + dverts, ddists = [], [] + for rec in quad_records: + if layer in rec['delta_vert'] and layer in rec['delta_dist']: + dverts.append(rec['delta_vert'][layer]) + ddists.append(rec['delta_dist'][layer]) + if dverts: + cg_data[f'delta_vert_L{layer}'] = np.array(dverts) + cg_data[f'delta_dist_L{layer}'] = np.array(ddists) + np.savez_compressed(os.path.join(npz_dir, f'cross_group_vectors_{scale}.npz'), **cg_data) + + +def load_scale_consistency(output_dir, scale, tag='all_pairs'): + """Load sign-corrected consistency.""" + path = os.path.join(output_dir, 'json', f'sign_corrected_consistency_{scale}_{tag}.json') + if not os.path.exists(path): + return {} + with open(path) as f: + raw = json.load(f) + result = {} + for key, vals in raw.items(): + parts = key.rsplit('_L', 1) + if len(parts) == 2: + result[(parts[0], int(parts[1]))] = vals + return result + + +def load_within_cat_consistency(output_dir, scale, tag='all_pairs'): + path = os.path.join(output_dir, 'json', f'within_cat_consistency_{scale}_{tag}.json') + if not os.path.exists(path): + return {} + with open(path) as f: + raw = json.load(f) + result = {} + for key, vals in raw.items(): + parts = key.rsplit('_L', 1) + if len(parts) == 2: + result[(parts[0], int(parts[1]))] = vals + return result + + +def load_scale_alignment(output_dir, scale): + path = os.path.join(output_dir, 'json', f'cross_alignment_{scale}.json') + if not os.path.exists(path): + return {} + with open(path) as f: + raw = json.load(f) + result = {} + for key, vals in raw.items(): + result[int(key.replace('L', ''))] = vals + return result + + +def load_delta_heatmaps(output_dir, scale, tag='all_pairs'): + import glob as glob_mod + pattern = os.path.join(output_dir, 'csv', f'delta_similarity_{scale}_L*_{tag}.csv') + files = glob_mod.glob(pattern) + result = {} + for fpath in files: + basename = os.path.basename(fpath) + # delta_similarity_{scale}_L{layer}_{tag}.csv + part = basename.replace(f'delta_similarity_{scale}_L', '').replace(f'_{tag}.csv', '') + try: + layer = int(part) + except ValueError: + continue + result[layer] = pd.read_csv(fpath, index_col=0) + return result + + +# ============================================================================ +# Visualization +# ============================================================================ + +def plot_within_cat_consistency_trajectory(within_cat, scale, model_type, save_path): + """Plot within-category delta consistency across layers.""" + fig, ax = plt.subplots(figsize=(12, 6)) + cat_colors = CAT_COLORS + for cat in CATEGORY_ORDER: + layers, vals = [], [] + for (c, l), v in sorted(within_cat.items(), key=lambda x: x[0][1]): + if c == cat: + layers.append(l) + vals.append(v['mean']) + if layers: + ax.plot(layers, vals, '-o', color=cat_colors[cat], label=cat, linewidth=2, markersize=3) + ax.set_xlabel('Layer Index') + ax.set_ylabel('Within-Category Consistency') + ax.set_title(f'{model_type.upper()} ({scale}) - Within-Category Delta Consistency', fontweight='bold') + ax.legend(fontsize=9) + ax.grid(True, alpha=0.3) + plt.tight_layout() + plt.savefig(save_path, dpi=300, bbox_inches='tight') + plt.close() + logger.info(f"Saved: {save_path}") + + +def plot_sign_corrected_consistency_trajectory(sign_corrected, scale, model_type, save_path): + """Plot sign-corrected group consistency across layers.""" + fig, ax = plt.subplots(figsize=(12, 6)) + colors = GROUP_COLORS + for group in GROUP_ORDER: + layers, vals = [], [] + for (g, l), v in sorted(sign_corrected.items(), key=lambda x: x[0][1]): + if g == group: + layers.append(l) + vals.append(v['mean']) + if layers: + ax.plot(layers, vals, '-o', color=colors[group], label=group, linewidth=2, markersize=3) + ax.set_xlabel('Layer Index') + ax.set_ylabel('Sign-Corrected Consistency') + ax.set_title(f'{model_type.upper()} ({scale}) - Sign-Corrected Group Consistency', fontweight='bold') + ax.legend(fontsize=11) + ax.grid(True, alpha=0.3) + plt.tight_layout() + plt.savefig(save_path, dpi=300, bbox_inches='tight') + plt.close() + logger.info(f"Saved: {save_path}") + + +def plot_cross_group_alignment_trajectory(cross_alignment, scale, model_type, save_path): + fig, ax = plt.subplots(figsize=(12, 6)) + layers = sorted(cross_alignment.keys()) + actual = [cross_alignment[l]['per_sample_mean'] for l in layers] + mean_delta = [cross_alignment[l]['mean_delta_alignment'] for l in layers] + perm_mean = [cross_alignment[l]['permutation_mean'] for l in layers] + perm_std = [cross_alignment[l]['permutation_std'] for l in layers] + + ax.plot(layers, actual, '-o', color='#d62728', label='cos(d_vert, d_dist) per-sample mean', + linewidth=2.5, markersize=3) + ax.plot(layers, mean_delta, '--s', color='#e377c2', label='cos(mean_d_vert, mean_d_dist)', + linewidth=1.5, markersize=3) + ax.plot(layers, perm_mean, ':', color='gray', label='permutation control', linewidth=1.5) + ax.fill_between(layers, + [m - 2*s for m, s in zip(perm_mean, perm_std)], + [m + 2*s for m, s in zip(perm_mean, perm_std)], + alpha=0.2, color='gray') + ax.set_xlabel('Layer Index') + ax.set_ylabel('Cosine Alignment') + ax.set_title(f'{model_type.upper()} ({scale}) - Cross-Group Alignment (Perspective Bias)', fontweight='bold') + ax.legend(fontsize=9) + ax.grid(True, alpha=0.3) + plt.tight_layout() + plt.savefig(save_path, dpi=300, bbox_inches='tight') + plt.close() + logger.info(f"Saved: {save_path}") + + +# Fix 7: Delta heatmap visualization + +def plot_delta_heatmap(sim_df, title, save_path): + """Plot delta-based similarity heatmap.""" + plt.figure(figsize=(10, 8)) + available_order = [c for c in CATEGORY_ORDER if c in sim_df.index] + sim_df_ordered = sim_df.loc[available_order, available_order] + + annot = sim_df_ordered.round(4).astype(str) + sns.heatmap(sim_df_ordered, annot=annot, fmt='', cmap='RdBu_r', + center=0, vmin=-1, vmax=1, square=True, linewidths=0.5, + cbar_kws={'label': 'Cosine Similarity'}) + plt.title(title, fontsize=14, fontweight='bold') + plt.tight_layout() + plt.savefig(save_path, dpi=300, bbox_inches='tight') + plt.close() + logger.info(f"Saved delta heatmap: {save_path}") + + +# Fix 6: Prediction stats visualization + +def plot_pred_stats_bars(all_pred_stats, model_type, save_path): + """Bar chart: per-group accuracy (orig/swap/both) across scales.""" + fig, axes = plt.subplots(1, len(GROUP_ORDER), figsize=(7 * len(GROUP_ORDER), 6)) + if len(GROUP_ORDER) == 1: + axes = [axes] + + available = [s for s in SCALE_ORDER if any(d['scale'] == s for d in all_pred_stats)] + if not available: + # Fallback: use whatever scales are present (preserves insertion order) + seen = [] + for d in all_pred_stats: + if d['scale'] not in seen: + seen.append(d['scale']) + available = seen + + for idx, group in enumerate(GROUP_ORDER): + ax = axes[idx] + x = np.arange(3) # orig, swap, both + width = 0.8 / len(available) + for i, scale in enumerate(available): + entry = next((d for d in all_pred_stats if d['scale'] == scale), None) + if entry is None: + continue + vals = [entry.get(f'{group}_acc_orig', 0), + entry.get(f'{group}_acc_swap', 0), + entry.get(f'{group}_acc_both', 0)] + offset = (i - len(available) / 2 + 0.5) * width + color = SCALE_COLORS.get(scale, 'gray') + ax.bar(x + offset, vals, width, label=scale, color=color) + ax.set_xticks(x) + ax.set_xticklabels(['orig', 'swap', 'both']) + ax.set_ylabel('Accuracy') + ax.set_title(group, fontweight='bold') + ax.legend(fontsize=7) + ax.set_ylim(0, 1.1) + ax.axhline(y=0.5, color='gray', linestyle='--', alpha=0.5) + ax.grid(True, alpha=0.3, axis='y') + + fig.suptitle(f'{model_type.upper()} - Prediction Accuracy by Group', fontsize=15, fontweight='bold', y=1.02) + plt.tight_layout() + plt.savefig(save_path, dpi=300, bbox_inches='tight') + plt.close() + logger.info(f"Saved: {save_path}") + + +def plot_pred_stats_trajectory(all_pred_stats, model_type, save_path): + """Line plot: acc_both trajectory across scales per group.""" + fig, ax = plt.subplots(figsize=(10, 6)) + available = [s for s in SCALE_ORDER if any(d['scale'] == s for d in all_pred_stats)] + if not available: + seen = [] + for d in all_pred_stats: + if d['scale'] not in seen: + seen.append(d['scale']) + available = seen + colors = GROUP_COLORS + + for group in GROUP_ORDER: + x_vals, y_vals = [], [] + for i, scale in enumerate(available): + entry = next((d for d in all_pred_stats if d['scale'] == scale), None) + if entry: + x_vals.append(i) + y_vals.append(entry.get(f'{group}_acc_both', 0)) + if x_vals: + ax.plot(x_vals, y_vals, '-o', color=colors[group], label=group, linewidth=2.5, markersize=6) + + ax.set_xticks(range(len(available))) + ax.set_xticklabels(available) + ax.set_xlabel('Scale') + ax.set_ylabel('Accuracy (both correct)') + ax.set_title(f'{model_type.upper()} - Both-Correct Accuracy Across Scales', fontweight='bold') + ax.legend(fontsize=10) + ax.set_ylim(0, 1.05) + ax.axhline(y=0.5, color='gray', linestyle='--', alpha=0.5) + ax.grid(True, alpha=0.3) + plt.tight_layout() + plt.savefig(save_path, dpi=300, bbox_inches='tight') + plt.close() + logger.info(f"Saved: {save_path}") + + +def plot_pca_embeddings(vectors_npz_path, scale, model_type, save_dir, bc_only=False): + data = np.load(vectors_npz_path, allow_pickle=True) + layer_keys = [k for k in data.files if k.startswith('orig_L')] + layers = sorted([int(k.replace('orig_L', '')) for k in layer_keys]) + + cat_colors = CAT_COLORS + + for layer in layers: + orig = data.get(f'orig_L{layer}') + swap = data.get(f'swap_L{layer}') + labels = data.get(f'labels_L{layer}') + deltas = data.get(f'delta_L{layer}') + cats = data.get(f'categories_L{layer}') + groups = data.get(f'groups_L{layer}') + + if bc_only and deltas is not None: + co = data.get(f'is_correct_orig_L{layer}') + cs = data.get(f'is_correct_swap_L{layer}') + if co is not None and cs is not None: + bc_mask = co.astype(bool) & cs.astype(bool) + if orig is not None and len(orig) == len(bc_mask): + orig = orig[bc_mask] + swap = swap[bc_mask] + labels = labels[bc_mask] if labels is not None else None + if len(deltas) == len(bc_mask): + deltas = deltas[bc_mask] + cats = cats[bc_mask] if cats is not None else None + groups = groups[bc_mask] if groups is not None else None + + if orig is None or swap is None or len(orig) == 0: + continue + + fig, axes = plt.subplots(1, 3, figsize=(24, 7)) + + pca = PCA(n_components=2) + all_vecs = np.vstack([orig, swap]) + all_pca = pca.fit_transform(all_vecs) + orig_pca = all_pca[:len(orig)] + swap_pca = all_pca[len(orig):] + + ax = axes[0] + for cat in CATEGORY_ORDER: + mask = np.array([str(l) == cat for l in labels]) + if mask.any(): + ax.scatter(orig_pca[mask, 0], orig_pca[mask, 1], + c=cat_colors.get(cat, 'gray'), label=f'{cat} (orig)', + alpha=0.5, s=15, marker='o') + ax.scatter(swap_pca[mask, 0], swap_pca[mask, 1], + c=cat_colors.get(cat, 'gray'), + alpha=0.5, s=15, marker='x') + ax.set_title('Embeddings by Category\n(o=orig, x=swap)', fontsize=11) + ax.legend(fontsize=7, ncol=2) + ax.grid(True, alpha=0.2) + + ax = axes[1] + if deltas is not None and cats is not None: + pca_d = PCA(n_components=2) + delta_pca = pca_d.fit_transform(deltas) + group_colors = GROUP_COLORS + if groups is not None: + for group in GROUP_ORDER: + mask = np.array([str(g) == group for g in groups]) + if mask.any(): + ax.scatter(delta_pca[mask, 0], delta_pca[mask, 1], + c=group_colors.get(group, 'gray'), label=group, alpha=0.5, s=15) + ax.set_title('Delta Vectors by Group', fontsize=11) + ax.legend(fontsize=9) + ax.grid(True, alpha=0.2) + + ax = axes[2] + if deltas is not None and cats is not None: + for cat in CATEGORY_ORDER: + mask = np.array([str(c) == cat for c in cats]) + if mask.any(): + ax.scatter(delta_pca[mask, 0], delta_pca[mask, 1], + c=cat_colors.get(cat, 'gray'), label=cat, alpha=0.5, s=15) + ax.set_title('Delta Vectors by Category', fontsize=11) + ax.legend(fontsize=8, ncol=2) + ax.grid(True, alpha=0.2) + + fig.suptitle(f'{model_type.upper()} ({scale}) - Layer {layer} - PCA', fontweight='bold') + plt.tight_layout() + plt.savefig(os.path.join(save_dir, f'pca_{scale}_L{layer}.png'), dpi=200, bbox_inches='tight') + plt.close() + + logger.info(f"Saved PCA plots to {save_dir}") + + +def plot_pca_3d(vectors_npz_path, scale, model_type, save_dir, bc_only=False): + """Generate 3-panel 3D PCA figure per representative layer.""" + data = np.load(vectors_npz_path, allow_pickle=True) + layer_keys = [k for k in data.files if k.startswith('orig_L')] + layers = sorted([int(k.replace('orig_L', '')) for k in layer_keys]) + + if not layers: + logger.info(f" [pca_3d] No orig_L* keys found in {vectors_npz_path}") + return + + os.makedirs(save_dir, exist_ok=True) + + def scatter3d(ax, xs, ys, zs, c, label, alpha=0.45, s=12, marker='o'): + ax.scatter(xs, ys, zs, c=c, label=label, alpha=alpha, s=s, marker=marker) + + for layer in layers: + orig = data.get(f'orig_L{layer}') + swap = data.get(f'swap_L{layer}') + labels = data.get(f'labels_L{layer}') + deltas = data.get(f'delta_L{layer}') + cats = data.get(f'categories_L{layer}') + groups = data.get(f'groups_L{layer}') + + if bc_only and deltas is not None: + co = data.get(f'is_correct_orig_L{layer}') + cs = data.get(f'is_correct_swap_L{layer}') + if co is not None and cs is not None: + bc_mask = co.astype(bool) & cs.astype(bool) + if orig is not None and len(orig) == len(bc_mask): + orig = orig[bc_mask] + swap = swap[bc_mask] + labels = labels[bc_mask] if labels is not None else None + if len(deltas) == len(bc_mask): + deltas = deltas[bc_mask] + cats = cats[bc_mask] if cats is not None else None + groups = groups[bc_mask] if groups is not None else None + + if orig is None or swap is None or len(orig) == 0: + continue + + # Panel 1: embeddings + pca_emb = PCA(n_components=3) + all_vecs = np.vstack([orig, swap]) + all_proj = pca_emb.fit_transform(all_vecs) + orig_proj = all_proj[:len(orig)] + swap_proj = all_proj[len(orig):] + ev1 = pca_emb.explained_variance_ratio_ + + # Panels 2/3: delta vectors + has_delta = (deltas is not None and len(deltas) >= 3) + if has_delta: + pca_d = PCA(n_components=3) + delta_proj = pca_d.fit_transform(deltas) + ev2 = pca_d.explained_variance_ratio_ + else: + delta_proj = None + ev2 = None + + fig = plt.figure(figsize=(30, 8)) + + ax1 = fig.add_subplot(131, projection='3d') + for cat in CATEGORY_ORDER: + mask = np.array([str(l) == cat for l in labels]) + if not mask.any(): + continue + c = CAT_COLORS.get(cat, 'gray') + scatter3d(ax1, orig_proj[mask, 0], orig_proj[mask, 1], orig_proj[mask, 2], + c=c, label=f'{cat} (orig)', marker='o') + scatter3d(ax1, swap_proj[mask, 0], swap_proj[mask, 1], swap_proj[mask, 2], + c=c, label=f'{cat} (swap)', marker='^') + ax1.set_title('Embeddings by Category\n(o=orig, ^=swap)', fontsize=10) + ax1.set_xlabel(f'PC1 ({ev1[0]:.1%})', fontsize=8) + ax1.set_ylabel(f'PC2 ({ev1[1]:.1%})', fontsize=8) + ax1.set_zlabel(f'PC3 ({ev1[2]:.1%})', fontsize=8) + ax1.legend(fontsize=6, ncol=2, loc='upper left') + + ax2 = fig.add_subplot(132, projection='3d') + if has_delta and groups is not None: + for group in GROUP_ORDER: + mask = np.array([str(g) == group for g in groups]) + if not mask.any(): + continue + scatter3d(ax2, delta_proj[mask, 0], delta_proj[mask, 1], delta_proj[mask, 2], + c=GROUP_COLORS.get(group, 'gray'), label=group) + ax2.set_title('Delta Vectors by Group', fontsize=10) + ax2.set_xlabel(f'PC1 ({ev2[0]:.1%})', fontsize=8) + ax2.set_ylabel(f'PC2 ({ev2[1]:.1%})', fontsize=8) + ax2.set_zlabel(f'PC3 ({ev2[2]:.1%})', fontsize=8) + ax2.legend(fontsize=8) + else: + ax2.set_title('Delta Vectors by Group\n(no data)', fontsize=10) + + ax3 = fig.add_subplot(133, projection='3d') + if has_delta and cats is not None: + for cat in CATEGORY_ORDER: + mask = np.array([str(c) == cat for c in cats]) + if not mask.any(): + continue + scatter3d(ax3, delta_proj[mask, 0], delta_proj[mask, 1], delta_proj[mask, 2], + c=CAT_COLORS.get(cat, 'gray'), label=cat) + ax3.set_title('Delta Vectors by Category', fontsize=10) + ax3.set_xlabel(f'PC1 ({ev2[0]:.1%})', fontsize=8) + ax3.set_ylabel(f'PC2 ({ev2[1]:.1%})', fontsize=8) + ax3.set_zlabel(f'PC3 ({ev2[2]:.1%})', fontsize=8) + ax3.legend(fontsize=7, ncol=2) + else: + ax3.set_title('Delta Vectors by Category\n(no data)', fontsize=10) + + fig.suptitle(f'{model_type.upper()} ({scale}) - Layer {layer} - 3D PCA', fontweight='bold') + plt.tight_layout() + plt.savefig(os.path.join(save_dir, f'pca_{scale}_L{layer}.png'), dpi=200, + bbox_inches='tight', pad_inches=0.4) + plt.close() + + logger.info(f"Saved 3D PCA plots to {save_dir}") + + +# Cross-scale plots + +def plot_cross_scale_consistency(all_consistency, model_type, save_path, title_prefix='Sign-Corrected'): + fig, axes = plt.subplots(1, 3, figsize=(21, 6)) + + for idx, group in enumerate(GROUP_ORDER): + ax = axes[idx] + for scale in SCALE_ORDER: + if scale not in all_consistency: + continue + consistency = all_consistency[scale] + layers, vals = [], [] + for (g, l), v in sorted(consistency.items(), key=lambda x: x[0][1]): + if g == group: + layers.append(l) + vals.append(v['mean']) + if layers: + ax.plot(layers, vals, '-', color=SCALE_COLORS.get(scale, 'gray'), + label=SCALE_DISPLAY_NAMES.get(scale, scale), linewidth=2) + ax.set_xlabel('Layer Index') + ax.set_ylabel('Consistency') + ax.set_title(group, fontweight='bold') + ax.legend(fontsize=9) + ax.grid(True, alpha=0.3) + + fig.suptitle(f'{model_type.upper()} - {title_prefix} Consistency Across Scales', + fontsize=15, fontweight='bold', y=1.02) + plt.tight_layout() + plt.savefig(save_path, dpi=300, bbox_inches='tight') + plt.close() + logger.info(f"Saved: {save_path}") + + +def plot_cross_scale_within_cat_consistency(all_within_cat, model_type, save_path): + """Cross-scale within-category consistency.""" + fig, axes = plt.subplots(2, 3, figsize=(21, 12)) + + for idx, cat in enumerate(CATEGORY_ORDER): + ax = axes[idx // 3][idx % 3] + for scale in SCALE_ORDER: + if scale not in all_within_cat: + continue + wc = all_within_cat[scale] + layers, vals = [], [] + for (c, l), v in sorted(wc.items(), key=lambda x: x[0][1]): + if c == cat: + layers.append(l) + vals.append(v['mean']) + if layers: + ax.plot(layers, vals, '-', color=SCALE_COLORS.get(scale, 'gray'), + label=SCALE_DISPLAY_NAMES.get(scale, scale), linewidth=2) + ax.set_xlabel('Layer Index') + ax.set_ylabel('Consistency') + ax.set_title(cat, fontweight='bold') + ax.legend(fontsize=8) + ax.grid(True, alpha=0.3) + + fig.suptitle(f'{model_type.upper()} - Within-Category Consistency Across Scales', + fontsize=15, fontweight='bold', y=1.02) + plt.tight_layout() + plt.savefig(save_path, dpi=300, bbox_inches='tight') + plt.close() + logger.info(f"Saved: {save_path}") + + +def plot_cross_scale_alignment(all_alignment, model_type, save_path): + fig, ax = plt.subplots(figsize=(12, 6)) + for scale in SCALE_ORDER: + if scale not in all_alignment: + continue + alignment = all_alignment[scale] + layers = sorted(alignment.keys()) + vals = [alignment[l]['per_sample_mean'] for l in layers] + ax.plot(layers, vals, '-', color=SCALE_COLORS.get(scale, 'gray'), + label=SCALE_DISPLAY_NAMES.get(scale, scale), linewidth=2) + ax.set_xlabel('Layer Index') + ax.set_ylabel('cos(d_vert, d_dist)') + ax.set_title(f'{model_type.upper()} - Cross-Group Alignment Across Scales\n' + f'(High=entangled, Low=disentangled)', fontweight='bold') + ax.legend(fontsize=10) + ax.grid(True, alpha=0.3) + plt.tight_layout() + plt.savefig(save_path, dpi=300, bbox_inches='tight') + plt.close() + logger.info(f"Saved: {save_path}") + + +# Fix 7: Delta-based trajectory (cross-layer, per-scale) + +def plot_delta_trajectory(all_delta_heatmaps, model_type, save_path): + """Cross-layer trajectory of delta-based similarities for key pairs.""" + pairs = [ + ('above', 'far', 'above-far'), ('below', 'close', 'below-close'), + ('left', 'right', 'left-right'), + ] + fig, axes = plt.subplots(1, len(pairs), figsize=(7 * len(pairs), 6)) + if len(pairs) == 1: + axes = [axes] + + for idx, (cat1, cat2, label) in enumerate(pairs): + ax = axes[idx] + for scale in SCALE_ORDER: + if scale not in all_delta_heatmaps: + continue + hm = all_delta_heatmaps[scale] + layers = sorted(hm.keys()) + vals = [] + valid_layers = [] + for l in layers: + df = hm[l] + if df is not None and cat1 in df.index and cat2 in df.columns: + valid_layers.append(l) + vals.append(df.loc[cat1, cat2]) + if valid_layers: + ax.plot(valid_layers, vals, '-', color=SCALE_COLORS.get(scale, 'gray'), + label=SCALE_DISPLAY_NAMES.get(scale, scale), linewidth=2) + ax.set_xlabel('Layer Index') + ax.set_ylabel('Delta Cosine Similarity') + ax.set_title(label, fontweight='bold') + ax.legend(fontsize=9) + ax.grid(True, alpha=0.3) + ax.axhline(y=0, color='gray', linestyle='--', alpha=0.5) + + fig.suptitle(f'{model_type.upper()} - Delta-Based Similarity Trajectory', + fontsize=15, fontweight='bold', y=1.02) + plt.tight_layout() + plt.savefig(save_path, dpi=300, bbox_inches='tight') + plt.close() + logger.info(f"Saved: {save_path}") + + +def plot_summary_barplot(all_consistency, all_alignment, model_type, save_path): + available_scales = [s for s in SCALE_ORDER if s in all_consistency] + if not available_scales: + return + + sample_cons = all_consistency[available_scales[0]] + max_layer = max(l for (_, l) in sample_cons.keys()) + + fig, axes = plt.subplots(1, 2, figsize=(16, 6)) + + ax = axes[0] + x = np.arange(len(GROUP_ORDER)) + width = 0.8 / len(available_scales) + for i, scale in enumerate(available_scales): + cons = all_consistency[scale] + vals = [cons.get((g, max_layer), {}).get('mean', 0) for g in GROUP_ORDER] + offset = (i - len(available_scales) / 2 + 0.5) * width + ax.bar(x + offset, vals, width, + label=SCALE_DISPLAY_NAMES.get(scale, scale), + color=SCALE_COLORS.get(scale, 'gray')) + ax.set_xticks(x) + ax.set_xticklabels(GROUP_ORDER) + ax.set_ylabel('Sign-Corrected Consistency') + ax.set_title(f'Consistency at Layer {max_layer}', fontweight='bold') + ax.legend(fontsize=8) + ax.grid(True, alpha=0.3, axis='y') + + ax = axes[1] + available_align = [s for s in available_scales if s in all_alignment] + if available_align: + vals = [all_alignment[s].get(max_layer, {}).get('per_sample_mean', 0) for s in available_align] + colors = [SCALE_COLORS.get(s, 'gray') for s in available_align] + ax.bar(range(len(vals)), vals, color=colors) + ax.set_xticks(range(len(vals))) + ax.set_xticklabels([SCALE_DISPLAY_NAMES.get(s, s) for s in available_align]) + ax.set_ylabel('cos(d_vert, d_dist)') + ax.set_title(f'Cross-Group Alignment at L{max_layer}\n(Lower=disentangled)', fontweight='bold') + ax.grid(True, alpha=0.3, axis='y') + + fig.suptitle(f'{model_type.upper()} - Summary at Deepest Layer', fontsize=15, fontweight='bold', y=1.02) + plt.tight_layout() + plt.savefig(save_path, dpi=300, bbox_inches='tight') + plt.close() + logger.info(f"Saved: {save_path}") + + +# ============================================================================ +# Main Pipeline +# ============================================================================ + +def process_scale(args, scale, swap_pairs, quads): + # Resolve model path from the correct config dict + if args.model_type in MODEL_CONFIGS_NEW: + cls_name, model_path = MODEL_CONFIGS_NEW[args.model_type][scale] + else: + model_path = MODEL_CONFIGS[args.model_type][scale] + cls_name = None + + logger.info(f"\n{'='*60}") + logger.info(f"Processing {args.model_type} - {scale}" + + (f" [{cls_name}]" if cls_name else "")) + logger.info(f"Model path: {model_path}") + logger.info(f"{'='*60}") + + extractor = get_extractor(args.model_type, model_path, scale=scale, device=args.device) + target_layers = extractor.target_layers + + output_dir = os.path.join(args.output_dir, args.model_type) + plots_dir = os.path.join(output_dir, 'plots') + os.makedirs(plots_dir, exist_ok=True) + + # Phase A: Extract swap pair features + logger.info("\n--- Phase A: Extracting swap pair features ---") + swap_records = extract_swap_features(extractor, swap_pairs, + max_samples_per_category=args.max_samples_per_category) + + # Phase B: Extract cross-group features + logger.info("\n--- Phase B: Extracting cross-group features ---") + quad_records = extract_cross_group_features(extractor, quads) if quads else [] + + # Phase C: Analysis + + # Fix 8: Category validity check + logger.info("\n--- Phase C: Analysis ---") + category_validity = check_category_validity(swap_records, scale) + unreliable_cats = [c for c, v in category_validity.items() if not v['reliable']] + if unreliable_cats: + logger.warning(f" Unreliable categories: {unreliable_cats}") + + # Fix 5: Two types of consistency (all pairs) + within_cat_all, sign_corrected_all = compute_delta_consistency(swap_records, target_layers) + + # Fix 8: Both-correct filtered consistency + both_correct_records = filter_both_correct(swap_records) + logger.info(f" Both-correct pairs: {len(both_correct_records)}/{len(swap_records)}") + within_cat_bc, sign_corrected_bc = compute_delta_consistency(both_correct_records, target_layers) + + # Cross-group alignment + cross_alignment = compute_cross_group_alignment(quad_records, target_layers) + pred_stats = compute_prediction_stats(swap_records, scale) + + # Fix 7: Delta-based heatmaps (for all layers) + delta_heatmaps_all = {} + delta_heatmaps_bc = {} + for layer in target_layers: + delta_heatmaps_all[layer] = compute_delta_similarity_matrix(swap_records, layer) + if both_correct_records: + delta_heatmaps_bc[layer] = compute_delta_similarity_matrix(both_correct_records, layer) + + # Log key results + max_layer = max(target_layers) + for group in GROUP_ORDER: + key = (group, max_layer) + if key in sign_corrected_all: + logger.info(f" Sign-corrected [{group}, L{max_layer}]: " + f"{sign_corrected_all[key]['mean']:.4f} +/- {sign_corrected_all[key]['std']:.4f}") + if max_layer in cross_alignment: + ca = cross_alignment[max_layer] + logger.info(f" Cross-group alignment L{max_layer}: " + f"{ca['per_sample_mean']:.4f} (perm={ca['permutation_mean']:.4f})") + logger.info(f" Accuracy orig={pred_stats['overall_acc_orig']:.1%}, " + f"swap={pred_stats['overall_acc_swap']:.1%}, " + f"both={pred_stats['overall_acc_both']:.1%}") + + # Phase D: Save results (both all_pairs and both_correct) + logger.info("\n--- Phase D: Saving results ---") + + # Save vectors NPZ ONCE with all records + correctness metadata + save_vectors_npz(scale, swap_records, quad_records, target_layers, output_dir) + + save_scale_results( + scale, swap_records, quad_records, + within_cat_all, sign_corrected_all, + cross_alignment, pred_stats, target_layers, + category_validity, delta_heatmaps_all, + output_dir, both_correct_tag='all_pairs', + ) + if both_correct_records: + save_scale_results( + scale, both_correct_records, quad_records, + within_cat_bc, sign_corrected_bc, + cross_alignment, pred_stats, target_layers, + category_validity, delta_heatmaps_bc, + output_dir, both_correct_tag='both_correct', + ) + + # Phase E: Per-scale plots (generate into separate subdirs) + logger.info("\n--- Phase E: Per-scale plots ---") + + for condition, wc_data, sc_data in [ + ('all', within_cat_all, sign_corrected_all), + ('both_correct', within_cat_bc, sign_corrected_bc), + ]: + if condition == 'both_correct' and not both_correct_records: + continue + + cond_dir = os.path.join(plots_dir, condition) + os.makedirs(cond_dir, exist_ok=True) + + wc_dir = os.path.join(cond_dir, 'within_cat_consistency') + sc_dir = os.path.join(cond_dir, 'sign_corrected') + ca_dir = os.path.join(cond_dir, 'cross_alignment') + os.makedirs(wc_dir, exist_ok=True) + os.makedirs(sc_dir, exist_ok=True) + os.makedirs(ca_dir, exist_ok=True) + + # Within-category consistency + plot_within_cat_consistency_trajectory( + wc_data, scale, args.model_type, + os.path.join(wc_dir, f'within_cat_consistency_{scale}.png')) + + # Sign-corrected consistency + plot_sign_corrected_consistency_trajectory( + sc_data, scale, args.model_type, + os.path.join(sc_dir, f'sign_corrected_consistency_{scale}.png')) + + # Cross-group alignment + if cross_alignment: + plot_cross_group_alignment_trajectory( + cross_alignment, scale, args.model_type, + os.path.join(ca_dir, f'cross_alignment_{scale}.png')) + + # PCA (from full NPZ) — 2D and 3D, all-pairs and both-correct + npz_path = os.path.join(output_dir, 'npz', f'vectors_{scale}.npz') + if os.path.exists(npz_path): + pca_dir = os.path.join(plots_dir, 'all', 'pca') + pca_3d_dir = os.path.join(plots_dir, 'all', 'pca_3d') + bc_pca_dir = os.path.join(plots_dir, 'both_correct', 'pca') + bc_pca_3d_dir = os.path.join(plots_dir, 'both_correct', 'pca_3d') + for d in (pca_dir, pca_3d_dir, bc_pca_dir, bc_pca_3d_dir): + os.makedirs(d, exist_ok=True) + plot_pca_embeddings(npz_path, scale, args.model_type, pca_dir) + plot_pca_3d(npz_path, scale, args.model_type, pca_3d_dir) + plot_pca_embeddings(npz_path, scale, args.model_type, bc_pca_dir, bc_only=True) + plot_pca_3d(npz_path, scale, args.model_type, bc_pca_3d_dir, bc_only=True) + + # Prediction stats bar (per-scale) + if pred_stats: + pred_plot_dir = os.path.join(plots_dir, 'all', 'pred_stats') + os.makedirs(pred_plot_dir, exist_ok=True) + plot_pred_stats_bars([pred_stats], args.model_type, + os.path.join(pred_plot_dir, f'pred_stats_{scale}.png')) + + # Cleanup + del swap_records, quad_records, both_correct_records + extractor.cleanup() + + logger.info(f"\n Scale {scale} complete.") + + +# ============================================================================ +# Accuracy Chart (integrated from accuracy_chart.py) +# ============================================================================ + +def _acc_plot_group_bars(pred_stats, model_type, ax_list): + available = [s for s in SCALE_ORDER if any(d['scale'] == s for d in pred_stats)] + x = np.arange(3) + width = 0.8 / max(len(available), 1) + for idx, group in enumerate(GROUP_ORDER): + ax = ax_list[idx] + for i, scale in enumerate(available): + entry = next((d for d in pred_stats if d['scale'] == scale), None) + if entry is None: + continue + vals = [entry.get(f'{group}_acc_orig', 0), + entry.get(f'{group}_acc_swap', 0), + entry.get(f'{group}_acc_both', 0)] + offset = (i - len(available) / 2 + 0.5) * width + ax.bar(x + offset, vals, width, label=scale, + color=SCALE_COLORS.get(scale, 'gray'), alpha=0.85) + ax.set_xticks(x) + ax.set_xticklabels(['orig', 'swap', 'both'], fontsize=10) + ax.set_ylabel('Accuracy', fontsize=9) + ax.set_title(group.capitalize(), fontweight='bold', fontsize=11, + color=GROUP_COLORS.get(group, 'black')) + ax.legend(fontsize=7, ncol=2) + ax.set_ylim(0, 1.15) + ax.axhline(y=0.5, color='gray', linestyle='--', alpha=0.5, linewidth=1) + ax.grid(True, alpha=0.3, axis='y') + + +def _acc_plot_both_trajectory(pred_stats, model_type, ax): + available = [s for s in SCALE_ORDER if any(d['scale'] == s for d in pred_stats)] + x_ticks = range(len(available)) + for group in GROUP_ORDER: + y_vals = [next((d for d in pred_stats if d['scale'] == s), {}).get(f'{group}_acc_both', 0) + for s in available] + ax.plot(x_ticks, y_vals, '-o', color=GROUP_COLORS.get(group, 'gray'), + label=group, linewidth=2.5, markersize=7) + y_overall = [next((d for d in pred_stats if d['scale'] == s), {}).get('overall_acc_both', 0) + for s in available] + ax.plot(x_ticks, y_overall, '--s', color='black', label='overall', + linewidth=2, markersize=6, alpha=0.7) + ax.set_xticks(list(x_ticks)) + ax.set_xticklabels(available, fontsize=9) + ax.set_xlabel('Scale', fontsize=9) + ax.set_ylabel('Accuracy (both correct)', fontsize=9) + ax.set_title('Both-Correct Accuracy Trajectory', fontweight='bold', fontsize=11) + ax.legend(fontsize=9) + ax.set_ylim(0, 1.05) + ax.axhline(y=0.5, color='gray', linestyle='--', alpha=0.5, linewidth=1) + ax.grid(True, alpha=0.3) + + +def _acc_plot_overall_trajectory(pred_stats, model_type, ax): + available = [s for s in SCALE_ORDER if any(d['scale'] == s for d in pred_stats)] + x_ticks = range(len(available)) + for metric, label, ls in [ + ('overall_acc_orig', 'orig', '-o'), + ('overall_acc_swap', 'swap', '-s'), + ('overall_acc_both', 'both', '-^'), + ]: + y_vals = [next((d for d in pred_stats if d['scale'] == s), {}).get(metric, 0) + for s in available] + ax.plot(x_ticks, y_vals, ls, label=label, linewidth=2.2, markersize=6) + ax.set_xticks(list(x_ticks)) + ax.set_xticklabels(available, fontsize=9) + ax.set_xlabel('Scale', fontsize=9) + ax.set_ylabel('Overall Accuracy', fontsize=9) + ax.set_title('Overall Accuracy Trajectory', fontweight='bold', fontsize=11) + ax.legend(fontsize=9) + ax.set_ylim(0, 1.05) + ax.axhline(y=0.5, color='gray', linestyle='--', alpha=0.5, linewidth=1) + ax.grid(True, alpha=0.3) + + +def _acc_plot_category_accuracy(cat_validity, model_type, ax_orig, ax_swap, pred_stats=None): + available = [s for s in SCALE_ORDER if s in cat_validity] + cats_with_overall = CATEGORY_ORDER + ['overall'] + x = np.arange(len(cats_with_overall)) + width = 0.8 / max(len(available), 1) + overall_key = {'acc_orig': 'overall_acc_orig', 'acc_swap': 'overall_acc_swap'} + for ax, metric, title in [ + (ax_orig, 'acc_orig', 'Per-Category Accuracy (orig)'), + (ax_swap, 'acc_swap', 'Per-Category Accuracy (swap)'), + ]: + for i, scale in enumerate(available): + cv = cat_validity[scale] + vals = [cv.get(cat, {}).get(metric, 0) for cat in CATEGORY_ORDER] + if pred_stats is not None: + entry = next((d for d in pred_stats if d['scale'] == scale), None) + vals.append(entry.get(overall_key[metric], 0) if entry else 0) + else: + vals.append(0) + offset = (i - len(available) / 2 + 0.5) * width + ax.bar(x + offset, vals, width, label=scale, + color=SCALE_COLORS.get(scale, 'gray'), alpha=0.85) + for j, cat in enumerate(CATEGORY_ORDER): + ax.axvspan(j - 0.45, j + 0.45, color=CAT_COLORS.get(cat, 'gray'), alpha=0.06, linewidth=0) + ax.axvline(x=len(CATEGORY_ORDER) - 0.5, color='black', linewidth=1.2, linestyle=':', alpha=0.6) + ax.set_xticks(x) + ax.set_xticklabels(cats_with_overall, fontsize=9, rotation=15) + ax.set_ylabel('Accuracy', fontsize=9) + ax.set_title(title, fontweight='bold', fontsize=11) + ax.legend(fontsize=7, ncol=2) + ax.set_ylim(0, 1.15) + ax.axhline(y=0.5, color='gray', linestyle='--', alpha=0.5, linewidth=1) + ax.grid(True, alpha=0.3, axis='y') + if available: + last_cv = cat_validity[available[-1]] + for j, cat in enumerate(CATEGORY_ORDER): + if not last_cv.get(cat, {}).get('reliable', True): + ax.text(j, 1.08, '✗', ha='center', va='center', + fontsize=9, color='red', fontweight='bold') + + +def _acc_plot_category_per_scale(cat_validity, model_type, save_dir, pred_stats=None): + cats_with_overall = CATEGORY_ORDER + ['overall'] + overall_key = {'acc_orig': 'overall_acc_orig', 'acc_swap': 'overall_acc_swap'} + for scale in sorted(cat_validity.keys(), + key=lambda s: SCALE_ORDER.index(s) if s in SCALE_ORDER else 99): + cv = cat_validity[scale] + ps_entry = next((d for d in pred_stats if d['scale'] == scale), None) if pred_stats else None + fig, axes = plt.subplots(1, 2, figsize=(16, 5)) + x = np.arange(len(cats_with_overall)) + width = 0.55 + for ax, metric, title in [ + (axes[0], 'acc_orig', f'acc_orig ({scale})'), + (axes[1], 'acc_swap', f'acc_swap ({scale})'), + ]: + vals = [cv.get(cat, {}).get(metric, 0) for cat in CATEGORY_ORDER] + overall_val = ps_entry.get(overall_key[metric], 0) if ps_entry else 0 + vals.append(overall_val) + colors = [CAT_COLORS.get(cat, 'gray') for cat in CATEGORY_ORDER] + ['#333333'] + bars = ax.bar(x, vals, width, color=colors, alpha=0.85, edgecolor='white') + ax.axvline(x=len(CATEGORY_ORDER) - 0.5, color='black', + linewidth=1.2, linestyle=':', alpha=0.6) + ax.set_xticks(x) + ax.set_xticklabels(cats_with_overall, fontsize=10) + ax.set_ylabel('Accuracy', fontsize=10) + ax.set_title(title, fontweight='bold', fontsize=12) + ax.set_ylim(0, 1.15) + ax.axhline(y=0.5, color='gray', linestyle='--', alpha=0.5) + ax.grid(True, alpha=0.3, axis='y') + for bar, cat in zip(bars, cats_with_overall): + reliable = cv.get(cat, {}).get('reliable', True) if cat != 'overall' else True + h = bar.get_height() + ax.text(bar.get_x() + bar.get_width() / 2, h + 0.02, + f'{h:.2f}' + ('' if reliable else ' ✗'), + ha='center', va='bottom', fontsize=8, + color='red' if not reliable else 'black') + fig.suptitle(f'{model_type.upper()} - Category Accuracy ({scale})', + fontsize=13, fontweight='bold') + plt.tight_layout() + out = os.path.join(save_dir, f'category_accuracy_{scale}.png') + plt.savefig(out, dpi=200, bbox_inches='tight') + plt.close() + logger.info(f"Saved: {out}") + + +def run_accuracy_charts(pred_stats, cat_validity, model_type, save_dir): + """Generate all accuracy chart plots into save_dir.""" + os.makedirs(save_dir, exist_ok=True) + + # Group bars + fig, axes = plt.subplots(1, 3, figsize=(21, 6)) + _acc_plot_group_bars(pred_stats, model_type, axes) + fig.suptitle(f'{model_type.upper()} - Prediction Accuracy by Group', + fontsize=15, fontweight='bold') + plt.tight_layout() + plt.savefig(os.path.join(save_dir, 'accuracy_group_bars.png'), dpi=200, bbox_inches='tight') + plt.close() + logger.info(f"Saved: {os.path.join(save_dir, 'accuracy_group_bars.png')}") + + # Trajectory + fig, axes = plt.subplots(1, 2, figsize=(16, 6)) + _acc_plot_both_trajectory(pred_stats, model_type, axes[0]) + _acc_plot_overall_trajectory(pred_stats, model_type, axes[1]) + fig.suptitle(f'{model_type.upper()} - Accuracy Trajectory Across Scales', + fontsize=14, fontweight='bold') + plt.tight_layout() + plt.savefig(os.path.join(save_dir, 'accuracy_trajectory.png'), dpi=200, bbox_inches='tight') + plt.close() + logger.info(f"Saved: {os.path.join(save_dir, 'accuracy_trajectory.png')}") + + if cat_validity: + # Category bars (all scales overlay) + fig, axes = plt.subplots(1, 2, figsize=(20, 6)) + _acc_plot_category_accuracy(cat_validity, model_type, axes[0], axes[1], + pred_stats=pred_stats) + fig.suptitle(f'{model_type.upper()} - Per-Category Accuracy Across Scales', + fontsize=14, fontweight='bold') + plt.tight_layout() + plt.savefig(os.path.join(save_dir, 'accuracy_category.png'), dpi=200, bbox_inches='tight') + plt.close() + logger.info(f"Saved: {os.path.join(save_dir, 'accuracy_category.png')}") + + # Per-scale category bars + _acc_plot_category_per_scale(cat_validity, model_type, save_dir, pred_stats=pred_stats) + + # Combined accuracy_chart.png + fig = plt.figure(figsize=(24, 14)) + ax_h = fig.add_subplot(3, 3, 1) + ax_v = fig.add_subplot(3, 3, 2) + ax_d = fig.add_subplot(3, 3, 3) + _acc_plot_group_bars(pred_stats, model_type, [ax_h, ax_v, ax_d]) + ax_tb = fig.add_subplot(3, 3, 4) + ax_to = fig.add_subplot(3, 3, 5) + _acc_plot_both_trajectory(pred_stats, model_type, ax_tb) + _acc_plot_overall_trajectory(pred_stats, model_type, ax_to) + ax_note = fig.add_subplot(3, 3, 6) + ax_note.axis('off') + available_scales = [s for s in SCALE_ORDER if any(d['scale'] == s for d in pred_stats)] + ax_note.text(0.1, 0.6, + f'Scales: {", ".join(available_scales)}\n\n✗ = unreliable category\n-- = 0.5 chance level', + transform=ax_note.transAxes, fontsize=11, va='top', family='monospace') + if cat_validity: + ax_co = fig.add_subplot(3, 2, 5) + ax_cs = fig.add_subplot(3, 2, 6) + _acc_plot_category_accuracy(cat_validity, model_type, ax_co, ax_cs, pred_stats=pred_stats) + fig.suptitle(f'{model_type.upper()} — Accuracy Summary', + fontsize=17, fontweight='bold', y=1.01) + plt.tight_layout() + plt.savefig(os.path.join(save_dir, 'accuracy_chart.png'), dpi=200, bbox_inches='tight') + plt.close() + logger.info(f"Saved: {os.path.join(save_dir, 'accuracy_chart.png')}") + + +# ============================================================================ +# Unify Consistency Y-axis (integrated from unify_consistency_ylim.py) +# ============================================================================ + +def _ylim_compute(all_vals, margin_ratio=0.08): + if not all_vals: + return -1, 1 + ymin, ymax = min(all_vals), max(all_vals) + margin = (ymax - ymin) * margin_ratio + return ymin - margin, ymax + margin + + +def _ylim_load_keyed_json(path): + if not os.path.exists(path): + return None + with open(path) as f: + raw = json.load(f) + if not raw: + return None + result = {} + for key, vals in raw.items(): + parts = key.rsplit('_L', 1) + if len(parts) == 2: + result[(parts[0], int(parts[1]))] = vals + return result if result else None + + +def _ylim_load_alignment_json(path): + if not os.path.exists(path): + return None + with open(path) as f: + raw = json.load(f) + if not raw: + return None + result = {int(k[1:]): v for k, v in raw.items() if k.startswith('L')} + return result if result else None + + +def _ylim_plot_sign_corrected(data, scale, model_type, save_path, ylim): + fig, ax = plt.subplots(figsize=(12, 6)) + for group in GROUP_ORDER: + layers, vals = [], [] + for (g, l), v in sorted(data.items(), key=lambda x: x[0][1]): + if g == group: + layers.append(l) + vals.append(v['mean']) + if layers: + ax.plot(layers, vals, '-o', color=GROUP_COLORS[group], + label=group, linewidth=2, markersize=3) + ax.set_ylim(ylim) + ax.set_xlabel('Layer Index') + ax.set_ylabel('Sign-Corrected Consistency') + ax.set_title(f'{model_type.upper()} ({scale}) - Sign-Corrected Group Consistency', + fontweight='bold') + ax.legend(fontsize=11) + ax.grid(True, alpha=0.3) + plt.tight_layout() + plt.savefig(save_path, dpi=300, bbox_inches='tight') + plt.close() + + +def _ylim_plot_within_cat(data, scale, model_type, save_path, ylim): + fig, ax = plt.subplots(figsize=(12, 6)) + for cat in CATEGORY_ORDER: + layers, vals = [], [] + for (c, l), v in sorted(data.items(), key=lambda x: x[0][1]): + if c == cat: + layers.append(l) + vals.append(v['mean']) + if layers: + ax.plot(layers, vals, '-o', color=CAT_COLORS[cat], + label=cat, linewidth=2, markersize=3) + ax.set_ylim(ylim) + ax.set_xlabel('Layer Index') + ax.set_ylabel('Within-Category Consistency') + ax.set_title(f'{model_type.upper()} ({scale}) - Within-Category Delta Consistency', + fontweight='bold') + ax.legend(fontsize=9) + ax.grid(True, alpha=0.3) + plt.tight_layout() + plt.savefig(save_path, dpi=300, bbox_inches='tight') + plt.close() + + +def _ylim_plot_cross_alignment(data, scale, model_type, save_path, ylim): + fig, ax = plt.subplots(figsize=(12, 6)) + layers = sorted(data.keys()) + ax.plot(layers, [data[l]['per_sample_mean'] for l in layers], '-o', color='#d62728', + label='cos(d_vert, d_dist) per-sample mean', linewidth=2.5, markersize=3) + ax.plot(layers, [data[l]['mean_delta_alignment'] for l in layers], '--s', color='#e377c2', + label='cos(mean_d_vert, mean_d_dist)', linewidth=1.5, markersize=3) + perm_mean = [data[l]['permutation_mean'] for l in layers] + perm_std = [data[l]['permutation_std'] for l in layers] + ax.plot(layers, perm_mean, ':', color='gray', label='permutation control', linewidth=1.5) + ax.fill_between(layers, + [m - 2*s for m, s in zip(perm_mean, perm_std)], + [m + 2*s for m, s in zip(perm_mean, perm_std)], + alpha=0.2, color='gray') + ax.set_ylim(ylim) + ax.set_xlabel('Layer Index') + ax.set_ylabel('Cosine Alignment') + ax.set_title(f'{model_type.upper()} ({scale}) - Cross-Group Alignment (Perspective Bias)', + fontweight='bold') + ax.legend(fontsize=9) + ax.grid(True, alpha=0.3) + plt.tight_layout() + plt.savefig(save_path, dpi=300, bbox_inches='tight') + plt.close() + + +def _ylim_process_plot_type(data_dir, plots_dir, conditions, model_type, + plot_name, json_pattern, loader, val_gatherer, plotter, + subfolder=None): + """Re-plot one plot type across all conditions with a unified y-axis.""" + logger.info(f" [unify ylim] {plot_name}") + for condition, condition_tag in conditions: + cond_plot_dir = os.path.join(plots_dir, condition) + if not os.path.isdir(cond_plot_dir): + continue + save_dir = os.path.join(cond_plot_dir, subfolder) if subfolder else cond_plot_dir + os.makedirs(save_dir, exist_ok=True) + all_data = {} + for scale in SCALE_ORDER: + path = os.path.join(data_dir, 'json', + json_pattern.format(scale=scale, tag=condition_tag)) + loaded = loader(path) + if loaded: + all_data[scale] = loaded + if not all_data: + continue + all_vals = val_gatherer(all_data) + ylim = _ylim_compute(all_vals) + for scale, data in all_data.items(): + save_path = os.path.join(save_dir, f'{plot_name}_{scale}.png') + plotter(data, scale, model_type, save_path, ylim) + logger.info(f" {condition}: y=[{ylim[0]:.4f}, {ylim[1]:.4f}], {len(all_data)} scales") + + +def run_unify_ylim(data_dir, plots_dir, model_type): + """Unify y-axis for sign_corrected, within_cat, and cross_alignment plots.""" + conditions = [ + ('all', 'all_pairs'), + ('both_correct', 'both_correct'), + ] + + def gather_keyed(all_data): + return [v['mean'] for data in all_data.values() for v in data.values()] + + def gather_alignment(all_data): + vals = [] + for data in all_data.values(): + for v in data.values(): + vals += [v['per_sample_mean'], v['mean_delta_alignment'], + v['permutation_mean'] + 2 * v['permutation_std'], + v['permutation_mean'] - 2 * v['permutation_std']] + return vals + + _ylim_process_plot_type( + data_dir, plots_dir, conditions, model_type, + plot_name='sign_corrected_consistency', + json_pattern='sign_corrected_consistency_{scale}_{tag}.json', + loader=_ylim_load_keyed_json, + val_gatherer=gather_keyed, + plotter=_ylim_plot_sign_corrected, + subfolder='sign_corrected', + ) + _ylim_process_plot_type( + data_dir, plots_dir, conditions, model_type, + plot_name='within_cat_consistency', + json_pattern='within_cat_consistency_{scale}_{tag}.json', + loader=_ylim_load_keyed_json, + val_gatherer=gather_keyed, + plotter=_ylim_plot_within_cat, + subfolder='within_cat_consistency', + ) + _ylim_process_plot_type( + data_dir, plots_dir, conditions, model_type, + plot_name='cross_alignment', + json_pattern='cross_alignment_{scale}.json', + loader=_ylim_load_alignment_json, + val_gatherer=gather_alignment, + plotter=_ylim_plot_cross_alignment, + subfolder='cross_alignment', + ) + + +def _check_merge_only_sources(output_dir: str, model_type: str) -> bool: + """Verify required source directories have data for a merge-only model_type. + Returns True if all sources look healthy, False (with warnings) if not. + """ + mc = MERGE_ONLY_CONFIGS[model_type] + ok = True + for req_dir in mc['required_dirs']: + src_path = os.path.join(output_dir, req_dir) + json_dir = os.path.join(src_path, 'json') + if not os.path.isdir(src_path): + if req_dir in MODEL_CONFIGS_NEW: + hint = f"python swap_analysis.py --model_type {req_dir}" + else: + hint = f"python swap_analysis.py --model_type {req_dir}" + logger.warning( + f"[{model_type}] Required source directory not found: {src_path}\n" + f" → Run inference first: {hint}" + ) + ok = False + elif not os.path.isdir(json_dir) or not any( + f.startswith('pred_stats_') for f in os.listdir(json_dir) + ): + logger.warning( + f"[{model_type}] Source directory exists but has no pred_stats JSON: {json_dir}\n" + f" → Inference may not have completed for '{req_dir}'." + ) + ok = False + else: + scales_found = [ + f.replace('pred_stats_', '').replace('.json', '') + for f in os.listdir(json_dir) + if f.startswith('pred_stats_') + ] + logger.info(f" [{req_dir}] found scales: {scales_found}") + return ok + + +def _load_scale_data_multi(output_dir: str, model_type: str, scale: str, scale_sources: dict): + """Load per-scale data for one scale, looking in the correct source directory. + + Returns (sc, sc_bc, wc, wc_bc, align, pred_stat, cat_validity, dh, dh_bc). + Any unavailable item is None / {}. + """ + src_dir = os.path.join(output_dir, scale_sources.get(scale, model_type)) + + sc = load_scale_consistency(src_dir, scale, 'all_pairs') + sc_bc = load_scale_consistency(src_dir, scale, 'both_correct') + wc = load_within_cat_consistency(src_dir, scale, 'all_pairs') + wc_bc = load_within_cat_consistency(src_dir, scale, 'both_correct') + align = load_scale_alignment(src_dir, scale) + + pred_stat = None + pred_path = os.path.join(src_dir, 'json', f'pred_stats_{scale}.json') + if os.path.exists(pred_path): + with open(pred_path) as f: + pred_stat = json.load(f) + + cat_validity = None + cv_path = os.path.join(src_dir, 'json', f'category_validity_{scale}.json') + if os.path.exists(cv_path): + with open(cv_path) as f: + cat_validity = json.load(f) + + dh = load_delta_heatmaps(src_dir, scale, 'all_pairs') + dh_bc = load_delta_heatmaps(src_dir, scale, 'both_correct') + + return sc, sc_bc, wc, wc_bc, align, pred_stat, cat_validity, dh, dh_bc + + +# --------------------------------------------------------------------------- +# All-layer heatmap + PCA helpers (called from run_merge / run_merge_extended) +# --------------------------------------------------------------------------- + +def _get_csv_layers(csv_dir: str, scale: str, tag: str) -> list: + """Return sorted list of layer indices that have a delta_similarity CSV.""" + import glob as _glob + pattern = os.path.join(csv_dir, f'delta_similarity_{scale}_L*_{tag}.csv') + layers = [] + for fpath in _glob.glob(pattern): + m = re.search( + rf'delta_similarity_{re.escape(scale)}_L(\d+)_{re.escape(tag)}\.csv$', + os.path.basename(fpath)) + if m: + layers.append(int(m.group(1))) + return sorted(layers) + + +def run_all_layer_heatmaps(model_dir: str, model_type: str, scales: list): + """Generate delta-similarity heatmaps for ALL layers from pre-computed CSVs. + + Reads {model_dir}/csv/delta_similarity_{scale}_L{n}_{tag}.csv + Writes {model_dir}/plots/all/heatmap/heatmap_{scale}_L{n}.png (all_pairs) + {model_dir}/plots/both_correct/heatmap/heatmap_{scale}_L{n}.png (both_correct) + + Skips a scale if the NPZ is missing or any all_pairs CSV is absent + (indicates inference was not fully completed for that scale). + """ + TAG_TO_DIR = { + 'all_pairs': os.path.join(model_dir, 'plots', 'all', 'heatmap'), + 'both_correct': os.path.join(model_dir, 'plots', 'both_correct', 'heatmap'), + } + + for scale in scales: + npz_path = os.path.join(model_dir, 'npz', f'vectors_{scale}.npz') + csv_dir = os.path.join(model_dir, 'csv') + + if not os.path.exists(npz_path): + logger.warning(f' [{model_type}/{scale}] NPZ not found, skipping heatmaps.') + continue + + data = np.load(npz_path, allow_pickle=True) + npz_layers = sorted( + int(k.replace('orig_L', '')) + for k in data.files if k.startswith('orig_L') + ) + data.close() + + if not npz_layers: + logger.warning(f' [{model_type}/{scale}] No orig_L* keys in NPZ, skipping heatmaps.') + continue + + csv_layers = _get_csv_layers(csv_dir, scale, 'all_pairs') + missing = set(npz_layers) - set(csv_layers) + if missing: + logger.warning( + f' [{model_type}/{scale}] {len(missing)} NPZ layers lack CSVs ' + f'(e.g. L{sorted(missing)[:5]}). Skipping all-layer heatmaps.') + continue + + for out_dir in TAG_TO_DIR.values(): + os.makedirs(out_dir, exist_ok=True) + + logger.info(f' [{model_type}/{scale}] Generating heatmaps for {len(npz_layers)} layers...') + saved = 0 + for layer in npz_layers: + for tag, out_dir in TAG_TO_DIR.items(): + csv_path = os.path.join(csv_dir, f'delta_similarity_{scale}_L{layer}_{tag}.csv') + if not os.path.exists(csv_path): + continue # both_correct CSV may be absent for some layers + df = pd.read_csv(csv_path, index_col=0) + available = [c for c in CATEGORY_ORDER if c in df.index] + if not available: + continue + df = df.loc[available, available] + title = ( + f'{model_type.upper()} ({scale}) \u2014 Delta Heatmap L{layer} ' + f'({"both-correct" if tag == "both_correct" else "all pairs"})' + ) + out_path = os.path.join(out_dir, f'heatmap_{scale}_L{layer}.png') + plot_delta_heatmap(df, title, out_path) + saved += 1 + logger.info(f' [{model_type}/{scale}] Saved {saved} heatmaps') + + +def run_all_layer_pca(model_dir: str, model_type: str, scales: list): + """Generate 2D and 3D PCA plots for ALL layers from saved NPZ files. + + Writes {model_dir}/plots/all/pca/pca_{scale}_L{n}.png (all pairs) + {model_dir}/plots/all/pca_3d/pca_{scale}_L{n}.png + {model_dir}/plots/both_correct/pca/pca_{scale}_L{n}.png (both-correct only) + {model_dir}/plots/both_correct/pca_3d/pca_{scale}_L{n}.png + """ + for scale in scales: + npz_path = os.path.join(model_dir, 'npz', f'vectors_{scale}.npz') + if not os.path.exists(npz_path): + logger.warning(f' [{model_type}/{scale}] NPZ not found, skipping PCA.') + continue + + # All-pairs PCA + pca_2d_dir = os.path.join(model_dir, 'plots', 'all', 'pca') + pca_3d_dir = os.path.join(model_dir, 'plots', 'all', 'pca_3d') + os.makedirs(pca_2d_dir, exist_ok=True) + os.makedirs(pca_3d_dir, exist_ok=True) + logger.info(f' [{model_type}/{scale}] Generating all-layer 2D PCA...') + plot_pca_embeddings(npz_path, scale, model_type, pca_2d_dir) + logger.info(f' [{model_type}/{scale}] Generating all-layer 3D PCA...') + plot_pca_3d(npz_path, scale, model_type, pca_3d_dir) + + # Both-correct PCA + bc_pca_2d_dir = os.path.join(model_dir, 'plots', 'both_correct', 'pca') + bc_pca_3d_dir = os.path.join(model_dir, 'plots', 'both_correct', 'pca_3d') + os.makedirs(bc_pca_2d_dir, exist_ok=True) + os.makedirs(bc_pca_3d_dir, exist_ok=True) + logger.info(f' [{model_type}/{scale}] Generating both-correct 2D PCA...') + plot_pca_embeddings(npz_path, scale, model_type, bc_pca_2d_dir, bc_only=True) + logger.info(f' [{model_type}/{scale}] Generating both-correct 3D PCA...') + plot_pca_3d(npz_path, scale, model_type, bc_pca_3d_dir, bc_only=True) + + +def run_merge(args): + # Per-scale data is always read from the standard results dir + data_dir = os.path.join(args.output_dir, args.model_type) + # Cross-scale plots go to merge_output_dir if specified, else same as data_dir + output_dir = args.merge_output_dir if args.merge_output_dir else data_dir + plots_dir = os.path.join(output_dir, 'plots') + os.makedirs(plots_dir, exist_ok=True) + + scale_order = ['vanilla', '80k', '400k', '800k', '2m', 'roborefer', '10pct', '20pct', '30pct'] + available_scales = [s for s in scale_order if s in args.scales] + + # Load per-scale results + all_sign_corrected = {} + all_sign_corrected_bc = {} + all_within_cat = {} + all_within_cat_bc = {} + all_alignment = {} + all_pred_stats = [] + all_cat_validity = {} + all_delta_heatmaps = {} + all_delta_heatmaps_bc = {} + + for scale in available_scales: + sc = load_scale_consistency(data_dir, scale, 'all_pairs') + if sc: + all_sign_corrected[scale] = sc + sc_bc = load_scale_consistency(data_dir, scale, 'both_correct') + if sc_bc: + all_sign_corrected_bc[scale] = sc_bc + wc = load_within_cat_consistency(data_dir, scale, 'all_pairs') + if wc: + all_within_cat[scale] = wc + wc_bc = load_within_cat_consistency(data_dir, scale, 'both_correct') + if wc_bc: + all_within_cat_bc[scale] = wc_bc + align = load_scale_alignment(data_dir, scale) + if align: + all_alignment[scale] = align + pred_path = os.path.join(data_dir, 'json', f'pred_stats_{scale}.json') + if os.path.exists(pred_path): + with open(pred_path) as f: + all_pred_stats.append(json.load(f)) + cv_path = os.path.join(data_dir, 'json', f'category_validity_{scale}.json') + if os.path.exists(cv_path): + with open(cv_path) as f: + all_cat_validity[scale] = json.load(f) + dh = load_delta_heatmaps(data_dir, scale, 'all_pairs') + if dh: + all_delta_heatmaps[scale] = dh + dh_bc = load_delta_heatmaps(data_dir, scale, 'both_correct') + if dh_bc: + all_delta_heatmaps_bc[scale] = dh_bc + + logger.info(f" Loaded data for {scale}") + + # Generate cross-scale plots into condition subdirs + for condition, sc_data, wc_data, dh_data, tag_label in [ + ('all', all_sign_corrected, all_within_cat, all_delta_heatmaps, 'all pairs'), + ('both_correct', all_sign_corrected_bc, all_within_cat_bc, all_delta_heatmaps_bc, 'both-correct'), + ]: + cond_dir = os.path.join(plots_dir, condition) + sc_dir = os.path.join(cond_dir, 'sign_corrected') + wc_dir = os.path.join(cond_dir, 'within_cat_consistency') + dt_dir = os.path.join(cond_dir, 'delta_trajectory') + os.makedirs(sc_dir, exist_ok=True) + os.makedirs(wc_dir, exist_ok=True) + os.makedirs(dt_dir, exist_ok=True) + + if len(sc_data) > 1: + plot_cross_scale_consistency( + sc_data, args.model_type, + os.path.join(sc_dir, 'cross_scale_sign_corrected.png'), + title_prefix=f'Sign-Corrected ({tag_label})') + + if len(wc_data) > 1: + plot_cross_scale_within_cat_consistency( + wc_data, args.model_type, + os.path.join(wc_dir, 'cross_scale_within_cat.png')) + + if dh_data: + plot_delta_trajectory(dh_data, args.model_type, + os.path.join(dt_dir, 'delta_trajectory.png')) + + # Cross-scale alignment + pred stats + summary (shared across conditions) + all_cond_dir = os.path.join(plots_dir, 'all') + ca_dir = os.path.join(all_cond_dir, 'cross_alignment') + pred_stats_dir = os.path.join(all_cond_dir, 'pred_stats') + summary_dir = os.path.join(all_cond_dir, 'summary') + os.makedirs(ca_dir, exist_ok=True) + os.makedirs(pred_stats_dir, exist_ok=True) + os.makedirs(summary_dir, exist_ok=True) + + if len(all_alignment) > 1: + plot_cross_scale_alignment( + all_alignment, args.model_type, + os.path.join(ca_dir, 'cross_scale_alignment.png')) + + # Prediction stats plots + if all_pred_stats: + plot_pred_stats_bars(all_pred_stats, args.model_type, + os.path.join(pred_stats_dir, 'pred_stats_bars.png')) + plot_pred_stats_trajectory(all_pred_stats, args.model_type, + os.path.join(pred_stats_dir, 'pred_stats_trajectory.png')) + + # Summary barplot + if all_sign_corrected: + plot_summary_barplot( + all_sign_corrected, all_alignment, args.model_type, + os.path.join(summary_dir, 'summary_barplot.png')) + + # Summary CSV + summary_rows = [] + for scale in available_scales: + pred_path = os.path.join(data_dir, 'json', f'pred_stats_{scale}.json') + if os.path.exists(pred_path): + with open(pred_path) as f: + row = json.load(f) + if scale in all_alignment: + max_layer = max(all_alignment[scale].keys()) + row['alignment_deepest'] = all_alignment[scale][max_layer]['per_sample_mean'] + row['alignment_perm'] = all_alignment[scale][max_layer]['permutation_mean'] + summary_rows.append(row) + + if summary_rows: + csv_dir = os.path.join(output_dir, 'csv') + os.makedirs(csv_dir, exist_ok=True) + pd.DataFrame(summary_rows).to_csv(os.path.join(csv_dir, 'summary.csv'), index=False) + + # Accuracy charts + if all_pred_stats: + acc_dir = os.path.join(plots_dir, 'accuracy') + logger.info("\n--- Accuracy Charts ---") + run_accuracy_charts(all_pred_stats, all_cat_validity, args.model_type, acc_dir) + + # Unify y-axis across scales for per-scale trajectory plots + logger.info("\n--- Unifying Y-axis ---") + run_unify_ylim(data_dir, plots_dir, args.model_type) + + # All-layer heatmaps + PCA (from saved CSVs / NPZ) + logger.info("\n--- All-Layer Heatmaps ---") + run_all_layer_heatmaps(data_dir, args.model_type, available_scales) + + logger.info("\n--- All-Layer PCA ---") + run_all_layer_pca(data_dir, args.model_type, available_scales) + + logger.info(f"\n=== Merge Complete ===\nResults in: {output_dir}") + + +def run_merge_extended(args): + """Generate cross-scale plots for new / merge-only model_types. + + - Runnable types (molmo_big, qwen_big, qwen_super, big_trio): + loads all data from results/{model_type}/ and saves plots there. + - Merge-only types (molmo_all, qwen_all): + loads per-scale data from the respective source directories, + saves all cross-scale plots to results/{model_type}/. + """ + is_merge_only = args.model_type in MERGE_ONLY_CONFIGS + + # ── Determine scale order and data source strategy ──────────────────────── + if is_merge_only: + mc = MERGE_ONLY_CONFIGS[args.model_type] + scale_order = mc['scale_order'] + scale_sources = mc['scale_sources'] + + logger.info(f"\n=== MERGE-ONLY mode: {args.model_type} ===") + logger.info("Checking required source directories...") + sources_ok = _check_merge_only_sources(args.output_dir, args.model_type) + if not sources_ok: + logger.warning( + f"\n[WARNING] One or more source directories are missing or incomplete.\n" + f" Cross-scale plots for '{args.model_type}' may be partial.\n" + f" Run the missing model types first (see warnings above), then retry merge." + ) + else: + scale_order = SCALE_ORDERS_NEW.get( + args.model_type, list(MODEL_CONFIGS_NEW[args.model_type])) + scale_sources = None # all data lives in results/{model_type}/ + + available_scales = [s for s in scale_order if s in args.scales] + logger.info(f"Merging scales (in order): {available_scales}") + + out_dir = os.path.join(args.output_dir, args.model_type) + plots_dir = os.path.join(out_dir, 'plots') + os.makedirs(plots_dir, exist_ok=True) + + # ── Load per-scale data ─────────────────────────────────────────────────── + all_sign_corrected = {} + all_sign_corrected_bc = {} + all_within_cat = {} + all_within_cat_bc = {} + all_alignment = {} + all_pred_stats = [] + all_cat_validity = {} + all_delta_heatmaps = {} + all_delta_heatmaps_bc = {} + + for scale in available_scales: + if is_merge_only: + (sc, sc_bc, wc, wc_bc, align, + pred_stat, cat_validity, dh, dh_bc) = _load_scale_data_multi( + args.output_dir, args.model_type, scale, scale_sources) + else: + src_dir = out_dir + sc = load_scale_consistency(src_dir, scale, 'all_pairs') + sc_bc = load_scale_consistency(src_dir, scale, 'both_correct') + wc = load_within_cat_consistency(src_dir, scale, 'all_pairs') + wc_bc = load_within_cat_consistency(src_dir, scale, 'both_correct') + align = load_scale_alignment(src_dir, scale) + + pred_stat = None + pred_path = os.path.join(src_dir, 'json', f'pred_stats_{scale}.json') + if os.path.exists(pred_path): + with open(pred_path) as f: + pred_stat = json.load(f) + + cat_validity = None + cv_path = os.path.join(src_dir, 'json', f'category_validity_{scale}.json') + if os.path.exists(cv_path): + with open(cv_path) as f: + cat_validity = json.load(f) + + dh = load_delta_heatmaps(src_dir, scale, 'all_pairs') + dh_bc = load_delta_heatmaps(src_dir, scale, 'both_correct') + + if sc: + all_sign_corrected[scale] = sc + if sc_bc: + all_sign_corrected_bc[scale] = sc_bc + if wc: + all_within_cat[scale] = wc + if wc_bc: + all_within_cat_bc[scale] = wc_bc + if align: + all_alignment[scale] = align + if pred_stat is not None: + all_pred_stats.append(pred_stat) + if cat_validity is not None: + all_cat_validity[scale] = cat_validity + if dh: + all_delta_heatmaps[scale] = dh + if dh_bc: + all_delta_heatmaps_bc[scale] = dh_bc + + logger.info(f" Loaded data for '{scale}'" + + (f" (from '{scale_sources[scale]}')" if is_merge_only else "")) + + # ── Cross-scale plots ───────────────────────────────────────────────────── + for condition, sc_data, wc_data, dh_data, tag_label in [ + ('all', all_sign_corrected, all_within_cat, all_delta_heatmaps, 'all pairs'), + ('both_correct', all_sign_corrected_bc, all_within_cat_bc, all_delta_heatmaps_bc, 'both-correct'), + ]: + cond_dir = os.path.join(plots_dir, condition) + sc_dir = os.path.join(cond_dir, 'sign_corrected') + wc_dir = os.path.join(cond_dir, 'within_cat_consistency') + dt_dir = os.path.join(cond_dir, 'delta_trajectory') + os.makedirs(sc_dir, exist_ok=True) + os.makedirs(wc_dir, exist_ok=True) + os.makedirs(dt_dir, exist_ok=True) + + if len(sc_data) > 1: + plot_cross_scale_consistency( + sc_data, args.model_type, + os.path.join(sc_dir, 'cross_scale_sign_corrected.png'), + title_prefix=f'Sign-Corrected ({tag_label})') + + if len(wc_data) > 1: + plot_cross_scale_within_cat_consistency( + wc_data, args.model_type, + os.path.join(wc_dir, 'cross_scale_within_cat.png')) + + if dh_data: + plot_delta_trajectory( + dh_data, args.model_type, + os.path.join(dt_dir, 'delta_trajectory.png')) + + # ── Alignment and prediction stats ──────────────────────────────────────── + all_cond_dir = os.path.join(plots_dir, 'all') + ca_dir = os.path.join(all_cond_dir, 'cross_alignment') + pred_stats_dir = os.path.join(all_cond_dir, 'pred_stats') + summary_dir = os.path.join(all_cond_dir, 'summary') + os.makedirs(ca_dir, exist_ok=True) + os.makedirs(pred_stats_dir, exist_ok=True) + os.makedirs(summary_dir, exist_ok=True) + + if len(all_alignment) > 1: + plot_cross_scale_alignment( + all_alignment, args.model_type, + os.path.join(ca_dir, 'cross_scale_alignment.png')) + + if all_pred_stats: + plot_pred_stats_bars( + all_pred_stats, args.model_type, + os.path.join(pred_stats_dir, 'pred_stats_bars.png')) + plot_pred_stats_trajectory( + all_pred_stats, args.model_type, + os.path.join(pred_stats_dir, 'pred_stats_trajectory.png')) + + if all_sign_corrected: + plot_summary_barplot( + all_sign_corrected, all_alignment, args.model_type, + os.path.join(summary_dir, 'summary_barplot.png')) + + # ── Summary CSV ─────────────────────────────────────────────────────────── + summary_rows = [] + for scale in available_scales: + ps = next((p for p in all_pred_stats if p.get('scale') == scale), None) + if ps is None: + continue + row = dict(ps) + if scale in all_alignment: + max_layer = max(all_alignment[scale].keys()) + row['alignment_deepest'] = all_alignment[scale][max_layer]['per_sample_mean'] + row['alignment_perm'] = all_alignment[scale][max_layer]['permutation_mean'] + summary_rows.append(row) + if summary_rows: + csv_dir = os.path.join(out_dir, 'csv') + os.makedirs(csv_dir, exist_ok=True) + pd.DataFrame(summary_rows).to_csv(os.path.join(csv_dir, 'summary.csv'), index=False) + + # ── Accuracy charts ─────────────────────────────────────────────────────── + if all_pred_stats: + acc_dir = os.path.join(plots_dir, 'accuracy') + logger.info("\n--- Accuracy Charts ---") + run_accuracy_charts(all_pred_stats, all_cat_validity, args.model_type, acc_dir) + + # ── Unify y-axis ────────────────────────────────────────────────────────── + # For merge-only types, per-scale JSON files span multiple source dirs, + # so run_unify_ylim (which expects all JSON in one dir) is skipped. + if not is_merge_only: + logger.info("\n--- Unifying Y-axis ---") + run_unify_ylim(out_dir, plots_dir, args.model_type) + else: + logger.info("\n--- Skipping y-axis unification (per-scale data spans multiple source dirs) ---") + + # ── All-layer heatmaps + PCA ────────────────────────────────────────────── + if not is_merge_only: + logger.info("\n--- All-Layer Heatmaps ---") + run_all_layer_heatmaps(out_dir, args.model_type, available_scales) + logger.info("\n--- All-Layer PCA ---") + run_all_layer_pca(out_dir, args.model_type, available_scales) + else: + # Merge-only types: NPZ/CSV files live in separate source directories + from collections import defaultdict as _defaultdict + mc_cfg = MERGE_ONLY_CONFIGS[args.model_type] + src_to_scales = _defaultdict(list) + for scale in available_scales: + src_to_scales[mc_cfg['scale_sources'][scale]].append(scale) + + logger.info("\n--- All-Layer Heatmaps (per source) ---") + for src_key, src_scales in src_to_scales.items(): + run_all_layer_heatmaps( + os.path.join(args.output_dir, src_key), src_key, src_scales) + + logger.info("\n--- All-Layer PCA (per source) ---") + for src_key, src_scales in src_to_scales.items(): + run_all_layer_pca( + os.path.join(args.output_dir, src_key), src_key, src_scales) + + logger.info(f"\n=== Merge Complete ===\nResults saved to: {out_dir}") + + +def main(): + # Default scales per legacy model_type (new types use their own defaults) + _LEGACY_DEFAULT_SCALES = { + 'molmo': ['vanilla', '80k', '400k', '800k', '2m'], + 'nvila': ['vanilla', '80k', '400k', '800k', '2m'], + 'qwen': ['vanilla', '80k', '400k', '800k', '2m'], + 'nvila_synthetic': ['80k-5pct', '80k-10pct', '80k-20pct', '80k-30pct', '400k-5pct'], + } + + parser = argparse.ArgumentParser( + description='Swap Analysis — Spatial Representation Probing', + formatter_class=argparse.RawDescriptionHelpFormatter, + ) + parser.add_argument('--data_path', type=str, + default='/data/shared/Qwen/EmbSpatial-Bench/EmbSpatial-Bench.tsv') + parser.add_argument('--model_type', type=str, required=True, + choices=ALL_MODEL_TYPES, + help=( + 'Legacy: molmo | nvila | qwen\n' + 'Synthetic: nvila_synthetic\n' + 'New large: molmo_big | qwen_big | qwen_super | big_trio\n' + 'Merge-only (--merge required): molmo_all | qwen_all' + )) + parser.add_argument('--scales', type=str, nargs='+', default=None, + help='Scales to process (default: all for the given model_type).') + parser.add_argument('--output_dir', type=str, + default='/data/shared/Qwen/experiments/swap_analysis/results') + parser.add_argument('--device', type=str, default='cuda') + parser.add_argument('--seed', type=int, default=42) + parser.add_argument('--merge', action='store_true', + help='Merge mode: generate cross-scale plots from saved per-scale data.') + parser.add_argument('--merge-output-dir', type=str, default=None, dest='merge_output_dir', + help='Override output dir for cross-scale plots (NVILA dual-merge).') + parser.add_argument('--no-auto-roborefer', action='store_true', dest='no_auto_roborefer', + help='Disable automatic inclusion of roborefer scale for nvila.') + parser.add_argument('--skip-cross-group', action='store_true') + parser.add_argument('--max-samples-per-category', type=int, default=200, + dest='max_samples_per_category') + parser.add_argument('--no-filtering', action='store_true', dest='no_filtering', + help='Disable Unknown/empty filtering for far/close reference objects.' + ' By default, Unknown candidates are removed before sampling.') + parser.add_argument('--question-type', type=str, default='mcq', + choices=['mcq', 'short'], dest='question_type', + help='mcq (default): MCQ A/B format with letter answers; ' + 'short: original "Answer with only one word." format.') + + args = parser.parse_args() + + # ── Per-model-type log file ─────────────────────────────────────────────── + log_path = _setup_file_logging(args.model_type) + logger.info(f"Logging to: {log_path}") + + # ── Validate: merge-only types require --merge ──────────────────────────── + if args.model_type in MERGE_ONLY_CONFIGS and not args.merge: + parser.error( + f"'{args.model_type}' is a merge-only type. Add --merge to run it.\n" + f" Example: python swap_analysis.py --model_type {args.model_type} --merge" + ) + + # ── Default scales ──────────────────────────────────────────────────────── + if args.scales is None: + if args.model_type in MERGE_ONLY_CONFIGS: + args.scales = MERGE_ONLY_CONFIGS[args.model_type]['scale_order'] + elif args.model_type in MODEL_CONFIGS_NEW: + args.scales = list(MODEL_CONFIGS_NEW[args.model_type].keys()) + else: + args.scales = _LEGACY_DEFAULT_SCALES.get( + args.model_type, ['vanilla', '80k', '400k', '800k', '2m']) + + # Legacy nvila: auto-include roborefer + if args.model_type == 'nvila' and 'roborefer' not in args.scales and not args.no_auto_roborefer: + args.scales.append('roborefer') + + np.random.seed(args.seed) + torch.manual_seed(args.seed) + random.seed(args.seed) + + # ── Merge mode ─────────────────────────────────────────────────────────── + if args.merge: + logger.info("\n=== MERGE MODE ===") + if args.model_type in MODEL_CONFIGS_NEW or args.model_type in MERGE_ONLY_CONFIGS: + run_merge_extended(args) + else: + run_merge(args) + return + + # ── Inference mode ──────────────────────────────────────────────────────── + logger.info("\n=== Loading & Creating Swap Pairs ===") + swap_pairs = load_swap_pairs(args.data_path, args.seed, + filter_unknown=not args.no_filtering, + question_type=args.question_type) + + quads = [] + if not args.skip_cross_group: + try: + hf_cache = build_hf_bbox_cache() + quads = create_cross_group_quads(swap_pairs, hf_cache, + question_type=args.question_type) + except Exception as e: + logger.warning(f"Cross-group setup failed: {e}. Skipping.") + quads = [] + + # ── Resolve config for the chosen model_type ───────────────────────────── + if args.model_type in MODEL_CONFIGS_NEW: + model_configs = MODEL_CONFIGS_NEW[args.model_type] + else: + model_configs = MODEL_CONFIGS[args.model_type] + + for scale in args.scales: + if scale not in model_configs: + logger.warning(f"Scale '{scale}' not in config for '{args.model_type}', skipping.") + continue + + # Validate model path exists (skip HF IDs that start with org/ prefix) + if args.model_type in MODEL_CONFIGS_NEW: + _, raw_path = model_configs[scale] + else: + raw_path = model_configs[scale] + if not os.path.isabs(raw_path) and not raw_path.startswith(('Qwen/', 'allenai/')): + if not os.path.exists(raw_path): + logger.warning(f"Model path not found: {raw_path} (scale='{scale}'), skipping.") + continue + + try: + process_scale(args, scale, swap_pairs, quads) + except Exception as e: + logger.error(f"Failed {args.model_type} - {scale}: {e}") + import traceback + traceback.print_exc() + continue + + logger.info(f"\n{'='*60}") + logger.info("=== All scales complete ===") + logger.info(f"Results: {os.path.join(args.output_dir, args.model_type)}") + logger.info(f"{'='*60}") + + +if __name__ == '__main__': + main() \ No newline at end of file diff --git a/swap_analysis/swap_analysis.py b/swap_analysis/swap_analysis.py new file mode 100644 index 0000000000000000000000000000000000000000..0fbea8d069e229bf725a438723b9caef22c8fbb0 --- /dev/null +++ b/swap_analysis/swap_analysis.py @@ -0,0 +1,3653 @@ +#!/usr/bin/env python3 +""" +Swap Analysis: Minimal Pair Probing for Spatial Representations + +Creates minimal pairs by swapping obj1<->obj2 in spatial questions: + Original: "Is A to the left or right of B?" -> left + Swapped: "Is B to the left or right of A?" -> right + +Supported model types +--------------------- + Legacy (Qwen2.5-VL-3B scale experiments): + molmo | nvila | qwen + New large models: + molmo_big : Molmo2-8B + qwen_big : Qwen3-VL-32B-Instruct + qwen_super : Qwen3-VL-235B-A22B-Instruct + big_trio : Molmo2-8B + RoboRefer + Qwen3-VL-32B + Merge-only (--merge required): + molmo_all : molmo (vanilla→2m) + molmo_big (molmo2) + qwen_all : qwen (vanilla→2m) + qwen_big (qwen3_32b) + +Usage examples +-------------- + # Legacy model (Qwen2.5-VL-3B scale) + python swap_analysis.py --model_type qwen + + # New large model (Qwen3-VL-32B) + conda run -n qwen3 python swap_analysis.py --model_type qwen_big + + # Cross-family merge (combine qwen + qwen_big results) + conda run -n qwen3 python swap_analysis.py --model_type qwen_all --merge + +Analyses: + 1. Difference vectors: delta = feature(swapped) - feature(original) + 2. Within-category delta consistency (do all left->right swaps point same direction?) + 3. Sign-corrected group consistency (align opposite categories by flipping) + 4. Cross-group delta alignment (delta_vertical vs delta_distance) for perspective bias + 5. Delta-based 6x6 similarity heatmap (mean delta per category as representation) + 6. Prediction stats visualization (bar chart + cross-scale trajectory) + 7. Both-correct filtering for delta analysis + 8. PCA visualization of per-sample embeddings + 9. Scaling effects on all of the above + +Fixes applied: + Fix 1: "Answer with only one word." appended to all prompts + Fix 2: Synonym handling (below/beneath->under, near/nearby->close, distant->far) + Fix 4: Cross-group quads index matching via string normalization + Fix 5: Within-category + sign-corrected delta consistency (replaces wrong group-level) + Fix 6: Prediction stats bar chart + cross-scale line plot + Fix 7: Delta-based 6x6 heatmap and trajectory + Fix 8: Category validity check + both-correct delta filtering +""" + +import os +import sys +import json +import argparse +import base64 +import logging +import random +import re +from io import BytesIO +from collections import defaultdict +from typing import Dict, List, Tuple, Optional, Any +from abc import ABC, abstractmethod + +import torch +import numpy as np +import pandas as pd +from PIL import Image +from tqdm import tqdm +import matplotlib +matplotlib.use('Agg') +import matplotlib.pyplot as plt +from mpl_toolkits.mplot3d import Axes3D # noqa: F401 +import seaborn as sns +from sklearn.metrics.pairwise import cosine_similarity +from sklearn.decomposition import PCA + +logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s') +logger = logging.getLogger(__name__) + +_HERE = os.path.dirname(os.path.abspath(__file__)) + +# ── Local HuggingFace cache helpers ────────────────────────────────────────── + +HF_HUB_DIR = '/data/shared/Qwen/mydisk/huggingface/hub' + + +def resolve_local_path(model_path: str) -> str: + """Return local snapshot path for a HF model ID if cached, else return the ID unchanged.""" + if os.path.isabs(model_path): + return model_path + cache_name = 'models--' + model_path.replace('/', '--') + snapshots_dir = os.path.join(HF_HUB_DIR, cache_name, 'snapshots') + if os.path.isdir(snapshots_dir): + snapshots = sorted(os.listdir(snapshots_dir)) + if snapshots: + local_path = os.path.join(snapshots_dir, snapshots[-1]) + logger.info(f"Local cache found: {model_path} → {local_path}") + return local_path + logger.warning( + f"Model not found in local cache: '{model_path}'\n" + f" Expected at: {snapshots_dir}\n" + f" Will fall back to online HuggingFace Hub download.\n" + f" To cache locally first: python -c \"from huggingface_hub import snapshot_download; " + f"snapshot_download('{model_path}', cache_dir='{HF_HUB_DIR}')\"" + ) + return model_path + + +def _setup_file_logging(model_type: str) -> str: + """Attach a per-model-type FileHandler to the root logger. + + Writes to /logs/{model_type}.log (append mode). + Returns the log file path. + """ + log_dir = os.path.join(_HERE, 'logs') + os.makedirs(log_dir, exist_ok=True) + log_path = os.path.join(log_dir, f'{model_type}.log') + fh = logging.FileHandler(log_path, mode='a', encoding='utf-8') + fh.setLevel(logging.INFO) + fh.setFormatter(logging.Formatter('%(asctime)s - %(levelname)s - %(message)s')) + logging.getLogger().addHandler(fh) + return log_path + + +# ============================================================================ +# Constants +# ============================================================================ + +CATEGORY_ORDER = ['left', 'right', 'above', 'below', 'far', 'close'] + +OPPOSITE_MAP = { + 'left': 'right', 'right': 'left', + 'above': 'below', 'below': 'above', + 'under': 'above', # short-mode vertical answer + 'far': 'close', 'close': 'far', +} + +# Opposite map for short-answer mode (vertical uses 'above'/'under', not 'above'/'below') +SHORT_OPPOSITE_MAP = { + 'left': 'right', 'right': 'left', + 'above': 'below', 'below': 'above', + 'far': 'close', 'close': 'far', +} + +GROUP_MAP = { + 'left': 'horizontal', 'right': 'horizontal', + 'above': 'vertical', 'below': 'vertical', + 'far': 'distance', 'close': 'distance', +} + +GROUP_ORDER = ['horizontal', 'vertical', 'distance'] + +# Fix 5: Canonical categories for sign-corrected consistency +CANONICAL_CATEGORIES = { + 'horizontal': 'left', + 'vertical': 'above', + 'distance': 'far', +} + +# Fix 2: Synonyms for answer matching +# 'below' is now primary; 'under'/'beneath' recognized as synonyms +SYNONYMS = { + 'below': ['under', 'beneath'], + 'close': ['near', 'nearby'], + 'far': ['distant'], +} + +# ── MCQ question templates (option order alternated per pair for A/B bias control) ── +_Q_TAIL_MCQ = "Answer with a single letter A or B." +MCQ_TEMPLATES = { + 'horizontal': { + 'left_first': "Is the {obj1} to the left or right of the {obj2}? (A) left (B) right " + _Q_TAIL_MCQ, + 'right_first': "Is the {obj1} to the left or right of the {obj2}? (A) right (B) left " + _Q_TAIL_MCQ, + }, + 'vertical': { + 'above_first': "Is the {obj1} above or below the {obj2}? (A) above (B) below " + _Q_TAIL_MCQ, + 'below_first': "Is the {obj1} above or below the {obj2}? (A) below (B) above " + _Q_TAIL_MCQ, + }, + 'distance': { + 'far_first': "Compared to {ref}, is {subj} far or close from you? (A) far (B) close " + _Q_TAIL_MCQ, + 'close_first': "Compared to {ref}, is {subj} far or close from you? (A) close (B) far " + _Q_TAIL_MCQ, + }, +} +MCQ_LETTER = { + 'horizontal': { + 'left_first': {'left': 'a', 'right': 'b'}, + 'right_first': {'left': 'b', 'right': 'a'}, + }, + 'vertical': { + 'above_first': {'above': 'a', 'below': 'b'}, + 'below_first': {'above': 'b', 'below': 'a'}, + }, + 'distance': { + 'far_first': {'far': 'a', 'close': 'b'}, + 'close_first': {'far': 'b', 'close': 'a'}, + }, +} + +SCALE_COLORS = { + 'vanilla': '#1f77b4', '80k': '#ff7f0e', '400k': '#2ca02c', + '800k': '#d62728', '2m': '#9467bd', 'roborefer':'#8c564b', + # New large models + 'molmo2': '#17becf', # cyan + 'qwen3_32b': '#bcbd22', # yellow-green + 'qwen3_235b': '#e377c2', # pink + # Synthetic-mix NVILA at 80k scale (shades of teal, light→dark by mix ratio) + '80k-5pct': '#b2dfdb', # very light teal + '80k-10pct': '#00b894', # teal + '80k-20pct': '#00897b', # darker teal + '80k-30pct': '#004d40', # deep teal + # Synthetic-mix NVILA at 400k scale + '400k-5pct': '#66bb6a', # light green (near 400k's #2ca02c) + # MCQ-synthetic-trained NVILA (darker shade of the matching base scale) + '80k-st': '#b85a00', # dark orange (darker than 80k #ff7f0e) + '400k-st': '#1a6b1a', # dark green (darker than 400k #2ca02c) + '800k-st': '#911b1b', # dark red (darker than 800k #d62728) +} + +# Canonical scale ordering used by accuracy/ylim plots (add new scales here to control x-axis) +SCALE_ORDER = [ + 'vanilla', '80k', '80k-5pct', '80k-10pct', '80k-20pct', '80k-30pct', '80k-st', + '400k', '400k-5pct', '400k-st', '800k', '800k-st', '2m', 'roborefer', + 'molmo2', 'qwen3_32b', 'qwen3_235b', +] + +# Human-readable legend labels (only entries that differ from the key are needed) +SCALE_DISPLAY_NAMES = { + '80k-5pct': '80k 5%', + '80k-10pct': '80k 10%', + '80k-20pct': '80k 20%', + '80k-30pct': '80k 30%', + '400k-5pct': '400k 5%', + '80k-st': '80k ST', + '400k-st': '400k ST', + '800k-st': '800k ST', +} +# Category colors aligned with group: horizontal=orange, vertical=green, distance=purple +CAT_COLORS = { + 'left': '#ff7f0e', 'right': '#ffbb78', # horizontal → orange + 'above': '#2ca02c', 'below': '#98df8a', # vertical → green + 'far': '#9467bd', 'close': '#c5b0d5', # distance → purple +} +GROUP_COLORS = { + 'horizontal': '#ff7f0e', + 'vertical': '#2ca02c', + 'distance': '#9467bd', +} + +# Short-answer (non-MCQ) question templates +SHORT_TEMPLATES = { + 'horizontal': "Is the {obj1} to the left or right of the {obj2}? Answer with only one word.", + 'vertical': "Is the {obj1} above or below the {obj2}? Answer with only one word.", + 'distance': "Compared to {ref}, is {subj} far or close from you? Answer with only one word.", +} + +MODEL_CONFIGS = { + 'molmo': { + 'vanilla': 'allenai/Molmo-7B-O-0924', + '80k': '/data/shared/Qwen/molmo/outputs/data_scale_exp/data_scale_exp_80k/unshared', + '400k': '/data/shared/Qwen/molmo/outputs/data_scale_exp/data_scale_exp_400k/unshared', + '800k': '/data/shared/Qwen/molmo/outputs/data_scale_exp/data_scale_exp_800k/unshared', + '2m': '/data/shared/Qwen/molmo/outputs/data_scale_exp/data_scale_exp_2m/unshared', + }, + 'nvila': { + 'vanilla': '/data/shared/Qwen/mydisk/NVILA-Lite-2B', + '80k': '/data/shared/Qwen/mydisk/output/DATA/NVILA-Lite-2B-DATA_SCALE_EXP_80K-20251108_180221', + '400k': '/data/shared/Qwen/mydisk/output/DATA/NVILA-Lite-2B-DATA_SCALE_EXP_400K-20251108_180221', + '800k': '/data/shared/Qwen/mydisk/output/DATA/NVILA-Lite-2B-DATA_SCALE_EXP_800K-20251108_180221', + '2m': '/data/shared/Qwen/mydisk/output/DATA/NVILA-Lite-2B-DATA_SCALE_EXP_2M-20260205_003632', + # '80k': '/data/shared/Qwen/mydisk/output/SINGLE/NVILA-Lite-2B-SINGLE_REFSPATIAL_16M-20260217_035008/checkpoint-1250', + # '400k': '/data/shared/Qwen/mydisk/output/SINGLE/NVILA-Lite-2B-SINGLE_REFSPATIAL_16M-20260217_035008/checkpoint-6250', + # '800k': '/data/shared/Qwen/mydisk/output/SINGLE/NVILA-Lite-2B-SINGLE_REFSPATIAL_16M-20260217_035008/checkpoint-12500', + # '2m': '/data/shared/Qwen/mydisk/output/SINGLE/NVILA-Lite-2B-SINGLE_REFSPATIAL_16M-20260217_035008/checkpoint-31250', + 'roborefer': '/data/shared/Qwen/mydisk/RoboRefer_model', + }, + 'qwen': { + 'vanilla': 'Qwen/Qwen2.5-VL-3B-Instruct', + '80k': '/data/shared/Qwen/mydisk/output/Qwen/data_scale_exp/Qwen2.5-VL-3B-Instruct-data_scale_exp_80k-20251114_120221', + '400k': '/data/shared/Qwen/mydisk/output/Qwen/data_scale_exp/Qwen2.5-VL-3B-Instruct-data_scale_exp_400k-20251114_120221', + '800k': '/data/shared/Qwen/mydisk/output/Qwen/data_scale_exp/Qwen2.5-VL-3B-Instruct-data_scale_exp_800k-20251114_120221', + '2m': '/data/shared/Qwen/mydisk/output/Qwen/data_scale_exp/Qwen2.5-VL-3B-Instruct-data_scale_exp_2m-20260109_120517', + }, + # NVILA trained with synthetic data mixed in at different ratios + 'nvila_synthetic': { + '80k-5pct': '/data/shared/Qwen/mydisk/output/SYNTHETIC/NVILA-Lite-2B-SYNTHETIC_MIX_5PCT_2M-20260226_023301/checkpoint-1250', + '80k-10pct': '/data/shared/Qwen/mydisk/output/SYNTHETIC/NVILA-Lite-2B-SYNTHETIC_MIX_10PCT_80K-20260224_234537', + '80k-20pct': '/data/shared/Qwen/mydisk/output/SYNTHETIC/NVILA-Lite-2B-SYNTHETIC_MIX_20PCT_80K-20260224_232347', + '80k-30pct': '/data/shared/Qwen/mydisk/output/SYNTHETIC/NVILA-Lite-2B-SYNTHETIC_MIX_30PCT_80K-20260224_232347', + '400k-5pct': '/data/shared/Qwen/mydisk/output/SYNTHETIC/NVILA-Lite-2B-SYNTHETIC_MIX_5PCT_2M-20260226_023301/checkpoint-6250', + }, + # NVILA trained with MCQ-format synthetic mix (80k / 400k / 800k steps) + 'nvila_st': { + '80k-st': '/data/shared/Qwen/mydisk/output/SYNTHETIC/NVILA-Lite-2B-SYNTHETIC_MIX_MCQ_5PCT_2M-20260302_030354/checkpoint-1250', + '400k-st': '/data/shared/Qwen/mydisk/output/SYNTHETIC/NVILA-Lite-2B-SYNTHETIC_MIX_MCQ_5PCT_2M-20260302_030354/checkpoint-6250', + '800k-st': '/data/shared/Qwen/mydisk/output/SYNTHETIC/NVILA-Lite-2B-SYNTHETIC_MIX_MCQ_5PCT_2M-20260302_030354/checkpoint-12500', + }, +} + +# ── New large / cross-family models ────────────────────────────────────────── +# Each scale maps to (ExtractorClassName, HF-model-ID-or-absolute-path). +# resolve_local_path() converts HF IDs to local snapshot dirs when cached. +MODEL_CONFIGS_NEW = { + 'molmo_big': { + 'molmo2': ('Molmo2Extractor', 'allenai/Molmo2-8B'), + }, + 'qwen_big': { + 'qwen3_32b': ('Qwen3VLExtractor', 'Qwen/Qwen3-VL-32B-Instruct'), + }, + 'qwen_super': { + 'qwen3_235b': ('Qwen3VLExtractor', 'Qwen/Qwen3-VL-235B-A22B-Instruct'), + }, + 'big_trio': { + 'molmo2': ('Molmo2Extractor', 'allenai/Molmo2-8B'), + 'roborefer': ('RoboReferExtractor', '/data/shared/Qwen/mydisk/RoboRefer_model'), + 'qwen3_32b': ('Qwen3VLExtractor', 'Qwen/Qwen3-VL-32B-Instruct'), + }, +} + +# ── Merge-only: combine existing per-scale data from multiple source dirs ───── +MERGE_ONLY_CONFIGS = { + 'molmo_all': { + 'scale_order': ['vanilla', '80k', '400k', '800k', '2m', 'molmo2'], + 'scale_sources': { + 'vanilla': 'molmo', '80k': 'molmo', '400k': 'molmo', + '800k': 'molmo', '2m': 'molmo', 'molmo2': 'molmo_big', + }, + 'required_dirs': ['molmo', 'molmo_big'], + }, + 'qwen_all': { + 'scale_order': ['vanilla', '80k', '400k', '800k', '2m', 'qwen3_32b'], + 'scale_sources': { + 'vanilla': 'qwen', '80k': 'qwen', '400k': 'qwen', + '800k': 'qwen', '2m': 'qwen', 'qwen3_32b': 'qwen_big', + }, + 'required_dirs': ['qwen', 'qwen_big'], + }, + # Compare NVILA baselines against synthetic-mix checkpoints + 'nvila_synth_compare': { + 'scale_order': ['vanilla', '80k', '80k-5pct', '80k-10pct', '400k', '400k-5pct'], + 'scale_sources': { + 'vanilla': 'nvila', '80k': 'nvila', + '80k-5pct': 'nvila_synthetic', '80k-10pct': 'nvila_synthetic', + '400k': 'nvila', + '400k-5pct': 'nvila_synthetic', + }, + 'required_dirs': ['nvila', 'nvila_synthetic'], + }, + # Compare NVILA baselines (vanilla→2m) against MCQ-synthetic-trained checkpoints + 'nvila_st_compare': { + 'scale_order': ['vanilla', '80k', '80k-st', '400k', '400k-st', '800k', '800k-st', '2m'], + 'scale_sources': { + 'vanilla': 'nvila', '80k': 'nvila', '80k-st': 'nvila_st', + '400k': 'nvila', '400k-st': 'nvila_st', + '800k': 'nvila', '800k-st': 'nvila_st', '2m': 'nvila', + }, + 'required_dirs': ['nvila', 'nvila_st'], + }, +} + +# Default scale run order for new runnable types +SCALE_ORDERS_NEW = { + 'molmo_big': ['molmo2'], + 'qwen_big': ['qwen3_32b'], + 'qwen_super': ['qwen3_235b'], + 'big_trio': ['molmo2', 'roborefer', 'qwen3_32b'], +} + +ALL_MODEL_TYPES = ( + list(MODEL_CONFIGS.keys()) + + list(MODEL_CONFIGS_NEW.keys()) + + list(MERGE_ONLY_CONFIGS.keys()) +) + + +# ============================================================================ +# Data Loading & Swap Pair Creation +# ============================================================================ + +OBJECT_PATTERNS = [ + re.compile(r'between\s+(.+?)\s+and\s+(.+?)\s+in', re.IGNORECASE), + re.compile(r'of\s+(.+?)\s+and\s+(.+?)\s+in', re.IGNORECASE), + re.compile(r'positions\s+of\s+(.+?)\s+and\s+(.+?)\s+interact', re.IGNORECASE), + re.compile(r'How\s+are\s+(.+?)\s+and\s+(.+?)\s+positioned', re.IGNORECASE), + re.compile(r'arrangement\s+of\s+(.+?)\s+and\s+(.+?)\s+in', re.IGNORECASE), +] + + +def extract_objects(question: str) -> Tuple[str, str]: + for pattern in OBJECT_PATTERNS: + m = pattern.search(question) + if m: + return m.group(1).strip(), m.group(2).strip() + raise ValueError(f"Could not extract objects from: {question}") + + +def decode_base64_image(base64_str: str) -> Image.Image: + image_data = base64.b64decode(base64_str) + return Image.open(BytesIO(image_data)).convert('RGB') + + +# ============================================================================ +# Answer Matching (Fix 2: synonym support) +# ============================================================================ + +def find_earliest_position(text: str, word: str) -> int: + """Find earliest position of word or any of its synonyms in text.""" + positions = [] + pos = text.find(word) + if pos != -1: + positions.append(pos) + for syn in SYNONYMS.get(word, []): + pos = text.find(syn) + if pos != -1: + positions.append(pos) + return min(positions) if positions else -1 + + +def check_answer(generated_text: str, expected_category: str, mcq_map: dict = None) -> bool: + if not generated_text or not generated_text.strip(): + return False + text = generated_text.strip().lower() + expected = expected_category.lower() + opposite = OPPOSITE_MAP[expected] + + if mcq_map: + exp_letter = mcq_map.get(expected) + opp_letter = mcq_map.get(opposite) + # Standalone letter response (e.g. "A", "A.", "A)", "B") + if exp_letter and text in (exp_letter, exp_letter+'.', exp_letter+')', exp_letter+','): + return True + if opp_letter and text in (opp_letter, opp_letter+'.', opp_letter+')', opp_letter+','): + return False + else: + exp_letter = opp_letter = None + + # MCQ inline pattern "(a)"/"(b)" — variant-aware + mcq_exp = f'({exp_letter})' if exp_letter else None + mcq_opp = f'({opp_letter})' if opp_letter else None + + def earliest_with_mcq(word, mcq_pat=None): + positions = [] + pos = text.find(word) + if pos != -1: + positions.append(pos) + for syn in SYNONYMS.get(word, []): + pos = text.find(syn) + if pos != -1: + positions.append(pos) + if mcq_pat: + pos = text.find(mcq_pat) + if pos != -1: + positions.append(pos) + return min(positions) if positions else -1 + + pos_exp = earliest_with_mcq(expected, mcq_exp) + pos_opp = earliest_with_mcq(opposite, mcq_opp) + if pos_exp == -1: + return False + if pos_opp == -1: + return True + return pos_exp < pos_opp + + +# ============================================================================ +# Swap Pair Loading (Fix 1: prompt suffix) +# ============================================================================ + +def load_swap_pairs(tsv_path: str, seed: int = 42, filter_unknown: bool = True, + question_type: str = 'mcq') -> List[dict]: + """Load EmbSpatialBench TSV and create swap pairs for all samples. + + Args: + filter_unknown: If True (default), skip far/close pairs where target_object + is Unknown/empty, and remove Unknown/empty values from reference_object + candidates before sampling. Pairs with no valid candidates are dropped. + Use --no-filtering to disable. + question_type: 'mcq' (default) uses MCQ A/B templates with letter answers; + 'short' uses the original "Answer with only one word." format. + """ + rng = random.Random(seed) + df = pd.read_csv(tsv_path, sep='\t') + + pairs = [] + stats = defaultdict(lambda: {'total': 0, 'success': 0}) + + def _valid_obj(v): + return bool(v) and str(v).strip().lower() not in ('unknown', 'n/a', '') + + for _, row in df.iterrows(): + category = row['category'] + stats[category]['total'] += 1 + + try: + if category in ['left', 'right', 'above', 'under', 'below']: + obj1, obj2 = extract_objects(row['question']) + if category in ['left', 'right']: + grp = 'horizontal' + else: + grp = 'vertical' + + if question_type == 'short': + # Single-word format; normalize 'under' → 'below' + if category == 'under': + category = 'below' + tmpl = SHORT_TEMPLATES[grp] + pair = { + 'index': row['index'], + 'question_id': str(row['question_id']), + 'image_base64': row['image'], + 'original_question': tmpl.format(obj1=obj1, obj2=obj2), + 'swapped_question': tmpl.format(obj1=obj2, obj2=obj1), + 'original_answer': category, + 'swapped_answer': SHORT_OPPOSITE_MAP[category], + 'group': grp, + 'category': category, + 'obj1': obj1, 'obj2': obj2, + 'mcq_map': None, + } + else: + # MCQ format; normalize 'under' → 'below' + if category == 'under': + category = 'below' + variant = ('left_first' if grp == 'horizontal' else 'above_first') \ + if len(pairs) % 2 == 0 else \ + ('right_first' if grp == 'horizontal' else 'below_first') + tmpl = MCQ_TEMPLATES[grp][variant] + mcq_map = MCQ_LETTER[grp][variant] + pair = { + 'index': row['index'], + 'question_id': str(row['question_id']), + 'image_base64': row['image'], + 'original_question': tmpl.format(obj1=obj1, obj2=obj2), + 'swapped_question': tmpl.format(obj1=obj2, obj2=obj1), + 'original_answer': category, + 'swapped_answer': OPPOSITE_MAP[category], + 'group': GROUP_MAP[category], + 'category': category, + 'obj1': obj1, 'obj2': obj2, + 'mcq_map': mcq_map, + } + + elif category in ['far', 'close']: + answer_key = row['answer'] + options = {k: row[k] for k in ['A', 'B', 'C', 'D']} + target_object = options[answer_key] + candidates = [v for k, v in options.items() if k != answer_key] + + if filter_unknown: + if not _valid_obj(target_object): + continue + candidates = [v for v in candidates if _valid_obj(v)] + if not candidates: + continue + + reference_object = rng.choice(candidates) + + if question_type == 'short': + tmpl = SHORT_TEMPLATES['distance'] + pair = { + 'index': row['index'], + 'question_id': str(row['question_id']), + 'image_base64': row['image'], + 'original_question': tmpl.format(ref=reference_object, subj=target_object), + 'swapped_question': tmpl.format(ref=target_object, subj=reference_object), + 'original_answer': category, + 'swapped_answer': OPPOSITE_MAP[category], + 'group': 'distance', + 'category': category, + 'target_object': target_object, + 'reference_object': reference_object, + 'mcq_map': None, + } + else: + variant = 'far_first' if len(pairs) % 2 == 0 else 'close_first' + tmpl = MCQ_TEMPLATES['distance'][variant] + mcq_map = MCQ_LETTER['distance'][variant] + pair = { + 'index': row['index'], + 'question_id': str(row['question_id']), + 'image_base64': row['image'], + 'original_question': tmpl.format(ref=reference_object, subj=target_object), + 'swapped_question': tmpl.format(ref=target_object, subj=reference_object), + 'original_answer': category, + 'swapped_answer': OPPOSITE_MAP[category], + 'group': 'distance', + 'category': category, + 'target_object': target_object, + 'reference_object': reference_object, + 'mcq_map': mcq_map, + } + else: + continue + + pairs.append(pair) + stats[category]['success'] += 1 + + except Exception as e: + logger.warning(f"Failed to create swap pair for index {row['index']}: {e}") + continue + + logger.info("Swap pair creation stats:") + for cat in CATEGORY_ORDER: + s = stats[cat] + logger.info(f" {cat}: {s['success']}/{s['total']}") + logger.info(f" Total pairs: {len(pairs)}") + + return pairs + + +# ============================================================================ +# HF Bbox Cache (Fix 4: string-normalized keys) +# ============================================================================ + +def build_hf_bbox_cache(hf_dataset_name: str = 'FlagEval/EmbSpatial-Bench') -> Dict[str, dict]: + """Load HF dataset and build bbox lookup cache keyed by string-normalized question_id.""" + from datasets import load_dataset + logger.info(f"Loading HF dataset: {hf_dataset_name}") + ds = load_dataset(hf_dataset_name, split='test') + + cache = {} + for item in ds: + # Fix 4: Normalize key to string for consistent matching + qid = str(item['question_id']) + cache[qid] = { + 'objects': item['objects'], + 'relation': item['relation'], + 'data_source': item['data_source'], + 'answer': item['answer'], + 'answer_options': item['answer_options'], + } + + # Fix 4: Log sample keys for debugging + sample_keys = list(cache.keys())[:5] + logger.info(f"Built bbox cache: {len(cache)} entries (sample keys: {sample_keys})") + return cache + + +def get_bbox_center_y(bbox: list) -> float: + return bbox[1] + bbox[3] / 2 + + +def create_cross_group_quads( + swap_pairs: List[dict], + hf_cache: Dict[str, dict], + threshold_ratio: float = 0.05, + question_type: str = 'mcq', +) -> List[dict]: + """For far/close swap pairs, create additional vertical queries using bbox.""" + IMAGE_HEIGHTS = {'ai2thor': 300, 'mp3d': 480, 'scannet': 968} + + quads = [] + stats = {'total': 0, 'matched': 0, 'ambiguous': 0, 'no_bbox': 0} + + distance_pairs = [p for p in swap_pairs if p['group'] == 'distance'] + + # Fix 4: Use question_id (e.g. 'mp3d_0') to match HF dataset, not integer index + n_matched_keys = sum(1 for p in distance_pairs if p['question_id'] in hf_cache) + logger.info(f"Matched {n_matched_keys}/{len(distance_pairs)} question_ids between TSV and HF dataset") + + for pair in distance_pairs: + stats['total'] += 1 + qid = pair['question_id'] + + if qid not in hf_cache: + stats['no_bbox'] += 1 + continue + + hf_item = hf_cache[qid] + names = hf_item['objects']['name'] + bboxes = hf_item['objects']['bbox'] + + target = pair['target_object'] + reference = pair['reference_object'] + + target_bbox_y, ref_bbox_y = None, None + for name, bbox in zip(names, bboxes): + if name == target: + target_bbox_y = get_bbox_center_y(bbox) + if name == reference: + ref_bbox_y = get_bbox_center_y(bbox) + + if target_bbox_y is None or ref_bbox_y is None: + stats['no_bbox'] += 1 + continue + + image_height = IMAGE_HEIGHTS.get(hf_item['data_source'], 480) + threshold = image_height * threshold_ratio + y_diff = target_bbox_y - ref_bbox_y + + if abs(y_diff) < threshold: + stats['ambiguous'] += 1 + continue + + if target_bbox_y < ref_bbox_y: + vert_original_answer = 'above' + else: + vert_original_answer = 'below' + + if question_type == 'short': + vert_tmpl = SHORT_TEMPLATES['vertical'] + vert_mcq_map = None + vert_original_q = vert_tmpl.format(obj1=target, obj2=reference) + vert_swapped_q = vert_tmpl.format(obj1=reference, obj2=target) + vert_swapped_answer = SHORT_OPPOSITE_MAP[vert_original_answer] + else: + vert_variant = 'above_first' if len(quads) % 2 == 0 else 'below_first' + vert_tmpl = MCQ_TEMPLATES['vertical'][vert_variant] + vert_mcq_map = MCQ_LETTER['vertical'][vert_variant] + vert_original_q = vert_tmpl.format(obj1=target, obj2=reference) + vert_swapped_q = vert_tmpl.format(obj1=reference, obj2=target) + vert_swapped_answer = OPPOSITE_MAP[vert_original_answer] + + quad = { + 'index': pair['index'], + 'image_base64': pair['image_base64'], + 'dist_original_q': pair['original_question'], + 'dist_swapped_q': pair['swapped_question'], + 'dist_original_answer': pair['original_answer'], + 'dist_swapped_answer': pair['swapped_answer'], + 'dist_mcq_map': pair['mcq_map'], + 'vert_original_q': vert_original_q, + 'vert_swapped_q': vert_swapped_q, + 'vert_original_answer': vert_original_answer, + 'vert_swapped_answer': vert_swapped_answer, + 'vert_mcq_map': vert_mcq_map, + 'target_object': target, + 'reference_object': reference, + 'target_bbox_y': target_bbox_y, + 'ref_bbox_y': ref_bbox_y, + 'y_diff': y_diff, + 'data_source': hf_item['data_source'], + } + quads.append(quad) + stats['matched'] += 1 + + logger.info(f"Cross-group quads: {stats['matched']}/{stats['total']} " + f"(ambiguous={stats['ambiguous']}, no_bbox={stats['no_bbox']})") + return quads + + +# ============================================================================ +# Base Extractor +# ============================================================================ + +class BaseHiddenStateExtractor(ABC): + def __init__(self, model_path: str, device: str = 'cuda', target_layers: List[int] = None): + self.model_path = model_path + self.device = device + self.hidden_states = {} + self.hooks = [] + self._load_model() + num_layers = self._get_num_layers() + if target_layers is None: + self.target_layers = list(range(num_layers)) + logger.info(f"Model has {num_layers} layers. Extracting ALL.") + else: + self.target_layers = target_layers + self._register_hooks() + + def _register_hooks(self): + for layer_idx in self.target_layers: + module = self._get_layer_module(layer_idx) + if module is not None: + hook = module.register_forward_hook(self._make_hook(layer_idx)) + self.hooks.append(hook) + + def _make_hook(self, layer_idx: int): + def hook_fn(module, input, output): + if isinstance(output, tuple): + hidden = output[0] + else: + hidden = output + if hidden.shape[1] > 1: # prefill only + last_token = hidden[:, -1, :].detach().cpu().float() + self.hidden_states[layer_idx] = last_token.squeeze(0) + return hook_fn + + @abstractmethod + def _load_model(self): pass + @abstractmethod + def _get_num_layers(self) -> int: pass + @abstractmethod + def _get_layer_module(self, layer_idx: int): pass + @abstractmethod + def extract_and_predict(self, image: Image.Image, question: str) -> Tuple[Dict[int, torch.Tensor], str]: pass + + def cleanup(self): + for hook in self.hooks: + hook.remove() + self.hooks = [] + if hasattr(self, 'model'): + del self.model + if hasattr(self, 'processor'): + del self.processor + torch.cuda.empty_cache() + + +# ============================================================================ +# Molmo Extractor +# ============================================================================ + +class MolmoExtractor(BaseHiddenStateExtractor): + def _load_model(self): + config_path = os.path.join(self.model_path, "config.yaml") + checkpoint_path = os.path.join(self.model_path, "model.pt") + if os.path.exists(config_path) and os.path.exists(checkpoint_path): + self._load_native_model() + self.is_native = True + else: + self._load_hf_model() + self.is_native = False + + def _load_native_model(self): + from olmo.config import ModelConfig + from olmo.model import Molmo as NativeMolmoModel + from olmo.data.model_preprocessor import MultiModalPreprocessor + from olmo.data.data_formatter import DataFormatter + + _original_load = torch.load + def _unsafe_load_wrapper(*args, **kwargs): + if 'weights_only' not in kwargs: + kwargs['weights_only'] = False + return _original_load(*args, **kwargs) + torch.load = _unsafe_load_wrapper + + cfg = ModelConfig.load( + os.path.join(self.model_path, "config.yaml"), + key="model", validate_paths=False + ) + cfg.init_device = "cpu" + self.model = NativeMolmoModel(cfg) + state_dict = torch.load(os.path.join(self.model_path, "model.pt"), map_location="cpu") + self.model.load_state_dict(state_dict) + self.model = self.model.to(self.device, dtype=torch.bfloat16).eval() + self.tokenizer = cfg.get_tokenizer() + + v_cfg = cfg.vision_backbone + h, w = cfg.llm_patches_per_crop() + image_padding_mask = 2 if cfg.fix_image_padding else (1 if cfg.image_padding_embed else None) + + class SafeDataFormatter(DataFormatter): + def get_system_prompt(self, style, for_inference, messages, rng=None): + if style is None: + style = "User" + return super().get_system_prompt(style, for_inference, messages, rng) + + self.formatter = SafeDataFormatter( + prompt_templates=cfg.prompt_type, message_format=cfg.message_formatting, + system_prompt=cfg.system_prompt_kind, always_start_with_space=cfg.always_start_with_space, + default_inference_len=cfg.default_inference_len + ) + self.preprocessor = MultiModalPreprocessor( + tokenizer=self.tokenizer, normalize=str(v_cfg.image_model_type), + crop_mode=cfg.crop_mode, max_crops=cfg.max_crops, + overlap_margins=cfg.overlap_margins, resize=v_cfg.resize_mode, + use_col_tokens=cfg.use_col_tokens, base_image_input_size=v_cfg.image_default_input_size, + image_pooling_w=cfg.image_pooling_w, image_pooling_h=cfg.image_pooling_h, + image_token_length_w=w, image_token_length_h=h, + image_patch_size=v_cfg.image_patch_size, image_padding_mask=image_padding_mask, + pad_value=cfg.pad_value, loss_token_weighting=cfg.multi_annotation_weighting, + ) + logger.info(f"Loaded native Molmo from {self.model_path}") + + def _load_hf_model(self): + from transformers import AutoModelForCausalLM, AutoProcessor + self.model = AutoModelForCausalLM.from_pretrained( + self.model_path, torch_dtype=torch.bfloat16, + trust_remote_code=True, device_map=self.device + ).eval() + self.processor = AutoProcessor.from_pretrained(self.model_path, trust_remote_code=True) + logger.info(f"Loaded HF Molmo from {self.model_path}") + + def _get_num_layers(self) -> int: + if self.is_native: + return len(self.model.transformer.blocks) + if hasattr(self.model, 'model') and hasattr(self.model.model, 'transformer'): + return len(self.model.model.transformer.blocks) + return 32 + + def _get_layer_module(self, layer_idx: int): + if self.is_native: + return self.model.transformer.blocks[layer_idx] + return self.model.model.transformer.blocks[layer_idx] + + def extract_and_predict(self, image, question): + self.hidden_states = {} + if self.is_native: + example = {"messages": [question], "image": image} + messages, _ = self.formatter(example, is_training=False, for_inference=True, rng=np.random) + batch = self.preprocessor(np.array(image), messages, is_training=False, require_image_features=True) + if 'input_ids' not in batch and 'input_tokens' in batch: + batch['input_ids'] = batch['input_tokens'] + + def to_t(x): + return torch.from_numpy(x) if isinstance(x, np.ndarray) else x + + input_ids = to_t(batch['input_ids']).unsqueeze(0).to(self.device).long() + images_t = to_t(batch['images']).unsqueeze(0).to(self.device, dtype=torch.bfloat16) + image_masks = to_t(batch['image_masks']).unsqueeze(0).to(self.device, dtype=torch.bfloat16) + image_input_idx = to_t(batch['image_input_idx']).unsqueeze(0).to(self.device) + + with torch.inference_mode(), torch.autocast("cuda", dtype=torch.bfloat16): + gen = self.model.generate( + input_ids=input_ids, images=images_t, + image_masks=image_masks, image_input_idx=image_input_idx, + max_steps=20, beam_size=1, + ) + generated_ids = gen.token_ids[0, 0] + answer = self.tokenizer.decode(generated_ids.tolist()).strip() + for eos in ['<|endoftext|>', '', '<|end|>']: + answer = answer.replace(eos, '').strip() + else: + from transformers import GenerationConfig + inputs = self.processor.process(images=[image], text=question) + processed = {} + for k, v in inputs.items(): + v = v.to(self.device).unsqueeze(0) + if v.dtype == torch.float32: + v = v.to(dtype=torch.bfloat16) + processed[k] = v + with torch.no_grad(), torch.autocast("cuda", dtype=torch.bfloat16): + output = self.model.generate_from_batch( + processed, + GenerationConfig(max_new_tokens=20, stop_strings="<|endoftext|>"), + tokenizer=self.processor.tokenizer, + ) + input_len = processed['input_ids'].shape[1] + answer = self.processor.tokenizer.decode(output[0, input_len:], skip_special_tokens=True).strip() + + return self.hidden_states.copy(), answer + + +# ============================================================================ +# NVILA Extractor +# ============================================================================ + +class NVILAExtractor(BaseHiddenStateExtractor): + def _load_model(self): + original_sys_path = sys.path.copy() + sys.path = [p for p in sys.path if 'RoboRefer' not in p] + modules_to_remove = [k for k in list(sys.modules.keys()) if 'llava' in k.lower()] + removed = {m: sys.modules.pop(m) for m in modules_to_remove} + try: + import llava + from llava.media import Image as LLaVAImage + from llava import conversation as clib + except Exception as err: + sys.path = original_sys_path + for m, mod in removed.items(): + sys.modules[m] = mod + raise RuntimeError(f"Failed to import llava: {err}") + sys.path = original_sys_path + self.LLaVAImage = LLaVAImage + self.clib = clib + self.model = llava.load(self.model_path, model_base=None) + self._find_llm_backbone() + logger.info(f"Loaded NVILA from {self.model_path}") + + def _find_llm_backbone(self): + candidates = [] + if hasattr(self.model, 'llm'): + if hasattr(self.model.llm, 'model') and hasattr(self.model.llm.model, 'layers'): + candidates.append(self.model.llm.model.layers) + if hasattr(self.model.llm, 'layers'): + candidates.append(self.model.llm.layers) + if hasattr(self.model, 'model'): + if hasattr(self.model.model, 'model') and hasattr(self.model.model.model, 'layers'): + candidates.append(self.model.model.model.layers) + if hasattr(self.model.model, 'layers'): + candidates.append(self.model.model.layers) + for name, module in self.model.named_modules(): + if name.endswith('.layers') and hasattr(module, '__len__') and len(module) > 0: + candidates.append(module) + if candidates: + self.llm_backbone = candidates[0] + else: + raise ValueError("Could not locate transformer layers in NVILA model") + + def _get_num_layers(self) -> int: + return len(self.llm_backbone) if hasattr(self, 'llm_backbone') else 24 + + def _get_layer_module(self, layer_idx: int): + return self.llm_backbone[layer_idx] + + def extract_and_predict(self, image, question): + self.hidden_states = {} + import tempfile + with tempfile.NamedTemporaryFile(suffix='.png', delete=False) as f: + temp_path = f.name + image.save(temp_path) + try: + prompt = [self.LLaVAImage(temp_path), question] + from transformers import GenerationConfig + response = self.model.generate_content( + prompt, generation_config=GenerationConfig(max_new_tokens=20, do_sample=False) + ) + finally: + os.unlink(temp_path) + answer = str(response[0] if isinstance(response, list) else response).strip() + return self.hidden_states.copy(), answer + + +class RoboReferExtractor(NVILAExtractor): + ROBOREFER_PATH = '/data/shared/Qwen/RoboRefer' + + def _load_model(self): + original_sys_path = sys.path.copy() + if self.ROBOREFER_PATH not in sys.path: + sys.path.insert(0, self.ROBOREFER_PATH) + modules_to_remove = [k for k in list(sys.modules.keys()) if 'llava' in k.lower()] + removed = {m: sys.modules.pop(m) for m in modules_to_remove} + try: + import llava + from llava.media import Image as LLaVAImage + from llava import conversation as clib + except Exception as err: + sys.path = original_sys_path + for m, mod in removed.items(): + sys.modules[m] = mod + raise RuntimeError(f"Failed to import RoboRefer llava: {err}") + sys.path = original_sys_path + self.LLaVAImage = LLaVAImage + self.clib = clib + self.model = llava.load(self.model_path, model_base=None) + self._find_llm_backbone() + logger.info(f"Loaded RoboRefer from {self.model_path}") + + +# ============================================================================ +# Qwen2.5-VL Extractor +# ============================================================================ + +class Qwen25VLExtractor(BaseHiddenStateExtractor): + BASE_MODEL = "Qwen/Qwen2.5-VL-3B-Instruct" + + def _load_model(self): + from transformers import Qwen2_5_VLForConditionalGeneration, AutoProcessor + try: + self.model = Qwen2_5_VLForConditionalGeneration.from_pretrained( + self.model_path, torch_dtype=torch.bfloat16, device_map=self.device + ) + except ImportError: + self.model = Qwen2_5_VLForConditionalGeneration.from_pretrained( + self.model_path, torch_dtype=torch.bfloat16 + ).to(self.device) + self.model.eval() + if self.model_path.startswith('/'): + self.processor = AutoProcessor.from_pretrained(self.BASE_MODEL) + else: + self.processor = AutoProcessor.from_pretrained(self.model_path) + logger.info(f"Loaded Qwen2.5-VL from {self.model_path}") + + def _get_num_layers(self) -> int: + return len(self.model.model.layers) + + def _get_layer_module(self, layer_idx: int): + return self.model.model.layers[layer_idx] + + def extract_and_predict(self, image, question): + self.hidden_states = {} + messages = [{"role": "user", "content": [ + {"type": "image", "image": image}, + {"type": "text", "text": question} + ]}] + text = self.processor.apply_chat_template(messages, tokenize=False, add_generation_prompt=True) + from qwen_vl_utils import process_vision_info + image_inputs, video_inputs = process_vision_info(messages) + inputs = self.processor( + text=[text], images=image_inputs, videos=video_inputs, + padding=True, return_tensors="pt" + ).to(self.device) + with torch.no_grad(): + output_ids = self.model.generate(**inputs, max_new_tokens=20, do_sample=False) + input_len = inputs['input_ids'].shape[1] + answer = self.processor.tokenizer.decode(output_ids[0, input_len:], skip_special_tokens=True).strip() + return self.hidden_states.copy(), answer + + +# ============================================================================ +# New Extractors: Molmo2-8B and Qwen3-VL family +# ============================================================================ + +class Molmo2Extractor(BaseHiddenStateExtractor): + """Extractor for allenai/Molmo2-8B (AutoModelForImageTextToText, messages-dict input).""" + + def _load_model(self): + from transformers import AutoProcessor, AutoModelForImageTextToText + self.processor = AutoProcessor.from_pretrained(self.model_path, trust_remote_code=True) + self.model = AutoModelForImageTextToText.from_pretrained( + self.model_path, trust_remote_code=True, torch_dtype='auto', device_map='auto', + ).eval() + self._find_llm_layers() + logger.info(f"Loaded Molmo2 from {self.model_path}") + + def _find_llm_layers(self): + candidates = [ + ['model', 'layers'], + ['language_model', 'model', 'layers'], + ['model', 'model', 'layers'], + ] + for path in candidates: + obj = self.model + for attr in path: + obj = getattr(obj, attr, None) + if obj is None: + break + if obj is not None and hasattr(obj, '__len__') and len(obj) > 0: + self.llm_layers = obj + logger.info(f"Molmo2: layers at '{'.'.join(path)}', count={len(obj)}") + return + best, best_len = None, 0 + for name, module in self.model.named_modules(): + if name.endswith('.layers') and hasattr(module, '__len__') and len(module) > best_len: + best, best_len = module, len(module) + logger.info(f"Molmo2: layers via scan at '{name}', count={best_len}") + if best is not None: + self.llm_layers = best + return + raise ValueError("Could not find transformer layers in Molmo2 model") + + def _get_num_layers(self) -> int: + return len(self.llm_layers) + + def _get_layer_module(self, layer_idx: int): + return self.llm_layers[layer_idx] + + def extract_and_predict(self, image, question): + self.hidden_states = {} + messages = [{"role": "user", "content": [ + {"type": "image", "image": image}, + {"type": "text", "text": question}, + ]}] + inputs = self.processor.apply_chat_template( + messages, tokenize=True, add_generation_prompt=True, + return_tensors="pt", return_dict=True, + ) + inputs = {k: v.to(self.model.device) for k, v in inputs.items()} + with torch.inference_mode(): + generated_ids = self.model.generate(**inputs, max_new_tokens=20, do_sample=False) + input_len = inputs['input_ids'].shape[1] + answer = self.processor.tokenizer.decode( + generated_ids[0, input_len:], skip_special_tokens=True).strip() + return self.hidden_states.copy(), answer + + +class Qwen3VLExtractor(BaseHiddenStateExtractor): + """Extractor for Qwen3-VL family (32B dense, 235B MoE). + + Key differences from Qwen25VLExtractor: + - AutoModelForImageTextToText + trust_remote_code=True + - process_vision_info requires image_patch_size=16 + - processor call requires do_resize=False + - 32×32 px patches → different min/max_pixels + """ + + MIN_PIXELS = 256 * 32 * 32 # 262,144 (mp3d/scannet → natural res; ai2thor → ~256 tokens) + MAX_PIXELS = 16384 * 32 * 32 # 16,777,216 + + def _load_model(self): + from transformers import AutoProcessor, AutoModelForImageTextToText, Qwen3VLMoeForConditionalGeneration + self.processor = AutoProcessor.from_pretrained(self.model_path, trust_remote_code=True) + self.model = AutoModelForImageTextToText.from_pretrained( + # self.model = Qwen3VLMoeForConditionalGeneration.from_pretrained( + self.model_path, trust_remote_code=True, torch_dtype='auto', + device_map='auto', attn_implementation='flash_attention_2', + ).eval() + self._find_llm_layers() + logger.info(f"Loaded Qwen3-VL from {self.model_path}") + + def _find_llm_layers(self): + candidates = [ + ['model', 'language_model', 'model', 'layers'], # Qwen3-VL expected + ['language_model', 'model', 'layers'], + ['model', 'model', 'layers'], + ['model', 'layers'], + ] + for path in candidates: + obj = self.model + for attr in path: + obj = getattr(obj, attr, None) + if obj is None: + break + if obj is not None and hasattr(obj, '__len__') and len(obj) > 0: + self.llm_layers = obj + logger.info(f"Qwen3-VL: layers at '{'.'.join(path)}', count={len(obj)}") + return + best, best_len = None, 0 + for name, module in self.model.named_modules(): + if name.endswith('.layers') and hasattr(module, '__len__') and len(module) > best_len: + best, best_len = module, len(module) + logger.info(f"Qwen3-VL: layers via scan at '{name}', count={best_len}") + if best is not None: + self.llm_layers = best + return + raise ValueError("Could not find transformer layers in Qwen3-VL model") + + def _get_num_layers(self) -> int: + return len(self.llm_layers) + + def _get_layer_module(self, layer_idx: int): + return self.llm_layers[layer_idx] + + def extract_and_predict(self, image, question): + self.hidden_states = {} + messages = [{"role": "user", "content": [ + {"type": "image", "image": image, + "min_pixels": self.MIN_PIXELS, "max_pixels": self.MAX_PIXELS}, + {"type": "text", "text": question}, + ]}] + text = self.processor.apply_chat_template(messages, tokenize=False, add_generation_prompt=True) + from qwen_vl_utils import process_vision_info + images, videos, _ = process_vision_info( + messages, image_patch_size=16, return_video_kwargs=True, return_video_metadata=True, + ) + inputs = self.processor( + text=text, images=images, videos=videos, do_resize=False, return_tensors="pt", + ).to(self.model.device) + with torch.no_grad(): + output_ids = self.model.generate(**inputs, max_new_tokens=20, do_sample=False) + input_len = inputs['input_ids'].shape[1] + answer = self.processor.tokenizer.decode( + output_ids[0, input_len:], skip_special_tokens=True).strip() + return self.hidden_states.copy(), answer + + +EXTRACTOR_CLASSES = { + 'MolmoExtractor': MolmoExtractor, + 'NVILAExtractor': NVILAExtractor, + 'RoboReferExtractor': RoboReferExtractor, + 'Qwen25VLExtractor': Qwen25VLExtractor, + 'Molmo2Extractor': Molmo2Extractor, + 'Qwen3VLExtractor': Qwen3VLExtractor, +} + + +def get_extractor(model_type: str, model_path: str = None, scale: str = None, **kwargs): + """Create an extractor for any model_type (legacy or new-large).""" + # New large models: (ExtractorClass, path) tuples in MODEL_CONFIGS_NEW + if model_type in MODEL_CONFIGS_NEW: + cls_name, raw_path = MODEL_CONFIGS_NEW[model_type][scale] + resolved = resolve_local_path(raw_path) + logger.info(f"Creating {cls_name} for scale='{scale}' from {resolved}") + return EXTRACTOR_CLASSES[cls_name](resolved, **kwargs) + # Legacy models + if model_type == 'nvila' and scale == 'roborefer': + return RoboReferExtractor(model_path, **kwargs) + legacy = { + 'molmo': MolmoExtractor, 'nvila': NVILAExtractor, 'qwen': Qwen25VLExtractor, + 'nvila_synthetic': NVILAExtractor, 'nvila_st': NVILAExtractor, + } + return legacy[model_type](model_path, **kwargs) + + +# ============================================================================ +# Feature Extraction Pipeline +# ============================================================================ + +def run_single_query(extractor, image, question): + hidden_states, predicted = extractor.extract_and_predict(image, question) + result = {} + for layer_idx in extractor.target_layers: + if layer_idx in hidden_states: + state = hidden_states[layer_idx].numpy().flatten() + if state.size > 0: + result[layer_idx] = state + return result, predicted + + +def extract_swap_features( + extractor: BaseHiddenStateExtractor, + swap_pairs: List[dict], + max_samples_per_category: int = 0, +) -> List[dict]: + """Extract features for all swap pairs.""" + rng = random.Random(42) + + if max_samples_per_category > 0: + grouped = defaultdict(list) + for p in swap_pairs: + grouped[p['category']].append(p) + limited = [] + for cat in CATEGORY_ORDER: + samples = grouped[cat] + if len(samples) > max_samples_per_category: + samples = rng.sample(samples, max_samples_per_category) + limited.extend(samples) + swap_pairs = limited + + records = [] + for pair in tqdm(swap_pairs, desc="Swap pairs"): + try: + image = decode_base64_image(pair['image_base64']) + hs_orig, pred_orig = run_single_query(extractor, image, pair['original_question']) + hs_swap, pred_swap = run_single_query(extractor, image, pair['swapped_question']) + + is_correct_orig = check_answer(pred_orig, pair['original_answer'], pair['mcq_map']) + is_correct_swap = check_answer(pred_swap, pair['swapped_answer'], pair['mcq_map']) + + delta = {} + for layer_idx in extractor.target_layers: + if layer_idx in hs_orig and layer_idx in hs_swap: + delta[layer_idx] = hs_swap[layer_idx] - hs_orig[layer_idx] + + record = { + 'index': pair['index'], + 'group': pair['group'], + 'category': pair['category'], + 'original_answer': pair['original_answer'], + 'swapped_answer': pair['swapped_answer'], + 'pred_orig': pred_orig, + 'pred_swap': pred_swap, + 'is_correct_orig': is_correct_orig, + 'is_correct_swap': is_correct_swap, + 'hs_orig': hs_orig, + 'hs_swap': hs_swap, + 'delta': delta, + } + records.append(record) + + mark_o = "O" if is_correct_orig else "X" + mark_s = "O" if is_correct_swap else "X" + logger.info(f" #{pair['index']:<6} {pair['category']:<6} " + f"orig[{mark_o}]=\"{pred_orig[:40]}\" swap[{mark_s}]=\"{pred_swap[:40]}\"" + + (f" [{len(records)}/{len(swap_pairs)}]" if len(records) % 50 == 0 else "")) + + except Exception as e: + logger.warning(f"Error on index {pair['index']}: {e}") + continue + + logger.info(f"Extracted {len(records)} swap pair records") + + # Fix 8: Per-category accuracy logging + for cat in CATEGORY_ORDER: + cat_recs = [r for r in records if r['category'] == cat] + n = len(cat_recs) + if n == 0: + continue + c_orig = sum(1 for r in cat_recs if r['is_correct_orig']) + c_swap = sum(1 for r in cat_recs if r['is_correct_swap']) + c_both = sum(1 for r in cat_recs if r['is_correct_orig'] and r['is_correct_swap']) + logger.info(f" {cat:>6s} (n={n}): acc_orig={c_orig/n:.1%}, acc_swap={c_swap/n:.1%}, " + f"acc_both={c_both/n:.1%}") + + return records + + +def extract_cross_group_features( + extractor: BaseHiddenStateExtractor, + quads: List[dict], +) -> List[dict]: + """Extract features for cross-group quads (4 forward passes each).""" + records = [] + for quad in tqdm(quads, desc="Cross-group quads"): + try: + image = decode_base64_image(quad['image_base64']) + hs_d_orig, pred_d_orig = run_single_query(extractor, image, quad['dist_original_q']) + hs_d_swap, pred_d_swap = run_single_query(extractor, image, quad['dist_swapped_q']) + hs_v_orig, pred_v_orig = run_single_query(extractor, image, quad['vert_original_q']) + hs_v_swap, pred_v_swap = run_single_query(extractor, image, quad['vert_swapped_q']) + + delta_dist, delta_vert = {}, {} + for layer_idx in extractor.target_layers: + if layer_idx in hs_d_orig and layer_idx in hs_d_swap: + delta_dist[layer_idx] = hs_d_swap[layer_idx] - hs_d_orig[layer_idx] + if layer_idx in hs_v_orig and layer_idx in hs_v_swap: + delta_vert[layer_idx] = hs_v_swap[layer_idx] - hs_v_orig[layer_idx] + + record = { + 'index': quad['index'], + 'delta_dist': delta_dist, + 'delta_vert': delta_vert, + 'pred_d_orig': pred_d_orig, 'pred_d_swap': pred_d_swap, + 'pred_v_orig': pred_v_orig, 'pred_v_swap': pred_v_swap, + 'is_correct_d_orig': check_answer(pred_d_orig, quad['dist_original_answer'], quad['dist_mcq_map']), + 'is_correct_d_swap': check_answer(pred_d_swap, quad['dist_swapped_answer'], quad['dist_mcq_map']), + 'is_correct_v_orig': check_answer(pred_v_orig, quad['vert_original_answer'], quad['vert_mcq_map']), + 'is_correct_v_swap': check_answer(pred_v_swap, quad['vert_swapped_answer'], quad['vert_mcq_map']), + 'data_source': quad['data_source'], + } + records.append(record) + + tqdm.write(f" #{quad['index']:<6} dist=[{pred_d_orig[:20]}/{pred_d_swap[:20]}] " + f"vert=[{pred_v_orig[:20]}/{pred_v_swap[:20]}]") + + except Exception as e: + logger.warning(f"Error on cross-group index {quad['index']}: {e}") + continue + + logger.info(f"Extracted {len(records)} cross-group quad records") + return records + + +# ============================================================================ +# Analysis Functions +# ============================================================================ + +# Fix 5: Within-category + sign-corrected delta consistency + +def compute_delta_consistency(records: List[dict], target_layers: List[int]): + """Compute TWO types of delta consistency. + + Returns: + within_cat_results: {(category, layer) -> {mean, std, n}} + sign_corrected_results: {(group, layer) -> {mean, std, n}} + """ + within_cat_results = {} + sign_corrected_results = {} + + for group in GROUP_ORDER: + canonical = CANONICAL_CATEGORIES[group] + opposite = OPPOSITE_MAP[canonical] + group_recs = [r for r in records if r['group'] == group] + + for layer in target_layers: + # (a) Within-category consistency + for cat in [canonical, opposite]: + cat_deltas = [r['delta'][layer] for r in group_recs + if r['category'] == cat and layer in r['delta']] + if len(cat_deltas) >= 2: + arr = np.array(cat_deltas) + sim = cosine_similarity(arr) + upper = sim[np.triu_indices(len(cat_deltas), k=1)] + within_cat_results[(cat, layer)] = { + 'mean': float(np.mean(upper)), + 'std': float(np.std(upper)), + 'n': len(cat_deltas), + } + + # (b) Sign-corrected group consistency + all_deltas = [] + for r in group_recs: + if layer not in r['delta']: + continue + d = r['delta'][layer] + if r['category'] == opposite: + d = -d # flip to align with canonical direction + all_deltas.append(d) + + if len(all_deltas) >= 2: + arr = np.array(all_deltas) + sim = cosine_similarity(arr) + upper = sim[np.triu_indices(len(all_deltas), k=1)] + sign_corrected_results[(group, layer)] = { + 'mean': float(np.mean(upper)), + 'std': float(np.std(upper)), + 'n': len(all_deltas), + } + + return within_cat_results, sign_corrected_results + + +# Fix 7: Delta-based similarity matrix + +def compute_delta_similarity_matrix(records: List[dict], layer: int) -> Optional[pd.DataFrame]: + """Compute 6x6 cosine similarity using mean delta per category.""" + cat_deltas = {} + for cat in CATEGORY_ORDER: + deltas = [r['delta'][layer] for r in records if r['category'] == cat and layer in r['delta']] + if deltas: + cat_deltas[cat] = np.mean(deltas, axis=0) + + available = [c for c in CATEGORY_ORDER if c in cat_deltas] + if len(available) < 2: + return None + + vectors = np.array([cat_deltas[c] for c in available]) + sim = cosine_similarity(vectors) + return pd.DataFrame(sim, index=available, columns=available) + + +# Fix 8: Both-correct filtering + +def filter_both_correct(records: List[dict]) -> List[dict]: + """Filter to pairs where both orig and swap predictions are correct.""" + return [r for r in records if r['is_correct_orig'] and r['is_correct_swap']] + + +# Fix 8: Category validity check + +def check_category_validity(records: List[dict], scale: str) -> Dict[str, dict]: + """Check per-category accuracy and flag unreliable categories.""" + validity = {} + for cat in CATEGORY_ORDER: + cat_recs = [r for r in records if r['category'] == cat] + n = len(cat_recs) + if n == 0: + validity[cat] = {'n': 0, 'acc_orig': 0, 'acc_swap': 0, 'reliable': False} + continue + acc_orig = sum(1 for r in cat_recs if r['is_correct_orig']) / n + acc_swap = sum(1 for r in cat_recs if r['is_correct_swap']) / n + reliable = acc_orig >= 0.5 and acc_swap >= 0.5 + validity[cat] = { + 'n': n, 'acc_orig': acc_orig, 'acc_swap': acc_swap, + 'reliable': reliable, + } + if not reliable: + logger.warning(f" [!] Category '{cat}' unreliable at scale={scale}: " + f"acc_orig={acc_orig:.1%}, acc_swap={acc_swap:.1%}") + return validity + + +def compute_cross_group_alignment(quad_records: List[dict], target_layers: List[int]) -> dict: + results = {} + for layer in target_layers: + per_sample = [] + delta_verts, delta_dists = [], [] + + for rec in quad_records: + if layer in rec['delta_vert'] and layer in rec['delta_dist']: + dv = rec['delta_vert'][layer] + dd = rec['delta_dist'][layer] + norm_v, norm_d = np.linalg.norm(dv), np.linalg.norm(dd) + if norm_v > 1e-10 and norm_d > 1e-10: + per_sample.append(float(np.dot(dv, dd) / (norm_v * norm_d))) + delta_verts.append(dv) + delta_dists.append(dd) + + if not per_sample: + continue + + mean_dv = np.mean(delta_verts, axis=0) + mean_dd = np.mean(delta_dists, axis=0) + norm_mv, norm_md = np.linalg.norm(mean_dv), np.linalg.norm(mean_dd) + mean_alignment = float(np.dot(mean_dv, mean_dd) / (norm_mv * norm_md + 1e-10)) + + rng = np.random.RandomState(42) + perm_alignments = [] + for _ in range(100): + shuffled_dd = [delta_dists[i] for i in rng.permutation(len(delta_dists))] + perm_cos = [] + for dv, dd in zip(delta_verts, shuffled_dd): + nv, nd = np.linalg.norm(dv), np.linalg.norm(dd) + if nv > 1e-10 and nd > 1e-10: + perm_cos.append(np.dot(dv, dd) / (nv * nd)) + perm_alignments.append(np.mean(perm_cos)) + + results[layer] = { + 'per_sample_mean': float(np.mean(per_sample)), + 'per_sample_std': float(np.std(per_sample)), + 'mean_delta_alignment': mean_alignment, + 'permutation_mean': float(np.mean(perm_alignments)), + 'permutation_std': float(np.std(perm_alignments)), + 'n_samples': len(per_sample), + } + return results + + +def compute_prediction_stats(records: List[dict], scale: str) -> dict: + stats = {'scale': scale} + total_correct_orig, total_correct_swap, total_both, total_n = 0, 0, 0, 0 + + for group in GROUP_ORDER: + group_recs = [r for r in records if r['group'] == group] + n = len(group_recs) + c_orig = sum(1 for r in group_recs if r['is_correct_orig']) + c_swap = sum(1 for r in group_recs if r['is_correct_swap']) + c_both = sum(1 for r in group_recs if r['is_correct_orig'] and r['is_correct_swap']) + stats[f'{group}_n'] = n + stats[f'{group}_acc_orig'] = c_orig / n if n > 0 else 0 + stats[f'{group}_acc_swap'] = c_swap / n if n > 0 else 0 + stats[f'{group}_acc_both'] = c_both / n if n > 0 else 0 + total_correct_orig += c_orig + total_correct_swap += c_swap + total_both += c_both + total_n += n + + stats['overall_acc_orig'] = total_correct_orig / total_n if total_n > 0 else 0 + stats['overall_acc_swap'] = total_correct_swap / total_n if total_n > 0 else 0 + stats['overall_acc_both'] = total_both / total_n if total_n > 0 else 0 + stats['overall_n'] = total_n + return stats + + +# ============================================================================ +# Saving & Loading +# ============================================================================ + +def get_representative_layers(all_layers, n=5): + if len(all_layers) <= n: + return list(all_layers) + indices = np.linspace(0, len(all_layers) - 1, n, dtype=int) + return [all_layers[i] for i in indices] + + +def save_scale_results( + scale, swap_records, quad_records, + within_cat_consistency, sign_corrected_consistency, + cross_alignment, pred_stats, target_layers, + category_validity, delta_heatmaps, + output_dir, both_correct_tag="all_pairs", + save_alignment=True, +): + """Save all per-scale results to disk. + + Args: + save_alignment: If False, skip writing cross_alignment_{scale}.json. + Set False during Phase A save; call save_cross_alignment() + separately after Phase B completes. + """ + csv_dir = os.path.join(output_dir, 'csv') + json_dir = os.path.join(output_dir, 'json') + os.makedirs(csv_dir, exist_ok=True) + os.makedirs(json_dir, exist_ok=True) + + # 1. Predictions CSV (tagged so all_pairs and both_correct don't overwrite each other) + pred_rows = [] + for r in swap_records: + pred_rows.append({ + 'index': r['index'], 'group': r['group'], 'category': r['category'], + 'pred_orig': r['pred_orig'], 'pred_swap': r['pred_swap'], + 'is_correct_orig': r['is_correct_orig'], 'is_correct_swap': r['is_correct_swap'], + }) + pd.DataFrame(pred_rows).to_csv( + os.path.join(csv_dir, f'predictions_{scale}_{both_correct_tag}.csv'), index=False) + + # 2. Within-category consistency JSON + wc_data = {} + for (cat, layer), vals in within_cat_consistency.items(): + wc_data[f'{cat}_L{layer}'] = vals + with open(os.path.join(json_dir, f'within_cat_consistency_{scale}_{both_correct_tag}.json'), 'w') as f: + json.dump(wc_data, f, indent=2) + + # 3. Sign-corrected consistency JSON + sc_data = {} + for (group, layer), vals in sign_corrected_consistency.items(): + sc_data[f'{group}_L{layer}'] = vals + with open(os.path.join(json_dir, f'sign_corrected_consistency_{scale}_{both_correct_tag}.json'), 'w') as f: + json.dump(sc_data, f, indent=2) + + # 4. Cross-group alignment JSON (only when save_alignment=True, i.e. after Phase B) + if save_alignment: + alignment_data = {} + for layer, vals in cross_alignment.items(): + alignment_data[f'L{layer}'] = vals + with open(os.path.join(json_dir, f'cross_alignment_{scale}.json'), 'w') as f: + json.dump(alignment_data, f, indent=2) + + # 5. Prediction stats JSON + with open(os.path.join(json_dir, f'pred_stats_{scale}.json'), 'w') as f: + json.dump(pred_stats, f, indent=2) + + # 6. Category validity JSON (Fix 8) + with open(os.path.join(json_dir, f'category_validity_{scale}.json'), 'w') as f: + json.dump(category_validity, f, indent=2) + + # 7. Delta heatmap CSVs (Fix 7) + for layer, df in delta_heatmaps.items(): + if df is not None: + df.to_csv(os.path.join(csv_dir, f'delta_similarity_{scale}_L{layer}_{both_correct_tag}.csv')) + + logger.info(f"Saved results for scale={scale} ({both_correct_tag}) to {output_dir}") + + +def save_vectors_npz(scale, swap_records, target_layers, output_dir): + """Save swap-pair vectors with correctness metadata to NPZ (Phase A result). + + Cross-group vectors are saved separately by save_cross_group_npz() after Phase B. + """ + rep_layers = list(target_layers) # save ALL layers (not just 5 representative) + delta_data = {} + for layer in rep_layers: + groups_list, categories_list, vectors = [], [], [] + orig_vecs, swap_vecs, labels = [], [], [] + correct_orig_list, correct_swap_list, indices_list = [], [], [] + for r in swap_records: + if layer in r['delta']: + groups_list.append(r['group']) + categories_list.append(r['category']) + vectors.append(r['delta'][layer]) + correct_orig_list.append(r['is_correct_orig']) + correct_swap_list.append(r['is_correct_swap']) + indices_list.append(r['index']) + if layer in r['hs_orig'] and layer in r['hs_swap']: + orig_vecs.append(r['hs_orig'][layer]) + swap_vecs.append(r['hs_swap'][layer]) + labels.append(r['category']) + if vectors: + delta_data[f'delta_L{layer}'] = np.array(vectors) + delta_data[f'groups_L{layer}'] = np.array(groups_list) + delta_data[f'categories_L{layer}'] = np.array(categories_list) + delta_data[f'is_correct_orig_L{layer}'] = np.array(correct_orig_list) + delta_data[f'is_correct_swap_L{layer}'] = np.array(correct_swap_list) + delta_data[f'indices_L{layer}'] = np.array(indices_list) + if orig_vecs: + delta_data[f'orig_L{layer}'] = np.array(orig_vecs) + delta_data[f'swap_L{layer}'] = np.array(swap_vecs) + delta_data[f'labels_L{layer}'] = np.array(labels) + + npz_dir = os.path.join(output_dir, 'npz') + os.makedirs(npz_dir, exist_ok=True) + np.savez_compressed(os.path.join(npz_dir, f'vectors_{scale}.npz'), **delta_data) + logger.info(f"Saved vectors NPZ with correctness metadata for scale={scale}") + + +def save_cross_group_npz(scale, quad_records, target_layers, output_dir): + """Save cross-group delta vectors to NPZ (Phase B result).""" + if not quad_records: + return + rep_layers = list(target_layers) + cg_data = {} + for layer in rep_layers: + dverts, ddists = [], [] + for rec in quad_records: + if layer in rec['delta_vert'] and layer in rec['delta_dist']: + dverts.append(rec['delta_vert'][layer]) + ddists.append(rec['delta_dist'][layer]) + if dverts: + cg_data[f'delta_vert_L{layer}'] = np.array(dverts) + cg_data[f'delta_dist_L{layer}'] = np.array(ddists) + npz_dir = os.path.join(output_dir, 'npz') + os.makedirs(npz_dir, exist_ok=True) + np.savez_compressed(os.path.join(npz_dir, f'cross_group_vectors_{scale}.npz'), **cg_data) + logger.info(f"Saved cross-group vectors NPZ for scale={scale}") + + +def save_cross_alignment(scale, cross_alignment, output_dir): + """Save cross-group alignment data to JSON (Phase B result).""" + json_dir = os.path.join(output_dir, 'json') + os.makedirs(json_dir, exist_ok=True) + alignment_data = {f'L{layer}': vals for layer, vals in cross_alignment.items()} + with open(os.path.join(json_dir, f'cross_alignment_{scale}.json'), 'w') as f: + json.dump(alignment_data, f, indent=2) + logger.info(f"Saved cross-alignment JSON for scale={scale}") + + +def _has_phase_b_data(scale_dir: str, scale: str) -> bool: + """Return True if cross_alignment_{scale}.json exists and is non-empty.""" + path = os.path.join(scale_dir, 'json', f'cross_alignment_{scale}.json') + if not os.path.exists(path): + return False + try: + with open(path) as f: + data = json.load(f) + return bool(data) + except Exception: + return False + + +def load_scale_consistency(output_dir, scale, tag='all_pairs'): + """Load sign-corrected consistency.""" + path = os.path.join(output_dir, 'json', f'sign_corrected_consistency_{scale}_{tag}.json') + if not os.path.exists(path): + return {} + with open(path) as f: + raw = json.load(f) + result = {} + for key, vals in raw.items(): + parts = key.rsplit('_L', 1) + if len(parts) == 2: + result[(parts[0], int(parts[1]))] = vals + return result + + +def load_within_cat_consistency(output_dir, scale, tag='all_pairs'): + path = os.path.join(output_dir, 'json', f'within_cat_consistency_{scale}_{tag}.json') + if not os.path.exists(path): + return {} + with open(path) as f: + raw = json.load(f) + result = {} + for key, vals in raw.items(): + parts = key.rsplit('_L', 1) + if len(parts) == 2: + result[(parts[0], int(parts[1]))] = vals + return result + + +def load_scale_alignment(output_dir, scale): + path = os.path.join(output_dir, 'json', f'cross_alignment_{scale}.json') + if not os.path.exists(path): + return {} + with open(path) as f: + raw = json.load(f) + result = {} + for key, vals in raw.items(): + result[int(key.replace('L', ''))] = vals + return result + + +def load_delta_heatmaps(output_dir, scale, tag='all_pairs'): + import glob as glob_mod + pattern = os.path.join(output_dir, 'csv', f'delta_similarity_{scale}_L*_{tag}.csv') + files = glob_mod.glob(pattern) + result = {} + for fpath in files: + basename = os.path.basename(fpath) + # delta_similarity_{scale}_L{layer}_{tag}.csv + part = basename.replace(f'delta_similarity_{scale}_L', '').replace(f'_{tag}.csv', '') + try: + layer = int(part) + except ValueError: + continue + result[layer] = pd.read_csv(fpath, index_col=0) + return result + + +# ============================================================================ +# Visualization +# ============================================================================ + +def plot_within_cat_consistency_trajectory(within_cat, scale, model_type, save_path): + """Plot within-category delta consistency across layers.""" + fig, ax = plt.subplots(figsize=(12, 6)) + cat_colors = CAT_COLORS + for cat in CATEGORY_ORDER: + layers, vals = [], [] + for (c, l), v in sorted(within_cat.items(), key=lambda x: x[0][1]): + if c == cat: + layers.append(l) + vals.append(v['mean']) + if layers: + ax.plot(layers, vals, '-o', color=cat_colors[cat], label=cat, linewidth=2, markersize=3) + ax.set_xlabel('Layer Index') + ax.set_ylabel('Within-Category Consistency') + ax.set_title(f'{model_type.upper()} ({scale}) - Within-Category Delta Consistency', fontweight='bold') + ax.legend(fontsize=9) + ax.grid(True, alpha=0.3) + plt.tight_layout() + plt.savefig(save_path, dpi=300, bbox_inches='tight') + plt.close() + logger.info(f"Saved: {save_path}") + + +def plot_sign_corrected_consistency_trajectory(sign_corrected, scale, model_type, save_path): + """Plot sign-corrected group consistency across layers.""" + fig, ax = plt.subplots(figsize=(12, 6)) + colors = GROUP_COLORS + for group in GROUP_ORDER: + layers, vals = [], [] + for (g, l), v in sorted(sign_corrected.items(), key=lambda x: x[0][1]): + if g == group: + layers.append(l) + vals.append(v['mean']) + if layers: + ax.plot(layers, vals, '-o', color=colors[group], label=group, linewidth=2, markersize=3) + ax.set_xlabel('Layer Index') + ax.set_ylabel('Sign-Corrected Consistency') + ax.set_title(f'{model_type.upper()} ({scale}) - Sign-Corrected Group Consistency', fontweight='bold') + ax.legend(fontsize=11) + ax.grid(True, alpha=0.3) + plt.tight_layout() + plt.savefig(save_path, dpi=300, bbox_inches='tight') + plt.close() + logger.info(f"Saved: {save_path}") + + +def plot_cross_group_alignment_trajectory(cross_alignment, scale, model_type, save_path): + fig, ax = plt.subplots(figsize=(12, 6)) + layers = sorted(cross_alignment.keys()) + actual = [cross_alignment[l]['per_sample_mean'] for l in layers] + mean_delta = [cross_alignment[l]['mean_delta_alignment'] for l in layers] + perm_mean = [cross_alignment[l]['permutation_mean'] for l in layers] + perm_std = [cross_alignment[l]['permutation_std'] for l in layers] + + ax.plot(layers, actual, '-o', color='#d62728', label='cos(d_vert, d_dist) per-sample mean', + linewidth=2.5, markersize=3) + ax.plot(layers, mean_delta, '--s', color='#e377c2', label='cos(mean_d_vert, mean_d_dist)', + linewidth=1.5, markersize=3) + ax.plot(layers, perm_mean, ':', color='gray', label='permutation control', linewidth=1.5) + ax.fill_between(layers, + [m - 2*s for m, s in zip(perm_mean, perm_std)], + [m + 2*s for m, s in zip(perm_mean, perm_std)], + alpha=0.2, color='gray') + ax.set_xlabel('Layer Index') + ax.set_ylabel('Cosine Alignment') + ax.set_title(f'{model_type.upper()} ({scale}) - Cross-Group Alignment (Perspective Bias)', fontweight='bold') + ax.legend(fontsize=9) + ax.grid(True, alpha=0.3) + plt.tight_layout() + plt.savefig(save_path, dpi=300, bbox_inches='tight') + plt.close() + logger.info(f"Saved: {save_path}") + + +# Fix 7: Delta heatmap visualization + +def plot_delta_heatmap(sim_df, title, save_path): + """Plot delta-based similarity heatmap.""" + plt.figure(figsize=(10, 8)) + available_order = [c for c in CATEGORY_ORDER if c in sim_df.index] + sim_df_ordered = sim_df.loc[available_order, available_order] + + annot = sim_df_ordered.round(4).astype(str) + sns.heatmap(sim_df_ordered, annot=annot, fmt='', cmap='RdBu_r', + center=0, vmin=-1, vmax=1, square=True, linewidths=0.5, + cbar_kws={'label': 'Cosine Similarity'}) + plt.title(title, fontsize=14, fontweight='bold') + plt.tight_layout() + plt.savefig(save_path, dpi=300, bbox_inches='tight') + plt.close() + logger.info(f"Saved delta heatmap: {save_path}") + + +# Fix 6: Prediction stats visualization + +def plot_pred_stats_bars(all_pred_stats, model_type, save_path): + """Bar chart: per-group accuracy (orig/swap/both) across scales.""" + fig, axes = plt.subplots(1, len(GROUP_ORDER), figsize=(7 * len(GROUP_ORDER), 6)) + if len(GROUP_ORDER) == 1: + axes = [axes] + + available = [s for s in SCALE_ORDER if any(d['scale'] == s for d in all_pred_stats)] + if not available: + # Fallback: use whatever scales are present (preserves insertion order) + seen = [] + for d in all_pred_stats: + if d['scale'] not in seen: + seen.append(d['scale']) + available = seen + + for idx, group in enumerate(GROUP_ORDER): + ax = axes[idx] + x = np.arange(3) # orig, swap, both + width = 0.8 / len(available) + for i, scale in enumerate(available): + entry = next((d for d in all_pred_stats if d['scale'] == scale), None) + if entry is None: + continue + vals = [entry.get(f'{group}_acc_orig', 0), + entry.get(f'{group}_acc_swap', 0), + entry.get(f'{group}_acc_both', 0)] + offset = (i - len(available) / 2 + 0.5) * width + color = SCALE_COLORS.get(scale, 'gray') + ax.bar(x + offset, vals, width, label=scale, color=color) + ax.set_xticks(x) + ax.set_xticklabels(['orig', 'swap', 'both']) + ax.set_ylabel('Accuracy') + ax.set_title(group, fontweight='bold') + ax.legend(fontsize=7) + ax.set_ylim(0, 1.1) + ax.axhline(y=0.5, color='gray', linestyle='--', alpha=0.5) + ax.grid(True, alpha=0.3, axis='y') + + fig.suptitle(f'{model_type.upper()} - Prediction Accuracy by Group', fontsize=15, fontweight='bold', y=1.02) + plt.tight_layout() + plt.savefig(save_path, dpi=300, bbox_inches='tight') + plt.close() + logger.info(f"Saved: {save_path}") + + +def plot_pred_stats_trajectory(all_pred_stats, model_type, save_path): + """Line plot: acc_both trajectory across scales per group.""" + fig, ax = plt.subplots(figsize=(10, 6)) + available = [s for s in SCALE_ORDER if any(d['scale'] == s for d in all_pred_stats)] + if not available: + seen = [] + for d in all_pred_stats: + if d['scale'] not in seen: + seen.append(d['scale']) + available = seen + colors = GROUP_COLORS + + for group in GROUP_ORDER: + x_vals, y_vals = [], [] + for i, scale in enumerate(available): + entry = next((d for d in all_pred_stats if d['scale'] == scale), None) + if entry: + x_vals.append(i) + y_vals.append(entry.get(f'{group}_acc_both', 0)) + if x_vals: + ax.plot(x_vals, y_vals, '-o', color=colors[group], label=group, linewidth=2.5, markersize=6) + + ax.set_xticks(range(len(available))) + ax.set_xticklabels(available) + ax.set_xlabel('Scale') + ax.set_ylabel('Accuracy (both correct)') + ax.set_title(f'{model_type.upper()} - Both-Correct Accuracy Across Scales', fontweight='bold') + ax.legend(fontsize=10) + ax.set_ylim(0, 1.05) + ax.axhline(y=0.5, color='gray', linestyle='--', alpha=0.5) + ax.grid(True, alpha=0.3) + plt.tight_layout() + plt.savefig(save_path, dpi=300, bbox_inches='tight') + plt.close() + logger.info(f"Saved: {save_path}") + + +def plot_pca_embeddings(vectors_npz_path, scale, model_type, save_dir, bc_only=False): + data = np.load(vectors_npz_path, allow_pickle=True) + layer_keys = [k for k in data.files if k.startswith('orig_L')] + layers = sorted([int(k.replace('orig_L', '')) for k in layer_keys]) + + cat_colors = CAT_COLORS + + for layer in layers: + orig = data.get(f'orig_L{layer}') + swap = data.get(f'swap_L{layer}') + labels = data.get(f'labels_L{layer}') + deltas = data.get(f'delta_L{layer}') + cats = data.get(f'categories_L{layer}') + groups = data.get(f'groups_L{layer}') + + if bc_only and deltas is not None: + co = data.get(f'is_correct_orig_L{layer}') + cs = data.get(f'is_correct_swap_L{layer}') + if co is not None and cs is not None: + bc_mask = co.astype(bool) & cs.astype(bool) + if orig is not None and len(orig) == len(bc_mask): + orig = orig[bc_mask] + swap = swap[bc_mask] + labels = labels[bc_mask] if labels is not None else None + if len(deltas) == len(bc_mask): + deltas = deltas[bc_mask] + cats = cats[bc_mask] if cats is not None else None + groups = groups[bc_mask] if groups is not None else None + + if orig is None or swap is None or len(orig) == 0: + continue + + fig, axes = plt.subplots(1, 3, figsize=(24, 7)) + + pca = PCA(n_components=2) + all_vecs = np.vstack([orig, swap]) + all_pca = pca.fit_transform(all_vecs) + orig_pca = all_pca[:len(orig)] + swap_pca = all_pca[len(orig):] + + ax = axes[0] + for cat in CATEGORY_ORDER: + mask = np.array([str(l) == cat for l in labels]) + if mask.any(): + ax.scatter(orig_pca[mask, 0], orig_pca[mask, 1], + c=cat_colors.get(cat, 'gray'), label=f'{cat} (orig)', + alpha=0.5, s=15, marker='o') + ax.scatter(swap_pca[mask, 0], swap_pca[mask, 1], + c=cat_colors.get(cat, 'gray'), + alpha=0.5, s=15, marker='x') + ax.set_title('Embeddings by Category\n(o=orig, x=swap)', fontsize=11) + ax.legend(fontsize=7, ncol=2) + ax.grid(True, alpha=0.2) + + ax = axes[1] + if deltas is not None and cats is not None: + pca_d = PCA(n_components=2) + delta_pca = pca_d.fit_transform(deltas) + group_colors = GROUP_COLORS + if groups is not None: + for group in GROUP_ORDER: + mask = np.array([str(g) == group for g in groups]) + if mask.any(): + ax.scatter(delta_pca[mask, 0], delta_pca[mask, 1], + c=group_colors.get(group, 'gray'), label=group, alpha=0.5, s=15) + ax.set_title('Delta Vectors by Group', fontsize=11) + ax.legend(fontsize=9) + ax.grid(True, alpha=0.2) + + ax = axes[2] + if deltas is not None and cats is not None: + for cat in CATEGORY_ORDER: + mask = np.array([str(c) == cat for c in cats]) + if mask.any(): + ax.scatter(delta_pca[mask, 0], delta_pca[mask, 1], + c=cat_colors.get(cat, 'gray'), label=cat, alpha=0.5, s=15) + ax.set_title('Delta Vectors by Category', fontsize=11) + ax.legend(fontsize=8, ncol=2) + ax.grid(True, alpha=0.2) + + fig.suptitle(f'{model_type.upper()} ({scale}) - Layer {layer} - PCA', fontweight='bold') + plt.tight_layout() + plt.savefig(os.path.join(save_dir, f'pca_{scale}_L{layer}.png'), dpi=200, bbox_inches='tight') + plt.close() + + logger.info(f"Saved PCA plots to {save_dir}") + + +def plot_pca_3d(vectors_npz_path, scale, model_type, save_dir, bc_only=False): + """Generate 3-panel 3D PCA figure per representative layer.""" + data = np.load(vectors_npz_path, allow_pickle=True) + layer_keys = [k for k in data.files if k.startswith('orig_L')] + layers = sorted([int(k.replace('orig_L', '')) for k in layer_keys]) + + if not layers: + logger.info(f" [pca_3d] No orig_L* keys found in {vectors_npz_path}") + return + + os.makedirs(save_dir, exist_ok=True) + + def scatter3d(ax, xs, ys, zs, c, label, alpha=0.45, s=12, marker='o'): + ax.scatter(xs, ys, zs, c=c, label=label, alpha=alpha, s=s, marker=marker) + + for layer in layers: + orig = data.get(f'orig_L{layer}') + swap = data.get(f'swap_L{layer}') + labels = data.get(f'labels_L{layer}') + deltas = data.get(f'delta_L{layer}') + cats = data.get(f'categories_L{layer}') + groups = data.get(f'groups_L{layer}') + + if bc_only and deltas is not None: + co = data.get(f'is_correct_orig_L{layer}') + cs = data.get(f'is_correct_swap_L{layer}') + if co is not None and cs is not None: + bc_mask = co.astype(bool) & cs.astype(bool) + if orig is not None and len(orig) == len(bc_mask): + orig = orig[bc_mask] + swap = swap[bc_mask] + labels = labels[bc_mask] if labels is not None else None + if len(deltas) == len(bc_mask): + deltas = deltas[bc_mask] + cats = cats[bc_mask] if cats is not None else None + groups = groups[bc_mask] if groups is not None else None + + if orig is None or swap is None or len(orig) == 0: + continue + + # Panel 1: embeddings + pca_emb = PCA(n_components=3) + all_vecs = np.vstack([orig, swap]) + all_proj = pca_emb.fit_transform(all_vecs) + orig_proj = all_proj[:len(orig)] + swap_proj = all_proj[len(orig):] + ev1 = pca_emb.explained_variance_ratio_ + + # Panels 2/3: delta vectors + has_delta = (deltas is not None and len(deltas) >= 3) + if has_delta: + pca_d = PCA(n_components=3) + delta_proj = pca_d.fit_transform(deltas) + ev2 = pca_d.explained_variance_ratio_ + else: + delta_proj = None + ev2 = None + + fig = plt.figure(figsize=(30, 8)) + + ax1 = fig.add_subplot(131, projection='3d') + for cat in CATEGORY_ORDER: + mask = np.array([str(l) == cat for l in labels]) + if not mask.any(): + continue + c = CAT_COLORS.get(cat, 'gray') + scatter3d(ax1, orig_proj[mask, 0], orig_proj[mask, 1], orig_proj[mask, 2], + c=c, label=f'{cat} (orig)', marker='o') + scatter3d(ax1, swap_proj[mask, 0], swap_proj[mask, 1], swap_proj[mask, 2], + c=c, label=f'{cat} (swap)', marker='^') + ax1.set_title('Embeddings by Category\n(o=orig, ^=swap)', fontsize=10) + ax1.set_xlabel(f'PC1 ({ev1[0]:.1%})', fontsize=8) + ax1.set_ylabel(f'PC2 ({ev1[1]:.1%})', fontsize=8) + ax1.set_zlabel(f'PC3 ({ev1[2]:.1%})', fontsize=8) + ax1.legend(fontsize=6, ncol=2, loc='upper left') + + ax2 = fig.add_subplot(132, projection='3d') + if has_delta and groups is not None: + for group in GROUP_ORDER: + mask = np.array([str(g) == group for g in groups]) + if not mask.any(): + continue + scatter3d(ax2, delta_proj[mask, 0], delta_proj[mask, 1], delta_proj[mask, 2], + c=GROUP_COLORS.get(group, 'gray'), label=group) + ax2.set_title('Delta Vectors by Group', fontsize=10) + ax2.set_xlabel(f'PC1 ({ev2[0]:.1%})', fontsize=8) + ax2.set_ylabel(f'PC2 ({ev2[1]:.1%})', fontsize=8) + ax2.set_zlabel(f'PC3 ({ev2[2]:.1%})', fontsize=8) + ax2.legend(fontsize=8) + else: + ax2.set_title('Delta Vectors by Group\n(no data)', fontsize=10) + + ax3 = fig.add_subplot(133, projection='3d') + if has_delta and cats is not None: + for cat in CATEGORY_ORDER: + mask = np.array([str(c) == cat for c in cats]) + if not mask.any(): + continue + scatter3d(ax3, delta_proj[mask, 0], delta_proj[mask, 1], delta_proj[mask, 2], + c=CAT_COLORS.get(cat, 'gray'), label=cat) + ax3.set_title('Delta Vectors by Category', fontsize=10) + ax3.set_xlabel(f'PC1 ({ev2[0]:.1%})', fontsize=8) + ax3.set_ylabel(f'PC2 ({ev2[1]:.1%})', fontsize=8) + ax3.set_zlabel(f'PC3 ({ev2[2]:.1%})', fontsize=8) + ax3.legend(fontsize=7, ncol=2) + else: + ax3.set_title('Delta Vectors by Category\n(no data)', fontsize=10) + + fig.suptitle(f'{model_type.upper()} ({scale}) - Layer {layer} - 3D PCA', fontweight='bold') + plt.tight_layout() + plt.savefig(os.path.join(save_dir, f'pca_{scale}_L{layer}.png'), dpi=200, + bbox_inches='tight', pad_inches=0.4) + plt.close() + + logger.info(f"Saved 3D PCA plots to {save_dir}") + + +# Cross-scale plots + +def plot_cross_scale_consistency(all_consistency, model_type, save_path, title_prefix='Sign-Corrected'): + fig, axes = plt.subplots(1, 3, figsize=(21, 6)) + + for idx, group in enumerate(GROUP_ORDER): + ax = axes[idx] + for scale in SCALE_ORDER: + if scale not in all_consistency: + continue + consistency = all_consistency[scale] + layers, vals = [], [] + for (g, l), v in sorted(consistency.items(), key=lambda x: x[0][1]): + if g == group: + layers.append(l) + vals.append(v['mean']) + if layers: + ax.plot(layers, vals, '-', color=SCALE_COLORS.get(scale, 'gray'), + label=SCALE_DISPLAY_NAMES.get(scale, scale), linewidth=2) + ax.set_xlabel('Layer Index') + ax.set_ylabel('Consistency') + ax.set_title(group, fontweight='bold') + ax.legend(fontsize=9) + ax.grid(True, alpha=0.3) + + fig.suptitle(f'{model_type.upper()} - {title_prefix} Consistency Across Scales', + fontsize=15, fontweight='bold', y=1.02) + plt.tight_layout() + plt.savefig(save_path, dpi=300, bbox_inches='tight') + plt.close() + logger.info(f"Saved: {save_path}") + + +def plot_cross_scale_within_cat_consistency(all_within_cat, model_type, save_path): + """Cross-scale within-category consistency.""" + fig, axes = plt.subplots(2, 3, figsize=(21, 12)) + + for idx, cat in enumerate(CATEGORY_ORDER): + ax = axes[idx // 3][idx % 3] + for scale in SCALE_ORDER: + if scale not in all_within_cat: + continue + wc = all_within_cat[scale] + layers, vals = [], [] + for (c, l), v in sorted(wc.items(), key=lambda x: x[0][1]): + if c == cat: + layers.append(l) + vals.append(v['mean']) + if layers: + ax.plot(layers, vals, '-', color=SCALE_COLORS.get(scale, 'gray'), + label=SCALE_DISPLAY_NAMES.get(scale, scale), linewidth=2) + ax.set_xlabel('Layer Index') + ax.set_ylabel('Consistency') + ax.set_title(cat, fontweight='bold') + ax.legend(fontsize=8) + ax.grid(True, alpha=0.3) + + fig.suptitle(f'{model_type.upper()} - Within-Category Consistency Across Scales', + fontsize=15, fontweight='bold', y=1.02) + plt.tight_layout() + plt.savefig(save_path, dpi=300, bbox_inches='tight') + plt.close() + logger.info(f"Saved: {save_path}") + + +def plot_cross_scale_alignment(all_alignment, model_type, save_path): + fig, ax = plt.subplots(figsize=(12, 6)) + for scale in SCALE_ORDER: + if scale not in all_alignment: + continue + alignment = all_alignment[scale] + layers = sorted(alignment.keys()) + vals = [alignment[l]['per_sample_mean'] for l in layers] + ax.plot(layers, vals, '-', color=SCALE_COLORS.get(scale, 'gray'), + label=SCALE_DISPLAY_NAMES.get(scale, scale), linewidth=2) + ax.set_xlabel('Layer Index') + ax.set_ylabel('cos(d_vert, d_dist)') + ax.set_title(f'{model_type.upper()} - Cross-Group Alignment Across Scales\n' + f'(High=entangled, Low=disentangled)', fontweight='bold') + ax.legend(fontsize=10) + ax.grid(True, alpha=0.3) + plt.tight_layout() + plt.savefig(save_path, dpi=300, bbox_inches='tight') + plt.close() + logger.info(f"Saved: {save_path}") + + +# Fix 7: Delta-based trajectory (cross-layer, per-scale) + +def plot_delta_trajectory(all_delta_heatmaps, model_type, save_path): + """Cross-layer trajectory of delta-based similarities for key pairs.""" + pairs = [ + ('above', 'far', 'above-far'), ('below', 'close', 'below-close'), + ('left', 'right', 'left-right'), + ] + fig, axes = plt.subplots(1, len(pairs), figsize=(7 * len(pairs), 6)) + if len(pairs) == 1: + axes = [axes] + + for idx, (cat1, cat2, label) in enumerate(pairs): + ax = axes[idx] + for scale in SCALE_ORDER: + if scale not in all_delta_heatmaps: + continue + hm = all_delta_heatmaps[scale] + layers = sorted(hm.keys()) + vals = [] + valid_layers = [] + for l in layers: + df = hm[l] + if df is not None and cat1 in df.index and cat2 in df.columns: + valid_layers.append(l) + vals.append(df.loc[cat1, cat2]) + if valid_layers: + ax.plot(valid_layers, vals, '-', color=SCALE_COLORS.get(scale, 'gray'), + label=SCALE_DISPLAY_NAMES.get(scale, scale), linewidth=2) + ax.set_xlabel('Layer Index') + ax.set_ylabel('Delta Cosine Similarity') + ax.set_title(label, fontweight='bold') + ax.legend(fontsize=9) + ax.grid(True, alpha=0.3) + ax.axhline(y=0, color='gray', linestyle='--', alpha=0.5) + + fig.suptitle(f'{model_type.upper()} - Delta-Based Similarity Trajectory', + fontsize=15, fontweight='bold', y=1.02) + plt.tight_layout() + plt.savefig(save_path, dpi=300, bbox_inches='tight') + plt.close() + logger.info(f"Saved: {save_path}") + + +def plot_summary_barplot(all_consistency, all_alignment, model_type, save_path): + available_scales = [s for s in SCALE_ORDER if s in all_consistency] + if not available_scales: + return + + sample_cons = all_consistency[available_scales[0]] + max_layer = max(l for (_, l) in sample_cons.keys()) + + fig, axes = plt.subplots(1, 2, figsize=(16, 6)) + + ax = axes[0] + x = np.arange(len(GROUP_ORDER)) + width = 0.8 / len(available_scales) + for i, scale in enumerate(available_scales): + cons = all_consistency[scale] + vals = [cons.get((g, max_layer), {}).get('mean', 0) for g in GROUP_ORDER] + offset = (i - len(available_scales) / 2 + 0.5) * width + ax.bar(x + offset, vals, width, + label=SCALE_DISPLAY_NAMES.get(scale, scale), + color=SCALE_COLORS.get(scale, 'gray')) + ax.set_xticks(x) + ax.set_xticklabels(GROUP_ORDER) + ax.set_ylabel('Sign-Corrected Consistency') + ax.set_title(f'Consistency at Layer {max_layer}', fontweight='bold') + ax.legend(fontsize=8) + ax.grid(True, alpha=0.3, axis='y') + + ax = axes[1] + available_align = [s for s in available_scales if s in all_alignment] + if available_align: + vals = [all_alignment[s].get(max_layer, {}).get('per_sample_mean', 0) for s in available_align] + colors = [SCALE_COLORS.get(s, 'gray') for s in available_align] + ax.bar(range(len(vals)), vals, color=colors) + ax.set_xticks(range(len(vals))) + ax.set_xticklabels([SCALE_DISPLAY_NAMES.get(s, s) for s in available_align]) + ax.set_ylabel('cos(d_vert, d_dist)') + ax.set_title(f'Cross-Group Alignment at L{max_layer}\n(Lower=disentangled)', fontweight='bold') + ax.grid(True, alpha=0.3, axis='y') + + fig.suptitle(f'{model_type.upper()} - Summary at Deepest Layer', fontsize=15, fontweight='bold', y=1.02) + plt.tight_layout() + plt.savefig(save_path, dpi=300, bbox_inches='tight') + plt.close() + logger.info(f"Saved: {save_path}") + + +# ============================================================================ +# Main Pipeline +# ============================================================================ + +def process_scale(args, scale, swap_pairs, quads): + # Resolve model path from the correct config dict + if args.model_type in MODEL_CONFIGS_NEW: + cls_name, model_path = MODEL_CONFIGS_NEW[args.model_type][scale] + else: + model_path = MODEL_CONFIGS[args.model_type][scale] + cls_name = None + + logger.info(f"\n{'='*60}") + logger.info(f"Processing {args.model_type} - {scale}" + + (f" [{cls_name}]" if cls_name else "")) + logger.info(f"Model path: {model_path}") + logger.info(f"{'='*60}") + + extractor = get_extractor(args.model_type, model_path, scale=scale, device=args.device) + target_layers = extractor.target_layers + + output_dir = os.path.join(args.output_dir, args.model_type) + plots_dir = os.path.join(output_dir, 'plots') + os.makedirs(plots_dir, exist_ok=True) + + # ── Phase A: Extract swap pair features ─────────────────────────────────── + logger.info("\n--- Phase A: Extracting swap pair features ---") + swap_records = extract_swap_features(extractor, swap_pairs, + max_samples_per_category=args.max_samples_per_category) + + # ── Phase C_A: Analysis of swap-pair data ───────────────────────────────── + logger.info("\n--- Phase C_A: Analysis (swap pairs) ---") + + category_validity = check_category_validity(swap_records, scale) + unreliable_cats = [c for c, v in category_validity.items() if not v['reliable']] + if unreliable_cats: + logger.warning(f" Unreliable categories: {unreliable_cats}") + + within_cat_all, sign_corrected_all = compute_delta_consistency(swap_records, target_layers) + + both_correct_records = filter_both_correct(swap_records) + logger.info(f" Both-correct pairs: {len(both_correct_records)}/{len(swap_records)}") + within_cat_bc, sign_corrected_bc = compute_delta_consistency(both_correct_records, target_layers) + + pred_stats = compute_prediction_stats(swap_records, scale) + + delta_heatmaps_all = {} + delta_heatmaps_bc = {} + for layer in target_layers: + delta_heatmaps_all[layer] = compute_delta_similarity_matrix(swap_records, layer) + if both_correct_records: + delta_heatmaps_bc[layer] = compute_delta_similarity_matrix(both_correct_records, layer) + + # Log Phase A key results + max_layer = max(target_layers) + for group in GROUP_ORDER: + key = (group, max_layer) + if key in sign_corrected_all: + logger.info(f" Sign-corrected [{group}, L{max_layer}]: " + f"{sign_corrected_all[key]['mean']:.4f} +/- {sign_corrected_all[key]['std']:.4f}") + logger.info(f" Accuracy orig={pred_stats['overall_acc_orig']:.1%}, " + f"swap={pred_stats['overall_acc_swap']:.1%}, " + f"both={pred_stats['overall_acc_both']:.1%}") + + # ── Phase D_A: Save Phase A results ─────────────────────────────────────── + logger.info("\n--- Phase D_A: Saving Phase A results ---") + + save_vectors_npz(scale, swap_records, target_layers, output_dir) + + save_scale_results( + scale, swap_records, [], + within_cat_all, sign_corrected_all, + {}, pred_stats, target_layers, + category_validity, delta_heatmaps_all, + output_dir, both_correct_tag='all_pairs', + save_alignment=False, + ) + if both_correct_records: + save_scale_results( + scale, both_correct_records, [], + within_cat_bc, sign_corrected_bc, + {}, pred_stats, target_layers, + category_validity, delta_heatmaps_bc, + output_dir, both_correct_tag='both_correct', + save_alignment=False, + ) + + # ── Phase E_A: Per-scale plots from Phase A data ─────────────────────────── + logger.info("\n--- Phase E_A: Per-scale plots (swap-pair data) ---") + + for condition, wc_data, sc_data in [ + ('all', within_cat_all, sign_corrected_all), + ('both_correct', within_cat_bc, sign_corrected_bc), + ]: + if condition == 'both_correct' and not both_correct_records: + continue + + cond_dir = os.path.join(plots_dir, condition) + os.makedirs(cond_dir, exist_ok=True) + + wc_dir = os.path.join(cond_dir, 'within_cat_consistency') + sc_dir = os.path.join(cond_dir, 'sign_corrected') + os.makedirs(wc_dir, exist_ok=True) + os.makedirs(sc_dir, exist_ok=True) + + plot_within_cat_consistency_trajectory( + wc_data, scale, args.model_type, + os.path.join(wc_dir, f'within_cat_consistency_{scale}.png')) + + plot_sign_corrected_consistency_trajectory( + sc_data, scale, args.model_type, + os.path.join(sc_dir, f'sign_corrected_consistency_{scale}.png')) + + # PCA (from full NPZ) — 2D and 3D, all-pairs and both-correct + npz_path = os.path.join(output_dir, 'npz', f'vectors_{scale}.npz') + if os.path.exists(npz_path): + pca_dir = os.path.join(plots_dir, 'all', 'pca') + pca_3d_dir = os.path.join(plots_dir, 'all', 'pca_3d') + bc_pca_dir = os.path.join(plots_dir, 'both_correct', 'pca') + bc_pca_3d_dir = os.path.join(plots_dir, 'both_correct', 'pca_3d') + for d in (pca_dir, pca_3d_dir, bc_pca_dir, bc_pca_3d_dir): + os.makedirs(d, exist_ok=True) + plot_pca_embeddings(npz_path, scale, args.model_type, pca_dir) + plot_pca_3d(npz_path, scale, args.model_type, pca_3d_dir) + plot_pca_embeddings(npz_path, scale, args.model_type, bc_pca_dir, bc_only=True) + plot_pca_3d(npz_path, scale, args.model_type, bc_pca_3d_dir, bc_only=True) + + if pred_stats: + pred_plot_dir = os.path.join(plots_dir, 'all', 'pred_stats') + os.makedirs(pred_plot_dir, exist_ok=True) + plot_pred_stats_bars([pred_stats], args.model_type, + os.path.join(pred_plot_dir, f'pred_stats_{scale}.png')) + + # ── Phase B: Extract cross-group features ───────────────────────────────── + skip_b = getattr(args, 'skip_phase_b', False) + if skip_b or not quads: + if skip_b: + logger.info("\n--- Phase B: Cross-group extraction [SKIPPED: --skip-phase-b] ---") + quad_records = [] + cross_alignment = {} + else: + logger.info("\n--- Phase B: Extracting cross-group features ---") + quad_records = extract_cross_group_features(extractor, quads) + + # ── Phase C_B: Cross-group analysis ─────────────────────────────────── + logger.info("\n--- Phase C_B: Analysis (cross-group) ---") + cross_alignment = compute_cross_group_alignment(quad_records, target_layers) + + if max_layer in cross_alignment: + ca = cross_alignment[max_layer] + logger.info(f" Cross-group alignment L{max_layer}: " + f"{ca['per_sample_mean']:.4f} (perm={ca['permutation_mean']:.4f})") + + # ── Phase D_B: Save Phase B results ─────────────────────────────────── + logger.info("\n--- Phase D_B: Saving Phase B results ---") + save_cross_group_npz(scale, quad_records, target_layers, output_dir) + save_cross_alignment(scale, cross_alignment, output_dir) + + # ── Phase E_B: Cross-alignment plots ────────────────────────────────── + logger.info("\n--- Phase E_B: Per-scale plots (cross-group data) ---") + for condition in ['all', 'both_correct']: + if condition == 'both_correct' and not both_correct_records: + continue + ca_dir = os.path.join(plots_dir, condition, 'cross_alignment') + os.makedirs(ca_dir, exist_ok=True) + plot_cross_group_alignment_trajectory( + cross_alignment, scale, args.model_type, + os.path.join(ca_dir, f'cross_alignment_{scale}.png')) + + # Cleanup + del swap_records, quad_records, both_correct_records + extractor.cleanup() + + logger.info(f"\n Scale {scale} complete.") + + +# ============================================================================ +# Accuracy Chart (integrated from accuracy_chart.py) +# ============================================================================ + +def _acc_plot_group_bars(pred_stats, model_type, ax_list): + available = [s for s in SCALE_ORDER if any(d['scale'] == s for d in pred_stats)] + x = np.arange(3) + width = 0.8 / max(len(available), 1) + for idx, group in enumerate(GROUP_ORDER): + ax = ax_list[idx] + for i, scale in enumerate(available): + entry = next((d for d in pred_stats if d['scale'] == scale), None) + if entry is None: + continue + vals = [entry.get(f'{group}_acc_orig', 0), + entry.get(f'{group}_acc_swap', 0), + entry.get(f'{group}_acc_both', 0)] + offset = (i - len(available) / 2 + 0.5) * width + ax.bar(x + offset, vals, width, label=scale, + color=SCALE_COLORS.get(scale, 'gray'), alpha=0.85) + ax.set_xticks(x) + ax.set_xticklabels(['orig', 'swap', 'both'], fontsize=10) + ax.set_ylabel('Accuracy', fontsize=9) + ax.set_title(group.capitalize(), fontweight='bold', fontsize=11, + color=GROUP_COLORS.get(group, 'black')) + ax.legend(fontsize=7, ncol=2) + ax.set_ylim(0, 1.15) + ax.axhline(y=0.5, color='gray', linestyle='--', alpha=0.5, linewidth=1) + ax.grid(True, alpha=0.3, axis='y') + + +def _acc_plot_both_trajectory(pred_stats, model_type, ax): + available = [s for s in SCALE_ORDER if any(d['scale'] == s for d in pred_stats)] + x_ticks = range(len(available)) + for group in GROUP_ORDER: + y_vals = [next((d for d in pred_stats if d['scale'] == s), {}).get(f'{group}_acc_both', 0) + for s in available] + ax.plot(x_ticks, y_vals, '-o', color=GROUP_COLORS.get(group, 'gray'), + label=group, linewidth=2.5, markersize=7) + y_overall = [next((d for d in pred_stats if d['scale'] == s), {}).get('overall_acc_both', 0) + for s in available] + ax.plot(x_ticks, y_overall, '--s', color='black', label='overall', + linewidth=2, markersize=6, alpha=0.7) + ax.set_xticks(list(x_ticks)) + ax.set_xticklabels(available, fontsize=9) + ax.set_xlabel('Scale', fontsize=9) + ax.set_ylabel('Accuracy (both correct)', fontsize=9) + ax.set_title('Both-Correct Accuracy Trajectory', fontweight='bold', fontsize=11) + ax.legend(fontsize=9) + ax.set_ylim(0, 1.05) + ax.axhline(y=0.5, color='gray', linestyle='--', alpha=0.5, linewidth=1) + ax.grid(True, alpha=0.3) + + +def _acc_plot_overall_trajectory(pred_stats, model_type, ax): + available = [s for s in SCALE_ORDER if any(d['scale'] == s for d in pred_stats)] + x_ticks = range(len(available)) + for metric, label, ls in [ + ('overall_acc_orig', 'orig', '-o'), + ('overall_acc_swap', 'swap', '-s'), + ('overall_acc_both', 'both', '-^'), + ]: + y_vals = [next((d for d in pred_stats if d['scale'] == s), {}).get(metric, 0) + for s in available] + ax.plot(x_ticks, y_vals, ls, label=label, linewidth=2.2, markersize=6) + ax.set_xticks(list(x_ticks)) + ax.set_xticklabels(available, fontsize=9) + ax.set_xlabel('Scale', fontsize=9) + ax.set_ylabel('Overall Accuracy', fontsize=9) + ax.set_title('Overall Accuracy Trajectory', fontweight='bold', fontsize=11) + ax.legend(fontsize=9) + ax.set_ylim(0, 1.05) + ax.axhline(y=0.5, color='gray', linestyle='--', alpha=0.5, linewidth=1) + ax.grid(True, alpha=0.3) + + +def _acc_plot_category_accuracy(cat_validity, model_type, ax_orig, ax_swap, pred_stats=None): + available = [s for s in SCALE_ORDER if s in cat_validity] + cats_with_overall = CATEGORY_ORDER + ['overall'] + x = np.arange(len(cats_with_overall)) + width = 0.8 / max(len(available), 1) + overall_key = {'acc_orig': 'overall_acc_orig', 'acc_swap': 'overall_acc_swap'} + for ax, metric, title in [ + (ax_orig, 'acc_orig', 'Per-Category Accuracy (orig)'), + (ax_swap, 'acc_swap', 'Per-Category Accuracy (swap)'), + ]: + for i, scale in enumerate(available): + cv = cat_validity[scale] + vals = [cv.get(cat, {}).get(metric, 0) for cat in CATEGORY_ORDER] + if pred_stats is not None: + entry = next((d for d in pred_stats if d['scale'] == scale), None) + vals.append(entry.get(overall_key[metric], 0) if entry else 0) + else: + vals.append(0) + offset = (i - len(available) / 2 + 0.5) * width + ax.bar(x + offset, vals, width, label=scale, + color=SCALE_COLORS.get(scale, 'gray'), alpha=0.85) + for j, cat in enumerate(CATEGORY_ORDER): + ax.axvspan(j - 0.45, j + 0.45, color=CAT_COLORS.get(cat, 'gray'), alpha=0.06, linewidth=0) + ax.axvline(x=len(CATEGORY_ORDER) - 0.5, color='black', linewidth=1.2, linestyle=':', alpha=0.6) + ax.set_xticks(x) + ax.set_xticklabels(cats_with_overall, fontsize=9, rotation=15) + ax.set_ylabel('Accuracy', fontsize=9) + ax.set_title(title, fontweight='bold', fontsize=11) + ax.legend(fontsize=7, ncol=2) + ax.set_ylim(0, 1.15) + ax.axhline(y=0.5, color='gray', linestyle='--', alpha=0.5, linewidth=1) + ax.grid(True, alpha=0.3, axis='y') + if available: + last_cv = cat_validity[available[-1]] + for j, cat in enumerate(CATEGORY_ORDER): + if not last_cv.get(cat, {}).get('reliable', True): + ax.text(j, 1.08, '✗', ha='center', va='center', + fontsize=9, color='red', fontweight='bold') + + +def _acc_plot_category_per_scale(cat_validity, model_type, save_dir, pred_stats=None): + cats_with_overall = CATEGORY_ORDER + ['overall'] + overall_key = {'acc_orig': 'overall_acc_orig', 'acc_swap': 'overall_acc_swap'} + for scale in sorted(cat_validity.keys(), + key=lambda s: SCALE_ORDER.index(s) if s in SCALE_ORDER else 99): + cv = cat_validity[scale] + ps_entry = next((d for d in pred_stats if d['scale'] == scale), None) if pred_stats else None + fig, axes = plt.subplots(1, 2, figsize=(16, 5)) + x = np.arange(len(cats_with_overall)) + width = 0.55 + for ax, metric, title in [ + (axes[0], 'acc_orig', f'acc_orig ({scale})'), + (axes[1], 'acc_swap', f'acc_swap ({scale})'), + ]: + vals = [cv.get(cat, {}).get(metric, 0) for cat in CATEGORY_ORDER] + overall_val = ps_entry.get(overall_key[metric], 0) if ps_entry else 0 + vals.append(overall_val) + colors = [CAT_COLORS.get(cat, 'gray') for cat in CATEGORY_ORDER] + ['#333333'] + bars = ax.bar(x, vals, width, color=colors, alpha=0.85, edgecolor='white') + ax.axvline(x=len(CATEGORY_ORDER) - 0.5, color='black', + linewidth=1.2, linestyle=':', alpha=0.6) + ax.set_xticks(x) + ax.set_xticklabels(cats_with_overall, fontsize=10) + ax.set_ylabel('Accuracy', fontsize=10) + ax.set_title(title, fontweight='bold', fontsize=12) + ax.set_ylim(0, 1.15) + ax.axhline(y=0.5, color='gray', linestyle='--', alpha=0.5) + ax.grid(True, alpha=0.3, axis='y') + for bar, cat in zip(bars, cats_with_overall): + reliable = cv.get(cat, {}).get('reliable', True) if cat != 'overall' else True + h = bar.get_height() + ax.text(bar.get_x() + bar.get_width() / 2, h + 0.02, + f'{h:.2f}' + ('' if reliable else ' ✗'), + ha='center', va='bottom', fontsize=8, + color='red' if not reliable else 'black') + fig.suptitle(f'{model_type.upper()} - Category Accuracy ({scale})', + fontsize=13, fontweight='bold') + plt.tight_layout() + out = os.path.join(save_dir, f'category_accuracy_{scale}.png') + plt.savefig(out, dpi=200, bbox_inches='tight') + plt.close() + logger.info(f"Saved: {out}") + + +def run_accuracy_charts(pred_stats, cat_validity, model_type, save_dir): + """Generate all accuracy chart plots into save_dir.""" + os.makedirs(save_dir, exist_ok=True) + + # Group bars + fig, axes = plt.subplots(1, 3, figsize=(21, 6)) + _acc_plot_group_bars(pred_stats, model_type, axes) + fig.suptitle(f'{model_type.upper()} - Prediction Accuracy by Group', + fontsize=15, fontweight='bold') + plt.tight_layout() + plt.savefig(os.path.join(save_dir, 'accuracy_group_bars.png'), dpi=200, bbox_inches='tight') + plt.close() + logger.info(f"Saved: {os.path.join(save_dir, 'accuracy_group_bars.png')}") + + # Trajectory + fig, axes = plt.subplots(1, 2, figsize=(16, 6)) + _acc_plot_both_trajectory(pred_stats, model_type, axes[0]) + _acc_plot_overall_trajectory(pred_stats, model_type, axes[1]) + fig.suptitle(f'{model_type.upper()} - Accuracy Trajectory Across Scales', + fontsize=14, fontweight='bold') + plt.tight_layout() + plt.savefig(os.path.join(save_dir, 'accuracy_trajectory.png'), dpi=200, bbox_inches='tight') + plt.close() + logger.info(f"Saved: {os.path.join(save_dir, 'accuracy_trajectory.png')}") + + if cat_validity: + # Category bars (all scales overlay) + fig, axes = plt.subplots(1, 2, figsize=(20, 6)) + _acc_plot_category_accuracy(cat_validity, model_type, axes[0], axes[1], + pred_stats=pred_stats) + fig.suptitle(f'{model_type.upper()} - Per-Category Accuracy Across Scales', + fontsize=14, fontweight='bold') + plt.tight_layout() + plt.savefig(os.path.join(save_dir, 'accuracy_category.png'), dpi=200, bbox_inches='tight') + plt.close() + logger.info(f"Saved: {os.path.join(save_dir, 'accuracy_category.png')}") + + # Per-scale category bars + _acc_plot_category_per_scale(cat_validity, model_type, save_dir, pred_stats=pred_stats) + + # Combined accuracy_chart.png + fig = plt.figure(figsize=(24, 14)) + ax_h = fig.add_subplot(3, 3, 1) + ax_v = fig.add_subplot(3, 3, 2) + ax_d = fig.add_subplot(3, 3, 3) + _acc_plot_group_bars(pred_stats, model_type, [ax_h, ax_v, ax_d]) + ax_tb = fig.add_subplot(3, 3, 4) + ax_to = fig.add_subplot(3, 3, 5) + _acc_plot_both_trajectory(pred_stats, model_type, ax_tb) + _acc_plot_overall_trajectory(pred_stats, model_type, ax_to) + ax_note = fig.add_subplot(3, 3, 6) + ax_note.axis('off') + available_scales = [s for s in SCALE_ORDER if any(d['scale'] == s for d in pred_stats)] + ax_note.text(0.1, 0.6, + f'Scales: {", ".join(available_scales)}\n\n✗ = unreliable category\n-- = 0.5 chance level', + transform=ax_note.transAxes, fontsize=11, va='top', family='monospace') + if cat_validity: + ax_co = fig.add_subplot(3, 2, 5) + ax_cs = fig.add_subplot(3, 2, 6) + _acc_plot_category_accuracy(cat_validity, model_type, ax_co, ax_cs, pred_stats=pred_stats) + fig.suptitle(f'{model_type.upper()} — Accuracy Summary', + fontsize=17, fontweight='bold', y=1.01) + plt.tight_layout() + plt.savefig(os.path.join(save_dir, 'accuracy_chart.png'), dpi=200, bbox_inches='tight') + plt.close() + logger.info(f"Saved: {os.path.join(save_dir, 'accuracy_chart.png')}") + + +# ============================================================================ +# Unify Consistency Y-axis (integrated from unify_consistency_ylim.py) +# ============================================================================ + +def _ylim_compute(all_vals, margin_ratio=0.08): + if not all_vals: + return -1, 1 + ymin, ymax = min(all_vals), max(all_vals) + margin = (ymax - ymin) * margin_ratio + return ymin - margin, ymax + margin + + +def _ylim_load_keyed_json(path): + if not os.path.exists(path): + return None + with open(path) as f: + raw = json.load(f) + if not raw: + return None + result = {} + for key, vals in raw.items(): + parts = key.rsplit('_L', 1) + if len(parts) == 2: + result[(parts[0], int(parts[1]))] = vals + return result if result else None + + +def _ylim_load_alignment_json(path): + if not os.path.exists(path): + return None + with open(path) as f: + raw = json.load(f) + if not raw: + return None + result = {int(k[1:]): v for k, v in raw.items() if k.startswith('L')} + return result if result else None + + +def _ylim_plot_sign_corrected(data, scale, model_type, save_path, ylim): + fig, ax = plt.subplots(figsize=(12, 6)) + for group in GROUP_ORDER: + layers, vals = [], [] + for (g, l), v in sorted(data.items(), key=lambda x: x[0][1]): + if g == group: + layers.append(l) + vals.append(v['mean']) + if layers: + ax.plot(layers, vals, '-o', color=GROUP_COLORS[group], + label=group, linewidth=2, markersize=3) + ax.set_ylim(ylim) + ax.set_xlabel('Layer Index') + ax.set_ylabel('Sign-Corrected Consistency') + ax.set_title(f'{model_type.upper()} ({scale}) - Sign-Corrected Group Consistency', + fontweight='bold') + ax.legend(fontsize=11) + ax.grid(True, alpha=0.3) + plt.tight_layout() + plt.savefig(save_path, dpi=300, bbox_inches='tight') + plt.close() + + +def _ylim_plot_within_cat(data, scale, model_type, save_path, ylim): + fig, ax = plt.subplots(figsize=(12, 6)) + for cat in CATEGORY_ORDER: + layers, vals = [], [] + for (c, l), v in sorted(data.items(), key=lambda x: x[0][1]): + if c == cat: + layers.append(l) + vals.append(v['mean']) + if layers: + ax.plot(layers, vals, '-o', color=CAT_COLORS[cat], + label=cat, linewidth=2, markersize=3) + ax.set_ylim(ylim) + ax.set_xlabel('Layer Index') + ax.set_ylabel('Within-Category Consistency') + ax.set_title(f'{model_type.upper()} ({scale}) - Within-Category Delta Consistency', + fontweight='bold') + ax.legend(fontsize=9) + ax.grid(True, alpha=0.3) + plt.tight_layout() + plt.savefig(save_path, dpi=300, bbox_inches='tight') + plt.close() + + +def _ylim_plot_cross_alignment(data, scale, model_type, save_path, ylim): + fig, ax = plt.subplots(figsize=(12, 6)) + layers = sorted(data.keys()) + ax.plot(layers, [data[l]['per_sample_mean'] for l in layers], '-o', color='#d62728', + label='cos(d_vert, d_dist) per-sample mean', linewidth=2.5, markersize=3) + ax.plot(layers, [data[l]['mean_delta_alignment'] for l in layers], '--s', color='#e377c2', + label='cos(mean_d_vert, mean_d_dist)', linewidth=1.5, markersize=3) + perm_mean = [data[l]['permutation_mean'] for l in layers] + perm_std = [data[l]['permutation_std'] for l in layers] + ax.plot(layers, perm_mean, ':', color='gray', label='permutation control', linewidth=1.5) + ax.fill_between(layers, + [m - 2*s for m, s in zip(perm_mean, perm_std)], + [m + 2*s for m, s in zip(perm_mean, perm_std)], + alpha=0.2, color='gray') + ax.set_ylim(ylim) + ax.set_xlabel('Layer Index') + ax.set_ylabel('Cosine Alignment') + ax.set_title(f'{model_type.upper()} ({scale}) - Cross-Group Alignment (Perspective Bias)', + fontweight='bold') + ax.legend(fontsize=9) + ax.grid(True, alpha=0.3) + plt.tight_layout() + plt.savefig(save_path, dpi=300, bbox_inches='tight') + plt.close() + + +def _ylim_process_plot_type(data_dir, plots_dir, conditions, model_type, + plot_name, json_pattern, loader, val_gatherer, plotter, + subfolder=None): + """Re-plot one plot type across all conditions with a unified y-axis.""" + logger.info(f" [unify ylim] {plot_name}") + for condition, condition_tag in conditions: + cond_plot_dir = os.path.join(plots_dir, condition) + if not os.path.isdir(cond_plot_dir): + continue + save_dir = os.path.join(cond_plot_dir, subfolder) if subfolder else cond_plot_dir + os.makedirs(save_dir, exist_ok=True) + all_data = {} + for scale in SCALE_ORDER: + path = os.path.join(data_dir, 'json', + json_pattern.format(scale=scale, tag=condition_tag)) + loaded = loader(path) + if loaded: + all_data[scale] = loaded + if not all_data: + continue + all_vals = val_gatherer(all_data) + ylim = _ylim_compute(all_vals) + for scale, data in all_data.items(): + save_path = os.path.join(save_dir, f'{plot_name}_{scale}.png') + plotter(data, scale, model_type, save_path, ylim) + logger.info(f" {condition}: y=[{ylim[0]:.4f}, {ylim[1]:.4f}], {len(all_data)} scales") + + +def run_unify_ylim(data_dir, plots_dir, model_type): + """Unify y-axis for sign_corrected, within_cat, and cross_alignment plots.""" + conditions = [ + ('all', 'all_pairs'), + ('both_correct', 'both_correct'), + ] + + def gather_keyed(all_data): + return [v['mean'] for data in all_data.values() for v in data.values()] + + def gather_alignment(all_data): + vals = [] + for data in all_data.values(): + for v in data.values(): + vals += [v['per_sample_mean'], v['mean_delta_alignment'], + v['permutation_mean'] + 2 * v['permutation_std'], + v['permutation_mean'] - 2 * v['permutation_std']] + return vals + + _ylim_process_plot_type( + data_dir, plots_dir, conditions, model_type, + plot_name='sign_corrected_consistency', + json_pattern='sign_corrected_consistency_{scale}_{tag}.json', + loader=_ylim_load_keyed_json, + val_gatherer=gather_keyed, + plotter=_ylim_plot_sign_corrected, + subfolder='sign_corrected', + ) + _ylim_process_plot_type( + data_dir, plots_dir, conditions, model_type, + plot_name='within_cat_consistency', + json_pattern='within_cat_consistency_{scale}_{tag}.json', + loader=_ylim_load_keyed_json, + val_gatherer=gather_keyed, + plotter=_ylim_plot_within_cat, + subfolder='within_cat_consistency', + ) + _ylim_process_plot_type( + data_dir, plots_dir, conditions, model_type, + plot_name='cross_alignment', + json_pattern='cross_alignment_{scale}.json', + loader=_ylim_load_alignment_json, + val_gatherer=gather_alignment, + plotter=_ylim_plot_cross_alignment, + subfolder='cross_alignment', + ) + + +def _check_merge_only_sources(output_dir: str, model_type: str) -> bool: + """Verify required source directories have data for a merge-only model_type. + Returns True if all sources look healthy, False (with warnings) if not. + """ + mc = MERGE_ONLY_CONFIGS[model_type] + ok = True + for req_dir in mc['required_dirs']: + src_path = os.path.join(output_dir, req_dir) + json_dir = os.path.join(src_path, 'json') + if not os.path.isdir(src_path): + if req_dir in MODEL_CONFIGS_NEW: + hint = f"python swap_analysis.py --model_type {req_dir}" + else: + hint = f"python swap_analysis.py --model_type {req_dir}" + logger.warning( + f"[{model_type}] Required source directory not found: {src_path}\n" + f" → Run inference first: {hint}" + ) + ok = False + elif not os.path.isdir(json_dir) or not any( + f.startswith('pred_stats_') for f in os.listdir(json_dir) + ): + logger.warning( + f"[{model_type}] Source directory exists but has no pred_stats JSON: {json_dir}\n" + f" → Inference may not have completed for '{req_dir}'." + ) + ok = False + else: + scales_found = [ + f.replace('pred_stats_', '').replace('.json', '') + for f in os.listdir(json_dir) + if f.startswith('pred_stats_') + ] + logger.info(f" [{req_dir}] found scales: {scales_found}") + return ok + + +def _load_scale_data_multi(output_dir: str, model_type: str, scale: str, scale_sources: dict): + """Load per-scale data for one scale, looking in the correct source directory. + + Returns (sc, sc_bc, wc, wc_bc, align, pred_stat, cat_validity, dh, dh_bc). + Any unavailable item is None / {}. + """ + src_dir = os.path.join(output_dir, scale_sources.get(scale, model_type)) + + sc = load_scale_consistency(src_dir, scale, 'all_pairs') + sc_bc = load_scale_consistency(src_dir, scale, 'both_correct') + wc = load_within_cat_consistency(src_dir, scale, 'all_pairs') + wc_bc = load_within_cat_consistency(src_dir, scale, 'both_correct') + align = load_scale_alignment(src_dir, scale) + + pred_stat = None + pred_path = os.path.join(src_dir, 'json', f'pred_stats_{scale}.json') + if os.path.exists(pred_path): + with open(pred_path) as f: + pred_stat = json.load(f) + + cat_validity = None + cv_path = os.path.join(src_dir, 'json', f'category_validity_{scale}.json') + if os.path.exists(cv_path): + with open(cv_path) as f: + cat_validity = json.load(f) + + dh = load_delta_heatmaps(src_dir, scale, 'all_pairs') + dh_bc = load_delta_heatmaps(src_dir, scale, 'both_correct') + + return sc, sc_bc, wc, wc_bc, align, pred_stat, cat_validity, dh, dh_bc + + +# --------------------------------------------------------------------------- +# All-layer heatmap + PCA helpers (called from run_merge / run_merge_extended) +# --------------------------------------------------------------------------- + +def _get_csv_layers(csv_dir: str, scale: str, tag: str) -> list: + """Return sorted list of layer indices that have a delta_similarity CSV.""" + import glob as _glob + pattern = os.path.join(csv_dir, f'delta_similarity_{scale}_L*_{tag}.csv') + layers = [] + for fpath in _glob.glob(pattern): + m = re.search( + rf'delta_similarity_{re.escape(scale)}_L(\d+)_{re.escape(tag)}\.csv$', + os.path.basename(fpath)) + if m: + layers.append(int(m.group(1))) + return sorted(layers) + + +def run_all_layer_heatmaps(model_dir: str, model_type: str, scales: list): + """Generate delta-similarity heatmaps for ALL layers from pre-computed CSVs. + + Reads {model_dir}/csv/delta_similarity_{scale}_L{n}_{tag}.csv + Writes {model_dir}/plots/all/heatmap/heatmap_{scale}_L{n}.png (all_pairs) + {model_dir}/plots/both_correct/heatmap/heatmap_{scale}_L{n}.png (both_correct) + + Skips a scale if the NPZ is missing or any all_pairs CSV is absent + (indicates inference was not fully completed for that scale). + """ + TAG_TO_DIR = { + 'all_pairs': os.path.join(model_dir, 'plots', 'all', 'heatmap'), + 'both_correct': os.path.join(model_dir, 'plots', 'both_correct', 'heatmap'), + } + + for scale in scales: + npz_path = os.path.join(model_dir, 'npz', f'vectors_{scale}.npz') + csv_dir = os.path.join(model_dir, 'csv') + + if not os.path.exists(npz_path): + logger.warning(f' [{model_type}/{scale}] NPZ not found, skipping heatmaps.') + continue + + data = np.load(npz_path, allow_pickle=True) + npz_layers = sorted( + int(k.replace('orig_L', '')) + for k in data.files if k.startswith('orig_L') + ) + data.close() + + if not npz_layers: + logger.warning(f' [{model_type}/{scale}] No orig_L* keys in NPZ, skipping heatmaps.') + continue + + csv_layers = _get_csv_layers(csv_dir, scale, 'all_pairs') + missing = set(npz_layers) - set(csv_layers) + if missing: + logger.warning( + f' [{model_type}/{scale}] {len(missing)} NPZ layers lack CSVs ' + f'(e.g. L{sorted(missing)[:5]}). Skipping all-layer heatmaps.') + continue + + for out_dir in TAG_TO_DIR.values(): + os.makedirs(out_dir, exist_ok=True) + + logger.info(f' [{model_type}/{scale}] Generating heatmaps for {len(npz_layers)} layers...') + saved = 0 + for layer in npz_layers: + for tag, out_dir in TAG_TO_DIR.items(): + csv_path = os.path.join(csv_dir, f'delta_similarity_{scale}_L{layer}_{tag}.csv') + if not os.path.exists(csv_path): + continue # both_correct CSV may be absent for some layers + df = pd.read_csv(csv_path, index_col=0) + available = [c for c in CATEGORY_ORDER if c in df.index] + if not available: + continue + df = df.loc[available, available] + title = ( + f'{model_type.upper()} ({scale}) \u2014 Delta Heatmap L{layer} ' + f'({"both-correct" if tag == "both_correct" else "all pairs"})' + ) + out_path = os.path.join(out_dir, f'heatmap_{scale}_L{layer}.png') + plot_delta_heatmap(df, title, out_path) + saved += 1 + logger.info(f' [{model_type}/{scale}] Saved {saved} heatmaps') + + +def run_all_layer_pca(model_dir: str, model_type: str, scales: list): + """Generate 2D and 3D PCA plots for ALL layers from saved NPZ files. + + Writes {model_dir}/plots/all/pca/pca_{scale}_L{n}.png (all pairs) + {model_dir}/plots/all/pca_3d/pca_{scale}_L{n}.png + {model_dir}/plots/both_correct/pca/pca_{scale}_L{n}.png (both-correct only) + {model_dir}/plots/both_correct/pca_3d/pca_{scale}_L{n}.png + """ + for scale in scales: + npz_path = os.path.join(model_dir, 'npz', f'vectors_{scale}.npz') + if not os.path.exists(npz_path): + logger.warning(f' [{model_type}/{scale}] NPZ not found, skipping PCA.') + continue + + # All-pairs PCA + pca_2d_dir = os.path.join(model_dir, 'plots', 'all', 'pca') + pca_3d_dir = os.path.join(model_dir, 'plots', 'all', 'pca_3d') + os.makedirs(pca_2d_dir, exist_ok=True) + os.makedirs(pca_3d_dir, exist_ok=True) + logger.info(f' [{model_type}/{scale}] Generating all-layer 2D PCA...') + plot_pca_embeddings(npz_path, scale, model_type, pca_2d_dir) + logger.info(f' [{model_type}/{scale}] Generating all-layer 3D PCA...') + plot_pca_3d(npz_path, scale, model_type, pca_3d_dir) + + # Both-correct PCA + bc_pca_2d_dir = os.path.join(model_dir, 'plots', 'both_correct', 'pca') + bc_pca_3d_dir = os.path.join(model_dir, 'plots', 'both_correct', 'pca_3d') + os.makedirs(bc_pca_2d_dir, exist_ok=True) + os.makedirs(bc_pca_3d_dir, exist_ok=True) + logger.info(f' [{model_type}/{scale}] Generating both-correct 2D PCA...') + plot_pca_embeddings(npz_path, scale, model_type, bc_pca_2d_dir, bc_only=True) + logger.info(f' [{model_type}/{scale}] Generating both-correct 3D PCA...') + plot_pca_3d(npz_path, scale, model_type, bc_pca_3d_dir, bc_only=True) + + +def run_merge(args): + # Per-scale data is always read from the standard results dir + data_dir = os.path.join(args.output_dir, args.model_type) + # Cross-scale plots go to merge_output_dir if specified, else same as data_dir + output_dir = args.merge_output_dir if args.merge_output_dir else data_dir + plots_dir = os.path.join(output_dir, 'plots') + os.makedirs(plots_dir, exist_ok=True) + + scale_order = ['vanilla', '80k', '400k', '800k', '2m', 'roborefer', '10pct', '20pct', '30pct'] + available_scales = [s for s in scale_order if s in args.scales] + + # Load per-scale results + all_sign_corrected = {} + all_sign_corrected_bc = {} + all_within_cat = {} + all_within_cat_bc = {} + all_alignment = {} + all_pred_stats = [] + all_cat_validity = {} + all_delta_heatmaps = {} + all_delta_heatmaps_bc = {} + + for scale in available_scales: + sc = load_scale_consistency(data_dir, scale, 'all_pairs') + if sc: + all_sign_corrected[scale] = sc + sc_bc = load_scale_consistency(data_dir, scale, 'both_correct') + if sc_bc: + all_sign_corrected_bc[scale] = sc_bc + wc = load_within_cat_consistency(data_dir, scale, 'all_pairs') + if wc: + all_within_cat[scale] = wc + wc_bc = load_within_cat_consistency(data_dir, scale, 'both_correct') + if wc_bc: + all_within_cat_bc[scale] = wc_bc + align = load_scale_alignment(data_dir, scale) + if align: + all_alignment[scale] = align + pred_path = os.path.join(data_dir, 'json', f'pred_stats_{scale}.json') + if os.path.exists(pred_path): + with open(pred_path) as f: + all_pred_stats.append(json.load(f)) + cv_path = os.path.join(data_dir, 'json', f'category_validity_{scale}.json') + if os.path.exists(cv_path): + with open(cv_path) as f: + all_cat_validity[scale] = json.load(f) + dh = load_delta_heatmaps(data_dir, scale, 'all_pairs') + if dh: + all_delta_heatmaps[scale] = dh + dh_bc = load_delta_heatmaps(data_dir, scale, 'both_correct') + if dh_bc: + all_delta_heatmaps_bc[scale] = dh_bc + + logger.info(f" Loaded data for {scale}") + + # Generate cross-scale plots into condition subdirs + for condition, sc_data, wc_data, dh_data, tag_label in [ + ('all', all_sign_corrected, all_within_cat, all_delta_heatmaps, 'all pairs'), + ('both_correct', all_sign_corrected_bc, all_within_cat_bc, all_delta_heatmaps_bc, 'both-correct'), + ]: + cond_dir = os.path.join(plots_dir, condition) + sc_dir = os.path.join(cond_dir, 'sign_corrected') + wc_dir = os.path.join(cond_dir, 'within_cat_consistency') + dt_dir = os.path.join(cond_dir, 'delta_trajectory') + os.makedirs(sc_dir, exist_ok=True) + os.makedirs(wc_dir, exist_ok=True) + os.makedirs(dt_dir, exist_ok=True) + + if len(sc_data) > 1: + plot_cross_scale_consistency( + sc_data, args.model_type, + os.path.join(sc_dir, 'cross_scale_sign_corrected.png'), + title_prefix=f'Sign-Corrected ({tag_label})') + + if len(wc_data) > 1: + plot_cross_scale_within_cat_consistency( + wc_data, args.model_type, + os.path.join(wc_dir, 'cross_scale_within_cat.png')) + + if dh_data: + plot_delta_trajectory(dh_data, args.model_type, + os.path.join(dt_dir, 'delta_trajectory.png')) + + # Cross-scale alignment + pred stats + summary (shared across conditions) + all_cond_dir = os.path.join(plots_dir, 'all') + ca_dir = os.path.join(all_cond_dir, 'cross_alignment') + pred_stats_dir = os.path.join(all_cond_dir, 'pred_stats') + summary_dir = os.path.join(all_cond_dir, 'summary') + os.makedirs(ca_dir, exist_ok=True) + os.makedirs(pred_stats_dir, exist_ok=True) + os.makedirs(summary_dir, exist_ok=True) + + has_phase_b = all(_has_phase_b_data(os.path.join(args.output_dir, args.model_type), s) for s in available_scales) + if has_phase_b and len(all_alignment) > 1: + plot_cross_scale_alignment( + all_alignment, args.model_type, + os.path.join(ca_dir, 'cross_scale_alignment.png')) + + # Prediction stats plots + if all_pred_stats: + plot_pred_stats_bars(all_pred_stats, args.model_type, + os.path.join(pred_stats_dir, 'pred_stats_bars.png')) + plot_pred_stats_trajectory(all_pred_stats, args.model_type, + os.path.join(pred_stats_dir, 'pred_stats_trajectory.png')) + + # Summary barplot + if all_sign_corrected: + plot_summary_barplot( + all_sign_corrected, all_alignment, args.model_type, + os.path.join(summary_dir, 'summary_barplot.png')) + + # Summary CSV + summary_rows = [] + for scale in available_scales: + pred_path = os.path.join(data_dir, 'json', f'pred_stats_{scale}.json') + if os.path.exists(pred_path): + with open(pred_path) as f: + row = json.load(f) + if scale in all_alignment: + max_layer = max(all_alignment[scale].keys()) + row['alignment_deepest'] = all_alignment[scale][max_layer]['per_sample_mean'] + row['alignment_perm'] = all_alignment[scale][max_layer]['permutation_mean'] + summary_rows.append(row) + + if summary_rows: + csv_dir = os.path.join(output_dir, 'csv') + os.makedirs(csv_dir, exist_ok=True) + pd.DataFrame(summary_rows).to_csv(os.path.join(csv_dir, 'summary.csv'), index=False) + + # Accuracy charts + if all_pred_stats: + acc_dir = os.path.join(plots_dir, 'accuracy') + logger.info("\n--- Accuracy Charts ---") + run_accuracy_charts(all_pred_stats, all_cat_validity, args.model_type, acc_dir) + + # Unify y-axis across scales for per-scale trajectory plots + logger.info("\n--- Unifying Y-axis ---") + run_unify_ylim(data_dir, plots_dir, args.model_type) + + # All-layer heatmaps + PCA (from saved CSVs / NPZ) + logger.info("\n--- All-Layer Heatmaps ---") + run_all_layer_heatmaps(data_dir, args.model_type, available_scales) + + logger.info("\n--- All-Layer PCA ---") + run_all_layer_pca(data_dir, args.model_type, available_scales) + + logger.info(f"\n=== Merge Complete ===\nResults in: {output_dir}") + + +def run_merge_extended(args): + """Generate cross-scale plots for new / merge-only model_types. + + - Runnable types (molmo_big, qwen_big, qwen_super, big_trio): + loads all data from results/{model_type}/ and saves plots there. + - Merge-only types (molmo_all, qwen_all): + loads per-scale data from the respective source directories, + saves all cross-scale plots to results/{model_type}/. + """ + is_merge_only = args.model_type in MERGE_ONLY_CONFIGS + + # ── Determine scale order and data source strategy ──────────────────────── + if is_merge_only: + mc = MERGE_ONLY_CONFIGS[args.model_type] + scale_order = mc['scale_order'] + scale_sources = mc['scale_sources'] + + logger.info(f"\n=== MERGE-ONLY mode: {args.model_type} ===") + logger.info("Checking required source directories...") + sources_ok = _check_merge_only_sources(args.output_dir, args.model_type) + if not sources_ok: + logger.warning( + f"\n[WARNING] One or more source directories are missing or incomplete.\n" + f" Cross-scale plots for '{args.model_type}' may be partial.\n" + f" Run the missing model types first (see warnings above), then retry merge." + ) + else: + scale_order = SCALE_ORDERS_NEW.get( + args.model_type, list(MODEL_CONFIGS_NEW[args.model_type])) + scale_sources = None # all data lives in results/{model_type}/ + + available_scales = [s for s in scale_order if s in args.scales] + logger.info(f"Merging scales (in order): {available_scales}") + + out_dir = os.path.join(args.output_dir, args.model_type) + plots_dir = os.path.join(out_dir, 'plots') + os.makedirs(plots_dir, exist_ok=True) + + # ── Load per-scale data ─────────────────────────────────────────────────── + all_sign_corrected = {} + all_sign_corrected_bc = {} + all_within_cat = {} + all_within_cat_bc = {} + all_alignment = {} + all_pred_stats = [] + all_cat_validity = {} + all_delta_heatmaps = {} + all_delta_heatmaps_bc = {} + + for scale in available_scales: + if is_merge_only: + (sc, sc_bc, wc, wc_bc, align, + pred_stat, cat_validity, dh, dh_bc) = _load_scale_data_multi( + args.output_dir, args.model_type, scale, scale_sources) + else: + src_dir = out_dir + sc = load_scale_consistency(src_dir, scale, 'all_pairs') + sc_bc = load_scale_consistency(src_dir, scale, 'both_correct') + wc = load_within_cat_consistency(src_dir, scale, 'all_pairs') + wc_bc = load_within_cat_consistency(src_dir, scale, 'both_correct') + align = load_scale_alignment(src_dir, scale) + + pred_stat = None + pred_path = os.path.join(src_dir, 'json', f'pred_stats_{scale}.json') + if os.path.exists(pred_path): + with open(pred_path) as f: + pred_stat = json.load(f) + + cat_validity = None + cv_path = os.path.join(src_dir, 'json', f'category_validity_{scale}.json') + if os.path.exists(cv_path): + with open(cv_path) as f: + cat_validity = json.load(f) + + dh = load_delta_heatmaps(src_dir, scale, 'all_pairs') + dh_bc = load_delta_heatmaps(src_dir, scale, 'both_correct') + + if sc: + all_sign_corrected[scale] = sc + if sc_bc: + all_sign_corrected_bc[scale] = sc_bc + if wc: + all_within_cat[scale] = wc + if wc_bc: + all_within_cat_bc[scale] = wc_bc + if align: + all_alignment[scale] = align + if pred_stat is not None: + all_pred_stats.append(pred_stat) + if cat_validity is not None: + all_cat_validity[scale] = cat_validity + if dh: + all_delta_heatmaps[scale] = dh + if dh_bc: + all_delta_heatmaps_bc[scale] = dh_bc + + logger.info(f" Loaded data for '{scale}'" + + (f" (from '{scale_sources[scale]}')" if is_merge_only else "")) + + # ── Cross-scale plots ───────────────────────────────────────────────────── + for condition, sc_data, wc_data, dh_data, tag_label in [ + ('all', all_sign_corrected, all_within_cat, all_delta_heatmaps, 'all pairs'), + ('both_correct', all_sign_corrected_bc, all_within_cat_bc, all_delta_heatmaps_bc, 'both-correct'), + ]: + cond_dir = os.path.join(plots_dir, condition) + sc_dir = os.path.join(cond_dir, 'sign_corrected') + wc_dir = os.path.join(cond_dir, 'within_cat_consistency') + dt_dir = os.path.join(cond_dir, 'delta_trajectory') + os.makedirs(sc_dir, exist_ok=True) + os.makedirs(wc_dir, exist_ok=True) + os.makedirs(dt_dir, exist_ok=True) + + if len(sc_data) > 1: + plot_cross_scale_consistency( + sc_data, args.model_type, + os.path.join(sc_dir, 'cross_scale_sign_corrected.png'), + title_prefix=f'Sign-Corrected ({tag_label})') + + if len(wc_data) > 1: + plot_cross_scale_within_cat_consistency( + wc_data, args.model_type, + os.path.join(wc_dir, 'cross_scale_within_cat.png')) + + if dh_data: + plot_delta_trajectory( + dh_data, args.model_type, + os.path.join(dt_dir, 'delta_trajectory.png')) + + # ── Alignment and prediction stats ──────────────────────────────────────── + all_cond_dir = os.path.join(plots_dir, 'all') + ca_dir = os.path.join(all_cond_dir, 'cross_alignment') + pred_stats_dir = os.path.join(all_cond_dir, 'pred_stats') + summary_dir = os.path.join(all_cond_dir, 'summary') + os.makedirs(ca_dir, exist_ok=True) + os.makedirs(pred_stats_dir, exist_ok=True) + os.makedirs(summary_dir, exist_ok=True) + + def _scale_dir_ext(s): + if is_merge_only: + return os.path.join(args.output_dir, scale_sources[s]) + return out_dir + + has_phase_b = all(_has_phase_b_data(_scale_dir_ext(s), s) for s in available_scales) + if has_phase_b and len(all_alignment) > 1: + plot_cross_scale_alignment( + all_alignment, args.model_type, + os.path.join(ca_dir, 'cross_scale_alignment.png')) + + if all_pred_stats: + plot_pred_stats_bars( + all_pred_stats, args.model_type, + os.path.join(pred_stats_dir, 'pred_stats_bars.png')) + plot_pred_stats_trajectory( + all_pred_stats, args.model_type, + os.path.join(pred_stats_dir, 'pred_stats_trajectory.png')) + + if all_sign_corrected: + plot_summary_barplot( + all_sign_corrected, all_alignment, args.model_type, + os.path.join(summary_dir, 'summary_barplot.png')) + + # ── Summary CSV ─────────────────────────────────────────────────────────── + summary_rows = [] + for scale in available_scales: + ps = next((p for p in all_pred_stats if p.get('scale') == scale), None) + if ps is None: + continue + row = dict(ps) + if scale in all_alignment: + max_layer = max(all_alignment[scale].keys()) + row['alignment_deepest'] = all_alignment[scale][max_layer]['per_sample_mean'] + row['alignment_perm'] = all_alignment[scale][max_layer]['permutation_mean'] + summary_rows.append(row) + if summary_rows: + csv_dir = os.path.join(out_dir, 'csv') + os.makedirs(csv_dir, exist_ok=True) + pd.DataFrame(summary_rows).to_csv(os.path.join(csv_dir, 'summary.csv'), index=False) + + # ── Accuracy charts ─────────────────────────────────────────────────────── + if all_pred_stats: + acc_dir = os.path.join(plots_dir, 'accuracy') + logger.info("\n--- Accuracy Charts ---") + run_accuracy_charts(all_pred_stats, all_cat_validity, args.model_type, acc_dir) + + # ── Unify y-axis ────────────────────────────────────────────────────────── + # For merge-only types, per-scale JSON files span multiple source dirs, + # so run_unify_ylim (which expects all JSON in one dir) is skipped. + if not is_merge_only: + logger.info("\n--- Unifying Y-axis ---") + run_unify_ylim(out_dir, plots_dir, args.model_type) + else: + logger.info("\n--- Skipping y-axis unification (per-scale data spans multiple source dirs) ---") + + # ── All-layer heatmaps + PCA ────────────────────────────────────────────── + if not is_merge_only: + logger.info("\n--- All-Layer Heatmaps ---") + run_all_layer_heatmaps(out_dir, args.model_type, available_scales) + logger.info("\n--- All-Layer PCA ---") + run_all_layer_pca(out_dir, args.model_type, available_scales) + else: + # Merge-only types: NPZ/CSV files live in separate source directories + from collections import defaultdict as _defaultdict + mc_cfg = MERGE_ONLY_CONFIGS[args.model_type] + src_to_scales = _defaultdict(list) + for scale in available_scales: + src_to_scales[mc_cfg['scale_sources'][scale]].append(scale) + + logger.info("\n--- All-Layer Heatmaps (per source) ---") + for src_key, src_scales in src_to_scales.items(): + run_all_layer_heatmaps( + os.path.join(args.output_dir, src_key), src_key, src_scales) + + logger.info("\n--- All-Layer PCA (per source) ---") + for src_key, src_scales in src_to_scales.items(): + run_all_layer_pca( + os.path.join(args.output_dir, src_key), src_key, src_scales) + + logger.info(f"\n=== Merge Complete ===\nResults saved to: {out_dir}") + + +def main(): + # Default scales per legacy model_type (new types use their own defaults) + _LEGACY_DEFAULT_SCALES = { + 'molmo': ['vanilla', '80k', '400k', '800k', '2m'], + 'nvila': ['vanilla', '80k', '400k', '800k', '2m'], + 'qwen': ['vanilla', '80k', '400k', '800k', '2m'], + 'nvila_synthetic': ['80k-5pct', '80k-10pct', '80k-20pct', '80k-30pct', '400k-5pct'], + 'nvila_st': ['80k-st', '400k-st', '800k-st'], + } + + parser = argparse.ArgumentParser( + description='Swap Analysis — Spatial Representation Probing', + formatter_class=argparse.RawDescriptionHelpFormatter, + ) + parser.add_argument('--data_path', type=str, + default='/data/shared/Qwen/EmbSpatial-Bench/EmbSpatial-Bench.tsv') + parser.add_argument('--model_type', type=str, required=True, + choices=ALL_MODEL_TYPES, + help=( + 'Legacy: molmo | nvila | qwen\n' + 'Synthetic: nvila_synthetic\n' + 'New large: molmo_big | qwen_big | qwen_super | big_trio\n' + 'Merge-only (--merge required): molmo_all | qwen_all' + )) + parser.add_argument('--scales', type=str, nargs='+', default=None, + help='Scales to process (default: all for the given model_type).') + parser.add_argument('--output_dir', type=str, + default='/data/shared/Qwen/experiments/swap_analysis/results') + parser.add_argument('--device', type=str, default='cuda') + parser.add_argument('--seed', type=int, default=42) + parser.add_argument('--merge', action='store_true', + help='Merge mode: generate cross-scale plots from saved per-scale data.') + parser.add_argument('--merge-output-dir', type=str, default=None, dest='merge_output_dir', + help='Override output dir for cross-scale plots (NVILA dual-merge).') + parser.add_argument('--no-auto-roborefer', action='store_true', dest='no_auto_roborefer', + help='Disable automatic inclusion of roborefer scale for nvila.') + parser.add_argument('--skip-cross-group', action='store_true') + parser.add_argument('--skip-phase-b', action='store_true', dest='skip_phase_b', + help='Skip Phase B (cross-group feature extraction). ' + 'Phase A inference + analysis + plots still run normally.') + parser.add_argument('--max-samples-per-category', type=int, default=200, + dest='max_samples_per_category') + parser.add_argument('--no-filtering', action='store_true', dest='no_filtering', + help='Disable Unknown/empty filtering for far/close reference objects.' + ' By default, Unknown candidates are removed before sampling.') + parser.add_argument('--question-type', type=str, default='mcq', + choices=['mcq', 'short'], dest='question_type', + help='mcq (default): MCQ A/B format with letter answers; ' + 'short: original "Answer with only one word." format.') + + args = parser.parse_args() + + # ── Per-model-type log file ─────────────────────────────────────────────── + log_path = _setup_file_logging(args.model_type) + logger.info(f"Logging to: {log_path}") + + # ── Validate: merge-only types require --merge ──────────────────────────── + if args.model_type in MERGE_ONLY_CONFIGS and not args.merge: + parser.error( + f"'{args.model_type}' is a merge-only type. Add --merge to run it.\n" + f" Example: python swap_analysis.py --model_type {args.model_type} --merge" + ) + + # ── Default scales ──────────────────────────────────────────────────────── + if args.scales is None: + if args.model_type in MERGE_ONLY_CONFIGS: + args.scales = MERGE_ONLY_CONFIGS[args.model_type]['scale_order'] + elif args.model_type in MODEL_CONFIGS_NEW: + args.scales = list(MODEL_CONFIGS_NEW[args.model_type].keys()) + else: + args.scales = _LEGACY_DEFAULT_SCALES.get( + args.model_type, ['vanilla', '80k', '400k', '800k', '2m']) + + # Legacy nvila: auto-include roborefer + if args.model_type == 'nvila' and 'roborefer' not in args.scales and not args.no_auto_roborefer: + args.scales.append('roborefer') + + np.random.seed(args.seed) + torch.manual_seed(args.seed) + random.seed(args.seed) + + # ── Merge mode ─────────────────────────────────────────────────────────── + if args.merge: + logger.info("\n=== MERGE MODE ===") + if args.model_type in MODEL_CONFIGS_NEW or args.model_type in MERGE_ONLY_CONFIGS: + run_merge_extended(args) + else: + run_merge(args) + return + + # ── Inference mode ──────────────────────────────────────────────────────── + logger.info("\n=== Loading & Creating Swap Pairs ===") + swap_pairs = load_swap_pairs(args.data_path, args.seed, + filter_unknown=not args.no_filtering, + question_type=args.question_type) + + quads = [] + if not args.skip_cross_group and not getattr(args, 'skip_phase_b', False): + try: + hf_cache = build_hf_bbox_cache() + quads = create_cross_group_quads(swap_pairs, hf_cache, + question_type=args.question_type) + except Exception as e: + logger.warning(f"Cross-group setup failed: {e}. Skipping.") + quads = [] + + # ── Resolve config for the chosen model_type ───────────────────────────── + if args.model_type in MODEL_CONFIGS_NEW: + model_configs = MODEL_CONFIGS_NEW[args.model_type] + else: + model_configs = MODEL_CONFIGS[args.model_type] + + for scale in args.scales: + if scale not in model_configs: + logger.warning(f"Scale '{scale}' not in config for '{args.model_type}', skipping.") + continue + + # Validate model path exists (skip HF IDs that start with org/ prefix) + if args.model_type in MODEL_CONFIGS_NEW: + _, raw_path = model_configs[scale] + else: + raw_path = model_configs[scale] + if not os.path.isabs(raw_path) and not raw_path.startswith(('Qwen/', 'allenai/')): + if not os.path.exists(raw_path): + logger.warning(f"Model path not found: {raw_path} (scale='{scale}'), skipping.") + continue + + try: + process_scale(args, scale, swap_pairs, quads) + except Exception as e: + logger.error(f"Failed {args.model_type} - {scale}: {e}") + import traceback + traceback.print_exc() + continue + + logger.info(f"\n{'='*60}") + logger.info("=== All scales complete ===") + logger.info(f"Results: {os.path.join(args.output_dir, args.model_type)}") + logger.info(f"{'='*60}") + + +if __name__ == '__main__': + main() \ No newline at end of file diff --git a/swap_analysis/swap_analysis_new_models.py b/swap_analysis/swap_analysis_new_models.py new file mode 100644 index 0000000000000000000000000000000000000000..3fc6256a7782016ef98f7de32471f09e21c6d555 --- /dev/null +++ b/swap_analysis/swap_analysis_new_models.py @@ -0,0 +1,1016 @@ +#!/usr/bin/env python3 +""" +DEPRECATED — This file has been merged into swap_analysis.py. + +All functionality (Molmo2Extractor, Qwen3VLExtractor, merge-only types, +per-model-type logging, etc.) is now available directly via: + + python swap_analysis.py --model_type + +See swap_analysis.py --help for all supported model types. +This file is kept for reference only and will be removed in a future cleanup. + +Original docstring preserved below: +------------------------------------ +Swap Analysis — New Models Extension + +Adds Molmo2-8B, Qwen3-VL-32B-Instruct, and Qwen3-VL-235B-A22B-Instruct +to the swap analysis pipeline. +Results are saved under new model_type directories, never overwriting existing results. + +Runnable model types (actually run inference + save per-scale data) +--------------------------------------------------------------------- + molmo_big : Molmo2-8B only → saves to results/molmo_big/ + qwen_big : Qwen3-VL-32B only → saves to results/qwen_big/ + qwen_super : Qwen3-VL-235B-A22B only → saves to results/qwen_super/ + big_trio : Molmo2-8B + RoboRefer + Qwen3-VL-32B → saves to results/big_trio/ + +Merge-only model types (load existing data, output cross-scale plots) +----------------------------------------------------------------------- + molmo_all : results/molmo/ (vanilla→2m) + results/molmo_big/ (molmo2) + → plots saved to results/molmo_all/ + qwen_all : results/qwen/ (vanilla→2m) + results/qwen_big/ (qwen3_32b) + → plots saved to results/qwen_all/ + (big_trio also uses --merge like other types) + +Logging +------- + Each run writes its own log to: logs/{model_type}.log (appended) + alongside the usual stderr output. + +Environment notes +----------------- + molmo_big, qwen_big, qwen_super, big_trio (molmo2+qwen3_32b) → qwen3 conda env + big_trio roborefer scale only → vila conda env + +Usage examples +-------------- +# Step 1 — run new models (qwen3 env) +conda run -n qwen3 python swap_analysis_new_models.py --model_type molmo_big +conda run -n qwen3 python swap_analysis_new_models.py --model_type qwen_big +conda run -n qwen3 python swap_analysis_new_models.py --model_type qwen_super + +# Step 2 — merge new results with existing molmo/qwen results (qwen3 env) +conda run -n qwen3 python swap_analysis_new_models.py --model_type molmo_all --merge +conda run -n qwen3 python swap_analysis_new_models.py --model_type qwen_all --merge + +# big_trio (multi-env): run per-env, then merge +conda run -n qwen3 python swap_analysis_new_models.py --model_type big_trio --scales molmo2 qwen3_32b +conda run -n vila python swap_analysis_new_models.py --model_type big_trio --scales roborefer +conda run -n qwen3 python swap_analysis_new_models.py --model_type big_trio --merge + +# Re-run a single scale +conda run -n qwen3 python swap_analysis_new_models.py --model_type molmo_big --scales molmo2 +""" + +import os +import sys +import json +import argparse +import logging +import random + +import torch +import numpy as np +import pandas as pd + +# ── Import common pipeline from swap_analysis ───────────────────────────────── + +_HERE = os.path.dirname(os.path.abspath(__file__)) +if _HERE not in sys.path: + sys.path.insert(0, _HERE) + +import swap_analysis as _sa +from swap_analysis import ( + # Base / existing extractors + BaseHiddenStateExtractor, + MolmoExtractor, + NVILAExtractor, + RoboReferExtractor, + Qwen25VLExtractor, + # Data loading + load_swap_pairs, + build_hf_bbox_cache, + create_cross_group_quads, + # Feature extraction + extract_swap_features, + extract_cross_group_features, + # Analysis + compute_delta_consistency, + compute_delta_similarity_matrix, + compute_cross_group_alignment, + compute_prediction_stats, + check_category_validity, + filter_both_correct, + get_representative_layers, + # Saving / loading + save_scale_results, + save_vectors_npz, + load_scale_consistency, + load_within_cat_consistency, + load_scale_alignment, + load_delta_heatmaps, + # Per-scale plots + plot_within_cat_consistency_trajectory, + plot_sign_corrected_consistency_trajectory, + plot_cross_group_alignment_trajectory, + plot_delta_heatmap, + plot_pca_embeddings, + plot_pca_3d, + plot_pred_stats_bars, + plot_pred_stats_trajectory, + # Cross-scale (merge) plots + plot_cross_scale_consistency, + plot_cross_scale_within_cat_consistency, + plot_cross_scale_alignment, + plot_delta_trajectory, + plot_summary_barplot, + # Post-hoc helpers + run_accuracy_charts, + run_unify_ylim, + # Constants + GROUP_ORDER, +) + +logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s') +logger = logging.getLogger(__name__) + + +def _setup_file_logging(model_type: str) -> str: + """Add a per-model-type FileHandler so each run gets its own log file. + + Log is written to /logs/{model_type}.log (append mode). + Returns the resolved log file path. + """ + log_dir = os.path.join(_HERE, 'logs') + os.makedirs(log_dir, exist_ok=True) + log_path = os.path.join(log_dir, f'{model_type}.log') + + fh = logging.FileHandler(log_path, mode='a', encoding='utf-8') + fh.setLevel(logging.INFO) + fh.setFormatter(logging.Formatter('%(asctime)s - %(levelname)s - %(message)s')) + + # Attach to both the module logger and the root logger so imported + # swap_analysis functions (which use their own module logger) are captured. + logging.getLogger().addHandler(fh) + + return log_path + +# ============================================================================ +# Local HuggingFace cache helpers +# ============================================================================ + +# Root of the shared HF hub cache on this machine +HF_HUB_DIR = '/data/shared/Qwen/mydisk/huggingface/hub' + + +def resolve_local_path(model_path: str) -> str: + """ + Resolve a HuggingFace model ID (e.g. 'Qwen/Qwen3-VL-32B-Instruct') to its + local snapshot path under HF_HUB_DIR, if the model has been cached there. + + - If model_path is already an absolute path, return it unchanged. + - If the model is found in the local cache, return the snapshot directory. + - If not found locally, log a warning and return the original HF ID + (transformers will then attempt to download from the Hub). + """ + if os.path.isabs(model_path): + return model_path # already a local absolute path + + # HF hub stores models as 'models--org--model-name' + cache_name = 'models--' + model_path.replace('/', '--') + snapshots_dir = os.path.join(HF_HUB_DIR, cache_name, 'snapshots') + + if os.path.isdir(snapshots_dir): + snapshots = sorted(os.listdir(snapshots_dir)) + if snapshots: + local_path = os.path.join(snapshots_dir, snapshots[-1]) + logger.info(f"Local cache found: {model_path} → {local_path}") + return local_path + + logger.warning( + f"Model not found in local cache: '{model_path}'\n" + f" Expected at: {snapshots_dir}\n" + f" Will fall back to online HuggingFace Hub download.\n" + f" To cache locally first, run:\n" + f" python -c \"from huggingface_hub import snapshot_download; " + f"snapshot_download('{model_path}', cache_dir='{HF_HUB_DIR}')\"" + ) + return model_path # fallback → online + + +# ============================================================================ +# Constants +# ============================================================================ + +# Extend upstream SCALE_COLORS in-place so all imported plot functions see them +_sa.SCALE_COLORS.update({ + 'molmo2': '#17becf', # cyan + 'qwen3_32b': '#bcbd22', # yellow-green + 'qwen3_235b': '#d62728', # red +}) +SCALE_COLORS = _sa.SCALE_COLORS # convenience alias + +# ── Runnable types: define which extractors + model paths to use ─────────────── +# Each value is (ExtractorClassName, model_path) +MODEL_CONFIGS_NEW = { + 'molmo_big': { + 'molmo2': ('Molmo2Extractor', 'allenai/Molmo2-8B'), + }, + 'qwen_big': { + 'qwen3_32b': ('Qwen3VLExtractor', 'Qwen/Qwen3-VL-32B-Instruct'), + }, + 'qwen_super': { + # MoE variant: 235B total / 22B activated params, same Qwen3-VL loading API + 'qwen3_235b': ('Qwen3VLExtractor', 'Qwen/Qwen3-VL-235B-A22B-Instruct'), + }, + 'big_trio': { + 'molmo2': ('Molmo2Extractor', 'allenai/Molmo2-8B'), + 'roborefer': ('RoboReferExtractor', '/data/shared/Qwen/mydisk/RoboRefer_model'), + 'qwen3_32b': ('Qwen3VLExtractor', 'Qwen/Qwen3-VL-32B-Instruct'), + }, +} + +# ── Merge-only types: combine data from multiple source directories ──────────── +# scale_sources: scale → source model_type directory name under results/ +# required_dirs: list of source dirs that MUST exist before merging +MERGE_ONLY_CONFIGS = { + 'molmo_all': { + 'scale_order': ['vanilla', '80k', '400k', '800k', '2m', 'molmo2'], + 'scale_sources': { + 'vanilla': 'molmo', + '80k': 'molmo', + '400k': 'molmo', + '800k': 'molmo', + '2m': 'molmo', + 'molmo2': 'molmo_big', + }, + 'required_dirs': ['molmo', 'molmo_big'], + }, + 'qwen_all': { + 'scale_order': ['vanilla', '80k', '400k', '800k', '2m', 'qwen3_32b'], + 'scale_sources': { + 'vanilla': 'qwen', + '80k': 'qwen', + '400k': 'qwen', + '800k': 'qwen', + '2m': 'qwen', + 'qwen3_32b': 'qwen_big', + }, + 'required_dirs': ['qwen', 'qwen_big'], + }, +} + +# Scale ordering for merge (runnable types) +SCALE_ORDERS = { + 'molmo_big': ['molmo2'], + 'qwen_big': ['qwen3_32b'], + 'qwen_super': ['qwen3_235b'], + 'big_trio': ['molmo2', 'roborefer', 'qwen3_32b'], +} + +# All valid --model_type choices (runnable + merge-only) +ALL_MODEL_TYPES = list(MODEL_CONFIGS_NEW.keys()) + list(MERGE_ONLY_CONFIGS.keys()) + + +# ============================================================================ +# New Extractor: Molmo2-8B +# ============================================================================ + +class Molmo2Extractor(BaseHiddenStateExtractor): + """ + Extractor for allenai/Molmo2-8B. + + Uses AutoModelForImageTextToText (messages-dict input format). + LLM backbone: Qwen3. Transformer layers are discovered dynamically because + the exact attribute path depends on the custom model architecture. + + Differences from MolmoExtractor: + - apply_chat_template instead of processor.process + - model.generate(**inputs) instead of generate_from_batch + - device_map='auto' for multi-GPU support + """ + + def _load_model(self): + from transformers import AutoProcessor, AutoModelForImageTextToText + self.processor = AutoProcessor.from_pretrained( + self.model_path, trust_remote_code=True + ) + self.model = AutoModelForImageTextToText.from_pretrained( + self.model_path, + trust_remote_code=True, + torch_dtype='auto', + device_map='auto', + ).eval() + self._find_llm_layers() + logger.info(f"Loaded Molmo2 from {self.model_path}") + + def _find_llm_layers(self): + """Dynamically locate the LLM transformer layer list.""" + # Try ordered candidate paths from model root + candidates = [ + ['model', 'layers'], # Qwen-VL / most common + ['language_model', 'model', 'layers'], # LLaVA-style + ['model', 'model', 'layers'], # nested Qwen + ] + for path in candidates: + obj = self.model + for attr in path: + obj = getattr(obj, attr, None) + if obj is None: + break + if obj is not None and hasattr(obj, '__len__') and len(obj) > 0: + self.llm_layers = obj + logger.info(f"Molmo2: layers at '{'.'.join(path)}', count={len(obj)}") + return + + # Fallback: scan named_modules for the largest .layers list + best, best_name, best_len = None, '', 0 + for name, module in self.model.named_modules(): + if name.endswith('.layers') and hasattr(module, '__len__') and len(module) > best_len: + best, best_name, best_len = module, name, len(module) + if best is not None: + self.llm_layers = best + logger.info(f"Molmo2: layers via scan at '{best_name}', count={best_len}") + return + + raise ValueError("Could not find transformer layers in Molmo2 model") + + def _get_num_layers(self) -> int: + return len(self.llm_layers) + + def _get_layer_module(self, layer_idx: int): + return self.llm_layers[layer_idx] + + def extract_and_predict(self, image, question): + self.hidden_states = {} + messages = [{ + "role": "user", + "content": [ + {"type": "image", "image": image}, + {"type": "text", "text": question}, + ], + }] + inputs = self.processor.apply_chat_template( + messages, + tokenize=True, + add_generation_prompt=True, + return_tensors="pt", + return_dict=True, + ) + inputs = {k: v.to(self.model.device) for k, v in inputs.items()} + with torch.inference_mode(): + generated_ids = self.model.generate(**inputs, max_new_tokens=20, do_sample=False) + input_len = inputs['input_ids'].shape[1] + answer = self.processor.tokenizer.decode( + generated_ids[0, input_len:], skip_special_tokens=True + ).strip() + return self.hidden_states.copy(), answer + + +# ============================================================================ +# New Extractor: Qwen3-VL-32B-Instruct +# ============================================================================ + +class Qwen3VLExtractor(BaseHiddenStateExtractor): + """ + Extractor for Qwen/Qwen3-VL-32B-Instruct (and other Qwen3-VL variants). + + Key differences from Qwen25VLExtractor: + - AutoModelForImageTextToText + trust_remote_code=True + - process_vision_info requires image_patch_size=16 + - processor call requires do_resize=False + - 32×32 px patches → different min/max_pixels + + Qwen3-VL wraps the LLM under model.model.language_model (not model.model.layers + directly like Qwen2.5-VL), so layer path is discovered dynamically. + Layer count: 64 for 32B (Qwen3-32B backbone), auto-detected. + """ + + MIN_PIXELS = 1280 * 32 * 32 # 1,310,720 (32×32 px patches) + MAX_PIXELS = 16384 * 32 * 32 # 16,777,216 + + def _load_model(self): + from transformers import AutoProcessor, AutoModelForImageTextToText + self.processor = AutoProcessor.from_pretrained( + self.model_path, trust_remote_code=True + ) + self.model = AutoModelForImageTextToText.from_pretrained( + self.model_path, + trust_remote_code=True, + torch_dtype='auto', + device_map='auto', + attn_implementation='flash_attention_2', + ).eval() + self._find_llm_layers() + logger.info(f"Loaded Qwen3-VL from {self.model_path}") + + def _find_llm_layers(self): + """Dynamically locate the LLM transformer layer list.""" + # Qwen3-VL wraps LLM under language_model; try common paths + candidates = [ + ['model', 'language_model', 'model', 'layers'], # Qwen3-VL expected + ['language_model', 'model', 'layers'], # flat wrapper + ['model', 'model', 'layers'], # Qwen2.5-VL style + ['model', 'layers'], # simple + ] + for path in candidates: + obj = self.model + for attr in path: + obj = getattr(obj, attr, None) + if obj is None: + break + if obj is not None and hasattr(obj, '__len__') and len(obj) > 0: + self.llm_layers = obj + logger.info(f"Qwen3-VL: layers at '{'.'.join(path)}', count={len(obj)}") + return + + # Fallback: scan named_modules for the largest .layers list + best, best_name, best_len = None, '', 0 + for name, module in self.model.named_modules(): + if name.endswith('.layers') and hasattr(module, '__len__') and len(module) > best_len: + best, best_name, best_len = module, name, len(module) + if best is not None: + self.llm_layers = best + logger.info(f"Qwen3-VL: layers via scan at '{best_name}', count={best_len}") + return + + raise ValueError("Could not find transformer layers in Qwen3-VL model") + + def _get_num_layers(self) -> int: + return len(self.llm_layers) + + def _get_layer_module(self, layer_idx: int): + return self.llm_layers[layer_idx] + + def extract_and_predict(self, image, question): + self.hidden_states = {} + messages = [{"role": "user", "content": [ + { + "type": "image", "image": image, + "min_pixels": self.MIN_PIXELS, "max_pixels": self.MAX_PIXELS, + }, + {"type": "text", "text": question}, + ]}] + text = self.processor.apply_chat_template( + messages, tokenize=False, add_generation_prompt=True + ) + from qwen_vl_utils import process_vision_info + # image_patch_size=16 and do_resize=False are both required for Qwen3-VL + images, videos, _ = process_vision_info( + messages, + image_patch_size=16, + return_video_kwargs=True, + return_video_metadata=True, + ) + inputs = self.processor( + text=text, + images=images, + videos=videos, + do_resize=False, + return_tensors="pt", + ).to(self.model.device) + with torch.no_grad(): + output_ids = self.model.generate(**inputs, max_new_tokens=20, do_sample=False) + input_len = inputs['input_ids'].shape[1] + answer = self.processor.tokenizer.decode( + output_ids[0, input_len:], skip_special_tokens=True + ).strip() + return self.hidden_states.copy(), answer + + +# ============================================================================ +# Extractor Registry +# ============================================================================ + +EXTRACTOR_CLASSES = { + 'MolmoExtractor': MolmoExtractor, + 'NVILAExtractor': NVILAExtractor, + 'RoboReferExtractor': RoboReferExtractor, + 'Qwen25VLExtractor': Qwen25VLExtractor, + 'Molmo2Extractor': Molmo2Extractor, + 'Qwen3VLExtractor': Qwen3VLExtractor, +} + + +def get_extractor_new(model_type: str, scale: str, device: str = 'cuda'): + """Create the appropriate extractor from MODEL_CONFIGS_NEW. + HF model IDs are automatically resolved to local snapshot paths when cached. + """ + cls_name, model_path = MODEL_CONFIGS_NEW[model_type][scale] + model_path = resolve_local_path(model_path) # prefer local cache + ExtractorCls = EXTRACTOR_CLASSES[cls_name] + logger.info(f"Creating {cls_name} for scale='{scale}' from {model_path}") + return ExtractorCls(model_path, device=device) + + +# ============================================================================ +# Per-scale processing (mirrors process_scale in swap_analysis.py) +# ============================================================================ + +def process_scale_new(args, scale, swap_pairs, quads): + """Run the full swap-analysis pipeline for one scale of a runnable model_type.""" + cls_name, model_path = MODEL_CONFIGS_NEW[args.model_type][scale] + + logger.info(f"\n{'='*60}") + logger.info(f"Processing {args.model_type} / {scale} [{cls_name}]") + logger.info(f"Model path: {model_path}") + logger.info(f"{'='*60}") + + extractor = get_extractor_new(args.model_type, scale, device=args.device) + target_layers = extractor.target_layers + + output_dir = os.path.join(args.output_dir, args.model_type) + plots_dir = os.path.join(output_dir, 'plots') + os.makedirs(plots_dir, exist_ok=True) + + # ── Phase A ─────────────────────────────────────────────────────────────── + logger.info("\n--- Phase A: Extracting swap pair features ---") + swap_records = extract_swap_features( + extractor, swap_pairs, + max_samples_per_category=args.max_samples_per_category, + ) + + # ── Phase B ─────────────────────────────────────────────────────────────── + logger.info("\n--- Phase B: Extracting cross-group features ---") + quad_records = extract_cross_group_features(extractor, quads) if quads else [] + + # ── Phase C: analysis ───────────────────────────────────────────────────── + logger.info("\n--- Phase C: Analysis ---") + category_validity = check_category_validity(swap_records, scale) + unreliable_cats = [c for c, v in category_validity.items() if not v['reliable']] + if unreliable_cats: + logger.warning(f" Unreliable categories: {unreliable_cats}") + + within_cat_all, sign_corrected_all = compute_delta_consistency(swap_records, target_layers) + + both_correct_records = filter_both_correct(swap_records) + logger.info(f" Both-correct pairs: {len(both_correct_records)}/{len(swap_records)}") + within_cat_bc, sign_corrected_bc = compute_delta_consistency(both_correct_records, target_layers) + + cross_alignment = compute_cross_group_alignment(quad_records, target_layers) + pred_stats = compute_prediction_stats(swap_records, scale) + + delta_heatmaps_all, delta_heatmaps_bc = {}, {} + for layer in target_layers: + delta_heatmaps_all[layer] = compute_delta_similarity_matrix(swap_records, layer) + if both_correct_records: + delta_heatmaps_bc[layer] = compute_delta_similarity_matrix(both_correct_records, layer) + + max_layer = max(target_layers) + for group in GROUP_ORDER: + key = (group, max_layer) + if key in sign_corrected_all: + logger.info(f" Sign-corrected [{group}, L{max_layer}]: " + f"{sign_corrected_all[key]['mean']:.4f} ± " + f"{sign_corrected_all[key]['std']:.4f}") + if max_layer in cross_alignment: + ca = cross_alignment[max_layer] + logger.info(f" Cross-group alignment L{max_layer}: " + f"{ca['per_sample_mean']:.4f} (perm={ca['permutation_mean']:.4f})") + logger.info(f" Accuracy orig={pred_stats['overall_acc_orig']:.1%}, " + f"swap={pred_stats['overall_acc_swap']:.1%}, " + f"both={pred_stats['overall_acc_both']:.1%}") + + # ── Phase D: save ───────────────────────────────────────────────────────── + logger.info("\n--- Phase D: Saving results ---") + save_vectors_npz(scale, swap_records, quad_records, target_layers, output_dir) + save_scale_results( + scale, swap_records, quad_records, + within_cat_all, sign_corrected_all, + cross_alignment, pred_stats, target_layers, + category_validity, delta_heatmaps_all, + output_dir, both_correct_tag='all_pairs', + ) + if both_correct_records: + save_scale_results( + scale, both_correct_records, quad_records, + within_cat_bc, sign_corrected_bc, + cross_alignment, pred_stats, target_layers, + category_validity, delta_heatmaps_bc, + output_dir, both_correct_tag='both_correct', + ) + + # ── Phase E: per-scale plots ────────────────────────────────────────────── + logger.info("\n--- Phase E: Per-scale plots ---") + for condition, wc_data, sc_data, dh_data in [ + ('all', within_cat_all, sign_corrected_all, delta_heatmaps_all), + ('both_correct', within_cat_bc, sign_corrected_bc, delta_heatmaps_bc), + ('all_with_validity', within_cat_all, sign_corrected_all, delta_heatmaps_all), + ]: + if condition == 'both_correct' and not both_correct_records: + continue + + cond_dir = os.path.join(plots_dir, condition) + os.makedirs(cond_dir, exist_ok=True) + cond_unreliable = unreliable_cats if condition == 'all_with_validity' else [] + + plot_within_cat_consistency_trajectory( + wc_data, scale, args.model_type, + os.path.join(cond_dir, f'within_cat_consistency_{scale}.png')) + + plot_sign_corrected_consistency_trajectory( + sc_data, scale, args.model_type, + os.path.join(cond_dir, f'sign_corrected_consistency_{scale}.png')) + + if cross_alignment: + plot_cross_group_alignment_trajectory( + cross_alignment, scale, args.model_type, + os.path.join(cond_dir, f'cross_alignment_{scale}.png')) + + rep_layers = get_representative_layers(target_layers) + for layer in rep_layers: + df = dh_data.get(layer) + if df is not None: + plot_delta_heatmap( + df, + f'{args.model_type.upper()} ({scale}) - Delta Heatmap L{layer} ({condition})', + os.path.join(cond_dir, f'delta_heatmap_{scale}_L{layer}.png'), + unreliable_cats=cond_unreliable, + ) + + # PCA (2D and 3D) + npz_path = os.path.join(output_dir, 'npz', f'vectors_{scale}.npz') + if os.path.exists(npz_path): + pca_dir = os.path.join(plots_dir, 'all', 'pca') + os.makedirs(pca_dir, exist_ok=True) + plot_pca_embeddings(npz_path, scale, args.model_type, pca_dir) + + pca_3d_dir = os.path.join(plots_dir, 'all', 'pca_3d') + os.makedirs(pca_3d_dir, exist_ok=True) + plot_pca_3d(npz_path, scale, args.model_type, pca_3d_dir) + + if pred_stats: + pred_dir = os.path.join(plots_dir, 'all') + os.makedirs(pred_dir, exist_ok=True) + plot_pred_stats_bars( + [pred_stats], args.model_type, + os.path.join(pred_dir, f'pred_stats_bars_{scale}.png')) + + extractor.cleanup() + logger.info(f"\n=== Scale '{scale}' complete ===") + + +# ============================================================================ +# Merge helpers +# ============================================================================ + +def _check_merge_only_sources(output_dir: str, model_type: str) -> bool: + """ + Verify required source directories have data. + Returns True if all sources look healthy, False (with warnings) if not. + """ + mc = MERGE_ONLY_CONFIGS[model_type] + ok = True + for req_dir in mc['required_dirs']: + src_path = os.path.join(output_dir, req_dir) + json_dir = os.path.join(src_path, 'json') + if not os.path.isdir(src_path): + logger.warning( + f"[{model_type}] Required source directory not found: {src_path}\n" + f" → Run inference first: python swap_analysis_new_models.py " + f"--model_type {req_dir}" + if req_dir in MODEL_CONFIGS_NEW else + f" → Run inference first: python swap_analysis.py " + f"--model_type {req_dir}" + ) + ok = False + elif not os.path.isdir(json_dir) or not any( + f.startswith('pred_stats_') for f in os.listdir(json_dir) + ): + logger.warning( + f"[{model_type}] Source directory exists but has no pred_stats JSON: {json_dir}\n" + f" → Inference may not have completed for '{req_dir}'." + ) + ok = False + else: + scales_found = [ + f.replace('pred_stats_', '').replace('.json', '') + for f in os.listdir(json_dir) + if f.startswith('pred_stats_') + ] + logger.info(f" [{req_dir}] found scales: {scales_found}") + return ok + + +def _load_scale_data_multi(output_dir: str, model_type: str, scale: str, scale_sources: dict): + """ + Load per-scale data for a single scale, looking in the correct source directory. + Returns (sc, sc_bc, wc, wc_bc, align, pred_stats_dict, cat_validity_dict, dh, dh_bc) + where any unavailable item is None / {}. + """ + src_dir = os.path.join(output_dir, scale_sources.get(scale, model_type)) + + sc = load_scale_consistency(src_dir, scale, 'all_pairs') + sc_bc = load_scale_consistency(src_dir, scale, 'both_correct') + wc = load_within_cat_consistency(src_dir, scale, 'all_pairs') + wc_bc = load_within_cat_consistency(src_dir, scale, 'both_correct') + align = load_scale_alignment(src_dir, scale) + + pred_stat = None + pred_path = os.path.join(src_dir, 'json', f'pred_stats_{scale}.json') + if os.path.exists(pred_path): + with open(pred_path) as f: + pred_stat = json.load(f) + + cat_validity = None + cv_path = os.path.join(src_dir, 'json', f'category_validity_{scale}.json') + if os.path.exists(cv_path): + with open(cv_path) as f: + cat_validity = json.load(f) + + dh = load_delta_heatmaps(src_dir, scale, 'all_pairs') + dh_bc = load_delta_heatmaps(src_dir, scale, 'both_correct') + + return sc, sc_bc, wc, wc_bc, align, pred_stat, cat_validity, dh, dh_bc + + +# ============================================================================ +# Merge (cross-scale plots + accuracy + ylim unification) +# ============================================================================ + +def run_merge_new(args): + """ + Generate cross-scale plots for a model_type. + + - For runnable types (molmo_big, qwen_big, big_trio): + loads all data from results/{model_type}/ and saves plots there. + - For merge-only types (molmo_all, qwen_all): + loads per-scale data from the respective source directories + (e.g. results/molmo/ and results/molmo_big/), + saves all cross-scale plots to results/{model_type}/. + """ + is_merge_only = args.model_type in MERGE_ONLY_CONFIGS + + # ── Determine scale order and data source strategy ──────────────────────── + if is_merge_only: + mc = MERGE_ONLY_CONFIGS[args.model_type] + scale_order = mc['scale_order'] + scale_sources = mc['scale_sources'] + + logger.info(f"\n=== MERGE-ONLY mode: {args.model_type} ===") + logger.info("Checking required source directories...") + sources_ok = _check_merge_only_sources(args.output_dir, args.model_type) + if not sources_ok: + logger.warning( + f"\n[WARNING] One or more source directories are missing or incomplete.\n" + f" Cross-scale plots for '{args.model_type}' may be partial.\n" + f" Run the missing model types first (see warnings above), then retry merge." + ) + else: + scale_order = SCALE_ORDERS.get(args.model_type, list(MODEL_CONFIGS_NEW[args.model_type])) + scale_sources = None # all data lives in results/{model_type}/ + + available_scales = [s for s in scale_order if s in args.scales] + logger.info(f"Merging scales (in order): {available_scales}") + + # Output always goes to results/{model_type}/ + out_dir = os.path.join(args.output_dir, args.model_type) + plots_dir = os.path.join(out_dir, 'plots') + os.makedirs(plots_dir, exist_ok=True) + + # ── Load per-scale data ─────────────────────────────────────────────────── + all_sign_corrected = {} + all_sign_corrected_bc = {} + all_within_cat = {} + all_within_cat_bc = {} + all_alignment = {} + all_pred_stats = [] + all_cat_validity = {} + all_delta_heatmaps = {} + all_delta_heatmaps_bc = {} + + for scale in available_scales: + if is_merge_only: + (sc, sc_bc, wc, wc_bc, align, + pred_stat, cat_validity, dh, dh_bc) = _load_scale_data_multi( + args.output_dir, args.model_type, scale, scale_sources) + else: + src_dir = os.path.join(args.output_dir, args.model_type) + sc = load_scale_consistency(src_dir, scale, 'all_pairs') + sc_bc = load_scale_consistency(src_dir, scale, 'both_correct') + wc = load_within_cat_consistency(src_dir, scale, 'all_pairs') + wc_bc = load_within_cat_consistency(src_dir, scale, 'both_correct') + align = load_scale_alignment(src_dir, scale) + + pred_stat = None + pred_path = os.path.join(src_dir, 'json', f'pred_stats_{scale}.json') + if os.path.exists(pred_path): + with open(pred_path) as f: + pred_stat = json.load(f) + + cat_validity = None + cv_path = os.path.join(src_dir, 'json', f'category_validity_{scale}.json') + if os.path.exists(cv_path): + with open(cv_path) as f: + cat_validity = json.load(f) + + dh = load_delta_heatmaps(src_dir, scale, 'all_pairs') + dh_bc = load_delta_heatmaps(src_dir, scale, 'both_correct') + + if sc: + all_sign_corrected[scale] = sc + if sc_bc: + all_sign_corrected_bc[scale] = sc_bc + if wc: + all_within_cat[scale] = wc + if wc_bc: + all_within_cat_bc[scale] = wc_bc + if align: + all_alignment[scale] = align + if pred_stat is not None: + all_pred_stats.append(pred_stat) + if cat_validity is not None: + all_cat_validity[scale] = cat_validity + if dh: + all_delta_heatmaps[scale] = dh + if dh_bc: + all_delta_heatmaps_bc[scale] = dh_bc + + logger.info(f" Loaded data for '{scale}'" + + (f" (from '{scale_sources[scale]}')" if is_merge_only else "")) + + # ── Cross-scale plots ───────────────────────────────────────────────────── + for condition, sc_data, wc_data, dh_data, tag_label in [ + ('all', all_sign_corrected, all_within_cat, all_delta_heatmaps, 'all pairs'), + ('both_correct', all_sign_corrected_bc, all_within_cat_bc, all_delta_heatmaps_bc, 'both-correct'), + ]: + cond_dir = os.path.join(plots_dir, condition) + os.makedirs(cond_dir, exist_ok=True) + + if len(sc_data) > 1: + plot_cross_scale_consistency( + sc_data, args.model_type, + os.path.join(cond_dir, 'cross_scale_sign_corrected.png'), + title_prefix=f'Sign-Corrected ({tag_label})') + + if len(wc_data) > 1: + plot_cross_scale_within_cat_consistency( + wc_data, args.model_type, + os.path.join(cond_dir, 'cross_scale_within_cat.png')) + + if dh_data: + plot_delta_trajectory( + dh_data, args.model_type, + os.path.join(cond_dir, 'delta_trajectory.png')) + + # ── Alignment and prediction stats ──────────────────────────────────────── + all_cond_dir = os.path.join(plots_dir, 'all') + os.makedirs(all_cond_dir, exist_ok=True) + + if len(all_alignment) > 1: + plot_cross_scale_alignment( + all_alignment, args.model_type, + os.path.join(all_cond_dir, 'cross_scale_alignment.png')) + + if all_pred_stats: + plot_pred_stats_bars( + all_pred_stats, args.model_type, + os.path.join(all_cond_dir, 'pred_stats_bars.png')) + plot_pred_stats_trajectory( + all_pred_stats, args.model_type, + os.path.join(all_cond_dir, 'pred_stats_trajectory.png')) + + if all_sign_corrected: + plot_summary_barplot( + all_sign_corrected, all_alignment, args.model_type, + os.path.join(all_cond_dir, 'summary_barplot.png')) + + # ── Summary CSV ─────────────────────────────────────────────────────────── + summary_rows = [] + for scale in available_scales: + ps = next((p for p in all_pred_stats if p.get('scale') == scale), None) + if ps is None: + continue + row = dict(ps) + if scale in all_alignment: + max_layer = max(all_alignment[scale].keys()) + row['alignment_deepest'] = all_alignment[scale][max_layer]['per_sample_mean'] + row['alignment_perm'] = all_alignment[scale][max_layer]['permutation_mean'] + summary_rows.append(row) + if summary_rows: + csv_dir = os.path.join(out_dir, 'csv') + os.makedirs(csv_dir, exist_ok=True) + pd.DataFrame(summary_rows).to_csv(os.path.join(csv_dir, 'summary.csv'), index=False) + + # ── Accuracy charts ─────────────────────────────────────────────────────── + if all_pred_stats: + acc_dir = os.path.join(plots_dir, 'accuracy') + logger.info("\n--- Accuracy Charts ---") + run_accuracy_charts(all_pred_stats, all_cat_validity, args.model_type, acc_dir) + + # ── Unify y-axis ────────────────────────────────────────────────────────── + # For merge-only types, per-scale JSON files live in multiple source dirs, + # so run_unify_ylim (which expects all JSON in one dir) is skipped. + # The cross-scale comparison plots above already share a common y-axis. + if not is_merge_only: + logger.info("\n--- Unifying Y-axis ---") + run_unify_ylim(out_dir, plots_dir, args.model_type) + else: + logger.info("\n--- Skipping y-axis unification (per-scale data spans multiple source dirs) ---") + + logger.info(f"\n=== Merge Complete ===\nResults saved to: {out_dir}") + + +# ============================================================================ +# main +# ============================================================================ + +def main(): + parser = argparse.ArgumentParser( + description='Swap Analysis — New Models (Molmo2 + Qwen3-VL)', + formatter_class=argparse.RawDescriptionHelpFormatter, + epilog=__doc__, + ) + parser.add_argument('--data_path', type=str, + default='/data/shared/Qwen/EmbSpatial-Bench/EmbSpatial-Bench.tsv') + parser.add_argument('--model_type', type=str, required=True, + choices=ALL_MODEL_TYPES, + help=( + 'Runnable: molmo_big | qwen_big | qwen_super | big_trio\n' + 'Merge-only (--merge required): molmo_all | qwen_all' + )) + parser.add_argument('--scales', type=str, nargs='+', default=None, + help='Scales to process (default: all for the given model_type). ' + 'For merge-only types, controls which scales are included in the merge.') + parser.add_argument('--output_dir', type=str, + default='/data/shared/Qwen/experiments/swap_analysis/results', + help='Root results directory.') + parser.add_argument('--device', type=str, default='cuda') + parser.add_argument('--seed', type=int, default=42) + parser.add_argument('--merge', action='store_true', + help='Merge mode: generate cross-scale plots from saved per-scale data.') + parser.add_argument('--skip-cross-group', action='store_true', + help='Skip cross-group quad extraction.') + parser.add_argument('--max-samples-per-category', type=int, default=200, + dest='max_samples_per_category') + + args = parser.parse_args() + + # ── Per-model-type log file ─────────────────────────────────────────────── + log_path = _setup_file_logging(args.model_type) + logger.info(f"Logging to: {log_path}") + + # ── Validate: merge-only types require --merge ──────────────────────────── + if args.model_type in MERGE_ONLY_CONFIGS and not args.merge: + parser.error( + f"'{args.model_type}' is a merge-only type. Add --merge to run it.\n" + f" Example: python swap_analysis_new_models.py " + f"--model_type {args.model_type} --merge" + ) + + # ── Default scales ──────────────────────────────────────────────────────── + if args.scales is None: + if args.model_type in MERGE_ONLY_CONFIGS: + args.scales = MERGE_ONLY_CONFIGS[args.model_type]['scale_order'] + else: + args.scales = list(MODEL_CONFIGS_NEW[args.model_type].keys()) + + np.random.seed(args.seed) + torch.manual_seed(args.seed) + random.seed(args.seed) + + if args.merge: + logger.info("\n=== MERGE MODE ===") + run_merge_new(args) + return + + # ── Per-scale inference loop ────────────────────────────────────────────── + logger.info("\n=== Loading & Creating Swap Pairs ===") + swap_pairs = load_swap_pairs(args.data_path, args.seed) + + quads = [] + if not args.skip_cross_group: + try: + hf_cache = build_hf_bbox_cache() + quads = create_cross_group_quads(swap_pairs, hf_cache) + except Exception as e: + logger.warning(f"Cross-group setup failed: {e}. Skipping.") + + model_configs = MODEL_CONFIGS_NEW[args.model_type] + for scale in args.scales: + if scale not in model_configs: + logger.warning(f"Scale '{scale}' not in config for '{args.model_type}', skipping.") + continue + + _, model_path = model_configs[scale] + if not model_path.startswith(('Qwen/', 'allenai/')) and not os.path.exists(model_path): + logger.warning(f"Model path not found: {model_path} (scale='{scale}'), skipping.") + continue + + try: + process_scale_new(args, scale, swap_pairs, quads) + except Exception as e: + logger.error(f"Failed {args.model_type} - {scale}: {e}") + import traceback + traceback.print_exc() + continue + + logger.info(f"\n{'='*60}") + logger.info("=== All scales complete ===") + logger.info(f"Results: {os.path.join(args.output_dir, args.model_type)}") + logger.info(f"{'='*60}") + + +if __name__ == '__main__': + main() diff --git a/swap_analysis/unify_consistency_ylim.py b/swap_analysis/unify_consistency_ylim.py new file mode 100644 index 0000000000000000000000000000000000000000..eb9d457e635d6137b1e7a38edb2eeed0bbe14da2 --- /dev/null +++ b/swap_analysis/unify_consistency_ylim.py @@ -0,0 +1,304 @@ +#!/usr/bin/env python3 +""" +Unify y-axis limits for per-scale trajectory plots across all scales. + +Handles three plot types: + 1. sign_corrected_consistency_{scale}.png + 2. within_cat_consistency_{scale}.png + 3. cross_alignment_{scale}.png + +For each plot type, finds the global min/max values across all scales, +then re-plots every per-scale figure with the same y-axis range, +overwriting the originals. + +Usage: + python unify_consistency_ylim.py --model_type nvila + python unify_consistency_ylim.py --model_type molmo + python unify_consistency_ylim.py --model_type qwen +""" + +import os +import json +import argparse +import logging +import numpy as np + +import matplotlib +matplotlib.use('Agg') +import matplotlib.pyplot as plt + +logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s') +logger = logging.getLogger(__name__) + +CATEGORY_ORDER = ['left', 'right', 'above', 'under', 'far', 'close'] +GROUP_ORDER = ['horizontal', 'vertical', 'distance'] +GROUP_COLORS = {'horizontal': '#2ca02c', 'vertical': '#ff7f0e', 'distance': '#9467bd'} +CAT_COLORS = { + 'left': '#1f77b4', 'right': '#aec7e8', + 'above': '#ff7f0e', 'under': '#ffbb78', + 'far': '#2ca02c', 'close': '#98df8a', +} +SCALE_ORDER = ['vanilla', '80k', '400k', '800k', '2m', 'roborefer'] + + +# ============================================================================ +# Loaders +# ============================================================================ + +def load_keyed_json(path): + """Load JSON with keys like 'group_L0' or 'cat_L0' -> {(name, layer): vals}.""" + if not os.path.exists(path): + return None + with open(path) as f: + raw = json.load(f) + if not raw: + return None + result = {} + for key, vals in raw.items(): + parts = key.rsplit('_L', 1) + if len(parts) == 2: + result[(parts[0], int(parts[1]))] = vals + return result if result else None + + +def load_alignment_json(path): + """Load cross_alignment JSON with keys like 'L0' -> {layer: vals}.""" + if not os.path.exists(path): + return None + with open(path) as f: + raw = json.load(f) + if not raw: + return None + result = {} + for key, vals in raw.items(): + if key.startswith('L'): + result[int(key[1:])] = vals + return result if result else None + + +# ============================================================================ +# Global y-limit computation +# ============================================================================ + +def compute_ylim(all_vals, margin_ratio=0.08): + if not all_vals: + return -1, 1 + ymin, ymax = min(all_vals), max(all_vals) + margin = (ymax - ymin) * margin_ratio + return ymin - margin, ymax + margin + + +def gather_sign_corrected_vals(all_data): + vals = [] + for data in all_data.values(): + for (_, _), v in data.items(): + vals.append(v['mean']) + return vals + + +def gather_within_cat_vals(all_data): + vals = [] + for data in all_data.values(): + for (_, _), v in data.items(): + vals.append(v['mean']) + return vals + + +def gather_alignment_vals(all_data): + """Gather all plotted values: per_sample_mean, mean_delta_alignment, perm bounds.""" + vals = [] + for data in all_data.values(): + for layer, v in data.items(): + vals.append(v['per_sample_mean']) + vals.append(v['mean_delta_alignment']) + vals.append(v['permutation_mean'] + 2 * v['permutation_std']) + vals.append(v['permutation_mean'] - 2 * v['permutation_std']) + return vals + + +# ============================================================================ +# Plot functions (matching swap_analysis.py originals, but with ylim) +# ============================================================================ + +def plot_sign_corrected(data, scale, model_type, save_path, ylim): + fig, ax = plt.subplots(figsize=(12, 6)) + for group in GROUP_ORDER: + layers, vals = [], [] + for (g, l), v in sorted(data.items(), key=lambda x: x[0][1]): + if g == group: + layers.append(l) + vals.append(v['mean']) + if layers: + ax.plot(layers, vals, '-o', color=GROUP_COLORS[group], + label=group, linewidth=2, markersize=3) + ax.set_ylim(ylim) + ax.set_xlabel('Layer Index') + ax.set_ylabel('Sign-Corrected Consistency') + ax.set_title(f'{model_type.upper()} ({scale}) - Sign-Corrected Group Consistency', + fontweight='bold') + ax.legend(fontsize=11) + ax.grid(True, alpha=0.3) + plt.tight_layout() + plt.savefig(save_path, dpi=300, bbox_inches='tight') + plt.close() + + +def plot_within_cat(data, scale, model_type, save_path, ylim): + fig, ax = plt.subplots(figsize=(12, 6)) + for cat in CATEGORY_ORDER: + layers, vals = [], [] + for (c, l), v in sorted(data.items(), key=lambda x: x[0][1]): + if c == cat: + layers.append(l) + vals.append(v['mean']) + if layers: + ax.plot(layers, vals, '-o', color=CAT_COLORS[cat], + label=cat, linewidth=2, markersize=3) + ax.set_ylim(ylim) + ax.set_xlabel('Layer Index') + ax.set_ylabel('Within-Category Consistency') + ax.set_title(f'{model_type.upper()} ({scale}) - Within-Category Delta Consistency', + fontweight='bold') + ax.legend(fontsize=9) + ax.grid(True, alpha=0.3) + plt.tight_layout() + plt.savefig(save_path, dpi=300, bbox_inches='tight') + plt.close() + + +def plot_cross_alignment(data, scale, model_type, save_path, ylim): + fig, ax = plt.subplots(figsize=(12, 6)) + layers = sorted(data.keys()) + actual = [data[l]['per_sample_mean'] for l in layers] + mean_delta = [data[l]['mean_delta_alignment'] for l in layers] + perm_mean = [data[l]['permutation_mean'] for l in layers] + perm_std = [data[l]['permutation_std'] for l in layers] + + ax.plot(layers, actual, '-o', color='#d62728', + label='cos(d_vert, d_dist) per-sample mean', linewidth=2.5, markersize=3) + ax.plot(layers, mean_delta, '--s', color='#e377c2', + label='cos(mean_d_vert, mean_d_dist)', linewidth=1.5, markersize=3) + ax.plot(layers, perm_mean, ':', color='gray', + label='permutation control', linewidth=1.5) + ax.fill_between(layers, + [m - 2*s for m, s in zip(perm_mean, perm_std)], + [m + 2*s for m, s in zip(perm_mean, perm_std)], + alpha=0.2, color='gray') + ax.set_ylim(ylim) + ax.set_xlabel('Layer Index') + ax.set_ylabel('Cosine Alignment') + ax.set_title(f'{model_type.upper()} ({scale}) - Cross-Group Alignment (Perspective Bias)', + fontweight='bold') + ax.legend(fontsize=9) + ax.grid(True, alpha=0.3) + plt.tight_layout() + plt.savefig(save_path, dpi=300, bbox_inches='tight') + plt.close() + + +# ============================================================================ +# Processing +# ============================================================================ + +def process_plot_type(data_dir, plots_dir, conditions, model_type, + plot_name, json_pattern, loader, val_gatherer, plotter): + """Generic processor for one plot type across all conditions.""" + logger.info(f"\n=== {plot_name} ===") + + for condition, condition_tag in conditions: + cond_plot_dir = os.path.join(plots_dir, condition) + if not os.path.isdir(cond_plot_dir): + logger.info(f" Skipping {condition}: plot dir not found") + continue + + # Load all scales + all_data = {} + for scale in SCALE_ORDER: + path = os.path.join(data_dir, 'json', json_pattern.format(scale=scale, tag=condition_tag)) + loaded = loader(path) + if loaded: + all_data[scale] = loaded + + if not all_data: + logger.info(f" Skipping {condition}: no data found") + continue + + # Compute unified ylim + all_vals = val_gatherer(all_data) + ylim = compute_ylim(all_vals) + logger.info(f" {condition}: unified y-axis = [{ylim[0]:.4f}, {ylim[1]:.4f}] " + f"({len(all_data)} scales)") + + # Re-plot each scale + for scale, data in all_data.items(): + fname = f'{plot_name}_{scale}.png' + save_path = os.path.join(cond_plot_dir, fname) + plotter(data, scale, model_type, save_path, ylim) + logger.info(f" Overwrote: {save_path}") + + +def main(): + parser = argparse.ArgumentParser( + description='Unify y-axis limits for per-scale trajectory plots') + parser.add_argument('--model_type', type=str, required=True, + choices=['molmo', 'nvila', 'qwen']) + parser.add_argument('--results_dir', type=str, + default='/data/shared/Qwen/experiments/swap_analysis/results') + args = parser.parse_args() + + data_dir = os.path.join(args.results_dir, args.model_type) + plots_dir = os.path.join(data_dir, 'plots') + + if not os.path.isdir(data_dir): + logger.error(f"Data dir not found: {data_dir}") + return + + logger.info(f"Unifying y-axis for {args.model_type}") + + conditions = [ + ('all', 'all_pairs'), + ('both_correct', 'both_correct'), + ('all_with_validity', 'all_pairs'), + ] + + # 1. Sign-corrected consistency + process_plot_type( + data_dir, plots_dir, conditions, args.model_type, + plot_name='sign_corrected_consistency', + json_pattern='sign_corrected_consistency_{scale}_{tag}.json', + loader=load_keyed_json, + val_gatherer=gather_sign_corrected_vals, + plotter=plot_sign_corrected, + ) + + # 2. Within-category consistency + process_plot_type( + data_dir, plots_dir, conditions, args.model_type, + plot_name='within_cat_consistency', + json_pattern='within_cat_consistency_{scale}_{tag}.json', + loader=load_keyed_json, + val_gatherer=gather_within_cat_vals, + plotter=plot_within_cat, + ) + + # 3. Cross-group alignment (same JSON for all conditions, no tag) + # cross_alignment_{scale}.json has no condition tag + cross_conditions = [ + ('all', 'all_pairs'), + ('both_correct', 'both_correct'), + ('all_with_validity', 'all_pairs'), + ] + process_plot_type( + data_dir, plots_dir, cross_conditions, args.model_type, + plot_name='cross_alignment', + json_pattern='cross_alignment_{scale}.json', + loader=load_alignment_json, + val_gatherer=gather_alignment_vals, + plotter=plot_cross_alignment, + ) + + logger.info("\nDone.") + + +if __name__ == '__main__': + main() diff --git a/swap_analysis_both_scripts/run_nvila_synthetic_mix_both.sh b/swap_analysis_both_scripts/run_nvila_synthetic_mix_both.sh new file mode 100644 index 0000000000000000000000000000000000000000..3f0b033fb9bdaedecfd6b3ac7b3bacab2dd2cd08 --- /dev/null +++ b/swap_analysis_both_scripts/run_nvila_synthetic_mix_both.sh @@ -0,0 +1,23 @@ +#!/bin/bash +set -e + +_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" +SA_SCRIPT="$_DIR/swap_analysis/run_nvila_synthetic_mix.sh" +SAS_SCRIPT="$_DIR/swap_analysis_synthetic/run_nvila_synthetic_mix.sh" + +echo "=========================================" +echo " [1/2] swap_analysis/run_nvila_synthetic_mix.sh" +echo "=========================================" +bash "$SA_SCRIPT" + +echo "" +echo "Waiting 10 seconds before synthetic run..." +sleep 10 + +echo "=========================================" +echo " [2/2] swap_analysis_synthetic/run_nvila_synthetic_mix.sh" +echo "=========================================" +bash "$SAS_SCRIPT" + +echo "" +echo "ALL DONE (real + synthetic): nvila_synthetic_mix" diff --git a/swap_analysis_synthetic/run_molmo.sh b/swap_analysis_synthetic/run_molmo.sh new file mode 100644 index 0000000000000000000000000000000000000000..459ed6b18594c63f2047264e5399aa701acb8490 --- /dev/null +++ b/swap_analysis_synthetic/run_molmo.sh @@ -0,0 +1,73 @@ +#!/bin/bash +set -e + +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +SCRIPT="$SCRIPT_DIR/swap_analysis_synthetic.py" +PYTHON="conda run --no-capture-output -n molmo python" +MODEL="molmo" +LOG_DIR="$SCRIPT_DIR/logs_counter_only/${MODEL}" +mkdir -p "$LOG_DIR" + +# MolmoE-1B: ~25GB per scale → 5 scales fit on GPUs 0-4 (one per GPU) +# Adjust GPUS to match your available GPU layout. +SCALES=("vanilla" "80k" "400k" "800k" "2m") +GPUS=(0 1 2 3 4) + +echo "=========================================" +echo " Molmo Synthetic Swap Analysis (counter-only): Launching ${#SCALES[@]} scales in parallel" +echo "=========================================" + +PIDS=() +for i in "${!SCALES[@]}"; do + scale="${SCALES[$i]}" + gpu="${GPUS[$i]}" + log="${LOG_DIR}/${scale}.log" + + echo "[GPU $gpu] $scale -> $log" + CUDA_VISIBLE_DEVICES=$gpu $PYTHON "$SCRIPT" \ + --model_type $MODEL \ + --scales $scale \ + --device cuda \ + --no-auto-roborefer \ + --counter-only \ + > "$log" 2>&1 & + PIDS+=($!) +done + +echo "" +echo "Waiting for all ${#PIDS[@]} processes..." +FAILED=0 +for i in "${!PIDS[@]}"; do + pid="${PIDS[$i]}" + scale="${SCALES[$i]}" + if wait $pid; then + echo "[DONE] $scale (PID $pid) - SUCCESS" + else + echo "[FAIL] $scale (PID $pid) - EXIT CODE $?" + FAILED=$((FAILED + 1)) + fi +done + +if [ $FAILED -gt 0 ]; then + echo "WARNING: $FAILED scale(s) failed. Check logs in $LOG_DIR" +fi + +echo "=========================================" +echo " Molmo: Merge 1/2 (full, all categories)" +echo "=========================================" +$PYTHON "$SCRIPT" --model_type $MODEL --merge \ + --scales vanilla 80k 400k 800k 2m \ + --counter-only \ + 2>&1 | tee "${LOG_DIR}/merge.log" + +echo "=========================================" +echo " Molmo: Merge 2/2 (VD-only)" +echo "=========================================" +$PYTHON "$SCRIPT" --model_type $MODEL --merge \ + --scales vanilla 80k 400k 800k 2m \ + --counter-only --vd-only \ + 2>&1 | tee "${LOG_DIR}/merge_vd_only.log" + +echo "ALL DONE: $MODEL (counter-only)" +echo "Results (full) : $SCRIPT_DIR/results_counter_only/$MODEL/" +echo "Results (vd-only): $SCRIPT_DIR/results_counter_only/vd-only/$MODEL/" diff --git a/swap_analysis_synthetic/run_molmo_big.sh b/swap_analysis_synthetic/run_molmo_big.sh new file mode 100644 index 0000000000000000000000000000000000000000..d52b6de42ebe1642664be6ec1d29b3bd47a56444 --- /dev/null +++ b/swap_analysis_synthetic/run_molmo_big.sh @@ -0,0 +1,45 @@ +#!/bin/bash +set -e + +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +SCRIPT="$SCRIPT_DIR/swap_analysis_synthetic.py" +PYTHON="conda run --no-capture-output -n molmo python" +MODEL="molmo_big" +LOG_DIR="$SCRIPT_DIR/logs_counter_only/${MODEL}" +mkdir -p "$LOG_DIR" + +# Molmo2-8B: ~20GB with device_map='auto' → fits on a single A100 80GB +# Adjust CUDA_VISIBLE_DEVICES as needed. +SCALE="molmo2" + +echo "=========================================" +echo " Molmo-Big Synthetic Swap Analysis (counter-only): $SCALE" +echo "=========================================" + +log="${LOG_DIR}/${SCALE}.log" +echo "Scale: $SCALE -> $log" + +CUDA_VISIBLE_DEVICES=5 $PYTHON "$SCRIPT" \ + --model_type $MODEL \ + --scales $SCALE \ + --device cuda \ + --counter-only \ + 2>&1 | tee "$log" + +echo "=========================================" +echo " Molmo-Big: Merge 1/2 (full, all categories)" +echo "=========================================" +CUDA_VISIBLE_DEVICES=5 $PYTHON "$SCRIPT" --model_type $MODEL --merge \ + --counter-only \ + 2>&1 | tee "${LOG_DIR}/merge.log" + +echo "=========================================" +echo " Molmo-Big: Merge 2/2 (VD-only)" +echo "=========================================" +CUDA_VISIBLE_DEVICES=5 $PYTHON "$SCRIPT" --model_type $MODEL --merge \ + --counter-only --vd-only \ + 2>&1 | tee "${LOG_DIR}/merge_vd_only.log" + +echo "ALL DONE: $MODEL (counter-only)" +echo "Results (full) : $SCRIPT_DIR/results_counter_only/$MODEL/" +echo "Results (vd-only): $SCRIPT_DIR/results_counter_only/vd-only/$MODEL/" diff --git a/swap_analysis_synthetic/run_nvila.sh b/swap_analysis_synthetic/run_nvila.sh new file mode 100644 index 0000000000000000000000000000000000000000..9214ca6436b20b9d15927c17341e59d3008ad877 --- /dev/null +++ b/swap_analysis_synthetic/run_nvila.sh @@ -0,0 +1,95 @@ +#!/bin/bash +set -e + +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +SCRIPT="$SCRIPT_DIR/swap_analysis_synthetic.py" +PYTHON="conda run --no-capture-output -n vila python" +MODEL="nvila" +RESULTS_BASE="$SCRIPT_DIR/results_counter_only" +RESULTS_BASE_VD="$SCRIPT_DIR/results_counter_only/vd-only" +LOG_DIR="$SCRIPT_DIR/logs_counter_only/${MODEL}" +mkdir -p "$LOG_DIR" + +# NVILA-8B: ~8GB per scale → 6 scales fit on GPUs 0-5 (one per GPU) +# Adjust GPUS to match your available GPU layout. +SCALES=("vanilla" "80k" "400k" "800k" "2m" "roborefer") +GPUS=(2 3 4 5 6 7) + +echo "=========================================" +echo " NVILA Synthetic Swap Analysis (counter-only): Launching ${#SCALES[@]} scales in parallel" +echo "=========================================" + +PIDS=() +for i in "${!SCALES[@]}"; do + scale="${SCALES[$i]}" + gpu="${GPUS[$i]}" + log="${LOG_DIR}/${scale}.log" + + echo "[GPU $gpu] $scale -> $log" + CUDA_VISIBLE_DEVICES=$gpu $PYTHON "$SCRIPT" \ + --model_type $MODEL \ + --scales $scale \ + --device cuda \ + --no-auto-roborefer \ + --counter-only \ + > "$log" 2>&1 & + PIDS+=($!) +done + +echo "" +echo "Waiting for all ${#PIDS[@]} processes..." +FAILED=0 +for i in "${!PIDS[@]}"; do + pid="${PIDS[$i]}" + scale="${SCALES[$i]}" + if wait $pid; then + echo "[DONE] $scale (PID $pid) - SUCCESS" + else + echo "[FAIL] $scale (PID $pid) - EXIT CODE $?" + FAILED=$((FAILED + 1)) + fi +done + +if [ $FAILED -gt 0 ]; then + echo "WARNING: $FAILED scale(s) failed. Check logs in $LOG_DIR" +fi + +echo "=========================================" +echo " NVILA: Merge 1/4 (full, without roborefer)" +echo "=========================================" +$PYTHON "$SCRIPT" --model_type $MODEL --merge \ + --scales vanilla 80k 400k 800k 2m \ + --counter-only \ + 2>&1 | tee "${LOG_DIR}/merge.log" + +echo "=========================================" +echo " NVILA: Merge 2/4 (full, with roborefer)" +echo "=========================================" +$PYTHON "$SCRIPT" --model_type $MODEL --merge \ + --scales vanilla 80k 400k 800k 2m roborefer \ + --counter-only \ + --merge-output-dir "${RESULTS_BASE}/nvila_with_roborefer" \ + 2>&1 | tee "${LOG_DIR}/merge_with_roborefer.log" + +echo "=========================================" +echo " NVILA: Merge 3/4 (VD-only, without roborefer)" +echo "=========================================" +$PYTHON "$SCRIPT" --model_type $MODEL --merge \ + --scales vanilla 80k 400k 800k 2m \ + --counter-only --vd-only \ + 2>&1 | tee "${LOG_DIR}/merge_vd_only.log" + +echo "=========================================" +echo " NVILA: Merge 4/4 (VD-only, with roborefer)" +echo "=========================================" +$PYTHON "$SCRIPT" --model_type $MODEL --merge \ + --scales vanilla 80k 400k 800k 2m roborefer \ + --counter-only --vd-only \ + --merge-output-dir "${RESULTS_BASE_VD}/nvila_with_roborefer" \ + 2>&1 | tee "${LOG_DIR}/merge_vd_only_with_roborefer.log" + +echo "ALL DONE: $MODEL (counter-only)" +echo "Results (full, no roborefer) : ${RESULTS_BASE}/nvila/" +echo "Results (full, with roborefer) : ${RESULTS_BASE}/nvila_with_roborefer/" +echo "Results (vd-only, no roborefer): ${RESULTS_BASE_VD}/nvila/" +echo "Results (vd-only, with roborefer): ${RESULTS_BASE_VD}/nvila_with_roborefer/" diff --git a/swap_analysis_synthetic/run_nvila_st.sh b/swap_analysis_synthetic/run_nvila_st.sh new file mode 100644 index 0000000000000000000000000000000000000000..0ed54c72c8c26e57951add9a37dc16c382d7c787 --- /dev/null +++ b/swap_analysis_synthetic/run_nvila_st.sh @@ -0,0 +1,76 @@ +#!/bin/bash +set -e + +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +SCRIPT="$SCRIPT_DIR/swap_analysis_synthetic.py" +PYTHON="conda run --no-capture-output -n vila python" +MODEL="nvila_st" +LOG_DIR="$SCRIPT_DIR/logs/${MODEL}" +LOG_DIR_CMP="$SCRIPT_DIR/logs/nvila_st_compare" +mkdir -p "$LOG_DIR" "$LOG_DIR_CMP" + +# MCQ-synthetic-trained NVILA checkpoints (~8GB each) +# GPU 5: 80k-st GPU 6: 400k-st GPU 7: 800k-st +SCALES=("80k-st" "400k-st" "800k-st") +GPUS=(0 1 2) + +echo "=========================================" +echo " NVILA-ST Synthetic: Launching ${#SCALES[@]} scales in parallel" +echo "=========================================" + +PIDS=() +for i in "${!SCALES[@]}"; do + scale="${SCALES[$i]}" + gpu="${GPUS[$i]}" + log="${LOG_DIR}/${scale}.log" + + echo "[GPU $gpu] $scale -> $log" + CUDA_VISIBLE_DEVICES=$gpu $PYTHON "$SCRIPT" \ + --model_type $MODEL \ + --scales $scale \ + --device cuda \ + --no-auto-roborefer \ + > "$log" 2>&1 & + PIDS+=($!) +done + +echo "" +echo "Waiting for all ${#PIDS[@]} processes..." +FAILED=0 +for i in "${!PIDS[@]}"; do + pid="${PIDS[$i]}" + scale="${SCALES[$i]}" + if wait $pid; then + echo "[DONE] $scale (PID $pid) - SUCCESS" + else + echo "[FAIL] $scale (PID $pid) - EXIT CODE $?" + FAILED=$((FAILED + 1)) + fi +done + +if [ $FAILED -gt 0 ]; then + echo "WARNING: $FAILED scale(s) failed. Check logs in $LOG_DIR" +fi + +# nvila_st_compare merges nvila baselines (vanilla/80k/400k/800k/2m) +# with nvila_st checkpoints (80k-st/400k-st/800k-st). +# Requires nvila baseline results to already exist (run run_nvila.sh first). + +echo "=========================================" +echo " NVILA-ST Compare: Merge 1/2 (full, all categories)" +echo "=========================================" +$PYTHON "$SCRIPT" --model_type nvila_st_compare --merge \ + 2>&1 | tee "${LOG_DIR_CMP}/merge.log" + +echo "=========================================" +echo " NVILA-ST Compare: Merge 2/2 (VD-only)" +echo "=========================================" +$PYTHON "$SCRIPT" --model_type nvila_st_compare --merge \ + --vd-only \ + 2>&1 | tee "${LOG_DIR_CMP}/merge_vd_only.log" + +echo "" +echo "ALL DONE: $MODEL (synthetic)" +echo "Inference results : $SCRIPT_DIR/results/$MODEL/" +echo "Compare (full) : $SCRIPT_DIR/results/nvila_st_compare/" +echo "Compare (vd-only) : $SCRIPT_DIR/results/vd-only/nvila_st_compare/" diff --git a/swap_analysis_synthetic/run_nvila_synthetic_mix.sh b/swap_analysis_synthetic/run_nvila_synthetic_mix.sh new file mode 100644 index 0000000000000000000000000000000000000000..6db03f0a733ff850d6c96af34792ef8f49a476d1 --- /dev/null +++ b/swap_analysis_synthetic/run_nvila_synthetic_mix.sh @@ -0,0 +1,82 @@ +#!/bin/bash +set -e + +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +SCRIPT="$SCRIPT_DIR/swap_analysis_synthetic.py" +PYTHON="conda run --no-capture-output -n vila python" +LOG_BASE="$SCRIPT_DIR/logs_counter_only" + +# 6 models to run for nvila_synth_compare (synthetic benchmark): +# vanilla / 80k / 400k → model_type=nvila (existing fine-tuned models) +# 80k-5pct / 80k-10pct / 400k-5pct → model_type=nvila_synthetic (new synthetic-mix models) +# +# GPU assignment (NVILA ~8GB each): +# GPU 0: nvila/vanilla GPU 1: nvila/80k +# GPU 2: nvila_synthetic/80k-5pct GPU 3: nvila_synthetic/80k-10pct +# GPU 4: nvila/400k GPU 5: nvila_synthetic/400k-5pct + +declare -a MODEL_TYPES=("nvila" "nvila" "nvila_synthetic" "nvila_synthetic" "nvila" "nvila_synthetic") +declare -a SCALES=( "vanilla" "80k" "80k-5pct" "80k-10pct" "400k" "400k-5pct") +declare -a GPUS=( 0 1 2 3 4 5) + +echo "=========================================" +echo " NVILA-Synthetic Mix (counter-only): Launching 6 models in parallel" +echo "=========================================" + +PIDS=() +for i in "${!SCALES[@]}"; do + mtype="${MODEL_TYPES[$i]}" + scale="${SCALES[$i]}" + gpu="${GPUS[$i]}" + log="${LOG_BASE}/${mtype}/${scale}.log" + mkdir -p "${LOG_BASE}/${mtype}" + + echo "[GPU $gpu] ${mtype}/${scale} -> $log" + CUDA_VISIBLE_DEVICES=$gpu $PYTHON "$SCRIPT" \ + --model_type $mtype \ + --scales $scale \ + --device cuda \ + --no-auto-roborefer \ + --counter-only \ + > "$log" 2>&1 & + PIDS+=($!) +done + +echo "" +echo "Waiting for all ${#PIDS[@]} processes..." +FAILED=0 +for i in "${!PIDS[@]}"; do + pid="${PIDS[$i]}" + label="${MODEL_TYPES[$i]}/${SCALES[$i]}" + if wait $pid; then + echo "[DONE] $label (PID $pid) - SUCCESS" + else + echo "[FAIL] $label (PID $pid) - EXIT CODE $?" + FAILED=$((FAILED + 1)) + fi +done + +if [ $FAILED -gt 0 ]; then + echo "WARNING: $FAILED process(es) failed. Check logs in $LOG_BASE" +fi + +LOG_DIR_CMP="${LOG_BASE}/nvila_synth_compare" +mkdir -p "$LOG_DIR_CMP" + +echo "=========================================" +echo " NVILA-Synthetic Mix: Merge 1/2 (full, all categories)" +echo "=========================================" +$PYTHON "$SCRIPT" --model_type nvila_synth_compare --merge \ + --counter-only \ + 2>&1 | tee "${LOG_DIR_CMP}/merge.log" + +echo "=========================================" +echo " NVILA-Synthetic Mix: Merge 2/2 (VD-only)" +echo "=========================================" +$PYTHON "$SCRIPT" --model_type nvila_synth_compare --merge \ + --counter-only --vd-only \ + 2>&1 | tee "${LOG_DIR_CMP}/merge_vd_only.log" + +echo "ALL DONE (counter-only)" +echo "Results (full) : $SCRIPT_DIR/results_counter_only/nvila_synth_compare/" +echo "Results (vd-only): $SCRIPT_DIR/results_counter_only/vd-only/nvila_synth_compare/" diff --git a/swap_analysis_synthetic/run_qwen_super.sh b/swap_analysis_synthetic/run_qwen_super.sh new file mode 100644 index 0000000000000000000000000000000000000000..27871334b6388494d34183dd73c2509a4d428308 --- /dev/null +++ b/swap_analysis_synthetic/run_qwen_super.sh @@ -0,0 +1,36 @@ +#!/bin/bash +set -e + +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +SCRIPT="$SCRIPT_DIR/swap_analysis_synthetic.py" +PYTHON="$(which python)" +MODEL="qwen_super" +LOG_DIR="$SCRIPT_DIR/logs_qwen3_p_0.5/${MODEL}" +mkdir -p "$LOG_DIR" + +# Qwen3-VL-235B: ~470GB with device_map='auto' → needs all 8× A100 80GB +# Runs as a single process using pipeline parallelism. +SCALE="qwen3_235b" + +echo "=========================================" +echo " Qwen-Super Synthetic Swap Analysis (p=0.5): $SCALE" +echo "=========================================" + +log="${LOG_DIR}/${SCALE}.log" +echo "Scale: $SCALE -> $log" + +CUDA_VISIBLE_DEVICES=0,1,2,3,4,5,6,7 $PYTHON "$SCRIPT" \ + --model_type $MODEL \ + --scales $SCALE \ + --device cuda \ + 2>&1 | tee "$log" + +echo "=========================================" +echo " Qwen-Super: Merge (full, all categories)" +echo "=========================================" +CUDA_VISIBLE_DEVICES=0 $PYTHON "$SCRIPT" --model_type $MODEL --merge \ + 2>&1 | tee "${LOG_DIR}/merge.log" + + +echo "ALL DONE: $MODEL (p=0.5)" +echo "Results (full) : $SCRIPT_DIR/results_qwen3_p_0.5/$MODEL/" diff --git a/swap_analysis_synthetic/test_qwen3vl.py b/swap_analysis_synthetic/test_qwen3vl.py new file mode 100644 index 0000000000000000000000000000000000000000..4b69715457ac050d12ca37f7e6c89dd530c284e0 --- /dev/null +++ b/swap_analysis_synthetic/test_qwen3vl.py @@ -0,0 +1,7 @@ +from transformers import Qwen3VLMoeForConditionalGeneration +model = Qwen3VLMoeForConditionalGeneration.from_pretrained( + "Qwen/Qwen3-VL-235B-A22B-Instruct", + torch_dtype="auto", + device_map="auto" +) +print("성공!")