# r_cnn_resnet.py
# Vojtěch Golda
from torchvision.models.detection import fasterrcnn_resnet50_fpn_v2, FasterRCNN_ResNet50_FPN_V2_Weights
from util.model_util import preprocess, get_data_bb, get_model, batch2boxes

from models.model_util import ModelUtil
# 4,4
# 32, 0
# 


class RCNNResNet(ModelUtil):
    def __init__(self, device, filename="models/r_cnn_resnet.pth"):
        self.device = device
        self.model = fasterrcnn_resnet50_fpn_v2
        self.weights = FasterRCNN_ResNet50_FPN_V2_Weights
        self.target_size = (720, 720)
        self.filename = filename

    def preprocess(*args, **kwargs):
        return preprocess(*args, **kwargs)

    def get_data(*args, **kwargs):
        return get_data_bb(*args, **kwargs)

    def get_model(*args, **kwargs):
        return get_model(*args, **kwargs)

    def batch2boxes(*args, **kwargs):
        return batch2boxes(*args, **kwargs)

