aboutsummaryrefslogtreecommitdiff
path: root/YOSO/__init__.py
diff options
context:
space:
mode:
authorIgor Pashev <pashev.igor@gmail.com>2022-09-24 13:11:05 +0200
committerIgor Pashev <pashev.igor@gmail.com>2022-09-24 13:11:05 +0200
commit8493dba7ff2f553ff9756ce868dc85254b767b4d (patch)
tree82a28b9276892bdc1947fd58f0637c949c4c7cbc /YOSO/__init__.py
parent249f59c4bfd1d20f81c7dc968988be98fe2398c3 (diff)
downloadyoso-master.tar.gz
Format with BlackHEADmaster
Diffstat (limited to 'YOSO/__init__.py')
-rw-r--r--YOSO/__init__.py21
1 files changed, 13 insertions, 8 deletions
diff --git a/YOSO/__init__.py b/YOSO/__init__.py
index 1decc61..6798d6f 100644
--- a/YOSO/__init__.py
+++ b/YOSO/__init__.py
@@ -5,24 +5,30 @@ import re
import sys
-IMAGE_FILE_TEMPLATES = ['*.png', '*.jpg', '*.jpeg']
+IMAGE_FILE_TEMPLATES = ["*.png", "*.jpg", "*.jpeg"]
+
def imagesDir(datadir):
- return os.path.join(datadir, 'images')
+ return os.path.join(datadir, "images")
+
def labelsDir(datadir):
- return os.path.join(datadir, 'labels')
+ return os.path.join(datadir, "labels")
+
def classesDir(datadir):
- return os.path.join(datadir, 'classes')
+ return os.path.join(datadir, "classes")
+
# e. g. "012 - Midi skirt.jpg":
-CLASSES_RE = re.compile(r'^0*(?P<cls>\d+)\s*-\s*(?P<name>[^.]+).*$')
+CLASSES_RE = re.compile(r"^0*(?P<cls>\d+)\s*-\s*(?P<name>[^.]+).*$")
# e. g. "1 0.57 0.42 0.17 0.6654"
BBOX_RE = re.compile(
- r'^\s*(?P<cls>\d+)\s+(?P<x>{float})\s+(?P<y>{float})\s+(?P<w>{float})\s+(?P<h>{float}).*$'.format(
- float=r'([0-9]*[.])?[0-9]+'))
+ r"^\s*(?P<cls>\d+)\s+(?P<x>{float})\s+(?P<y>{float})\s+(?P<w>{float})\s+(?P<h>{float}).*$".format(
+ float=r"([0-9]*[.])?[0-9]+"
+ )
+)
def main():
@@ -32,4 +38,3 @@ def main():
main_window.show()
sys.exit(app.exec())
-