Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Integrate Audiovisual SlowFast Networks into the repo #219

Open
wants to merge 13 commits into
base: main
Choose a base branch
from

Conversation

fanyix
Copy link

@fanyix fanyix commented Jun 14, 2020

Please see projects/avslowfast/README.md for a starter for training and evaluation with an AVSlowFast 4x16 R50 model.

@facebook-github-bot
Copy link
Contributor

Hi @fanyix!

Thank you for your pull request. We require contributors to sign our Contributor License Agreement, and yours needs attention.

You currently have a record in our system, but we do not have a signature on file.

In order for us to review and merge your code, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

If you have received this in error or have any questions, please contact us at cla@fb.com. Thanks!

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jun 14, 2020
Copy link
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

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

@takatosp1 has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@facebook-github-bot
Copy link
Contributor

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks!

@fanyix fanyix marked this pull request as ready for review August 11, 2020 20:09
@facebook-github-bot
Copy link
Contributor

@fanyix has updated the pull request. You must reimport the pull request before landing.

@facebook-github-bot
Copy link
Contributor

@fanyix has updated the pull request. You must reimport the pull request before landing.

@marteautony
Copy link

Hi,

There is a problem with the visualization of video. Audio are not provided so the next error is printed.

Traceback (most recent call last):
File "tools/run_net.py", line 42, in
main()
File "tools/run_net.py", line 37, in main
demo(cfg)
File "/workspace/Documents/Tony/AVSlowFast/tools/demo_net.py", line 119, in demo
for frames in tqdm.tqdm(run_demo(cfg, frame_provider)):
File "/usr/local/lib/python3.6/dist-packages/tqdm/std.py", line 1174, in iter
for obj in iterable:
File "/workspace/Documents/Tony/AVSlowFast/tools/demo_net.py", line 79, in run_demo
model.put(task)
File "/workspace/Documents/Tony/AVSlowFast/slowfast/visualization/predictor.py", line 138, in put
task = self.predictor(task)
File "/workspace/Documents/Tony/AVSlowFast/slowfast/visualization/predictor.py", line 77, in call
inputs = process_cv2_inputs(frames, self.cfg)
File "/workspace/Documents/Tony/AVSlowFast/slowfast/visualization/utils.py", line 321, in process_cv2_inputs
inputs = [inp.unsqueeze(0) for inp in inputs]
File "/workspace/Documents/Tony/AVSlowFast/slowfast/visualization/utils.py", line 321, in
inputs = [inp.unsqueeze(0) for inp in inputs]
AttributeError: 'NoneType' object has no attribute 'unsqueeze'

@haooooooqi
Copy link
Contributor

Hey @fanyix

Thanks for committing the code into PySlowFast, could you remind me if you have trained the av slowfast model in PySlowFast codebase? Could you remind me what is the performance you got?

Thanks,
Haoqi

@fanyix
Copy link
Author

fanyix commented Oct 13, 2020

Hey @fanyix

Thanks for committing the code into PySlowFast, could you remind me if you have trained the av slowfast model in PySlowFast codebase? Could you remind me what is the performance you got?

Thanks,
Haoqi

Hi Haoqi,

I haven't trained from scratch using pySlowFast, however I did try converting caffe2 models and finetune it with a short schedule in pySlowFast. I got something around 0.5 gap to the number achieved in the caffe2 codebase. It's possible my finetuning schedule is not optimized so it would be great if you can try it on your end (or even better train from scratch).

self.t_relu = nn.ReLU(inplace=self._inplace_relu)

# 1x1x3, BN, ReLU.
self.f = nn.Conv3d(
Copy link

Choose a reason for hiding this comment

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

Hi, I am trying to re-implement AVSlowfast, and feel confused here.

In the paper (Table 1), the dim_inner should be the same as the planes, but the code here shows that the dim_inner is 2 * planes. i.e., for res2: [3×1, 1×3], 32 should be [3×1, 1×3], 64.

dim_inner // cfg.SLOWFAST.AU_BETA_INV
],
temp_kernel_sizes=temp_kernel[1],
stride=[1] * 3,
Copy link

Choose a reason for hiding this comment

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

Besides, here the stride means the stride of res1 of the audio pathway is 1. However in the paper Downsampling in time-frequency space is performed by stride 2^2 convolution in the center (“bottleneck”) filter of the first residual block in each stage from res2 to res5. In the code, it seems that res2 is not included.

Copy link
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

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

@theschnitz has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

Copy link
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

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

@theschnitz has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants