Skip to content

Commit 23bbb6f

Browse files
committed
"Naturally" sort image paths
1 parent 23ec63e commit 23bbb6f

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

setup.cfg

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ packages = find:
3434
install_requires =
3535
dask-image
3636
napari==0.4.17
37+
natsort
3738
numpy
3839
opencv-python-headless
3940
pandas

src/napari_deeplabcut/_reader.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
from dask import delayed
1212
from dask_image.imread import imread
1313
from napari.types import LayerData
14+
from natsort import natsorted
1415

1516
from napari_deeplabcut import misc
1617

@@ -94,7 +95,7 @@ def read_images(path):
9495
params = {
9596
"name": "images",
9697
"metadata": {
97-
"paths": sorted(filepaths),
98+
"paths": natsorted(filepaths),
9899
"root": os.path.split(path)[0],
99100
},
100101
}

0 commit comments

Comments
 (0)