I use mxnet-cu101==1.6.0b20190812 and gluoncv==0.4.0.post0 in Windows10.
I have a question about pre-trained Faster RCNN models of gluoncv.
from gluoncv import model_zoo, data, utils
im_fname = utils.download(‘GitHub - dmlc/web-data at master’ +
‘gluoncv/detection/biking.jpg?raw=true’,
path=‘biking.jpg’)
net = model_zoo.get_model(‘faster_rcnn_fpn_resnet101_v1d_coco’, pretrained=True)
x, img = data.transforms.presets.rcnn.load_test(im_fname)
class_IDs, scores, bounding_boxs = net(x)
An error occurred.
Traceback (most recent call last):
File “”, line 1, in
File “D:\python\mxnet0812\lib\site-packages\mxnet\gluon\block.py”, line 548, in call
out = self.forward(*args)
File “D:\python\mxnet0812\lib\site-packages\mxnet\gluon\block.py”, line 926, in forward
return self.hybrid_forward(ndarray, x, *args, **params)
File “D:\python\mxnet0812\lib\site-packages\gluoncv\model_zoo\faster_rcnn\faster_rcnn.py”, line 344, in hybrid_forward
self._strides, roi_mode=self._roi_mode)
File “D:\python\mxnet0812\lib\site-packages\gluoncv\model_zoo\faster_rcnn\faster_rcnn.py”, line 278, in _pyramid_roi_feats
sample_ratio=2)
TypeError: ROIAlign() takes from 0 to 2 positional arguments but 4 were given
When I used mxnet==1.4.1(cpu only), the error didn’t occur.
How do I change my code?
I would be grateful if anyone could tell me.