detrium.core.family

ModelFamilyAdapter abstraction for aggregating multiple Apache-2.0 DETR families.

class ModelFamilyAdapter(ABC)

Contract implemented by each DETR model family (e.g. rtdetr_family).

字段

名称类型默认值
family_namestr''
supported_tasksTuple[str, ...]('detect',)
license_namestr'Apache-2.0'
matches(self, name_or_cfg: Union[str, Mapping[str, Any]]) -> bool

Return True if this adapter owns the given model alias, recipe, or config dict.

名称类型默认值
name_or_cfgUnion[str, Mapping[str, Any]]—
build_deploy_module(self, model: nn.Module, postprocessor: Optional[nn.Module]) -> nn.Module

Wrap model + postprocessor into a deploy-ready inference/export nn.Module.

名称类型默认值
modelnn.Module—
postprocessorOptional[nn.Module]—
class FamilyRegistry

Registry mapping model families to their `ModelFamilyAdapter` instances.

register(self, adapter: ModelFamilyAdapter) -> ModelFamilyAdapter
名称类型默认值
adapterModelFamilyAdapter—
resolve(self, name_or_cfg: Union[str, Mapping[str, Any]]) -> ModelFamilyAdapter
名称类型默认值
name_or_cfgUnion[str, Mapping[str, Any]]—