Skip to content

Commit

Permalink
Fix the bug of generating HMDB51 class index file. (#69)
Browse files Browse the repository at this point in the history
  • Loading branch information
yzfly committed Jul 29, 2020
1 parent 62f55c2 commit 70b7998
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tools/data/parse_file_list.py
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ def generate_class_index_file():
frame_path = 'data/hmdb51/rawframes'
annotation_dir = 'data/hmdb51/annotations'

class_list = os.listdir(frame_path).sort()
class_list = sorted(os.listdir(frame_path))
class_dict = dict()
with open(class_index_file, 'w') as f:
content = []
Expand All @@ -388,7 +388,7 @@ def generate_class_index_file():
with open(train_file_template.format(i), 'w') as fout:
content = []
for class_name in class_dict:
filename = class_name + f'_train_split{i}.txt'
filename = class_name + f'_test_split{i}.txt'
filename_path = osp.join(annotation_dir, filename)
with open(filename_path, 'r') as fin:
for line in fin:
Expand Down

0 comments on commit 70b7998

Please sign in to comment.