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: expected np.ndarray (got list) #57

Open
zhouxuedaasd opened this issue Jul 18, 2024 · 1 comment
Open

TypeError: expected np.ndarray (got list) #57

zhouxuedaasd opened this issue Jul 18, 2024 · 1 comment

Comments

@zhouxuedaasd
Copy link

File "E:\Python\ultralytics_afpn\ultralytics\models\yolo\detect\predict_deepsort.py", line 240, in
preprocess
img = torch.from_numpy(img).to(self.model.device)
TypeError: expected np.ndarray (got list)

@SHUSHENGQIGUI
Copy link

img = torch.from_numpy(img[0]).to(self.model.device)
img = img.unsqueeze(0)

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

2 participants