Example #1
0
    def __init__(self, image_size=256, num_classes=200):
        self.image_size = image_size
        self.num_classes = num_classes
        self.net = ClassNet(num_classes=self.num_classes).cuda()

        self.name_to_label_id, self.label_info_dict = DataUtil.get_class_name(data_root=self.get_data_root_path())
        self.transform_train, self.transform_test = MyTransform.transform_train_cam(image_size=self.image_size)
        pass
    def __init__(self, image_size=224, num_classes=200):
        self.image_size = image_size
        self.net = CAMNet(num_classes=num_classes).cuda()

        self.name_to_label_id, self.label_info_dict = DataUtil.get_class_name()
        self.transform_train, self.transform_test = MyTransform.transform_train_cam(
            image_size=self.image_size)
        self.transform_un_normalize = MyTransform.transform_un_normalize()
        pass