AdelaiDet
AdelaiDet copied to clipboard
RuntimeError: indices should be either on cpu or on the same device as the indexed tensor (cpu) when run demo.py in colab
/usr/local/lib/python3.10/dist-packages/torch/utils/_contextlib.py:125: UserWarning: Decorating classes is deprecated and will be disabled in future versions. You should only decorate functions or methods. To preserve the current behavior of class decoration, you can directly decorate the __init__
method and nothing else.
warnings.warn("Decorating classes is deprecated and will be disabled in "
[05/17 07:22:07 detectron2]: Arguments: Namespace(config_file='configs/BAText/ICDAR2015/v1_attn_R_50.yaml', webcam=False, video_input=None, input=['/content/images/'], output='output', confidence_threshold=0.3, opts=['MODEL.WEIGHTS', 'v1_ic15_finetuned.pth'])
WARNING [05/17 07:22:07 d2.config.compat]: Config 'configs/BAText/ICDAR2015/v1_attn_R_50.yaml' has no VERSION. Assuming it to be compatible with latest v2.
[05/17 07:22:08 d2.checkpoint.detection_checkpoint]: [DetectionCheckpointer] Loading from v1_ic15_finetuned.pth ...
The checkpoint state_dict contains keys that are not used by the model:
pixel_mean
pixel_std
0% 0/10 [00:00<?, ?it/s]/usr/local/lib/python3.10/dist-packages/torch/functional.py:504: UserWarning: torch.meshgrid: in an upcoming release, it will be required to pass the indexing argument. (Triggered internally at ../aten/src/ATen/native/TensorShape.cpp:3483.)
return _VF.meshgrid(tensors, **kwargs) # type: ignore[attr-defined]
0% 0/10 [00:01<?, ?it/s]
Traceback (most recent call last):
File "/content/AdelaiDet/demo/demo.py", line 87, in
I got the same problem. Do you have solutions?
if you run in colab chnage the version of condacolab