lazylabel-gui 1.1.9__py3-none-any.whl → 1.2.1__py3-none-any.whl

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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: lazylabel-gui
3
- Version: 1.1.9
3
+ Version: 1.2.1
4
4
  Summary: An image segmentation GUI for generating ML ready mask tensors and annotations.
5
5
  Author-email: "Deniz N. Cakan" <deniz.n.cakan@gmail.com>
6
6
  License: MIT License
@@ -57,7 +57,7 @@ Dynamic: license-file
57
57
 
58
58
  **AI-Assisted Image Segmentation Made Simple**
59
59
 
60
- LazyLabel combines Meta's Segment Anything Model (SAM) with intuitive editing tools for fast, precise image labeling. Perfect for machine learning datasets, computer vision research, and annotation workflows.
60
+ LazyLabel combines Meta's Segment Anything Model (SAM) with intuitive editing tools for fast, precise image labeling. Perfect for machine learning datasets and computer vision research.
61
61
 
62
62
  ![LazyLabel Screenshot](https://raw.githubusercontent.com/dnzckn/LazyLabel/main/src/lazylabel/demo_pictures/gui.PNG)
63
63
 
@@ -71,67 +71,57 @@ pip install lazylabel-gui
71
71
  lazylabel-gui
72
72
  ```
73
73
 
74
+ ### Optional: SAM-2 Support
75
+ For advanced SAM-2 models, install manually:
76
+ ```bash
77
+ pip install git+https://github.com/facebookresearch/sam2.git
78
+ ```
79
+ *Note: SAM-2 is optional - LazyLabel works with SAM 1.0 models by default*
80
+
74
81
  ### Usage
75
82
  1. **Open Folder** → Select your image directory
76
83
  2. **Click on image** → AI generates instant masks
77
- 3. **Fine-tune** → Edit polygons, merge segments, adjust classes
84
+ 3. **Fine-tune** → Edit polygons, merge segments
78
85
  4. **Export** → Clean `.npz` files ready for ML training
79
86
 
80
87
  ---
81
88
 
82
89
  ## ✨ Key Features
83
90
 
84
- ### **🧠 AI-Powered Segmentation**
85
- - **One-click masking** with Meta's SAM model
86
- - **Smart prompting** via positive/negative points
87
- - **Fragment filtering** to remove small artifacts
88
- - **Multiple model support** (VIT-H, VIT-L, VIT-B)
89
-
90
- ### **🎨 Advanced Editing**
91
- - **Polygon drawing** with full vertex control
92
- - **Bounding box** annotation mode
93
- - **Shape merging** and class assignment
94
- - **Edit mode** for precision adjustments
95
-
96
- ### **⚡ Productivity Tools**
97
- - **Image adjustments** (brightness, contrast, gamma)
98
- - **Customizable hotkeys** for all functions
99
- - **Undo/redo** with full history
100
- - **Auto-save** and session persistence
101
-
102
- ### **📊 ML-Ready Outputs**
103
- - **One-hot encoded** `.npz` format
104
- - **Clean class separation** with shape `(H, W, Classes)`
105
- - **Batch processing** support
106
- - **Existing mask loading** for iterative work
91
+ - **🧠 One-click AI segmentation** with Meta's SAM and SAM2 models
92
+ - **🎨 Manual polygon drawing** with full vertex control
93
+ - **⚡ Smart editing tools** - merge segments, adjust class names, and class order
94
+ - **📊 ML-ready exports** - One-hot encoded `.npz` format and `.json` for YOLO format
95
+ - **🔧 Image enhancement** - brightness, contrast, gamma adjustment
96
+ - **🔍 Image viewer** - zoom, pan, brightness, contrast, and gamma adjustment
97
+ - **✂️ Edge cropping** - define custom crop areas to focus on specific regions
98
+ - **🔄 Undo/Redo** - full history of all actions
99
+ - **💾 Auto-saving** - Automatic saving of your labels when navigating between images
100
+ - **🎛️ Advanced filtering** - FFT thresholding and color channel thresholding
101
+ - **⌨️ Customizable hotkeys** for all functions
107
102
 
108
103
  ---
109
104
 
110
- ## ⌨️ Essential Controls
111
-
112
- | Mode | Key | Action |
113
- |------|-----|--------|
114
- | **AI Segmentation** | `1` | Point mode for SAM |
115
- | | `Left Click` | Add positive point |
116
- | | `Right Click` | Add negative point |
117
- | | `Space` | Save segment |
118
- | **Manual Drawing** | `2` | Polygon mode |
119
- | | `Left Click` | Add vertex |
120
- | | `Enter` | Close polygon |
121
- | **Editing** | `E` | Selection mode |
122
- | | `R` | Edit selected shapes |
123
- | | `M` | Merge selected segments |
124
- | **Navigation** | `Q` | Pan mode |
125
- | | `W/A/S/D` | Pan image |
126
- | | `Scroll` | Zoom in/out |
127
-
128
- **💡 All hotkeys are customizable** - Click "Hotkeys" button to personalize shortcuts
105
+ ## ⌨️ Essential Hotkeys
106
+
107
+ | Action | Key | Description |
108
+ |--------|-----|-------------|
109
+ | **AI Mode** | `1` | Point-click segmentation |
110
+ | **Draw Mode** | `2` | Manual polygon drawing |
111
+ | **Edit Mode** | `E` | Select and modify shapes |
112
+ | **Save Segment** | `Space` | Confirm current mask |
113
+ | **Merge** | `M` | Combine selected segments |
114
+ | **Pan** | `Q` + drag | Navigate large images |
115
+ | **Positive Point** | `Left Click` | Add to segment |
116
+ | **Negative Point** | `Right Click` | Remove from segment |
117
+
118
+ 💡 **All hotkeys customizable** - Click "Hotkeys" button to personalize
129
119
 
130
120
  ---
131
121
 
132
122
  ## 📦 Output Format
133
123
 
134
- LazyLabel exports clean, ML-ready data:
124
+ Perfect for ML training - clean, structured data:
135
125
 
136
126
  ```python
137
127
  import numpy as np
@@ -141,41 +131,24 @@ data = np.load('your_image.npz')
141
131
  mask = data['mask'] # Shape: (height, width, num_classes)
142
132
 
143
133
  # Each channel is a binary mask for one class
144
- class_0_mask = mask[:, :, 0] # Binary mask for class 0
145
- class_1_mask = mask[:, :, 1] # Binary mask for class 1
146
- # ... and so on
134
+ class_0_mask = mask[:, :, 0] # Background
135
+ class_1_mask = mask[:, :, 1] # Object type 1
136
+ class_2_mask = mask[:, :, 2] # Object type 2
147
137
  ```
148
138
 
149
- **Perfect for:**
150
- - Semantic segmentation training
151
- - Instance segmentation datasets
139
+
140
+ **Ideal for:**
141
+ - Semantic segmentation datasets
142
+ - Instance segmentation training
152
143
  - Computer vision research
153
144
  - Automated annotation pipelines
154
145
 
155
146
  ---
156
147
 
157
- ## 🛠️ Advanced Features
158
-
159
- ### **Image Enhancement**
160
- - **Brightness/Contrast** adjustment sliders
161
- - **Gamma correction** for better visibility
162
- - **Live preview** of adjustments
163
- - **SAM integration** with adjusted images
164
-
165
- ### **Smart Filtering**
166
- - **Fragment threshold** removes small segments
167
- - **Size-based filtering** (0-100% of largest segment)
168
- - **Quality control** for clean annotations
169
-
170
- ### **Professional Workflow**
171
- - **Class management** with custom aliases
172
- - **Segment organization** with sortable tables
173
- - **Batch export** for large datasets
174
- - **Model switching** without restart
148
+ ## 🛠️ Development
175
149
 
176
- ---
177
-
178
- ## 🏗️ Development
150
+ **Requirements:** Python 3.10+
151
+ **2.5GB** disk space for SAM model (auto-downloaded)
179
152
 
180
153
  ### Installation from Source
181
154
  ```bash
@@ -185,38 +158,26 @@ pip install -e .
185
158
  lazylabel-gui
186
159
  ```
187
160
 
188
- ### Code Quality & Testing
161
+ ### Testing & Quality
189
162
  ```bash
190
- # Linting & formatting
191
- ruff check . && ruff format .
192
-
193
- # Run tests with coverage
163
+ # Run full test suite
194
164
  python -m pytest --cov=lazylabel --cov-report=html
195
165
 
196
- # All tests pass with 60%+ coverage
166
+ # Code formatting & linting
167
+ ruff check . && ruff format .
197
168
  ```
198
169
 
199
170
  ### Architecture
200
- - **Modular design** with clean separation of concerns
201
- - **Signal-based communication** between components
171
+ - **Modular design** with clean component separation
172
+ - **Signal-based communication** between UI elements
202
173
  - **Extensible model system** for new SAM variants
203
- - **Comprehensive test suite** with 95% speed optimization
204
-
205
- ---
206
-
207
- ## 📋 Requirements
208
-
209
- - **Python 3.10+**
210
- - **OpenCV** for image processing
211
- - **PyQt6** for GUI
212
- - **NumPy** for data handling
213
- - **2.5GB** disk space for SAM model (auto-downloaded)
174
+ - **Comprehensive test suite** (150+ tests, 60%+ coverage)
214
175
 
215
176
  ---
216
177
 
217
178
  ## 🤝 Contributing
218
179
 
219
- LazyLabel welcomes contributions! Check out our:
180
+ LazyLabel welcomes contributions! Check out:
220
181
  - [Architecture Guide](src/lazylabel/ARCHITECTURE.md) for technical details
221
182
  - [Hotkey System](src/lazylabel/HOTKEY_FEATURE.md) for customization
222
183
  - Issues page for feature requests and bug reports
@@ -225,9 +186,8 @@ LazyLabel welcomes contributions! Check out our:
225
186
 
226
187
  ## 🙏 Acknowledgments
227
188
 
228
- LazyLabel was inspired by and builds upon the excellent work of:
229
- - [LabelMe](https://github.com/wkentaro/labelme) - The pioneering open-source image annotation tool
230
- - [Segment-Anything-UI](https://github.com/branislavhesko/segment-anything-ui) - Early SAM integration concepts
189
+ - [LabelMe](https://github.com/wkentaro/labelme)
190
+ - [Segment-Anything-UI](https://github.com/branislavhesko/segment-anything-ui)
231
191
 
232
192
  ---
233
193
 
@@ -2,22 +2,23 @@ lazylabel/__init__.py,sha256=0yitHZYNNuF4Rqj7cqE0TrfDV8zhzKD3A5W1vOymHK4,199
2
2
  lazylabel/__main__.py,sha256=5IWklQrNkzeMH6rchzZxxoeSnZlkz-HRiPWXqjjj2yA,139
3
3
  lazylabel/main.py,sha256=8NkDYawiSRavXv35Lh2nYAz88EYVt8jrJXYZsk6EE7M,849
4
4
  lazylabel/config/__init__.py,sha256=TnDXH0yx0zy97FfjpiVPHleMgMrM5YwWrUbvevSNJjg,263
5
- lazylabel/config/hotkeys.py,sha256=bbHPpCNokwgH0EX74vGcNdn3RoyVZNVr-is6us-7J3M,7990
5
+ lazylabel/config/hotkeys.py,sha256=PwxBUy7RvIUU3HCXT74NnexPbg2VFQrbR5FTGek31h8,8008
6
6
  lazylabel/config/paths.py,sha256=ZVKbtaNOxmYO4l6JgsY-8DXaE_jaJfDg2RQJJn3-5nw,1275
7
7
  lazylabel/config/settings.py,sha256=0muOT64zBr9Tn-JbyYRPf9xX760-X84ov93m56SpSHA,1898
8
8
  lazylabel/core/__init__.py,sha256=FmRjop_uIBSJwKMGhaZ-3Iwu34LkoxTuD-hnq5vbTSY,232
9
9
  lazylabel/core/file_manager.py,sha256=CmRLd3FtOa64mt9Wz-eYErDerFOm1gt3roGlibviqwo,6013
10
- lazylabel/core/model_manager.py,sha256=GYwAVCJVsKrgVXD54XS6BxkFxQEcrNJyt_IBfwOA0AI,3815
10
+ lazylabel/core/model_manager.py,sha256=NmgnIrw9sb_vSwRVkBr2Z_Mc2kFfdFukFgUhqs2e-L0,6829
11
11
  lazylabel/core/segment_manager.py,sha256=M6kHcYeiub3WqL01NElCvKOc2GNmf72LUM1W8XwSaxc,6465
12
12
  lazylabel/models/__init__.py,sha256=fIlk_0DuZfiClcm0XlZdimeHzunQwBmTMI4PcGsaymw,91
13
- lazylabel/models/sam_model.py,sha256=anh4XMkoX8U5MCZHV5HqN0x8iVnRYi50rcXFt6LdFCQ,8020
13
+ lazylabel/models/sam2_model.py,sha256=gGg1p6iD50o1n8RoL0fas691qfEM59ChBIV3mDODtAQ,8453
14
+ lazylabel/models/sam_model.py,sha256=Q1GAaFG6n5JoZXhClcUZKN-gvA_wmtVuUYzELG7zhPg,8833
14
15
  lazylabel/ui/__init__.py,sha256=4qDIh9y6tABPmD8MAMGZn_G7oSRyrcHt2HkjoWgbGH4,268
15
- lazylabel/ui/control_panel.py,sha256=IvGtL-Z-WOpo9q-owhwBSB-DSwXaDubec2ajLRMoyFk,31322
16
+ lazylabel/ui/control_panel.py,sha256=_ZtEuURL2RxjlOWXXky5ZWt5uIJrAqw9L5raKpg5Xj4,32950
16
17
  lazylabel/ui/editable_vertex.py,sha256=nAFC2UuFfbvMbGBbAiLWA77cS5-Hn3a08xe1_QLz2yk,2449
17
18
  lazylabel/ui/hotkey_dialog.py,sha256=U_B76HLOxWdWkfA4d2XgRUaZTJPAAE_m5fmwf7Rh-5Y,14743
18
19
  lazylabel/ui/hoverable_pixelmap_item.py,sha256=kJFOp7WXiyHpNf7l73TZjiob85jgP30b5MZvu_z5L3c,728
19
20
  lazylabel/ui/hoverable_polygon_item.py,sha256=aclUwd0P8H8xbcep6GwhnfaVs1zSkqeZKAL-xeDyMiU,1222
20
- lazylabel/ui/main_window.py,sha256=R7QpEY3kEhxTm_bYYJDpmF1zUgvEwU9UxLwPkduCgkU,128160
21
+ lazylabel/ui/main_window.py,sha256=fmyNsKGzL57mQk31OFEKUv-bwZB3iKzTKf_b90ht790,145682
21
22
  lazylabel/ui/numeric_table_widget_item.py,sha256=dQUlIFu9syCxTGAHVIlmbgkI7aJ3f3wmDPBz1AGK9Bg,283
22
23
  lazylabel/ui/photo_viewer.py,sha256=f93Mn9ajR2CYakJbbhhHvD5blKrwiGq3ZYgro-k2npc,4217
23
24
  lazylabel/ui/reorderable_class_table.py,sha256=sxHhQre5O_MXLDFgKnw43QnvXXoqn5xRKMGitgO7muI,2371
@@ -35,9 +36,9 @@ lazylabel/utils/__init__.py,sha256=V6IR5Gim-39HgM2NyTVT-n8gy3mjilCSFW9y0owN5nc,1
35
36
  lazylabel/utils/custom_file_system_model.py,sha256=-3EimlybvevH6bvqBE0qdFnLADVtayylmkntxPXK0Bk,4869
36
37
  lazylabel/utils/logger.py,sha256=R7z6ifgA-NY-9ZbLlNH0i19zzwXndJ_gkG2J1zpVEhg,1306
37
38
  lazylabel/utils/utils.py,sha256=sYSCoXL27OaLgOZaUkCAhgmKZ7YfhR3Cc5F8nDIa3Ig,414
38
- lazylabel_gui-1.1.9.dist-info/licenses/LICENSE,sha256=kSDEIgrWAPd1u2UFGGpC9X71dhzrlzBFs8hbDlENnGE,1092
39
- lazylabel_gui-1.1.9.dist-info/METADATA,sha256=MjH3jrF3QDAOKiGUpuA3vIBJPTjAM4jax88hJdojKlw,8064
40
- lazylabel_gui-1.1.9.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
41
- lazylabel_gui-1.1.9.dist-info/entry_points.txt,sha256=Hd0WwEG9OPTa_ziYjiD0aRh7R6Fupt-wdQ3sspdc1mM,54
42
- lazylabel_gui-1.1.9.dist-info/top_level.txt,sha256=YN4uIyrpDBq1wiJaBuZLDipIzyZY0jqJOmmXiPIOUkU,10
43
- lazylabel_gui-1.1.9.dist-info/RECORD,,
39
+ lazylabel_gui-1.2.1.dist-info/licenses/LICENSE,sha256=kSDEIgrWAPd1u2UFGGpC9X71dhzrlzBFs8hbDlENnGE,1092
40
+ lazylabel_gui-1.2.1.dist-info/METADATA,sha256=3oudmKUge4EXthGYCBauKdxRjhVbY7LZAZqDE4aRNUI,7237
41
+ lazylabel_gui-1.2.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
42
+ lazylabel_gui-1.2.1.dist-info/entry_points.txt,sha256=Hd0WwEG9OPTa_ziYjiD0aRh7R6Fupt-wdQ3sspdc1mM,54
43
+ lazylabel_gui-1.2.1.dist-info/top_level.txt,sha256=YN4uIyrpDBq1wiJaBuZLDipIzyZY0jqJOmmXiPIOUkU,10
44
+ lazylabel_gui-1.2.1.dist-info/RECORD,,