Skip to content

Commit

Permalink
Use natsort.os_sorted to sort files in the browser
Browse files Browse the repository at this point in the history
  • Loading branch information
wkentaro committed Feb 25, 2022
1 parent a3126e0 commit 41c1aa6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion labelme/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import webbrowser

import imgviz
import natsort
from qtpy import QtCore
from qtpy.QtCore import Qt
from qtpy import QtGui
Expand Down Expand Up @@ -2075,5 +2076,5 @@ def scanAllImages(self, folderPath):
if file.lower().endswith(tuple(extensions)):
relativePath = osp.join(root, file)
images.append(relativePath)
images.sort(key=lambda x: x.lower())
images = natsort.os_sorted(images)
return images
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ def get_install_requires():
install_requires = [
"imgviz>=0.11",
"matplotlib<3.3", # for PyInstaller
"natsort>=7.1.0",
"numpy",
"Pillow>=2.8",
"PyYAML",
Expand Down

0 comments on commit 41c1aa6

Please sign in to comment.