Dataset Comparison

L3
ModelContextProtocolFilesystemVotenet

Map ScanNet object categories to their SUN RGB-D equivalents and calculate detailed object counts for each mapped category.

Created by Lingjun Chen
2025-08-13
Cross ReferencingData ExtractionPattern Analysis

Model Ranking

Click on the dots to view the trajectory of each task run
Model
Run Results
Pass@4
Pass^4
Avg Time
Avg Turns
Input Tokens
Output Tokens
Total Tokens
OpenAI
gpt-5
2
/4
220.8s
10.0
104,374
13,299
117,673
Claude
claude-4-1-opus
0
/1
--
335.7s
16.0
567,839
4,403
572,242
Claude
claude-4-sonnet
0
/4
130.8s
11.5
263,917
2,147
266,064
DeepSeek
deepseek-chat
0
/4
231.0s
21.5
573,823
2,345
576,168
Gemini
gemini-2-5-pro
0
/4
353.4s
12.3
225,797
6,008
231,805
Grok
grok-4
0
/4
384.6s
14.8
-
-
-
MoonshotAI
k2
0
/4
79.2s
11.5
181,516
1,207
182,723
OpenAI
o3
0
/4
236.4s
25.8
757,304
13,384
770,688
Qwen
qwen-3-coder
0
/4
107.0s
15.3
426,417
1,850
428,267

Task State

Task Initial State Files
Download ZIP package to view the complete file structure
votenet/ ├── doc/ │ ├── teaser.jpg │ └── tips.md ├── models/ │ ├── ap_helper.py │ ├── backbone_module.py │ ├── boxnet.py │ ├── dump_helper.py │ ├── loss_helper.py │ ├── loss_helper_boxnet.py │ ├── proposal_module.py │ ├── votenet.py │ └── voting_module.py ├── pointnet2/ │ ├── _ext_src/ │ │ ├── include/ │ │ │ ├── ball_query.h │ │ │ ├── cuda_utils.h │ │ │ ├── group_points.h │ │ │ ├── interpolate.h │ │ │ ├── sampling.h │ │ │ └── utils.h │ │ └── src/ │ │ ├── ball_query.cpp │ │ ├── ball_query_gpu.cu │ │ ├── bindings.cpp │ │ ├── group_points.cpp │ │ ├── group_points_gpu.cu │ │ ├── interpolate.cpp │ │ ├── interpolate_gpu.cu │ │ ├── sampling.cpp │ │ └── sampling_gpu.cu │ ├── pointnet2_modules.py │ ├── pointnet2_test.py │ ├── pointnet2_utils.py │ ├── pytorch_utils.py │ └── setup.py ├── scannet/ │ ├── meta_data/ │ │ ├── scannet_means.npz │ │ ├── scannet_train.txt │ │ ├── scannetv2-labels.combined.tsv │ │ ├── scannetv2_test.txt │ │ ├── scannetv2_train.txt │ │ └── scannetv2_val.txt │ ├── scans/ │ ├── batch_load_scannet_data.py │ ├── data_viz.py │ ├── load_scannet_data.py │ ├── model_util_scannet.py │ ├── README.md │ ├── scannet_detection_dataset.py │ └── scannet_utils.py ├── sunrgbd/ │ ├── matlab/ │ │ ├── extract_rgbd_data_v1.m │ │ ├── extract_rgbd_data_v2.m │ │ └── extract_split.m │ ├── OFFICIAL_SUNRGBD/ │ ├── sunrgbd_trainval/ │ ├── model_util_sunrgbd.py │ ├── README.md │ ├── sunrgbd_data.py │ ├── sunrgbd_detection_dataset.py │ └── sunrgbd_utils.py ├── utils/ │ ├── box_util.py │ ├── eval_det.py │ ├── metric_util.py │ ├── nms.py │ ├── nn_distance.py │ ├── pc_util.py │ ├── tf_logger.py │ └── tf_visualizer.py ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── demo.py ├── eval.py ├── LICENSE ├── README.md └── train.py

