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

Visual Voice Activity Detection (VVAD) integration including live camera and prerecorded demo #330

Merged
merged 152 commits into from
Apr 15, 2024

Conversation

cedric-cfk
Copy link
Contributor

@cedric-cfk cedric-cfk commented Jan 16, 2024

This pull request includes:

  • an integration for the dataset VVAD-LRS3
  • a model presented by VVAD-LRS3 for binary 3D classification tasks
  • four different CNN2Plus1D models for binary 3D classification tasks
  • a detection pipeline for the VVAD task
  • two demo files using the VVAD pipeline. One using the live camera feed and the second using a prerecorded video file

Note:

  • There are two TODOs included in the code, regarding the downloading of model files. Those will be resolved in the next days.

Sorry, something went wrong.

Cedric Carl-Franek Kränzle and others added 30 commits June 7, 2023 13:03
# Conflicts:
#	examples/visual_voice_activity_detection/training/train_v2.py
#	paz/models/classification/__init__.py
Copy link
Owner

@oarriaga oarriaga left a comment

Choose a reason for hiding this comment

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

I think this PR is almost there!

Comment on lines 586 to 607
if value is None:
mean = None
else:
size = len(self.predictions)

self.predictions.append(value)
if size > self.window_size:
self.predictions.pop(0)

mean = 0
if len(self.predictions) <= 1:
mean = value
else:
total_weights = 0
for prediction_index in range(0, size):
weight = (prediction_index + 1) / size
mean = mean + self.predictions[prediction_index] * weight
total_weights = total_weights + weight
mean = mean / total_weights
return mean


Copy link
Owner

Choose a reason for hiding this comment

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

I think this can be split into smaller functions to improve readability. The 3 conditions + for loop in a call seems to complex to read and understand easily.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I have combined the AveragePredictions class with the WeightedAveragePredictions class. Additionally, I moved the computation of the weighted average (the for loop) to the backend.

For me it looks more readable now and I could save duplicated lines :)

Cedric Carl-Franek Kränzle added 4 commits April 12, 2024 19:21
@oarriaga oarriaga merged commit 8bfa3b2 into oarriaga:master Apr 15, 2024
0 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants