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

TypeError: __array__() takes 1 positional argument but 2 were given #3

Open
CkShibit opened this issue Jul 3, 2021 · 0 comments
Open

Comments

@CkShibit
Copy link

CkShibit commented Jul 3, 2021

from segmentor import Segmentor
import utils
model = utils.unpickle('model/model.pkl')
s = Segmentor(model, min_frames=10, threshold=0.7)
s.visualize_segments('videos/kiss.mp4')
Traceback (most recent call last):
File "", line 1, in
File "/Downloads/docker_data/Cver/kissing-detector/segmentor.py", line 110, in visualize_segments
segments = self.get_segments(path_video)
File "/Downloads/docker_data/Cver/kissing-detector/segmentor.py", line 93, in get_segments
audio, images = BuildDataset.one_video_extract_audio_and_stills(path_video)
File "/Downloads/docker_data/Cver/kissing-detector/pipeline.py", line 95, in one_video_extract_audio_and_stills
images.append(transformer(frame_pil))
File "/root/miniconda3/envs/kiss/lib/python3.6/site-packages/torchvision/transforms/transforms.py", line 60, in call
img = t(img)
File "/root/miniconda3/envs/kiss/lib/python3.6/site-packages/torchvision/transforms/transforms.py", line 97, in call
return F.to_tensor(pic)
File "/root/miniconda3/envs/kiss/lib/python3.6/site-packages/torchvision/transforms/functional.py", line 129, in to_tensor
np.array(pic, mode_to_nptype.get(pic.mode, np.uint8), copy=True)
TypeError: array() takes 1 positional argument but 2 were given

what should I do to fix it?
Thank .

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