lazylabel-gui 1.0.2__tar.gz → 1.0.3__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (21) hide show
  1. {lazylabel_gui-1.0.2 → lazylabel_gui-1.0.3}/PKG-INFO +4 -4
  2. {lazylabel_gui-1.0.2 → lazylabel_gui-1.0.3}/README.md +4 -4
  3. {lazylabel_gui-1.0.2 → lazylabel_gui-1.0.3}/pyproject.toml +1 -1
  4. {lazylabel_gui-1.0.2 → lazylabel_gui-1.0.3}/src/lazylabel/main.py +11 -4
  5. {lazylabel_gui-1.0.2 → lazylabel_gui-1.0.3}/src/lazylabel_gui.egg-info/PKG-INFO +4 -4
  6. {lazylabel_gui-1.0.2 → lazylabel_gui-1.0.3}/LICENSE +0 -0
  7. {lazylabel_gui-1.0.2 → lazylabel_gui-1.0.3}/setup.cfg +0 -0
  8. {lazylabel_gui-1.0.2 → lazylabel_gui-1.0.3}/src/lazylabel/controls.py +0 -0
  9. {lazylabel_gui-1.0.2 → lazylabel_gui-1.0.3}/src/lazylabel/custom_file_system_model.py +0 -0
  10. {lazylabel_gui-1.0.2 → lazylabel_gui-1.0.3}/src/lazylabel/editable_vertex.py +0 -0
  11. {lazylabel_gui-1.0.2 → lazylabel_gui-1.0.3}/src/lazylabel/hoverable_polygon_item.py +0 -0
  12. {lazylabel_gui-1.0.2 → lazylabel_gui-1.0.3}/src/lazylabel/numeric_table_widget_item.py +0 -0
  13. {lazylabel_gui-1.0.2 → lazylabel_gui-1.0.3}/src/lazylabel/photo_viewer.py +0 -0
  14. {lazylabel_gui-1.0.2 → lazylabel_gui-1.0.3}/src/lazylabel/reorderable_class_table.py +0 -0
  15. {lazylabel_gui-1.0.2 → lazylabel_gui-1.0.3}/src/lazylabel/sam_model.py +0 -0
  16. {lazylabel_gui-1.0.2 → lazylabel_gui-1.0.3}/src/lazylabel/utils.py +0 -0
  17. {lazylabel_gui-1.0.2 → lazylabel_gui-1.0.3}/src/lazylabel_gui.egg-info/SOURCES.txt +0 -0
  18. {lazylabel_gui-1.0.2 → lazylabel_gui-1.0.3}/src/lazylabel_gui.egg-info/dependency_links.txt +0 -0
  19. {lazylabel_gui-1.0.2 → lazylabel_gui-1.0.3}/src/lazylabel_gui.egg-info/entry_points.txt +0 -0
  20. {lazylabel_gui-1.0.2 → lazylabel_gui-1.0.3}/src/lazylabel_gui.egg-info/requires.txt +0 -0
  21. {lazylabel_gui-1.0.2 → lazylabel_gui-1.0.3}/src/lazylabel_gui.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: lazylabel-gui
3
- Version: 1.0.2
3
+ Version: 1.0.3
4
4
  Summary: An image segmentation GUI for generating mask tensors.
5
5
  Author-email: "Deniz N. Cakan" <deniz.n.cakan@gmail.com>
6
6
  License: MIT License
