File size: 480 Bytes
bcb3888
 
 
eee9495
bcb3888
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
from transformers import PretrainedConfig

class DFineConfig(PretrainedConfig):
    model_type = "d_fine"

    def __init__(
        self,
        input_size=[640, 640],
        input_components=["images", "orig_target_sizes"],
        output_components=["labels", "boxes", "scores"],
        **kwargs
    ):
        super().__init__(**kwargs)
        self.input_size = input_size
        self.input_components = input_components
        self.output_components = output_components