Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add modules of SSN pipeline. #33

Merged
merged 8 commits into from
Jul 29, 2020
Merged

Conversation

JackyTown
Copy link
Contributor

No description provided.

@codecov
Copy link

codecov bot commented Jul 17, 2020

Codecov Report

Merging #33 into master will increase coverage by 0.26%.
The diff coverage is 95.74%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #33      +/-   ##
==========================================
+ Coverage   84.90%   85.17%   +0.26%     
==========================================
  Files          73       73              
  Lines        3889     3979      +90     
  Branches      632      643      +11     
==========================================
+ Hits         3302     3389      +87     
  Misses        485      485              
- Partials      102      105       +3     
Flag Coverage Δ
#unittests 85.17% <95.74%> (+0.26%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
mmaction/datasets/pipelines/__init__.py 100.00% <ø> (ø)
mmaction/datasets/pipelines/formating.py 93.85% <85.71%> (+0.34%) ⬆️
mmaction/datasets/pipelines/loading.py 93.76% <96.55%> (+0.67%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 97b768e...a8466bb. Read the comment docs.

@dreamerlin dreamerlin self-requested a review July 17, 2020 12:50
Returns:
np.ndarray: Sampled frame indices in train mode.
"""
start_frame = proposal.start_frame + 1
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why +1?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because the interval of the proposal is (proposal.start_frame, proposal.end_frame]

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why did they choose this convention? can we change it to the python-style interval?

@innerlee
Copy link
Contributor

kindly ping

@dreamerlin
Copy link
Collaborator

Kindly ping.

@innerlee
Copy link
Contributor

The interval convention part has not changed.

@@ -88,7 +89,7 @@ def _get_train_clips(self, num_frames):
ratio = (num_frames - ori_clip_len + 1.0) / self.num_clips
clip_offsets = np.around(np.arange(self.num_clips) * ratio)
else:
clip_offsets = np.zeros((self.num_clips, ))
clip_offsets = np.zeros((self.num_clips, ), dtype=np.int32)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

any reason to choose int32?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will it be better to change it to int8?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.....

np.int is ok

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK.

np.ndarray: Sampled frame indices in train mode.
"""
start_frame = proposal.start_frame
end_frame = proposal.end_frame - 1
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

end_frame = proposal.end_frame

end_frame = proposal.end_frame - 1
ori_clip_len = self.clip_len * self.frame_interval

duration = end_frame - start_frame + 1
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

duration = end_frame - start_frame

assert duration != 0
valid_length = duration - ori_clip_len

valid_starting = max(1,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is the calculation assumes that

  • 1 based counting
  • inclusive for both starting and ending?

i was trying to move the convention of 0 based, [start, end)

@innerlee innerlee merged commit b21f76f into open-mmlab:master Jul 29, 2020
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants