when I train Mask RCNN . There are warning as follows:
UserWarning: indexing with dtype torch.uint8 is now deprecated, please use a dtype torch.bool instead.
And when I run :
python tools/test_ins.py configs/mask_rcnn_r50_fpn_1x.py work_dirs0324/ptc/mask_rcnn_r50_fpn_1x6/epoch_500.pth --show --out results_solo.pkl --eval segm
there are a error as follows:
File "tools/test_ins.py", line 257, in
main()
File "tools/test_ins.py", line 217, in main
outputs = single_gpu_test(model, data_loader)
File "tools/test_ins.py", line 53, in single_gpu_test
result = get_masks(seg_result, num_classes=num_classes)
File "tools/test_ins.py", line 27, in get_masks
seg_pred = cur_result[0].cpu().numpy().astype(np.uint8)
AttributeError: 'numpy.ndarray' object has no attribute 'cpu'
It seems that the cur_result[0] is not showing " true or false" such as solov2 .
when I train Mask RCNN . There are warning as follows: UserWarning: indexing with dtype torch.uint8 is now deprecated, please use a dtype torch.bool instead.
And when I run : python tools/test_ins.py configs/mask_rcnn_r50_fpn_1x.py work_dirs0324/ptc/mask_rcnn_r50_fpn_1x6/epoch_500.pth --show --out results_solo.pkl --eval segm
there are a error as follows: File "tools/test_ins.py", line 257, in
main()
File "tools/test_ins.py", line 217, in main
outputs = single_gpu_test(model, data_loader)
File "tools/test_ins.py", line 53, in single_gpu_test
result = get_masks(seg_result, num_classes=num_classes)
File "tools/test_ins.py", line 27, in get_masks
seg_pred = cur_result[0].cpu().numpy().astype(np.uint8)
AttributeError: 'numpy.ndarray' object has no attribute 'cpu'
It seems that the cur_result[0] is not showing " true or false" such as solov2 .
I don't know how to solve it .please help me.