Skip to content

Copy images when YOLO export can't create symlinks - #1519

Merged
onuralpszr merged 16 commits into
obss:mainfrom
mh-masum6875:fix/yolo-export-symlink-fallback
Nov 24, 2026
Merged

onuralpszr merged 16 commits into
obss:mainfrom
mh-masum6875:fix/yolo-export-symlink-fallback

Conversation

@mh-masum6875

Copy link
Copy Markdown
Contributor

Exporting a COCO dataset as YOLO links the images by default. On Windows that needs a privilege ordinary accounts don't have, so sahi coco yolo and Coco.export_as_yolo() failed with WinError 1314: A required privilege is not held by the client unless disable_symlink was passed.

Falls back to copying the image, with a warning, when the symlink can't be created. That's already done up front on Colab.

On Windows tests/test_coco_utils.py gives 35 passed with the change, including test_coco2yolo and test_export_coco_as_yolo, which fail on main there; without it 3 fail.

The mp=True path wasn't run.

mh-masum6875 and others added 16 commits November 12, 2026 18:21
Exporting a COCO dataset as YOLO links the images by default. On
Windows that needs a privilege ordinary accounts don't have, so
'sahi coco yolo' and Coco.export_as_yolo() failed with 'WinError 1314:
A required privilege is not held by the client' unless disable_symlink
was passed.

Fall back to copying the image when the symlink can't be created, as
is already done up front on Colab.
Signed-off-by: Onuralp SEZER <thunderbirdtr@gmail.com>
@onuralpszr
onuralpszr merged commit aec0805 into obss:main Nov 24, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants