Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -18,9 +18,7 @@ from PIL import Image
|
|
| 18 |
# from featup.util import norm
|
| 19 |
from torchaudio.functional import resample
|
| 20 |
|
| 21 |
-
|
| 22 |
-
from denseav.plotting import plot_attention_video, plot_2head_attention_video, plot_feature_video
|
| 23 |
-
from denseav.shared import norm, crop_to_divisor, blur_dim
|
| 24 |
from os.path import join
|
| 25 |
|
| 26 |
|
|
@@ -82,6 +80,10 @@ models = {o: LitAVAligner.from_pretrained(f"mhamilton723/DenseAV-{o}") for o in
|
|
| 82 |
|
| 83 |
|
| 84 |
def process_video(video, model_option):
|
|
|
|
|
|
|
|
|
|
|
|
|
| 85 |
# model = models[model_option].cuda()
|
| 86 |
model = models[model_option]
|
| 87 |
|
|
|
|
| 18 |
# from featup.util import norm
|
| 19 |
from torchaudio.functional import resample
|
| 20 |
|
| 21 |
+
|
|
|
|
|
|
|
| 22 |
from os.path import join
|
| 23 |
|
| 24 |
|
|
|
|
| 80 |
|
| 81 |
|
| 82 |
def process_video(video, model_option):
|
| 83 |
+
from denseav.train import LitAVAligner
|
| 84 |
+
from denseav.plotting import plot_attention_video, plot_2head_attention_video, plot_feature_video
|
| 85 |
+
from denseav.shared import norm, crop_to_divisor, blur_dim
|
| 86 |
+
|
| 87 |
# model = models[model_option].cuda()
|
| 88 |
model = models[model_option]
|
| 89 |
|