Hello Guys,
I am asking a basic 101 question but the thing is we have trained the faster_rcnn_resnet50_v1b
2 times on different objects and now my basic code looks like this:
from gluoncv import model_zoo, data, utils
from matplotlib import pyplot as plt
net = model_zoo.get_model('faster_rcnn_resnet50_v1b_voc', pretrained=True, ctx=mx.gpu())
im_fname = '/home/ubuntu/notebooks/deeplearning_stuff/VOCtemplate/VOC2018/JPEGImages/200425094324_328899_6548_4326.jpg'
x, img = data.transforms.presets.rcnn.load_test(im_fname, short=512)
x = x.copyto(mx.gpu())
print('Shape of pre-processed image:', x.shape)
net.load_parameters('/home/abc_object/faster_rcnn_resnet50_v1b_voc_best.params')
net.load_parameters('/home/xyz_weight/faster_rcnn_resnet50_v1b_voc_best.params')
net.reset_class(['abc_object'], reuse_weights={'abc_object': 'abc_object'})
class_IDs, scores, bounding_boxs = net(x)
I am having trouble in the net.load_parameters() how can I load two different set of trained weights and perform the prediction??