Instruction



Verify

*.py
Python
#!/usr/bin/env python3
"""
Verification script for Votenet Dataset Comparison Task
"""

import sys
from pathlib import Path
import re
import os

def get_test_directory() -> Path:
    """Get the test directory from FILESYSTEM_TEST_DIR env var."""
    test_root = os.environ.get("FILESYSTEM_TEST_DIR")
    if not test_root:
        raise ValueError("FILESYSTEM_TEST_DIR environment variable is required")
    return Path(test_root)

def verify_analysis_file_exists(test_dir: Path) -> bool:
    """Verify that the analysis.txt file exists."""
    analysis_file = test_dir / "analysis.txt"
    
    if not analysis_file.exists():
        print("❌ File 'analysis.txt' not found")
        return False
    
    print("✅ Analysis file found")
    return True

def verify_analysis_format(test_dir: Path) -> bool:
    """Verify that the analysis file has the correct format."""
    analysis_file = test_dir / "analysis.txt"
    
    try:
        content = analysis_file.read_text()
        lines = content.split('\n')
        
        # Check if content is not empty
        if not content.strip():
            print("❌ Analysis file is empty")
            return False
        
        # Check if we have enough lines for at least one category block
        if len(lines) < 2:
            print("❌ Analysis file doesn't have enough lines for a category block")
            return False
        
        # Check if the format follows the 2-line block pattern with empty lines between blocks
        # Each block should have: category_name, count, empty_line
        line_index = 0
        block_count = 0
        
        while line_index < len(lines):
            # Skip leading empty lines
            while line_index < len(lines) and lines[line_index].strip() == "":
                line_index += 1
            
            if line_index >= len(lines):
                break
            
            # Check if we have at least 2 lines for a block
            if line_index + 1 >= len(lines):
                print("❌ Incomplete category block at the end")
                return False
            
            # Line 1 should be category name
            category_line = lines[line_index].strip()
            if not category_line:
                print(f"❌ Empty category name at line {line_index + 1}")
                return False
            
            # Line 2 should be count
            count_line = lines[line_index + 1].strip()
            if not count_line:
                print(f"❌ Empty count at line {line_index + 2}")
                return False
            
            # Check if count line contains a number
            if not re.search(r'\d+', count_line):
                print(f"❌ Count line doesn't contain a number at line {line_index + 2}: '{count_line}'")
                return False
            
            block_count += 1
            line_index += 2
            
            # Skip empty line between blocks (if not at the end)
            if line_index < len(lines) and lines[line_index].strip() == "":
                line_index += 1
        
        if block_count == 0:
            print("❌ No valid category blocks found")
            return False
        
        print(f"✅ Analysis format is correct with {block_count} category blocks")
        return True
        
    except Exception as e:
        print(f"❌ Error reading analysis file: {e}")
        return False

def verify_required_categories(test_dir: Path) -> bool:
    """Verify that all required SUN RGB-D categories are present."""
    analysis_file = test_dir / "analysis.txt"
    
    try:
        content = analysis_file.read_text()
        lines = content.split('\n')
        
        # Extract category names from the file
        categories_found = []
        line_index = 0
        
        while line_index < len(lines):
            # Skip empty lines
            while line_index < len(lines) and lines[line_index].strip() == "":
                line_index += 1
            
            if line_index >= len(lines):
                break
            
            # Get category name
            category_line = lines[line_index].strip()
            if category_line:
                categories_found.append(category_line.lower())
            
            # Skip to next block
            line_index += 2
            while line_index < len(lines) and lines[line_index].strip() == "":
                line_index += 1
        
        # Required categories
        required_categories = {
            'chair', 'table', 'bed', 'bookshelf', 'desk', 
            'toilet', 'dresser', 'bathtub', 'sofa', 'night_stand'
        }
        
        # Check if all required categories are present
        missing_categories = required_categories - set(categories_found)
        if missing_categories:
            print(f"❌ Missing required categories: {missing_categories}")
            return False
        
        # Check for extra categories
        extra_categories = set(categories_found) - required_categories
        if extra_categories:
            print(f"⚠️  Extra categories found: {extra_categories}")
        
        print(f"✅ All required categories present: {sorted(required_categories)}")
        return True
        
    except Exception as e:
        print(f"❌ Error verifying required categories: {e}")
        return False

