new check_dataset functions (#43)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
parent
d143ac666f
commit
1f3aad86c1
13 changed files with 336 additions and 62 deletions
|
|
@ -118,9 +118,3 @@ def get_model(model='s.pt', pretrained=True):
|
|||
return torchvision.models.__dict__[model](weights='IMAGENET1K_V1' if pretrained else None)
|
||||
else: # Ultralytics assets
|
||||
return torch.load(attempt_download(f"{model}.pt"), map_location='cpu')
|
||||
|
||||
|
||||
def yaml_load(file='data.yaml'):
|
||||
# Single-line safe yaml loading
|
||||
with open(file, errors='ignore') as f:
|
||||
return yaml.safe_load(f)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue