ultralytics 8.0.98
add Baidu RT-DETR models (#2527)
Co-authored-by: Kalen Michael <kalenmike@gmail.com> Co-authored-by: Laughing <61612323+Laughing-q@users.noreply.github.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Yonghye Kwon <developer.0hye@gmail.com> Co-authored-by: Dowon <ks2515@naver.com>
This commit is contained in:
@ -71,11 +71,9 @@ def export_fmts_hub():
|
||||
def export_model(model_id='', format='torchscript'):
|
||||
"""Export a model to all formats."""
|
||||
assert format in export_fmts_hub(), f"Unsupported export format '{format}', valid formats are {export_fmts_hub()}"
|
||||
r = requests.post('https://api.ultralytics.com/export',
|
||||
json={
|
||||
'apiKey': Auth().api_key,
|
||||
'modelId': model_id,
|
||||
'format': format})
|
||||
r = requests.post(f'https://api.ultralytics.com/v1/models/{model_id}/export',
|
||||
json={'format': format},
|
||||
headers={'x-api-key': Auth().api_key})
|
||||
assert r.status_code == 200, f'{PREFIX}{format} export failure {r.status_code} {r.reason}'
|
||||
LOGGER.info(f'{PREFIX}{format} export started ✅')
|
||||
|
||||
|
Reference in New Issue
Block a user