lazylabel-gui 1.1.0__tar.gz → 1.1.2__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 (42) hide show
  1. {lazylabel_gui-1.1.0 → lazylabel_gui-1.1.2}/LICENSE +21 -21
  2. {lazylabel_gui-1.1.0 → lazylabel_gui-1.1.2}/PKG-INFO +197 -197
  3. {lazylabel_gui-1.1.0 → lazylabel_gui-1.1.2}/README.md +147 -147
  4. {lazylabel_gui-1.1.0 → lazylabel_gui-1.1.2}/pyproject.toml +40 -40
  5. {lazylabel_gui-1.1.0 → lazylabel_gui-1.1.2}/setup.cfg +4 -4
  6. {lazylabel_gui-1.1.0 → lazylabel_gui-1.1.2}/src/lazylabel/__init__.py +8 -8
  7. {lazylabel_gui-1.1.0 → lazylabel_gui-1.1.2}/src/lazylabel/config/__init__.py +6 -6
  8. {lazylabel_gui-1.1.0 → lazylabel_gui-1.1.2}/src/lazylabel/config/hotkeys.py +168 -168
  9. {lazylabel_gui-1.1.0 → lazylabel_gui-1.1.2}/src/lazylabel/config/paths.py +40 -40
  10. {lazylabel_gui-1.1.0 → lazylabel_gui-1.1.2}/src/lazylabel/config/settings.py +65 -65
  11. {lazylabel_gui-1.1.0 → lazylabel_gui-1.1.2}/src/lazylabel/core/__init__.py +6 -6
  12. {lazylabel_gui-1.1.0 → lazylabel_gui-1.1.2}/src/lazylabel/core/file_manager.py +105 -105
  13. {lazylabel_gui-1.1.0 → lazylabel_gui-1.1.2}/src/lazylabel/core/model_manager.py +97 -94
  14. {lazylabel_gui-1.1.0 → lazylabel_gui-1.1.2}/src/lazylabel/core/segment_manager.py +171 -140
  15. {lazylabel_gui-1.1.0 → lazylabel_gui-1.1.2}/src/lazylabel/main.py +36 -22
  16. {lazylabel_gui-1.1.0 → lazylabel_gui-1.1.2}/src/lazylabel/models/__init__.py +4 -4
  17. {lazylabel_gui-1.1.0 → lazylabel_gui-1.1.2}/src/lazylabel/models/sam_model.py +195 -154
  18. {lazylabel_gui-1.1.0 → lazylabel_gui-1.1.2}/src/lazylabel/ui/__init__.py +7 -7
  19. {lazylabel_gui-1.1.0 → lazylabel_gui-1.1.2}/src/lazylabel/ui/control_panel.py +241 -220
  20. {lazylabel_gui-1.1.0 → lazylabel_gui-1.1.2}/src/lazylabel/ui/editable_vertex.py +64 -51
  21. {lazylabel_gui-1.1.0 → lazylabel_gui-1.1.2}/src/lazylabel/ui/hotkey_dialog.py +383 -383
  22. {lazylabel_gui-1.1.0 → lazylabel_gui-1.1.2}/src/lazylabel/ui/hoverable_pixelmap_item.py +22 -22
  23. {lazylabel_gui-1.1.0 → lazylabel_gui-1.1.2}/src/lazylabel/ui/hoverable_polygon_item.py +39 -39
  24. {lazylabel_gui-1.1.0 → lazylabel_gui-1.1.2}/src/lazylabel/ui/main_window.py +1659 -1264
  25. {lazylabel_gui-1.1.0 → lazylabel_gui-1.1.2}/src/lazylabel/ui/numeric_table_widget_item.py +9 -9
  26. {lazylabel_gui-1.1.0 → lazylabel_gui-1.1.2}/src/lazylabel/ui/photo_viewer.py +54 -54
  27. {lazylabel_gui-1.1.0 → lazylabel_gui-1.1.2}/src/lazylabel/ui/reorderable_class_table.py +61 -61
  28. {lazylabel_gui-1.1.0 → lazylabel_gui-1.1.2}/src/lazylabel/ui/right_panel.py +315 -239
  29. {lazylabel_gui-1.1.0 → lazylabel_gui-1.1.2}/src/lazylabel/ui/widgets/__init__.py +8 -7
  30. {lazylabel_gui-1.1.0 → lazylabel_gui-1.1.2}/src/lazylabel/ui/widgets/adjustments_widget.py +108 -107
  31. {lazylabel_gui-1.1.0 → lazylabel_gui-1.1.2}/src/lazylabel/ui/widgets/model_selection_widget.py +93 -93
  32. {lazylabel_gui-1.1.0 → lazylabel_gui-1.1.2}/src/lazylabel/ui/widgets/settings_widget.py +105 -105
  33. lazylabel_gui-1.1.2/src/lazylabel/ui/widgets/status_bar.py +109 -0
  34. {lazylabel_gui-1.1.0 → lazylabel_gui-1.1.2}/src/lazylabel/utils/__init__.py +5 -5
  35. {lazylabel_gui-1.1.0 → lazylabel_gui-1.1.2}/src/lazylabel/utils/custom_file_system_model.py +132 -132
  36. {lazylabel_gui-1.1.0 → lazylabel_gui-1.1.2}/src/lazylabel/utils/utils.py +12 -12
  37. {lazylabel_gui-1.1.0 → lazylabel_gui-1.1.2}/src/lazylabel_gui.egg-info/PKG-INFO +197 -197
  38. {lazylabel_gui-1.1.0 → lazylabel_gui-1.1.2}/src/lazylabel_gui.egg-info/SOURCES.txt +1 -0
  39. {lazylabel_gui-1.1.0 → lazylabel_gui-1.1.2}/src/lazylabel_gui.egg-info/dependency_links.txt +0 -0
  40. {lazylabel_gui-1.1.0 → lazylabel_gui-1.1.2}/src/lazylabel_gui.egg-info/entry_points.txt +0 -0
  41. {lazylabel_gui-1.1.0 → lazylabel_gui-1.1.2}/src/lazylabel_gui.egg-info/requires.txt +0 -0
  42. {lazylabel_gui-1.1.0 → lazylabel_gui-1.1.2}/src/lazylabel_gui.egg-info/top_level.txt +0 -0
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2025 Deniz N. Cakan
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Deniz N. Cakan
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -1,197 +1,197 @@
1
- Metadata-Version: 2.4
2
- Name: lazylabel-gui
3
- Version: 1.1.0
4
- Summary: An image segmentation GUI for generating ML ready mask tensors and annotations.
5
- Author-email: "Deniz N. Cakan" <deniz.n.cakan@gmail.com>
6
- License: MIT License
7
-
8
- Copyright (c) 2025 Deniz N. Cakan
9
-
10
- Permission is hereby granted, free of charge, to any person obtaining a copy
11
- of this software and associated documentation files (the "Software"), to deal
12
- in the Software without restriction, including without limitation the rights
13
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
14
- copies of the Software, and to permit persons to whom the Software is
15
- furnished to do so, subject to the following conditions:
16
-
17
- The above copyright notice and this permission notice shall be included in all
18
- copies or substantial portions of the Software.
19
-
20
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
23
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
24
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
25
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
26
- SOFTWARE.
27
-
28
- Project-URL: Homepage, https://github.com/dnzckn/lazylabel
29
- Project-URL: Bug Tracker, https://github.com/dnzckn/lazylabel/issues
30
- Classifier: Programming Language :: Python :: 3
31
- Classifier: License :: OSI Approved :: MIT License
32
- Classifier: Operating System :: OS Independent
33
- Classifier: Topic :: Scientific/Engineering :: Image Processing
34
- Classifier: Environment :: X11 Applications :: Qt
35
- Requires-Python: >=3.10
36
- Description-Content-Type: text/markdown
37
- License-File: LICENSE
38
- Requires-Dist: PyQt6>=6.9.0
39
- Requires-Dist: pyqtdarktheme==2.1.0
40
- Requires-Dist: torch>=2.7.1
41
- Requires-Dist: torchvision>=0.22.1
42
- Requires-Dist: segment-anything==1.0
43
- Requires-Dist: numpy>=2.1.2
44
- Requires-Dist: opencv-python>=4.11.0.86
45
- Requires-Dist: scipy>=1.15.3
46
- Requires-Dist: requests>=2.32.4
47
- Requires-Dist: tqdm>=4.67.1
48
- Dynamic: license-file
49
-
50
- # <img src="https://raw.githubusercontent.com/dnzckn/LazyLabel/main/src/lazylabel/demo_pictures/logo2.png" alt="LazyLabel Logo" style="height:60px; vertical-align:middle;" /> <img src="https://raw.githubusercontent.com/dnzckn/LazyLabel/main/src/lazylabel/demo_pictures/logo_black.png" alt="LazyLabel Cursive" style="height:60px; vertical-align:middle;" />
51
-
52
- LazyLabel is an intuitive, AI-assisted image segmentation tool built with a modern, modular architecture. It uses Meta's Segment Anything Model (SAM) for quick, precise mask generation, alongside advanced polygon editing for fine-tuned control. Features comprehensive model management, customizable hotkeys, and outputs in clean, one-hot encoded `.npz` format for easy machine learning integration.
53
-
54
- Inspired by [LabelMe](https://github.com/wkentaro/labelme?tab=readme-ov-file#installation) and [Segment-Anything-UI](https://github.com/branislavhesko/segment-anything-ui/tree/main).
55
-
56
- ![LazyLabel Screenshot](https://raw.githubusercontent.com/dnzckn/LazyLabel/main/src/lazylabel/demo_pictures/gui.PNG)
57
-
58
- ---
59
-
60
- ## ✨ Core Features
61
-
62
- ### **AI-Powered Segmentation**
63
- * Generate masks with simple left-click (positive) and right-click (negative) interactions
64
- * Multiple SAM model support with easy switching
65
- * Custom model loading from any directory
66
-
67
- ### **Advanced Editing Tools**
68
- * **Vector Polygon Tool**: Full control to draw, edit, and reshape polygons
69
- * **Vertex Editing**: Drag vertices or move entire shapes with precision
70
- * **Selection & Merging**: Select, merge, and re-order segments intuitively
71
-
72
- ### **Professional Workflow**
73
- * **Customizable Hotkeys**: Personalize keyboard shortcuts for all functions
74
- * **Advanced Class Management**: Assign multiple segments to single class IDs
75
- * **Smart I/O**: Load existing `.npz` masks; save as clean, one-hot encoded outputs
76
- * **Interactive UI**: Color-coded segments, sortable lists, and hover highlighting
77
-
78
- ### **Modern Architecture**
79
- * **Modular Design**: Clean, maintainable codebase with separated concerns
80
- * **Model Management**: Dedicated model storage and switching system
81
- * **Persistent Settings**: User preferences saved between sessions
82
-
83
- ---
84
-
85
- ## 🚀 Getting Started
86
-
87
- ### Prerequisites
88
- **Python 3.10+**
89
-
90
- ### Installation
91
-
92
- #### For Users [via PyPI](https://pypi.org/project/lazylabel-gui/)
93
- 1. Install LazyLabel directly:
94
- ```bash
95
- pip install lazylabel-gui
96
- ```
97
- 2. Run the application:
98
- ```bash
99
- lazylabel-gui
100
- ```
101
-
102
- #### For Developers (from Source)
103
- 1. Clone the repository:
104
- ```bash
105
- git clone https://github.com/dnzckn/LazyLabel.git
106
- cd LazyLabel
107
- ```
108
- 2. Install in editable mode:
109
- ```bash
110
- pip install -e .
111
- ```
112
- 3. Run the application:
113
- ```bash
114
- lazylabel-gui
115
- ```
116
-
117
- ### Model Management
118
- * **Default Storage**: Models are stored in `src/lazylabel/models/` directory
119
- * **Custom Models**: Click "Browse Models" to select custom model folders
120
- * **Model Switching**: Use the dropdown to switch between available models
121
- * **Auto-Detection**: Application automatically detects all `.pth` files in selected directories
122
-
123
- **Note**: On the first run, the application will automatically download the SAM model checkpoint (~2.5 GB) from Meta's repository to the models directory. This is a one-time download.
124
-
125
- ---
126
-
127
- ## ⌨️ Controls & Keybinds
128
-
129
- > **💡 Tip**: All hotkeys are fully customizable! Click the "Hotkeys" button in the control panel to personalize your shortcuts.
130
-
131
- ### Modes
132
- | Key | Action |
133
- |---|---|
134
- | `1` | Enter **Point Mode** (for AI segmentation). |
135
- | `2` | Enter **Polygon Drawing Mode**. |
136
- | `E` | Toggle **Selection Mode** to select existing segments. |
137
- | `R` | Enter **Edit Mode** for selected polygons (drag shape or vertices). |
138
- | `Q` | Toggle **Pan Mode** (click and drag the image). |
139
-
140
- ### Actions
141
- | Key(s) | Action |
142
- |---|---|
143
- | `L-Click` | Add positive point (Point Mode) or polygon vertex. |
144
- | `R-Click` | Add negative point (Point Mode). |
145
- | `Ctrl + Z` | Undo last point. |
146
- | `Spacebar` | Finalize and save current AI segment. |
147
- | `Enter` | **Save final mask for the current image to a `.npz` file.** |
148
- | `M` | **Merge** selected segments into a single class. |
149
- | `V` / `Delete` / `Backspace`| **Delete** selected segments. |
150
- | `C` | Clear temporary points/vertices. |
151
- | `W/A/S/D` | Pan image. |
152
- | `Scroll Wheel` | Zoom-in or -out. |
153
-
154
- ---
155
-
156
- ## 📦 Output Format
157
-
158
- LazyLabel saves your work as a compressed NumPy array (`.npz`) with the same name as your image file.
159
-
160
- The file contains a single data key, `'mask'`, holding a **one-hot encoded tensor** with the shape `(H, W, C)`:
161
- * `H`: Image height.
162
- * `W`: Image width.
163
- * `C`: Total unique classes.
164
-
165
- Each channel is a binary mask for a class, combining all assigned segments into a clean, ML-ready output.
166
-
167
- ---
168
-
169
- ## 🏗️ Architecture
170
-
171
- LazyLabel features a modern, modular architecture designed for maintainability and extensibility:
172
-
173
- * **Modular Design**: Clean separation between UI, business logic, and configuration
174
- * **Signal-Based Communication**: Loose coupling between components using PyQt signals
175
- * **Persistent Configuration**: User settings and preferences saved between sessions
176
- * **Extensible Model System**: Easy integration of new SAM models and types
177
-
178
- For detailed technical documentation, see [ARCHITECTURE.md](src/lazylabel/ARCHITECTURE.md).
179
-
180
- ---
181
-
182
- ## ⌨️ Hotkey Customization
183
-
184
- LazyLabel includes a comprehensive hotkey management system:
185
-
186
- * **Full Customization**: Personalize keyboard shortcuts for all 27+ functions
187
- * **Category Organization**: Hotkeys organized by function (Modes, Actions, Navigation, etc.)
188
- * **Primary & Secondary Keys**: Set multiple shortcuts for the same action
189
- * **Persistent Settings**: Custom hotkeys saved between sessions
190
- * **Conflict Prevention**: System prevents duplicate key assignments
191
-
192
- For complete hotkey documentation, see [HOTKEY_FEATURE.md](src/lazylabel/HOTKEY_FEATURE.md).
193
-
194
- ---
195
-
196
- ## ☕ Support LazyLabel
197
- [If you found LazyLabel helpful, consider supporting the project!](https://buymeacoffee.com/dnzckn)
1
+ Metadata-Version: 2.4
2
+ Name: lazylabel-gui
3
+ Version: 1.1.2
4
+ Summary: An image segmentation GUI for generating ML ready mask tensors and annotations.
5
+ Author-email: "Deniz N. Cakan" <deniz.n.cakan@gmail.com>
6
+ License: MIT License
7
+
8
+ Copyright (c) 2025 Deniz N. Cakan
9
+
10
+ Permission is hereby granted, free of charge, to any person obtaining a copy
11
+ of this software and associated documentation files (the "Software"), to deal
12
+ in the Software without restriction, including without limitation the rights
13
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
14
+ copies of the Software, and to permit persons to whom the Software is
15
+ furnished to do so, subject to the following conditions:
16
+
17
+ The above copyright notice and this permission notice shall be included in all
18
+ copies or substantial portions of the Software.
19
+
20
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
23
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
24
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
25
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
26
+ SOFTWARE.
27
+
28
+ Project-URL: Homepage, https://github.com/dnzckn/lazylabel
29
+ Project-URL: Bug Tracker, https://github.com/dnzckn/lazylabel/issues
30
+ Classifier: Programming Language :: Python :: 3
31
+ Classifier: License :: OSI Approved :: MIT License
32
+ Classifier: Operating System :: OS Independent
33
+ Classifier: Topic :: Scientific/Engineering :: Image Processing
34
+ Classifier: Environment :: X11 Applications :: Qt
35
+ Requires-Python: >=3.10
36
+ Description-Content-Type: text/markdown
37
+ License-File: LICENSE
38
+ Requires-Dist: PyQt6>=6.9.0
39
+ Requires-Dist: pyqtdarktheme==2.1.0
40
+ Requires-Dist: torch>=2.7.1
41
+ Requires-Dist: torchvision>=0.22.1
42
+ Requires-Dist: segment-anything==1.0
43
+ Requires-Dist: numpy>=2.1.2
44
+ Requires-Dist: opencv-python>=4.11.0.86
45
+ Requires-Dist: scipy>=1.15.3
46
+ Requires-Dist: requests>=2.32.4
47
+ Requires-Dist: tqdm>=4.67.1
48
+ Dynamic: license-file
49
+
50
+ # <img src="https://raw.githubusercontent.com/dnzckn/LazyLabel/main/src/lazylabel/demo_pictures/logo2.png" alt="LazyLabel Logo" style="height:60px; vertical-align:middle;" /> <img src="https://raw.githubusercontent.com/dnzckn/LazyLabel/main/src/lazylabel/demo_pictures/logo_black.png" alt="LazyLabel Cursive" style="height:60px; vertical-align:middle;" />
51
+
52
+ LazyLabel is an intuitive, AI-assisted image segmentation tool built with a modern, modular architecture. It uses Meta's Segment Anything Model (SAM) for quick, precise mask generation, alongside advanced polygon editing for fine-tuned control. Features comprehensive model management, customizable hotkeys, and outputs in clean, one-hot encoded `.npz` format for easy machine learning integration.
53
+
54
+ Inspired by [LabelMe](https://github.com/wkentaro/labelme?tab=readme-ov-file#installation) and [Segment-Anything-UI](https://github.com/branislavhesko/segment-anything-ui/tree/main).
55
+
56
+ ![LazyLabel Screenshot](https://raw.githubusercontent.com/dnzckn/LazyLabel/main/src/lazylabel/demo_pictures/gui.PNG)
57
+
58
+ ---
59
+
60
+ ## ✨ Core Features
61
+
62
+ ### **AI-Powered Segmentation**
63
+ * Generate masks with simple left-click (positive) and right-click (negative) interactions
64
+ * Multiple SAM model support with easy switching
65
+ * Custom model loading from any directory
66
+
67
+ ### **Advanced Editing Tools**
68
+ * **Vector Polygon Tool**: Full control to draw, edit, and reshape polygons
69
+ * **Vertex Editing**: Drag vertices or move entire shapes with precision
70
+ * **Selection & Merging**: Select, merge, and re-order segments intuitively
71
+
72
+ ### **Professional Workflow**
73
+ * **Customizable Hotkeys**: Personalize keyboard shortcuts for all functions
74
+ * **Advanced Class Management**: Assign multiple segments to single class IDs
75
+ * **Smart I/O**: Load existing `.npz` masks; save as clean, one-hot encoded outputs
76
+ * **Interactive UI**: Color-coded segments, sortable lists, and hover highlighting
77
+
78
+ ### **Modern Architecture**
79
+ * **Modular Design**: Clean, maintainable codebase with separated concerns
80
+ * **Model Management**: Dedicated model storage and switching system
81
+ * **Persistent Settings**: User preferences saved between sessions
82
+
83
+ ---
84
+
85
+ ## 🚀 Getting Started
86
+
87
+ ### Prerequisites
88
+ **Python 3.10+**
89
+
90
+ ### Installation
91
+
92
+ #### For Users [via PyPI](https://pypi.org/project/lazylabel-gui/)
93
+ 1. Install LazyLabel directly:
94
+ ```bash
95
+ pip install lazylabel-gui
96
+ ```
97
+ 2. Run the application:
98
+ ```bash
99
+ lazylabel-gui
100
+ ```
101
+
102
+ #### For Developers (from Source)
103
+ 1. Clone the repository:
104
+ ```bash
105
+ git clone https://github.com/dnzckn/LazyLabel.git
106
+ cd LazyLabel
107
+ ```
108
+ 2. Install in editable mode:
109
+ ```bash
110
+ pip install -e .
111
+ ```
112
+ 3. Run the application:
113
+ ```bash
114
+ lazylabel-gui
115
+ ```
116
+
117
+ ### Model Management
118
+ * **Default Storage**: Models are stored in `src/lazylabel/models/` directory
119
+ * **Custom Models**: Click "Browse Models" to select custom model folders
120
+ * **Model Switching**: Use the dropdown to switch between available models
121
+ * **Auto-Detection**: Application automatically detects all `.pth` files in selected directories
122
+
123
+ **Note**: On the first run, the application will automatically download the SAM model checkpoint (~2.5 GB) from Meta's repository to the models directory. This is a one-time download.
124
+
125
+ ---
126
+
127
+ ## ⌨️ Controls & Keybinds
128
+
129
+ > **💡 Tip**: All hotkeys are fully customizable! Click the "Hotkeys" button in the control panel to personalize your shortcuts.
130
+
131
+ ### Modes
132
+ | Key | Action |
133
+ |---|---|
134
+ | `1` | Enter **Point Mode** (for AI segmentation). |
135
+ | `2` | Enter **Polygon Drawing Mode**. |
136
+ | `E` | Toggle **Selection Mode** to select existing segments. |
137
+ | `R` | Enter **Edit Mode** for selected polygons (drag shape or vertices). |
138
+ | `Q` | Toggle **Pan Mode** (click and drag the image). |
139
+
140
+ ### Actions
141
+ | Key(s) | Action |
142
+ |---|---|
143
+ | `L-Click` | Add positive point (Point Mode) or polygon vertex. |
144
+ | `R-Click` | Add negative point (Point Mode). |
145
+ | `Ctrl + Z` | Undo last point. |
146
+ | `Spacebar` | Finalize and save current AI segment. |
147
+ | `Enter` | **Save final mask for the current image to a `.npz` file.** |
148
+ | `M` | **Merge** selected segments into a single class. |
149
+ | `V` / `Delete` / `Backspace`| **Delete** selected segments. |
150
+ | `C` | Clear temporary points/vertices. |
151
+ | `W/A/S/D` | Pan image. |
152
+ | `Scroll Wheel` | Zoom-in or -out. |
153
+
154
+ ---
155
+
156
+ ## 📦 Output Format
157
+
158
+ LazyLabel saves your work as a compressed NumPy array (`.npz`) with the same name as your image file.
159
+
160
+ The file contains a single data key, `'mask'`, holding a **one-hot encoded tensor** with the shape `(H, W, C)`:
161
+ * `H`: Image height.
162
+ * `W`: Image width.
163
+ * `C`: Total unique classes.
164
+
165
+ Each channel is a binary mask for a class, combining all assigned segments into a clean, ML-ready output.
166
+
167
+ ---
168
+
169
+ ## 🏗️ Architecture
170
+
171
+ LazyLabel features a modern, modular architecture designed for maintainability and extensibility:
172
+
173
+ * **Modular Design**: Clean separation between UI, business logic, and configuration
174
+ * **Signal-Based Communication**: Loose coupling between components using PyQt signals
175
+ * **Persistent Configuration**: User settings and preferences saved between sessions
176
+ * **Extensible Model System**: Easy integration of new SAM models and types
177
+
178
+ For detailed technical documentation, see [ARCHITECTURE.md](src/lazylabel/ARCHITECTURE.md).
179
+
180
+ ---
181
+
182
+ ## ⌨️ Hotkey Customization
183
+
184
+ LazyLabel includes a comprehensive hotkey management system:
185
+
186
+ * **Full Customization**: Personalize keyboard shortcuts for all 27+ functions
187
+ * **Category Organization**: Hotkeys organized by function (Modes, Actions, Navigation, etc.)
188
+ * **Primary & Secondary Keys**: Set multiple shortcuts for the same action
189
+ * **Persistent Settings**: Custom hotkeys saved between sessions
190
+ * **Conflict Prevention**: System prevents duplicate key assignments
191
+
192
+ For complete hotkey documentation, see [HOTKEY_FEATURE.md](src/lazylabel/HOTKEY_FEATURE.md).
193
+
194
+ ---
195
+
196
+ ## ☕ Support LazyLabel
197
+ [If you found LazyLabel helpful, consider supporting the project!](https://buymeacoffee.com/dnzckn)