azure-scripts / pull_extra.py
vivekvar's picture
azure home scripts: data gen, training, misc
a70eb3d verified
#!/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}')