Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitc99a16a

Browse files
dan9thsensepeteflorence
dan9thsense
authored andcommitted
Add check to see if have cross-scene data
1 parentc3b068a commitc99a16a

File tree

1 file changed

+17
-4
lines changed

1 file changed

+17
-4
lines changed

‎dense_correspondence/evaluation/evaluation.py‎

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -276,14 +276,21 @@ def evaluate_network_cross_scene(dcn=None, dataset=None, save=True):
276276
forannotated_pairincross_scene_data:
277277

278278
scene_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+
ifnotos.path.isdir(dataset.get_full_path_for_scene(scene_name_a))\
282+
ornotos.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+
281287
image_a_idx=annotated_pair["image_a"]["image_idx"]
282288
image_b_idx=annotated_pair["image_b"]["image_idx"]
283289

284290
img_a_pixels=annotated_pair["image_a"]["pixels"]
285291
img_b_pixels=annotated_pair["image_b"]["pixels"]
286292

293+
287294
dataframe_list_temp=\
288295
DenseCorrespondenceEvaluation.single_cross_scene_image_pair_quantitative_analysis(dcn,
289296
dataset,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
15381545
forannotated_pairincross_scene_data:
15391546

15401547
scene_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+
ifnotos.path.isdir(dataset.get_full_path_for_scene(scene_name_a))\
1552+
ornotos.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)
15431556
image_a_idx=annotated_pair["image_a"]["image_idx"]
15441557
image_b_idx=annotated_pair["image_b"]["image_idx"]
15451558

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp