Hi,
I am new in the field of object detection, I will be grateful if you could help me to reduce the number of detected objects in a pre-trained model that is trained on the coco dataset. I want only to detect “person” and “dog”.
I am using fasterrcnn_resnet50_fpn model:

#load mode
model = torchvision.models.detection.fasterrcnn_resnet50_fpn(pretrained=True)

I am not sure who should I modify the model to only detect class 1 (person) and class 18 (dog). I do not want to train the model on new data.
I will appreciate it if you can help me with this problem.
Thank you