| 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 |