未验证 提交 d7fbd956 编写于 作者: H huangjun12 提交者: GitHub

fix bug of annotation file root in bmn (#4416)

* fix bug of annotation file root

* fix bug of feature file not exists
上级 9538969d
......@@ -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:
......
......@@ -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 = []
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册