File size: 941 Bytes
a70eb3d | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | #!/usr/bin/env python3
# Pull 3 extra helmet/rider datasets from Roboflow Universe
from roboflow import Roboflow
# API key reused from previous script
rf = Roboflow(api_key='qeQs9chVa3kU0XnpTZsd')
targets = [
('gw-khadatkar-and-sv-wasule', 'helmet-and-no-helmet-rider-detection', '~/extra_khadatkar'),
('nckh-2023', 'helmet-detection-project', '~/extra_nckh'),
('learning-evidence', 'helmet-detection_yolov8', '~/extra_learning'),
]
for ws, proj, loc in targets:
print(f'\n=== {ws}/{proj} ===')
try:
p = rf.workspace(ws).project(proj)
# try latest version
vs = p.versions()
if not vs:
print(' NO VERSIONS'); continue
v = vs[0]
print(f' version={v.version}')
ds = v.download('yolov8', location=loc)
print(f' DOWNLOADED to {loc}')
except Exception as e:
print(f' FAIL: {e}')
|