Skip to content

Commit

Permalink
change net_input to 112 according to r(2+1)d, accelerate training
Browse files Browse the repository at this point in the history
  • Loading branch information
cr committed Jan 25, 2019
1 parent 806af3b commit 532e3cc
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions lib/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ def __init__(self, directory, mode='train', clip_len=8, frame_sample_rate=1):
folder = Path(directory)/mode # get the directory of the specified split
self.clip_len = clip_len

self.short_side = [256, 320]
self.crop_size = 224
self.short_side = [128, 160]
self.crop_size = 112
self.frame_sample_rate = frame_sample_rate
self.mode = mode

Expand All @@ -28,7 +28,8 @@ def __init__(self, directory, mode='train', clip_len=8, frame_sample_rate=1):
# convert the list of label names into an array of label indices
self.label_array = np.array([self.label2index[label] for label in labels], dtype=int)

with open('labels.txt', 'w') as f:
label_file = str(os.listdir(folder))+'class_labels.txt'
with open(label_file, 'w') as f:
for id, label in enumerate(sorted(self.label2index)):
f.writelines(str(id + 1) + ' ' + label + '\n')

Expand Down

0 comments on commit 532e3cc

Please sign in to comment.