Skip to content

Commit

Permalink
Fix conflicts in start idx.
Browse files Browse the repository at this point in the history
  • Loading branch information
JackyTown committed Jul 28, 2020
1 parent b837bcb commit b3f6166
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions mmaction/datasets/pipelines/loading.py
Original file line number Diff line number Diff line change
Expand Up @@ -403,9 +403,9 @@ def _get_proposal_clips(self, proposal, num_frames):
valid_ending = min(num_frames - ori_clip_len + 1,
end_frame + int(duration * self.aug_ratio[1]))

valid_starting_length = (
start_frame - valid_starting - ori_clip_len + 1)
valid_ending_length = valid_ending - end_frame - ori_clip_len + 1
valid_starting_length = (start_frame - valid_starting +
1) - ori_clip_len
valid_ending_length = (valid_ending - end_frame + 1) - ori_clip_len

if self.mode == 'train':
starting_offsets = self._get_train_indices(valid_starting_length,
Expand Down Expand Up @@ -464,7 +464,7 @@ def _get_test_clips(self, num_frames):
"""
ori_clip_len = self.clip_len * self.frame_interval
return np.arange(
0, num_frames - ori_clip_len, self.test_interval, dtype=int) + 1
0, num_frames - ori_clip_len, self.test_interval, dtype=int)

def _sample_clips(self, num_frames, proposals):
"""Choose clip offsets for the video in a given mode.
Expand Down

0 comments on commit b3f6166

Please # to comment.