FangSen9000
Attempted to submit 4 changes, although the reasoning degraded, the reasoning could still run.
1eb306c
import numpy as np
import os
from pathlib import Path
# Load training data
train_info = np.load('asllrp/train_info.npy', allow_pickle=True).item()
print("=== TRAINING DATA STRUCTURE ===")
print(f"Number of training samples: {len(train_info) - 1}") # -1 for 'prefix' key
print(f"Prefix: {train_info.get('prefix', 'N/A')}")
# Check a few samples
for i in range(min(5, len(train_info) - 1)):
sample = train_info[i]
print(f"\nSample {i}:")
for key in sample.keys():
val = sample[key]
if key == 'label':
print(f" {key}: {val} (length: {len(val) if hasattr(val, '__len__') else 'N/A'})")
elif key == 'folder':
# Check if the folder exists
folder_path = Path(val)
exists = folder_path.exists()
if exists:
jpg_files = list(folder_path.glob('*.jpg'))
print(f" {key}: {val} (exists: {exists}, jpg files: {len(jpg_files)})")
else:
print(f" {key}: {val} (exists: {exists})")
else:
print(f" {key}: {val}")
# Check if video folders exist
print("\n=== CHECKING VIDEO FOLDER PATHS ===")
missing_folders = []
for i in range(min(10, len(train_info) - 1)):
sample = train_info[i]
folder = sample.get('folder', '')
if not Path(folder).exists():
missing_folders.append(folder)
if missing_folders:
print(f"WARNING: {len(missing_folders)} out of 10 sample folders are missing!")
print("First missing folder:", missing_folders[0] if missing_folders else "None")
else:
print("All checked folders exist")