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.
- lazylabel/config/hotkeys.py +2 -2
- lazylabel/core/model_manager.py +91 -16
- lazylabel/models/sam2_model.py +223 -0
- lazylabel/models/sam_model.py +25 -3
- lazylabel/ui/control_panel.py +37 -2
- lazylabel/ui/main_window.py +438 -33
- {lazylabel_gui-1.1.9.dist-info → lazylabel_gui-1.2.1.dist-info}/METADATA +56 -96
- {lazylabel_gui-1.1.9.dist-info → lazylabel_gui-1.2.1.dist-info}/RECORD +12 -11
- {lazylabel_gui-1.1.9.dist-info → lazylabel_gui-1.2.1.dist-info}/WHEEL +0 -0
- {lazylabel_gui-1.1.9.dist-info → lazylabel_gui-1.2.1.dist-info}/entry_points.txt +0 -0
- {lazylabel_gui-1.1.9.dist-info → lazylabel_gui-1.2.1.dist-info}/licenses/LICENSE +0 -0
- {lazylabel_gui-1.1.9.dist-info → lazylabel_gui-1.2.1.dist-info}/top_level.txt +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: lazylabel-gui
|
3
|
-
Version: 1.1
|
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
|
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
|

|
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
|
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
|
-
|
85
|
-
-
|
86
|
-
-
|
87
|
-
-
|
88
|
-
-
|
89
|
-
|
90
|
-
|
91
|
-
-
|
92
|
-
-
|
93
|
-
-
|
94
|
-
-
|
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
|
111
|
-
|
112
|
-
|
|
113
|
-
|
114
|
-
| **AI
|
115
|
-
| | `
|
116
|
-
| | `
|
117
|
-
| | `Space` |
|
118
|
-
| **
|
119
|
-
| | `
|
120
|
-
| | `
|
121
|
-
| **
|
122
|
-
|
123
|
-
|
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
|
-
|
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] #
|
145
|
-
class_1_mask = mask[:, :, 1] #
|
146
|
-
#
|
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
|
-
|
150
|
-
|
151
|
-
-
|
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
|
-
## 🛠️
|
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
|
-
###
|
161
|
+
### Testing & Quality
|
189
162
|
```bash
|
190
|
-
#
|
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
|
-
#
|
166
|
+
# Code formatting & linting
|
167
|
+
ruff check . && ruff format .
|
197
168
|
```
|
198
169
|
|
199
170
|
### Architecture
|
200
|
-
- **Modular design** with clean separation
|
201
|
-
- **Signal-based communication** between
|
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**
|
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
|
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
|
-
|
229
|
-
- [
|
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=
|
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=
|
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/
|
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=
|
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=
|
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.
|
39
|
-
lazylabel_gui-1.1.
|
40
|
-
lazylabel_gui-1.1.
|
41
|
-
lazylabel_gui-1.1.
|
42
|
-
lazylabel_gui-1.1.
|
43
|
-
lazylabel_gui-1.1.
|
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,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|