@@ -276,14 +276,21 @@ def evaluate_network_cross_scene(dcn=None, dataset=None, save=True):
276276for annotated_pair in cross_scene_data :
277277
278278scene_name_a = annotated_pair ["image_a" ]["scene_name" ]
279- scene_name_b = annotated_pair ["image_b" ]["scene_name" ]
280-
279+ scene_name_b = annotated_pair ["image_b" ]["scene_name" ]
280+
281+ if not os .path .isdir (dataset .get_full_path_for_scene (scene_name_a ))\
282+ or not os .path .isdir (dataset .get_full_path_for_scene (scene_name_b )):
283+ print ("at least one of these scene names does not exist:" ,scene_name_a ,scene_name_b )
284+ continue
285+ print ("these scene names both exist:" ,scene_name_a ,scene_name_b )
286+
281287image_a_idx = annotated_pair ["image_a" ]["image_idx" ]
282288image_b_idx = annotated_pair ["image_b" ]["image_idx" ]
283289
284290img_a_pixels = annotated_pair ["image_a" ]["pixels" ]
285291img_b_pixels = annotated_pair ["image_b" ]["pixels" ]
286292
293+
287294dataframe_list_temp = \
288295DenseCorrespondenceEvaluation .single_cross_scene_image_pair_quantitative_analysis (dcn ,
289296dataset ,scene_name_a ,image_a_idx ,scene_name_b ,image_b_idx ,
@@ -1538,8 +1545,14 @@ def evaluate_network_qualitative_cross_scene(dcn, dataset, draw_human_annotation
15381545for annotated_pair in cross_scene_data :
15391546
15401547scene_name_a = annotated_pair ["image_a" ]["scene_name" ]
1541- scene_name_b = annotated_pair ["image_b" ]["scene_name" ]
1542-
1548+ scene_name_b = annotated_pair ["image_b" ]["scene_name" ]
1549+ # some labeled cross scene data may not be in the configured dataset
1550+ # this checks that the scenes actually exist (i.e., have been downloaded)
1551+ if not os .path .isdir (dataset .get_full_path_for_scene (scene_name_a ))\
1552+ or not os .path .isdir (dataset .get_full_path_for_scene (scene_name_b )):
1553+ print ("at least one of these scene names does not exist:" ,scene_name_a ,scene_name_b )
1554+ continue
1555+ print ("these scene names exist:" ,scene_name_a ,scene_name_b )
15431556image_a_idx = annotated_pair ["image_a" ]["image_idx" ]
15441557image_b_idx = annotated_pair ["image_b" ]["image_idx" ]
15451558