diff --git a/dygraph/bmn/bmn.yaml b/dygraph/bmn/bmn.yaml index e16fa53bc01c4a94fcfb9781091443fa4e55775c..dbcb2f649ffdb2e612b76abcb415dcc27e10bd61 100644 --- a/dygraph/bmn/bmn.yaml +++ b/dygraph/bmn/bmn.yaml @@ -6,7 +6,7 @@ MODEL: prop_boundary_ratio: 0.5 num_sample: 32 num_sample_perbin: 3 - anno_file: "../../PaddleCV/PaddleVideo/data/dataset/bmn/activitynet_1.3_annotations.json" + anno_file: "../../PaddleCV/video/data/dataset/bmn/activitynet_1.3_annotations.json" feat_path: './fix_feat_100' TRAIN: diff --git a/dygraph/bmn/reader.py b/dygraph/bmn/reader.py index 11209fee20c6f7e9fb84c98441eb1ff0796b307a..d76ff5e578213d7736d7cdf62a56d48394b813a9 100644 --- a/dygraph/bmn/reader.py +++ b/dygraph/bmn/reader.py @@ -48,7 +48,7 @@ class BMNReader(): def get_dataset_dict(self): assert (os.path.exists(self.feat_path)), "Input feature path not exists" - assert (os.listdir(self.feat_path)), "Input feature file not exists" + assert (os.listdir(self.feat_path)), "No feature file in feature path" self.video_dict = {} if self.mode == "infer": annos = json.load(open(self.file_list)) @@ -64,6 +64,10 @@ class BMNReader(): self.video_list.sort() print("%s subset video numbers: %d" % (self.subset, len(self.video_list))) + video_name_set = set( + [video_name + '.npy' for video_name in self.video_list]) + assert (video_name_set.intersection(set(os.listdir(self.feat_path))) == + video_name_set), "Input feature not exists in feature path" def get_match_map(self): match_map = []