Skip to content

Sort directory listings in inpainting and super-resolution converters - #4056

Merged
sstrehlk merged 4 commits into
openvinotoolkit:masterfrom
pwolnows:sort-annotation-converters-part2
Oct 8, 2026
Merged

sstrehlk merged 4 commits into
openvinotoolkit:masterfrom
pwolnows:sort-annotation-converters-part2

Conversation

@pwolnows

Copy link
Copy Markdown
Contributor

Summary

Makes annotation conversion deterministic for the InpaintingConverter and SRConverter by sorting directory listings before use.

Changes

  • inpainting.py: sort images and masks file lists from iterdir() before pairing them up.
  • super_resolution_converter.py: sort lr_dir.iterdir() results before building the low-resolution file list.

Why

Path.iterdir() order is filesystem-dependent and not guaranteed, which can cause images/masks (or LR files) to be paired inconsistently across OSes/runs. Sorting the listings ensures reproducible annotation ordering.

Testing

  • Manual review of the converters; no functional change to file matching logic beyond deterministic ordering.

@pwolnows
pwolnows enabled auto-merge (squash) October 7, 2026 14:35
@sstrehlk
sstrehlk disabled auto-merge October 8, 2026 06:04
@sstrehlk
sstrehlk merged commit 58de6ac into openvinotoolkit:master Oct 8, 2026
6 of 13 checks passed
@pwolnows
pwolnows deleted the sort-annotation-converters-part2 branch October 13, 2026 09:06
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.

2 participants