Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sort files #8

Open
bertsky opened this issue Jan 30, 2021 · 0 comments
Open

sort files #8

bertsky opened this issue Jan 30, 2021 · 0 comments
Labels
enhancement New feature or request

Comments

@bertsky
Copy link

bertsky commented Jan 30, 2021

imgs_cv_train=np.array(os.listdir(dir_img))
segs_cv_train=np.array(os.listdir(dir_seg))

This does not sort file names in any way, so it's pure luck (or rather, depends on platform and filesystem history) that pairs of image and annotation are actually consistent.

I suggest:

  1. sorting this by file name
  2. remove the useless numpy conversion (its destined for a zip iterator below)
  3. add an assertion below that the base names are identical:

img_name=im.split('.')[0]

@cneud cneud added the enhancement New feature or request label Jun 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants