RegNet-Pytorch
RegNet-Pytorch copied to clipboard
Can you show a demo of ImageNet model, for using the pretrain model?
Hello, Thanks for your works! Can you show a demo of using the ImageNet pretrain model?
For example:
# load image
img = cv2.resize(cv2.imread(), (?, ?))
img = (img - ??) / ??
img = img.transpose([2, 0, 1])[None]
# inference
net = regnet_3200M(pretrain=True)
pred = net(torch.from_numpy(img))
# show predict
print(labels[pred.argmax(1)])