Support both *.yml
and *.yaml
files (#4086)
Co-authored-by: ChristopherRogers1991 <ChristopherRogers1991@gmail.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Sungjoo(Dennis) Hwang <48212469+Denny-Hwang@users.noreply.github.com>
This commit is contained in:
@ -16,8 +16,8 @@ class RTDETR(Model):
|
||||
"""
|
||||
|
||||
def __init__(self, model='rtdetr-l.pt') -> None:
|
||||
if model and not model.endswith('.pt') and not model.endswith('.yaml'):
|
||||
raise NotImplementedError('RT-DETR only supports creating from pt file or yaml file.')
|
||||
if model and not model.split('.')[-1] in ('pt', 'yaml', 'yml'):
|
||||
raise NotImplementedError('RT-DETR only supports creating from *.pt file or *.yaml file.')
|
||||
super().__init__(model=model, task='detect')
|
||||
|
||||
@property
|
||||
|
Reference in New Issue
Block a user