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

AttributeError: 'BmpImageFile' object has no attribute 'ndim' #11

Open
erjihaoshi opened this issue Jun 27, 2019 · 1 comment
Open

AttributeError: 'BmpImageFile' object has no attribute 'ndim' #11

erjihaoshi opened this issue Jun 27, 2019 · 1 comment

Comments

@erjihaoshi
Copy link

when i successfully import torchaudio in google colab ,but i get error AttributeError: 'BmpImageFile' object has no attribute 'ndim', Does anyone konw how to fix it ?

@erjihaoshi
Copy link
Author

in sda.py at def call(self, img, audio, fs=None, aligned=False): you should change first else:

        frame = np.array(img)

or you just run :
import sda
import scipy.io.wavfile as wav
from PIL import Image
va = sda.VideoAnimator(gpu=0)# Instantiate the aminator
fs, audio_clip = wav.read("example/audio.wav")

frame = Image.open("example/image.bmp")

frame = "example/image.bmp"
vid, aud = va(frame, audio_clip, fs=fs)

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

No branches or pull requests

1 participant