def verify_category_counts(test_dir: Path) -> bool:
    """Verify that the category counts match the expected values."""
    analysis_file = test_dir / "analysis.txt"
    
    try:
        content = analysis_file.read_text()
        lines = content.split('\n')
        
        # Expected counts from answer.txt
        expected_counts = {
            'chair': 4681,
            'table': 1170,
            'bed': 370,
            'bookshelf': 377,
            'desk': 680,
            'toilet': 256,
            'dresser': 213,
            'bathtub': 144,
            'sofa': 1,
            'night_stand': 224
        }
        
        # Extract category counts from the file
        category_counts = {}
        line_index = 0
        
        while line_index < len(lines):
            # Skip empty lines
            while line_index < len(lines) and lines[line_index].strip() == "":
                line_index += 1
            
            if line_index >= len(lines):
                break
            
            # Get category name
            category_line = lines[line_index].strip()
            if not category_line:
                line_index += 1
                continue
            
            # Get count
            if line_index + 1 < len(lines):
                count_line = lines[line_index + 1].strip()
                if count_line:
                    # Extract number from count line
                    count_match = re.search(r'(\d+)', count_line)
                    if count_match:
                        category = category_line.lower()
                        count = int(count_match.group(1))
                        category_counts[category] = count
            
            # Skip to next block
            line_index += 2
            while line_index < len(lines) and lines[line_index].strip() == "":
                line_index += 1
        
        # Verify counts match expected values
        all_counts_correct = True
        for category, expected_count in expected_counts.items():
            if category in category_counts:
                actual_count = category_counts[category]
                if actual_count != expected_count:
                    print(f"❌ Count mismatch for {category}: expected {expected_count}, got {actual_count}")
                    all_counts_correct = False
            else:
                print(f"❌ Category {category} not found in analysis")
                all_counts_correct = False
        
        if all_counts_correct:
            print("✅ All category counts match expected values")
            return True
        else:
            return False
        
    except Exception as e:
        print(f"❌ Error verifying category counts: {e}")
        return False

def verify_file_structure(test_dir: Path) -> bool:
    """Verify that the analysis.txt file is in the correct location."""
    analysis_file = test_dir / "analysis.txt"
    
    if not analysis_file.exists():
        print("❌ Analysis file not found in test directory root")
        return False
    
    # Check if it's directly in the test directory root, not in a subdirectory
    if analysis_file.parent != test_dir:
        print("❌ Analysis file should be in the test directory root")
        return False
    
    print("✅ Analysis file is in the correct location")
    return True

def main():
    """Main verification function."""
    test_dir = get_test_directory()
    print("🔍 Verifying Votenet Dataset Comparison Task...")
    
    # Define verification steps
    verification_steps = [
        ("Analysis File Exists", verify_analysis_file_exists),
        ("File Location", verify_file_structure),
        ("File Format", verify_analysis_format),
        ("Required Categories", verify_required_categories),
        ("Category Counts", verify_category_counts),
    ]
    
    # Run all verification steps
    all_passed = True
    for step_name, verify_func in verification_steps:
        print(f"\n--- {step_name} ---")
        if not verify_func(test_dir):
            all_passed = False
    
    # Final result
    print("\n" + "="*50)
    if all_passed:
        print("✅ Votenet dataset comparison task completed correctly!")
        print("🎉 Task verification: PASS")
        sys.exit(0)
    else:
        print("❌ Task verification: FAIL")
        sys.exit(1)

if __name__ == "__main__":
    main()