@@ -70,11 +70,11 @@ Inspired by [LabelMe](https://github.com/wkentaro/labelme?tab=readme-ov-file#ins
70
70
  ## 🚀 Getting Started
71
71
 
72
72
  ### Prerequisites
73
- Ensure you have **Python 3.10** or newer.
73
+ **Python 3.10**
74
74
 
75
75
  ### Installation
76
76
 
77
- #### For Users (via PyPI)
77
+ #### For Users [via PyPI](https://pypi.org/project/lazylabel-gui/)
78
78
  1. Install LazyLabel directly:
79
79
  ```bash
80
80
  pip install lazylabel-gui
@@ -87,7 +87,7 @@ Ensure you have **Python 3.10** or newer.
87
87
  #### For Developers (from Source)
88
88
  1. Clone the repository:
89
89
  ```bash
90
- git clone [https://github.com/dnzckn/LazyLabel.git](https://github.com/dnzckn/LazyLabel.git)
90
+ git clone https://github.com/dnzckn/LazyLabel.git
91
91
  cd LazyLabel
92
92
  ```
93
93
  2. Install in editable mode, which links the installed package to your source directory:
@@ -21,11 +21,11 @@ Inspired by [LabelMe](https://github.com/wkentaro/labelme?tab=readme-ov-file#ins
21
21
  ## 🚀 Getting Started
22
22
 
23
23
  ### Prerequisites
24
- Ensure you have **Python 3.10** or newer.
24
+ **Python 3.10**
25
25
 
26
26
  ### Installation
27
27
 
28
- #### For Users (via PyPI)
28
+ #### For Users [via PyPI](https://pypi.org/project/lazylabel-gui/)
29
29
  1. Install LazyLabel directly:
30
30
  ```bash
31
31
  pip install lazylabel-gui
@@ -38,7 +38,7 @@ Ensure you have **Python 3.10** or newer.
38
38
  #### For Developers (from Source)
39
39
  1. Clone the repository:
40
40
  ```bash
41
- git clone [https://github.com/dnzckn/LazyLabel.git](https://github.com/dnzckn/LazyLabel.git)
41
+ git clone https://github.com/dnzckn/LazyLabel.git
42
42
  cd LazyLabel
43
43
  ```
44
44
  2. Install in editable mode, which links the installed package to your source directory:
@@ -95,4 +95,4 @@ Each channel is a binary mask for a class, combining all assigned segments into
95
95
  ---
96
96
 
97
97
  ## ☕ Support LazyLabel
98
- [If you found LazyLabel helpful, consider supporting the project!](https://buymeacoffee.com/dnzckn)
98
+ [If you found LazyLabel helpful, consider supporting the project!](https://buymeacoffee.com/dnzckn)
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "lazylabel-gui"
7
- version = "1.0.2"
7
+ version = "1.0.3"
8
8
  authors = [
9
9
  { name="Deniz N. Cakan", email="deniz.n.cakan@gmail.com" },
10
10
  ]
@@ -19,7 +19,6 @@ from PyQt6.QtWidgets import (
19
19
  from PyQt6.QtGui import QPixmap, QColor, QPen, QBrush, QPolygonF, QIcon
20
20
  from PyQt6.QtCore import Qt, QPointF, QTimer
21
21
 
22
- # Relative imports for package structure
23
22
  from .photo_viewer import PhotoViewer
24
23
  from .sam_model import SamModel
25
24
  from .utils import mask_to_pixmap
@@ -43,7 +42,6 @@ class MainWindow(QMainWindow):
43
42
 
44
43
  self.setGeometry(50, 50, 1600, 900)
45
44
 
46
- # The SamModel instance is now passed in
47
45
  self.sam_model = sam_model
48
46
  self.mode = "sam_points"
49
47
  self.previous_mode = "sam_points"
@@ -118,10 +116,16 @@ class MainWindow(QMainWindow):
118
116
  self.control_panel.btn_clear_points.clicked.connect(self.clear_all_points)
119
117
 
120
118
  def set_mode(self, mode_name, is_toggle=False):
119
+ # Clear selection if exiting selection mode
120
+ if self.mode == "selection" and mode_name != "selection":
121
+ self.right_panel.segment_table.clearSelection()
122
+
121
123
  if self.mode == "edit" and mode_name != "edit":
122
124
  self.display_all_segments()
125
+
123
126
  if not is_toggle and self.mode not in ["pan", "selection", "edit"]:
124
127
  self.previous_mode = self.mode
128
+
125
129
  self.mode = mode_name
126
130
  self.control_panel.mode_label.setText(
127
131
  f"Mode: {mode_name.replace('_', ' ').title()}"
@@ -179,7 +183,9 @@ class MainWindow(QMainWindow):
179
183
  self.current_file_index = index
180
184
  path = self.file_model.filePath(index)
181
185
 
182
- if os.path.isfile(path) and path.lower().endswith((".png", ".jpg", ".jpeg")):
186
+ if os.path.isfile(path) and path.lower().endswith(
187
+ (".png", ".jpg", ".jpeg", ".tiff")
188
+ ):
183
189
  self.current_image_path = path
184
190
  pixmap = QPixmap(self.current_image_path)
185
191
  if not pixmap.isNull():
@@ -429,6 +435,7 @@ class MainWindow(QMainWindow):
429
435
  for i, seg_dict in enumerate(self.segments):
430
436
  self.segment_items[i] = []
431
437
  class_id = seg_dict.get("class_id", 0)
438
+
432
439
  hue_index = class_id_to_hue_index.get(class_id, 0)
433
440
  hue = int((hue_index * 360 / num_classes)) % 360
434
441
  base_color = QColor.fromHsv(hue, 220, 220)
@@ -854,7 +861,7 @@ class MainWindow(QMainWindow):
854
861
  def main():
855
862
  app = QApplication(sys.argv)
856
863
  qdarktheme.setup_theme()
857
- sam_model = SamModel(model_type="vit_h") # one-time check/download
864
+ sam_model = SamModel(model_type="vit_h")
858
865
  main_win = MainWindow(sam_model)
859
866
  main_win.show()
860
867
  sys.exit(app.exec())
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: lazylabel-gui
3
- Version: 1.0.2
3
+ Version: 1.0.3
4
4
  Summary: An image segmentation GUI for generating mask tensors.
5
5
  Author-email: "Deniz N. Cakan" <deniz.n.cakan@gmail.com>
6
6
  License: MIT License
@@ -70,11 +70,11 @@ Inspired by [LabelMe](https://github.com/wkentaro/labelme?tab=readme-ov-file#ins
70
70
  ## 🚀 Getting Started
71
71
 
72
72
  ### Prerequisites
73
- Ensure you have **Python 3.10** or newer.
73
+ **Python 3.10**
74
74
 
75
75
  ### Installation
76
76
 
77
- #### For Users (via PyPI)
77
+ #### For Users [via PyPI](https://pypi.org/project/lazylabel-gui/)
78
78
  1. Install LazyLabel directly:
79
79
  ```bash
80
80
  pip install lazylabel-gui
@@ -87,7 +87,7 @@ Ensure you have **Python 3.10** or newer.
87
87
  #### For Developers (from Source)
88
88
  1. Clone the repository:
89
89
  ```bash
90
- git clone [https://github.com/dnzckn/LazyLabel.git](https://github.com/dnzckn/LazyLabel.git)
90
+ git clone https://github.com/dnzckn/LazyLabel.git
91
91
  cd LazyLabel
92
92
  ```
93
93
  2. Install in editable mode, which links the installed package to your source directory:
File without changes
File without changes