diff --git a/.gitignore b/.gitignore index 08bd8aa..9914aa1 100644 --- a/.gitignore +++ b/.gitignore @@ -38,4 +38,6 @@ coverage.xml dmypy.json # IDEA config files -.idea/ \ No newline at end of file +.idea/ + +.vscode/ \ No newline at end of file diff --git a/cocoviewer.py b/cocoviewer.py index 470a4be..e8537a4 100644 --- a/cocoviewer.py +++ b/cocoviewer.py @@ -180,7 +180,9 @@ def draw_bboxes(draw, objects, labels, obj_categories, ignore, width, label_size # TODO: Implement notification message as popup window font = ImageFont.load_default() - tw, th = draw.textsize(text, font) + # use pillow==9.5.0 + tw, th = font.getsize(text) + tx0 = b[0] ty0 = b[1] - th @@ -534,7 +536,7 @@ def __init__(self, data, root, image_panel, statusbar, menu, objects_panel, slid self.labels_on_global = tk.BooleanVar() # Toggles category labels self.labels_on_global.set(True) self.masks_on_global = tk.BooleanVar() # Toggles masks globally - self.masks_on_global.set(True) + self.masks_on_global.set(False) self.coloring_on_global = tk.BooleanVar() # Toggles objects/categories coloring self.coloring_on_global.set(False) # False for categories (defaults), True for objects # Menu Configuration