Scalsol / mega.pytorch

Memory Enhanced Global-Local Aggregation for Video Object Detection, CVPR2020
Other
566 stars 115 forks source link

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

Open Flyingdog-Huang opened 3 years ago

Flyingdog-Huang commented 3 years ago

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'>.

读不到图像数据