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

pic should be Tensor or ndarray. Got <class 'NoneType'>. #102

Open
Flyingdog-Huang opened this issue Jul 13, 2021 · 0 comments
Open

pic should be Tensor or ndarray. Got <class 'NoneType'>. #102

Flyingdog-Huang opened this issue Jul 13, 2021 · 0 comments

Comments

@Flyingdog-Huang
Copy link

python demo/demo.py mega configs/MEGA/vid_R_50_C4_MEGA_1x.yaml configs/MEGA/MEGA_R_50.pth --suffix ".jpg" --visualize-path datasets/pic/uav0000086_00000_v --output-folder visualization/uav86_MEGA
29%|██████████▊ | 4/14 [00:04<00:11, 1.13s/it]
Traceback (most recent call last):
File "demo/demo.py", line 67, in
visualization_results = vid_demo.run_on_image_folder(args.visualize_path, suffix=args.suffix)
File "/home/hlx/objectDetection/ht/project/mega.pytorch/demo/predictor.py", line 477, in run_on_image_folder
img = self.perform_transform(img)
File "/home/hlx/objectDetection/ht/project/mega.pytorch/demo/predictor.py", line 413, in perform_transform
image = self.transforms(original_image)
File "/home/hlx/anaconda3/envs/MEGA/lib/python3.7/site-packages/torchvision/transforms/transforms.py", line 61, in call
img = t(img)
File "/home/hlx/anaconda3/envs/MEGA/lib/python3.7/site-packages/torchvision/transforms/transforms.py", line 127, in call
return F.to_pil_image(pic, self.mode)
File "/home/hlx/anaconda3/envs/MEGA/lib/python3.7/site-packages/torchvision/transforms/functional.py", line 119, in to_pil_image
raise TypeError('pic should be Tensor or ndarray. Got {}.'.format(type(pic)))
TypeError: pic should be Tensor or ndarray. Got <class 'NoneType'>.

读不到图像数据

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