Based on this doc 58 it seems that you should be able to create the PyTorch model using:
from detectron2.modeling import build_model
model = build_model(cfg)  # returns a torch.nn.Module

Loading a checkpoint and using this model is also explained in the same doc.