v-iashin / SpecVQGAN

Source code for "Taming Visually Guided Sound Generation" (Oral at the BMVC 2021)
https://v-iashin.github.io/SpecVQGAN
MIT License
347 stars 40 forks source link

Colab demo fails at importing video #45

Closed DCooper-nz closed 4 months ago

DCooper-nz commented 4 months ago

Just running everything as written I get this crash when at the importing video stage.

Trimmed the input video ./data/vggsound/video/-Qowmc0P9ic_34000_44000.mp4 and saved the output @ ./tmp/-Qowmc0P9ic_34000_44000_trim_to_10s.mp4 /usr/local/lib/python3.10/dist-packages/torchvision/models/_utils.py:208: UserWarning: The parameter 'pretrained' is deprecated since 0.13 and may be removed in the future, please use 'weights' instead. warnings.warn( /usr/local/lib/python3.10/dist-packages/torchvision/models/_utils.py:223: UserWarning: Arguments other than a weight enum or None for 'weights' are deprecated since 0.13 and may be removed in the future. The current behavior is equivalent to passing weights=ResNet50_Weights.IMAGENET1K_V1. You can also use weights=ResNet50_Weights.DEFAULT to get the most up-to-date weights. warnings.warn(msg) Raw Extracted Representation: (215, 2048)

AttributeError Traceback (most recent call last) in <cell line: 11>() 9 extraction_fps = 21.5 10 feature_extractor = ExtractResNet50(extraction_fps, config.data.params, device) ---> 11 visual_features, resampled_frames = feature_extractor(video_path) 12 13 # Show the selected frames to extract features for

6 frames /usr/local/lib/python3.10/dist-packages/numpy/init.py in getattr(attr) 317 318 if attr in former_attrs: --> 319 raise AttributeError(former_attrs[attr]) 320 321 if attr == 'testing':

AttributeError: module 'numpy' has no attribute 'int'. np.int was a deprecated alias for the builtin int. To avoid this error in existing code, use int by itself. Doing this will not modify any behavior and is safe. When replacing np.int, you may wish to use e.g. np.int64 or np.int32 to specify the precision. If you wish to review your current use, check the release note link for additional information. The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations

v-iashin commented 4 months ago

thanks for pointing it out.

should be fixed by 33c601d