mmrotate-cfa: indices should be either on cpu or on the same device as the indexed tensor (cpu)

66 Views Asked by At

I'm learning how to use openmmlab mmrotate library. I downloaded the config and checkpoint file named cfa_r50_fpn_1x_dota_le135. I implement the inference model as follow image. When i ran it i have a bug:

# 
# /content/mmrotate/mmrotate/core/post_processing/bbox_nms_rotated.py in multiclass_nms_rotated(multi_bboxes, multi_scores, score_thr, nms, max_num, score_factors, return_inds)
# 56     print('hello')
# 57     inds = valid_mask.nonzero(as_tuple=False).squeeze(1)
# 58     bboxes, scores, labels = bboxes[inds], scores[inds], labels[inds]
# 59 
# 60     if bboxes.numel() == 0:
# 
# RuntimeError: indices should be either on cpu or on the same device as the indexed tensor (cpu)
# 

i am a newbie and i don't understand so much about this problem, morever it's the built-in file of this library (mim downloaded). Is anybody can help me? my library is:

Package    Version    Source
---------  ---------  -----------------------------------------
mmcv-full  1.5.3      https://github.com/open-mmlab/mmcv
mmdet      2.25.1     https://github.com/open-mmlab/mmdetection
mmrotate   0.3.4      /content/mmrotate

i tried the mmdetetion install.md, it's seem working so good, but with mmrotate i cannot run the install.md docs

0

There are 0 best solutions below