@@ -466,12 +466,12 @@ def generate_ground_truth_from_paths(trajectory_paths: List[str], output_dir: st
466466def run_complete_pipeline (
467467 trajectory_gcs_paths : List [str ],
468468 output_dir : str ,
469- image_key : str = "observation/images/exterior_image_1_left" ,
470469 language_key : str = "metadata/language_instruction" ,
471470 question : str = "Is this trajectory successful?" ,
472471 max_workers : int = 4 ,
473472 skip_download : bool = False ,
474- generate_ground_truth : bool = False
473+ generate_ground_truth : bool = False ,
474+ video_path_key : Optional [str ] = None
475475) -> Dict :
476476 """
477477 Run complete pipeline: download → process → validate.
@@ -548,11 +548,12 @@ def run_complete_pipeline(
548548 # Try to use the actual VLM processing with trajectory directories
549549 vlm_results = process_trajectories_parallel (
550550 trajectory_paths_for_vlm ,
551- image_key = image_key ,
551+ image_key = "" , # Not used for DROID directories with video_path_key
552552 language_key = language_key ,
553553 question = question ,
554554 max_workers = max_workers ,
555- output_dir = f"{ output_dir } /vlm_detailed_results"
555+ output_dir = f"{ output_dir } /vlm_detailed_results" ,
556+ video_path_key = video_path_key
556557 )
557558 print (f"✅ VLM processing completed successfully" )
558559 except Exception as e :
@@ -737,13 +738,8 @@ def main():
737738 )
738739 parser .add_argument (
739740 "--output-dir" ,
740- default = "./results" ,
741- help = "Output directory for all pipeline results (default: ./results)"
742- )
743- parser .add_argument (
744- "--image-key" ,
745- default = "observation/images/exterior_image_1_left" ,
746- help = "Key to extract images from trajectories (default: exterior_image_1_left)"
741+ default = "./output" ,
742+ help = "Output directory for all pipeline results (default: ./output)"
747743 )
748744 parser .add_argument (
749745 "--language-key" ,
@@ -777,6 +773,10 @@ def main():
777773 action = "store_true" ,
778774 help = "Show what would be processed without actually running"
779775 )
776+ parser .add_argument (
777+ "--video-path-key" ,
778+ help = "Specific video path key from metadata (e.g., 'ext1_mp4_path', 'wrist_mp4_path')"
779+ )
780780
781781 parser .set_defaults (generate_ground_truth = True )
782782 args = parser .parse_args ()
@@ -856,7 +856,7 @@ def main():
856856 for i , path in enumerate (trajectory_paths , 1 ):
857857 print (f" { i } . { path } " )
858858 print (f"Output directory: { args .output_dir } " )
859- print (f"Image key: { args .image_key } " )
859+ print (f"Video path key: { args .video_path_key or 'auto-detect' } " )
860860 print (f"Language key: { args .language_key } " )
861861 print (f"VLM question: { args .question } " )
862862 print (f"Max workers: { args .max_workers } " )
@@ -868,12 +868,12 @@ def main():
868868 results = run_complete_pipeline (
869869 trajectory_gcs_paths = trajectory_paths ,
870870 output_dir = args .output_dir ,
871- image_key = args .image_key ,
872871 language_key = args .language_key ,
873872 question = args .question ,
874873 max_workers = args .max_workers ,
875874 skip_download = args .skip_download ,
876- generate_ground_truth = args .generate_ground_truth
875+ generate_ground_truth = args .generate_ground_truth ,
876+ video_path_key = args .video_path_key
877877 )
878878
879879 # Check if pipeline was successful
0 commit comments