lazylabel-gui 1.3.5__tar.gz → 1.3.6__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.
- {lazylabel_gui-1.3.5/src/lazylabel_gui.egg-info → lazylabel_gui-1.3.6}/PKG-INFO +52 -49
- lazylabel_gui-1.3.6/README.md +142 -0
- {lazylabel_gui-1.3.5 → lazylabel_gui-1.3.6}/pyproject.toml +1 -1
- {lazylabel_gui-1.3.5 → lazylabel_gui-1.3.6}/src/lazylabel/ui/widgets/channel_threshold_widget.py +18 -4
- {lazylabel_gui-1.3.5 → lazylabel_gui-1.3.6/src/lazylabel_gui.egg-info}/PKG-INFO +52 -49
- lazylabel_gui-1.3.5/README.md +0 -139
- {lazylabel_gui-1.3.5 → lazylabel_gui-1.3.6}/LICENSE +0 -0
- {lazylabel_gui-1.3.5 → lazylabel_gui-1.3.6}/setup.cfg +0 -0
- {lazylabel_gui-1.3.5 → lazylabel_gui-1.3.6}/src/lazylabel/__init__.py +0 -0
- {lazylabel_gui-1.3.5 → lazylabel_gui-1.3.6}/src/lazylabel/__main__.py +0 -0
- {lazylabel_gui-1.3.5 → lazylabel_gui-1.3.6}/src/lazylabel/config/__init__.py +0 -0
- {lazylabel_gui-1.3.5 → lazylabel_gui-1.3.6}/src/lazylabel/config/hotkeys.py +0 -0
- {lazylabel_gui-1.3.5 → lazylabel_gui-1.3.6}/src/lazylabel/config/paths.py +0 -0
- {lazylabel_gui-1.3.5 → lazylabel_gui-1.3.6}/src/lazylabel/config/settings.py +0 -0
- {lazylabel_gui-1.3.5 → lazylabel_gui-1.3.6}/src/lazylabel/core/__init__.py +0 -0
- {lazylabel_gui-1.3.5 → lazylabel_gui-1.3.6}/src/lazylabel/core/file_manager.py +0 -0
- {lazylabel_gui-1.3.5 → lazylabel_gui-1.3.6}/src/lazylabel/core/model_manager.py +0 -0
- {lazylabel_gui-1.3.5 → lazylabel_gui-1.3.6}/src/lazylabel/core/segment_manager.py +0 -0
- {lazylabel_gui-1.3.5 → lazylabel_gui-1.3.6}/src/lazylabel/main.py +0 -0
- {lazylabel_gui-1.3.5 → lazylabel_gui-1.3.6}/src/lazylabel/models/__init__.py +0 -0
- {lazylabel_gui-1.3.5 → lazylabel_gui-1.3.6}/src/lazylabel/models/sam2_model.py +0 -0
- {lazylabel_gui-1.3.5 → lazylabel_gui-1.3.6}/src/lazylabel/models/sam_model.py +0 -0
- {lazylabel_gui-1.3.5 → lazylabel_gui-1.3.6}/src/lazylabel/ui/__init__.py +0 -0
- {lazylabel_gui-1.3.5 → lazylabel_gui-1.3.6}/src/lazylabel/ui/control_panel.py +0 -0
- {lazylabel_gui-1.3.5 → lazylabel_gui-1.3.6}/src/lazylabel/ui/editable_vertex.py +0 -0
- {lazylabel_gui-1.3.5 → lazylabel_gui-1.3.6}/src/lazylabel/ui/hotkey_dialog.py +0 -0
- {lazylabel_gui-1.3.5 → lazylabel_gui-1.3.6}/src/lazylabel/ui/hoverable_pixelmap_item.py +0 -0
- {lazylabel_gui-1.3.5 → lazylabel_gui-1.3.6}/src/lazylabel/ui/hoverable_polygon_item.py +0 -0
- {lazylabel_gui-1.3.5 → lazylabel_gui-1.3.6}/src/lazylabel/ui/main_window.py +0 -0
- {lazylabel_gui-1.3.5 → lazylabel_gui-1.3.6}/src/lazylabel/ui/modes/__init__.py +0 -0
- {lazylabel_gui-1.3.5 → lazylabel_gui-1.3.6}/src/lazylabel/ui/modes/base_mode.py +0 -0
- {lazylabel_gui-1.3.5 → lazylabel_gui-1.3.6}/src/lazylabel/ui/modes/multi_view_mode.py +0 -0
- {lazylabel_gui-1.3.5 → lazylabel_gui-1.3.6}/src/lazylabel/ui/modes/single_view_mode.py +0 -0
- {lazylabel_gui-1.3.5 → lazylabel_gui-1.3.6}/src/lazylabel/ui/numeric_table_widget_item.py +0 -0
- {lazylabel_gui-1.3.5 → lazylabel_gui-1.3.6}/src/lazylabel/ui/photo_viewer.py +0 -0
- {lazylabel_gui-1.3.5 → lazylabel_gui-1.3.6}/src/lazylabel/ui/reorderable_class_table.py +0 -0
- {lazylabel_gui-1.3.5 → lazylabel_gui-1.3.6}/src/lazylabel/ui/right_panel.py +0 -0
- {lazylabel_gui-1.3.5 → lazylabel_gui-1.3.6}/src/lazylabel/ui/widgets/__init__.py +0 -0
- {lazylabel_gui-1.3.5 → lazylabel_gui-1.3.6}/src/lazylabel/ui/widgets/adjustments_widget.py +0 -0
- {lazylabel_gui-1.3.5 → lazylabel_gui-1.3.6}/src/lazylabel/ui/widgets/border_crop_widget.py +0 -0
- {lazylabel_gui-1.3.5 → lazylabel_gui-1.3.6}/src/lazylabel/ui/widgets/fft_threshold_widget.py +0 -0
- {lazylabel_gui-1.3.5 → lazylabel_gui-1.3.6}/src/lazylabel/ui/widgets/fragment_threshold_widget.py +0 -0
- {lazylabel_gui-1.3.5 → lazylabel_gui-1.3.6}/src/lazylabel/ui/widgets/model_selection_widget.py +0 -0
- {lazylabel_gui-1.3.5 → lazylabel_gui-1.3.6}/src/lazylabel/ui/widgets/settings_widget.py +0 -0
- {lazylabel_gui-1.3.5 → lazylabel_gui-1.3.6}/src/lazylabel/ui/widgets/status_bar.py +0 -0
- {lazylabel_gui-1.3.5 → lazylabel_gui-1.3.6}/src/lazylabel/ui/workers/__init__.py +0 -0
- {lazylabel_gui-1.3.5 → lazylabel_gui-1.3.6}/src/lazylabel/ui/workers/image_discovery_worker.py +0 -0
- {lazylabel_gui-1.3.5 → lazylabel_gui-1.3.6}/src/lazylabel/ui/workers/multi_view_sam_init_worker.py +0 -0
- {lazylabel_gui-1.3.5 → lazylabel_gui-1.3.6}/src/lazylabel/ui/workers/multi_view_sam_update_worker.py +0 -0
- {lazylabel_gui-1.3.5 → lazylabel_gui-1.3.6}/src/lazylabel/ui/workers/sam_update_worker.py +0 -0
- {lazylabel_gui-1.3.5 → lazylabel_gui-1.3.6}/src/lazylabel/ui/workers/single_view_sam_init_worker.py +0 -0
- {lazylabel_gui-1.3.5 → lazylabel_gui-1.3.6}/src/lazylabel/utils/__init__.py +0 -0
- {lazylabel_gui-1.3.5 → lazylabel_gui-1.3.6}/src/lazylabel/utils/custom_file_system_model.py +0 -0
- {lazylabel_gui-1.3.5 → lazylabel_gui-1.3.6}/src/lazylabel/utils/fast_file_manager.py +0 -0
- {lazylabel_gui-1.3.5 → lazylabel_gui-1.3.6}/src/lazylabel/utils/logger.py +0 -0
- {lazylabel_gui-1.3.5 → lazylabel_gui-1.3.6}/src/lazylabel/utils/utils.py +0 -0
- {lazylabel_gui-1.3.5 → lazylabel_gui-1.3.6}/src/lazylabel_gui.egg-info/SOURCES.txt +0 -0
- {lazylabel_gui-1.3.5 → lazylabel_gui-1.3.6}/src/lazylabel_gui.egg-info/dependency_links.txt +0 -0
- {lazylabel_gui-1.3.5 → lazylabel_gui-1.3.6}/src/lazylabel_gui.egg-info/entry_points.txt +0 -0
- {lazylabel_gui-1.3.5 → lazylabel_gui-1.3.6}/src/lazylabel_gui.egg-info/requires.txt +0 -0
- {lazylabel_gui-1.3.5 → lazylabel_gui-1.3.6}/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.3.
|
3
|
+
Version: 1.3.6
|
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
|
@@ -53,17 +53,24 @@ Requires-Dist: pytest-qt>=4.2.0; extra == "dev"
|
|
53
53
|
Requires-Dist: ruff>=0.8.0; extra == "dev"
|
54
54
|
Dynamic: license-file
|
55
55
|
|
56
|
-
#
|
56
|
+
# LazyLabel
|
57
57
|
|
58
|
-
|
58
|
+
<div align="center">
|
59
|
+
<img src="https://raw.githubusercontent.com/dnzckn/LazyLabel/main/src/lazylabel/demo_pictures/logo2.png" alt="LazyLabel Logo" style="height:60px; vertical-align:middle;" />
|
60
|
+
<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;" />
|
61
|
+
</div>
|
59
62
|
|
60
|
-
|
63
|
+
**AI-Assisted Image Segmentation for Machine Learning Applications**
|
61
64
|
|
62
|
-
|
65
|
+
LazyLabel integrates Meta's Segment Anything Model (SAM) with advanced editing capabilities to enable efficient, high-precision image annotation. Designed for computer vision research and machine learning dataset preparation.
|
66
|
+
|
67
|
+
<div align="center">
|
68
|
+
<img src="https://raw.githubusercontent.com/dnzckn/LazyLabel/main/src/lazylabel/demo_pictures/gui.PNG" alt="LazyLabel Screenshot" width="800"/>
|
69
|
+
</div>
|
63
70
|
|
64
71
|
---
|
65
72
|
|
66
|
-
##
|
73
|
+
## Quick Start
|
67
74
|
|
68
75
|
### Installation
|
69
76
|
```bash
|
@@ -71,38 +78,38 @@ pip install lazylabel-gui
|
|
71
78
|
lazylabel-gui
|
72
79
|
```
|
73
80
|
|
74
|
-
### Optional: SAM
|
75
|
-
For
|
81
|
+
### Optional: SAM 2.1 Support
|
82
|
+
For enhanced performance with SAM 2.1 models:
|
76
83
|
```bash
|
77
84
|
pip install git+https://github.com/facebookresearch/sam2.git
|
78
85
|
```
|
79
|
-
|
86
|
+
**Note:** SAM 2.1 is optional - LazyLabel downloads SAM 1.0 models by default.
|
80
87
|
|
81
88
|
### Usage
|
82
|
-
1. **Open Folder**
|
83
|
-
2. **Click on
|
84
|
-
3. **
|
85
|
-
4. **Export**
|
89
|
+
1. **Open Folder** - Select your image directory
|
90
|
+
2. **AI Segmentation** - Click on objects for automatic mask generation
|
91
|
+
3. **Manual Refinement** - Edit polygons, merge segments, adjust classifications
|
92
|
+
4. **Export** - Generate `.npz` files with one-hot encoded masks for ML training
|
86
93
|
|
87
94
|
---
|
88
95
|
|
89
|
-
##
|
96
|
+
## Key Features
|
90
97
|
|
91
|
-
-
|
92
|
-
-
|
93
|
-
-
|
94
|
-
-
|
95
|
-
-
|
96
|
-
-
|
97
|
-
-
|
98
|
-
-
|
99
|
-
-
|
100
|
-
-
|
101
|
-
-
|
98
|
+
- **One-click AI segmentation** with Meta's SAM and SAM 2.1 models
|
99
|
+
- **Manual polygon drawing** with full vertex control
|
100
|
+
- **Smart editing tools** - merge segments, adjust class names, and class order
|
101
|
+
- **ML-ready exports** - One-hot encoded `.npz` format and `.json` for YOLO format
|
102
|
+
- **Image enhancement** - brightness, contrast, gamma adjustment
|
103
|
+
- **Advanced image viewer** - zoom, pan, and real-time adjustments
|
104
|
+
- **Edge cropping** - define custom crop areas to focus on specific regions
|
105
|
+
- **Undo/Redo system** - full history of all actions
|
106
|
+
- **Auto-saving** - automatic saving of labels when navigating between images
|
107
|
+
- **Advanced filtering** - FFT thresholding and color channel thresholding
|
108
|
+
- **Customizable hotkeys** for all functions
|
102
109
|
|
103
110
|
---
|
104
111
|
|
105
|
-
##
|
112
|
+
## Essential Hotkeys
|
106
113
|
|
107
114
|
| Action | Key | Description |
|
108
115
|
|--------|-----|-------------|
|
@@ -115,13 +122,13 @@ pip install git+https://github.com/facebookresearch/sam2.git
|
|
115
122
|
| **Positive Point** | `Left Click` | Add to segment |
|
116
123
|
| **Negative Point** | `Right Click` | Remove from segment |
|
117
124
|
|
118
|
-
|
125
|
+
**Note:** All hotkeys are fully customizable - Click "Hotkeys" button to personalize your workflow.
|
119
126
|
|
120
127
|
---
|
121
128
|
|
122
|
-
##
|
129
|
+
## Output Format
|
123
130
|
|
124
|
-
|
131
|
+
LazyLabel exports data in standardized formats optimized for machine learning workflows:
|
125
132
|
|
126
133
|
```python
|
127
134
|
import numpy as np
|
@@ -145,10 +152,9 @@ class_2_mask = mask[:, :, 2] # Object type 2
|
|
145
152
|
|
146
153
|
---
|
147
154
|
|
148
|
-
##
|
155
|
+
## Development
|
149
156
|
|
150
|
-
**Requirements:** Python 3.10
|
151
|
-
**2.5GB** disk space for SAM model (auto-downloaded)
|
157
|
+
**Requirements:** Python 3.10+, ~2.5GB disk space for SAM models (auto-downloaded)
|
152
158
|
|
153
159
|
### Installation from Source
|
154
160
|
```bash
|
@@ -160,35 +166,32 @@ lazylabel-gui
|
|
160
166
|
|
161
167
|
### Testing & Quality
|
162
168
|
```bash
|
163
|
-
# Run
|
164
|
-
|
169
|
+
# Run test suite (272 tests)
|
170
|
+
pytest --tb=short
|
165
171
|
|
166
|
-
# Code
|
167
|
-
ruff check
|
172
|
+
# Code quality checks
|
173
|
+
ruff check --fix src/
|
168
174
|
```
|
169
175
|
|
170
176
|
### Architecture
|
171
177
|
- **Modular design** with clean component separation
|
172
|
-
- **Signal-based communication** between UI elements
|
173
|
-
- **Extensible model system** for
|
174
|
-
- **Comprehensive test suite** (
|
178
|
+
- **Signal-based communication** between UI elements
|
179
|
+
- **Extensible model system** for SAM 1.0 and SAM 2.1 variants
|
180
|
+
- **Comprehensive test suite** (272 tests with extensive coverage)
|
181
|
+
- **Multi-view support** for simultaneous image processing
|
175
182
|
|
176
183
|
---
|
177
184
|
|
178
|
-
##
|
185
|
+
## Contributing
|
179
186
|
|
180
|
-
LazyLabel welcomes contributions!
|
181
|
-
- [
|
182
|
-
- [
|
183
|
-
- Issues page for feature requests and bug reports
|
187
|
+
LazyLabel welcomes contributions! Please review:
|
188
|
+
- [Usage Manual](src/lazylabel/USAGE_MANUAL.md) for comprehensive user documentation
|
189
|
+
- [Architecture Guide](src/lazylabel/ARCHITECTURE.md) for technical implementation details
|
190
|
+
- [Issues page](https://github.com/dnzckn/LazyLabel/issues) for feature requests and bug reports
|
184
191
|
|
185
192
|
---
|
186
193
|
|
187
|
-
##
|
194
|
+
## Acknowledgments
|
188
195
|
|
189
196
|
- [LabelMe](https://github.com/wkentaro/labelme)
|
190
197
|
- [Segment-Anything-UI](https://github.com/branislavhesko/segment-anything-ui)
|
191
|
-
|
192
|
-
---
|
193
|
-
|
194
|
-
**Made with ❤️ for the computer vision community**
|
@@ -0,0 +1,142 @@
|
|
1
|
+
# LazyLabel
|
2
|
+
|
3
|
+
<div align="center">
|
4
|
+
<img src="https://raw.githubusercontent.com/dnzckn/LazyLabel/main/src/lazylabel/demo_pictures/logo2.png" alt="LazyLabel Logo" style="height:60px; vertical-align:middle;" />
|
5
|
+
<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;" />
|
6
|
+
</div>
|
7
|
+
|
8
|
+
**AI-Assisted Image Segmentation for Machine Learning Applications**
|
9
|
+
|
10
|
+
LazyLabel integrates Meta's Segment Anything Model (SAM) with advanced editing capabilities to enable efficient, high-precision image annotation. Designed for computer vision research and machine learning dataset preparation.
|
11
|
+
|
12
|
+
<div align="center">
|
13
|
+
<img src="https://raw.githubusercontent.com/dnzckn/LazyLabel/main/src/lazylabel/demo_pictures/gui.PNG" alt="LazyLabel Screenshot" width="800"/>
|
14
|
+
</div>
|
15
|
+
|
16
|
+
---
|
17
|
+
|
18
|
+
## Quick Start
|
19
|
+
|
20
|
+
### Installation
|
21
|
+
```bash
|
22
|
+
pip install lazylabel-gui
|
23
|
+
lazylabel-gui
|
24
|
+
```
|
25
|
+
|
26
|
+
### Optional: SAM 2.1 Support
|
27
|
+
For enhanced performance with SAM 2.1 models:
|
28
|
+
```bash
|
29
|
+
pip install git+https://github.com/facebookresearch/sam2.git
|
30
|
+
```
|
31
|
+
**Note:** SAM 2.1 is optional - LazyLabel downloads SAM 1.0 models by default.
|
32
|
+
|
33
|
+
### Usage
|
34
|
+
1. **Open Folder** - Select your image directory
|
35
|
+
2. **AI Segmentation** - Click on objects for automatic mask generation
|
36
|
+
3. **Manual Refinement** - Edit polygons, merge segments, adjust classifications
|
37
|
+
4. **Export** - Generate `.npz` files with one-hot encoded masks for ML training
|
38
|
+
|
39
|
+
---
|
40
|
+
|
41
|
+
## Key Features
|
42
|
+
|
43
|
+
- **One-click AI segmentation** with Meta's SAM and SAM 2.1 models
|
44
|
+
- **Manual polygon drawing** with full vertex control
|
45
|
+
- **Smart editing tools** - merge segments, adjust class names, and class order
|
46
|
+
- **ML-ready exports** - One-hot encoded `.npz` format and `.json` for YOLO format
|
47
|
+
- **Image enhancement** - brightness, contrast, gamma adjustment
|
48
|
+
- **Advanced image viewer** - zoom, pan, and real-time adjustments
|
49
|
+
- **Edge cropping** - define custom crop areas to focus on specific regions
|
50
|
+
- **Undo/Redo system** - full history of all actions
|
51
|
+
- **Auto-saving** - automatic saving of labels when navigating between images
|
52
|
+
- **Advanced filtering** - FFT thresholding and color channel thresholding
|
53
|
+
- **Customizable hotkeys** for all functions
|
54
|
+
|
55
|
+
---
|
56
|
+
|
57
|
+
## Essential Hotkeys
|
58
|
+
|
59
|
+
| Action | Key | Description |
|
60
|
+
|--------|-----|-------------|
|
61
|
+
| **AI Mode** | `1` | Point-click segmentation |
|
62
|
+
| **Draw Mode** | `2` | Manual polygon drawing |
|
63
|
+
| **Edit Mode** | `E` | Select and modify shapes |
|
64
|
+
| **Save Segment** | `Space` | Confirm current mask |
|
65
|
+
| **Merge** | `M` | Combine selected segments |
|
66
|
+
| **Pan** | `Q` + drag | Navigate large images |
|
67
|
+
| **Positive Point** | `Left Click` | Add to segment |
|
68
|
+
| **Negative Point** | `Right Click` | Remove from segment |
|
69
|
+
|
70
|
+
**Note:** All hotkeys are fully customizable - Click "Hotkeys" button to personalize your workflow.
|
71
|
+
|
72
|
+
---
|
73
|
+
|
74
|
+
## Output Format
|
75
|
+
|
76
|
+
LazyLabel exports data in standardized formats optimized for machine learning workflows:
|
77
|
+
|
78
|
+
```python
|
79
|
+
import numpy as np
|
80
|
+
|
81
|
+
# Load your labeled data
|
82
|
+
data = np.load('your_image.npz')
|
83
|
+
mask = data['mask'] # Shape: (height, width, num_classes)
|
84
|
+
|
85
|
+
# Each channel is a binary mask for one class
|
86
|
+
class_0_mask = mask[:, :, 0] # Background
|
87
|
+
class_1_mask = mask[:, :, 1] # Object type 1
|
88
|
+
class_2_mask = mask[:, :, 2] # Object type 2
|
89
|
+
```
|
90
|
+
|
91
|
+
|
92
|
+
**Ideal for:**
|
93
|
+
- Semantic segmentation datasets
|
94
|
+
- Instance segmentation training
|
95
|
+
- Computer vision research
|
96
|
+
- Automated annotation pipelines
|
97
|
+
|
98
|
+
---
|
99
|
+
|
100
|
+
## Development
|
101
|
+
|
102
|
+
**Requirements:** Python 3.10+, ~2.5GB disk space for SAM models (auto-downloaded)
|
103
|
+
|
104
|
+
### Installation from Source
|
105
|
+
```bash
|
106
|
+
git clone https://github.com/dnzckn/LazyLabel.git
|
107
|
+
cd LazyLabel
|
108
|
+
pip install -e .
|
109
|
+
lazylabel-gui
|
110
|
+
```
|
111
|
+
|
112
|
+
### Testing & Quality
|
113
|
+
```bash
|
114
|
+
# Run test suite (272 tests)
|
115
|
+
pytest --tb=short
|
116
|
+
|
117
|
+
# Code quality checks
|
118
|
+
ruff check --fix src/
|
119
|
+
```
|
120
|
+
|
121
|
+
### Architecture
|
122
|
+
- **Modular design** with clean component separation
|
123
|
+
- **Signal-based communication** between UI elements
|
124
|
+
- **Extensible model system** for SAM 1.0 and SAM 2.1 variants
|
125
|
+
- **Comprehensive test suite** (272 tests with extensive coverage)
|
126
|
+
- **Multi-view support** for simultaneous image processing
|
127
|
+
|
128
|
+
---
|
129
|
+
|
130
|
+
## Contributing
|
131
|
+
|
132
|
+
LazyLabel welcomes contributions! Please review:
|
133
|
+
- [Usage Manual](src/lazylabel/USAGE_MANUAL.md) for comprehensive user documentation
|
134
|
+
- [Architecture Guide](src/lazylabel/ARCHITECTURE.md) for technical implementation details
|
135
|
+
- [Issues page](https://github.com/dnzckn/LazyLabel/issues) for feature requests and bug reports
|
136
|
+
|
137
|
+
---
|
138
|
+
|
139
|
+
## Acknowledgments
|
140
|
+
|
141
|
+
- [LabelMe](https://github.com/wkentaro/labelme)
|
142
|
+
- [Segment-Anything-UI](https://github.com/branislavhesko/segment-anything-ui)
|
{lazylabel_gui-1.3.5 → lazylabel_gui-1.3.6}/src/lazylabel/ui/widgets/channel_threshold_widget.py
RENAMED
@@ -372,6 +372,7 @@ class ChannelThresholdWidget(QWidget):
|
|
372
372
|
super().__init__(parent)
|
373
373
|
self.current_image_channels = 0 # 0 = no image, 1 = grayscale, 3 = RGB
|
374
374
|
self.sliders = {} # Dictionary of channel name -> slider
|
375
|
+
self.is_dragging = False # Track if any slider is being dragged
|
375
376
|
|
376
377
|
self.setupUI()
|
377
378
|
|
@@ -434,10 +435,8 @@ class ChannelThresholdWidget(QWidget):
|
|
434
435
|
for channel_name in channel_names:
|
435
436
|
slider_widget = ChannelSliderWidget(channel_name, self)
|
436
437
|
slider_widget.valueChanged.connect(self._on_slider_changed)
|
437
|
-
slider_widget.dragStarted.connect(
|
438
|
-
|
439
|
-
) # Forward drag signals
|
440
|
-
slider_widget.dragFinished.connect(self.dragFinished.emit)
|
438
|
+
slider_widget.dragStarted.connect(self._on_drag_started)
|
439
|
+
slider_widget.dragFinished.connect(self._on_drag_finished)
|
441
440
|
self.sliders[channel_name] = slider_widget
|
442
441
|
self.sliders_layout.addWidget(slider_widget)
|
443
442
|
|
@@ -450,6 +449,21 @@ class ChannelThresholdWidget(QWidget):
|
|
450
449
|
|
451
450
|
def _on_slider_changed(self):
|
452
451
|
"""Handle slider value change."""
|
452
|
+
# Only emit thresholdChanged if not currently dragging
|
453
|
+
# This prevents expensive calculations during drag operations
|
454
|
+
if not self.is_dragging:
|
455
|
+
self.thresholdChanged.emit()
|
456
|
+
|
457
|
+
def _on_drag_started(self):
|
458
|
+
"""Handle drag start - suppress expensive calculations during drag."""
|
459
|
+
self.is_dragging = True
|
460
|
+
self.dragStarted.emit()
|
461
|
+
|
462
|
+
def _on_drag_finished(self):
|
463
|
+
"""Handle drag finish - perform final calculation."""
|
464
|
+
self.is_dragging = False
|
465
|
+
self.dragFinished.emit()
|
466
|
+
# Emit threshold changed now that dragging is complete
|
453
467
|
self.thresholdChanged.emit()
|
454
468
|
|
455
469
|
def get_threshold_settings(self):
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: lazylabel-gui
|
3
|
-
Version: 1.3.
|
3
|
+
Version: 1.3.6
|
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
|
@@ -53,17 +53,24 @@ Requires-Dist: pytest-qt>=4.2.0; extra == "dev"
|
|
53
53
|
Requires-Dist: ruff>=0.8.0; extra == "dev"
|
54
54
|
Dynamic: license-file
|
55
55
|
|
56
|
-
#
|
56
|
+
# LazyLabel
|
57
57
|
|
58
|
-
|
58
|
+
<div align="center">
|
59
|
+
<img src="https://raw.githubusercontent.com/dnzckn/LazyLabel/main/src/lazylabel/demo_pictures/logo2.png" alt="LazyLabel Logo" style="height:60px; vertical-align:middle;" />
|
60
|
+
<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;" />
|
61
|
+
</div>
|
59
62
|
|
60
|
-
|
63
|
+
**AI-Assisted Image Segmentation for Machine Learning Applications**
|
61
64
|
|
62
|
-
|
65
|
+
LazyLabel integrates Meta's Segment Anything Model (SAM) with advanced editing capabilities to enable efficient, high-precision image annotation. Designed for computer vision research and machine learning dataset preparation.
|
66
|
+
|
67
|
+
<div align="center">
|
68
|
+
<img src="https://raw.githubusercontent.com/dnzckn/LazyLabel/main/src/lazylabel/demo_pictures/gui.PNG" alt="LazyLabel Screenshot" width="800"/>
|
69
|
+
</div>
|
63
70
|
|
64
71
|
---
|
65
72
|
|
66
|
-
##
|
73
|
+
## Quick Start
|
67
74
|
|
68
75
|
### Installation
|
69
76
|
```bash
|
@@ -71,38 +78,38 @@ pip install lazylabel-gui
|
|
71
78
|
lazylabel-gui
|
72
79
|
```
|
73
80
|
|
74
|
-
### Optional: SAM
|
75
|
-
For
|
81
|
+
### Optional: SAM 2.1 Support
|
82
|
+
For enhanced performance with SAM 2.1 models:
|
76
83
|
```bash
|
77
84
|
pip install git+https://github.com/facebookresearch/sam2.git
|
78
85
|
```
|
79
|
-
|
86
|
+
**Note:** SAM 2.1 is optional - LazyLabel downloads SAM 1.0 models by default.
|
80
87
|
|
81
88
|
### Usage
|
82
|
-
1. **Open Folder**
|
83
|
-
2. **Click on
|
84
|
-
3. **
|
85
|
-
4. **Export**
|
89
|
+
1. **Open Folder** - Select your image directory
|
90
|
+
2. **AI Segmentation** - Click on objects for automatic mask generation
|
91
|
+
3. **Manual Refinement** - Edit polygons, merge segments, adjust classifications
|
92
|
+
4. **Export** - Generate `.npz` files with one-hot encoded masks for ML training
|
86
93
|
|
87
94
|
---
|
88
95
|
|
89
|
-
##
|
96
|
+
## Key Features
|
90
97
|
|
91
|
-
-
|
92
|
-
-
|
93
|
-
-
|
94
|
-
-
|
95
|
-
-
|
96
|
-
-
|
97
|
-
-
|
98
|
-
-
|
99
|
-
-
|
100
|
-
-
|
101
|
-
-
|
98
|
+
- **One-click AI segmentation** with Meta's SAM and SAM 2.1 models
|
99
|
+
- **Manual polygon drawing** with full vertex control
|
100
|
+
- **Smart editing tools** - merge segments, adjust class names, and class order
|
101
|
+
- **ML-ready exports** - One-hot encoded `.npz` format and `.json` for YOLO format
|
102
|
+
- **Image enhancement** - brightness, contrast, gamma adjustment
|
103
|
+
- **Advanced image viewer** - zoom, pan, and real-time adjustments
|
104
|
+
- **Edge cropping** - define custom crop areas to focus on specific regions
|
105
|
+
- **Undo/Redo system** - full history of all actions
|
106
|
+
- **Auto-saving** - automatic saving of labels when navigating between images
|
107
|
+
- **Advanced filtering** - FFT thresholding and color channel thresholding
|
108
|
+
- **Customizable hotkeys** for all functions
|
102
109
|
|
103
110
|
---
|
104
111
|
|
105
|
-
##
|
112
|
+
## Essential Hotkeys
|
106
113
|
|
107
114
|
| Action | Key | Description |
|
108
115
|
|--------|-----|-------------|
|
@@ -115,13 +122,13 @@ pip install git+https://github.com/facebookresearch/sam2.git
|
|
115
122
|
| **Positive Point** | `Left Click` | Add to segment |
|
116
123
|
| **Negative Point** | `Right Click` | Remove from segment |
|
117
124
|
|
118
|
-
|
125
|
+
**Note:** All hotkeys are fully customizable - Click "Hotkeys" button to personalize your workflow.
|
119
126
|
|
120
127
|
---
|
121
128
|
|
122
|
-
##
|
129
|
+
## Output Format
|
123
130
|
|
124
|
-
|
131
|
+
LazyLabel exports data in standardized formats optimized for machine learning workflows:
|
125
132
|
|
126
133
|
```python
|
127
134
|
import numpy as np
|
@@ -145,10 +152,9 @@ class_2_mask = mask[:, :, 2] # Object type 2
|
|
145
152
|
|
146
153
|
---
|
147
154
|
|
148
|
-
##
|
155
|
+
## Development
|
149
156
|
|
150
|
-
**Requirements:** Python 3.10
|
151
|
-
**2.5GB** disk space for SAM model (auto-downloaded)
|
157
|
+
**Requirements:** Python 3.10+, ~2.5GB disk space for SAM models (auto-downloaded)
|
152
158
|
|
153
159
|
### Installation from Source
|
154
160
|
```bash
|
@@ -160,35 +166,32 @@ lazylabel-gui
|
|
160
166
|
|
161
167
|
### Testing & Quality
|
162
168
|
```bash
|
163
|
-
# Run
|
164
|
-
|
169
|
+
# Run test suite (272 tests)
|
170
|
+
pytest --tb=short
|
165
171
|
|
166
|
-
# Code
|
167
|
-
ruff check
|
172
|
+
# Code quality checks
|
173
|
+
ruff check --fix src/
|
168
174
|
```
|
169
175
|
|
170
176
|
### Architecture
|
171
177
|
- **Modular design** with clean component separation
|
172
|
-
- **Signal-based communication** between UI elements
|
173
|
-
- **Extensible model system** for
|
174
|
-
- **Comprehensive test suite** (
|
178
|
+
- **Signal-based communication** between UI elements
|
179
|
+
- **Extensible model system** for SAM 1.0 and SAM 2.1 variants
|
180
|
+
- **Comprehensive test suite** (272 tests with extensive coverage)
|
181
|
+
- **Multi-view support** for simultaneous image processing
|
175
182
|
|
176
183
|
---
|
177
184
|
|
178
|
-
##
|
185
|
+
## Contributing
|
179
186
|
|
180
|
-
LazyLabel welcomes contributions!
|
181
|
-
- [
|
182
|
-
- [
|
183
|
-
- Issues page for feature requests and bug reports
|
187
|
+
LazyLabel welcomes contributions! Please review:
|
188
|
+
- [Usage Manual](src/lazylabel/USAGE_MANUAL.md) for comprehensive user documentation
|
189
|
+
- [Architecture Guide](src/lazylabel/ARCHITECTURE.md) for technical implementation details
|
190
|
+
- [Issues page](https://github.com/dnzckn/LazyLabel/issues) for feature requests and bug reports
|
184
191
|
|
185
192
|
---
|
186
193
|
|
187
|
-
##
|
194
|
+
## Acknowledgments
|
188
195
|
|
189
196
|
- [LabelMe](https://github.com/wkentaro/labelme)
|
190
197
|
- [Segment-Anything-UI](https://github.com/branislavhesko/segment-anything-ui)
|
191
|
-
|
192
|
-
---
|
193
|
-
|
194
|
-
**Made with ❤️ for the computer vision community**
|
lazylabel_gui-1.3.5/README.md
DELETED
@@ -1,139 +0,0 @@
|
|
1
|
-
# <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;" />
|
2
|
-
|
3
|
-
**AI-Assisted Image Segmentation Made Simple**
|
4
|
-
|
5
|
-
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.
|
6
|
-
|
7
|
-

|
8
|
-
|
9
|
-
---
|
10
|
-
|
11
|
-
## 🚀 Quick Start
|
12
|
-
|
13
|
-
### Installation
|
14
|
-
```bash
|
15
|
-
pip install lazylabel-gui
|
16
|
-
lazylabel-gui
|
17
|
-
```
|
18
|
-
|
19
|
-
### Optional: SAM-2 Support
|
20
|
-
For advanced SAM-2 models, install manually:
|
21
|
-
```bash
|
22
|
-
pip install git+https://github.com/facebookresearch/sam2.git
|
23
|
-
```
|
24
|
-
*Note: SAM-2 is optional - LazyLabel works with SAM 1.0 models by default*
|
25
|
-
|
26
|
-
### Usage
|
27
|
-
1. **Open Folder** → Select your image directory
|
28
|
-
2. **Click on image** → AI generates instant masks
|
29
|
-
3. **Fine-tune** → Edit polygons, merge segments
|
30
|
-
4. **Export** → Clean `.npz` files ready for ML training
|
31
|
-
|
32
|
-
---
|
33
|
-
|
34
|
-
## ✨ Key Features
|
35
|
-
|
36
|
-
- **🧠 One-click AI segmentation** with Meta's SAM and SAM2 models
|
37
|
-
- **🎨 Manual polygon drawing** with full vertex control
|
38
|
-
- **⚡ Smart editing tools** - merge segments, adjust class names, and class order
|
39
|
-
- **📊 ML-ready exports** - One-hot encoded `.npz` format and `.json` for YOLO format
|
40
|
-
- **🔧 Image enhancement** - brightness, contrast, gamma adjustment
|
41
|
-
- **🔍 Image viewer** - zoom, pan, brightness, contrast, and gamma adjustment
|
42
|
-
- **✂️ Edge cropping** - define custom crop areas to focus on specific regions
|
43
|
-
- **🔄 Undo/Redo** - full history of all actions
|
44
|
-
- **💾 Auto-saving** - Automatic saving of your labels when navigating between images
|
45
|
-
- **🎛️ Advanced filtering** - FFT thresholding and color channel thresholding
|
46
|
-
- **⌨️ Customizable hotkeys** for all functions
|
47
|
-
|
48
|
-
---
|
49
|
-
|
50
|
-
## ⌨️ Essential Hotkeys
|
51
|
-
|
52
|
-
| Action | Key | Description |
|
53
|
-
|--------|-----|-------------|
|
54
|
-
| **AI Mode** | `1` | Point-click segmentation |
|
55
|
-
| **Draw Mode** | `2` | Manual polygon drawing |
|
56
|
-
| **Edit Mode** | `E` | Select and modify shapes |
|
57
|
-
| **Save Segment** | `Space` | Confirm current mask |
|
58
|
-
| **Merge** | `M` | Combine selected segments |
|
59
|
-
| **Pan** | `Q` + drag | Navigate large images |
|
60
|
-
| **Positive Point** | `Left Click` | Add to segment |
|
61
|
-
| **Negative Point** | `Right Click` | Remove from segment |
|
62
|
-
|
63
|
-
💡 **All hotkeys customizable** - Click "Hotkeys" button to personalize
|
64
|
-
|
65
|
-
---
|
66
|
-
|
67
|
-
## 📦 Output Format
|
68
|
-
|
69
|
-
Perfect for ML training - clean, structured data:
|
70
|
-
|
71
|
-
```python
|
72
|
-
import numpy as np
|
73
|
-
|
74
|
-
# Load your labeled data
|
75
|
-
data = np.load('your_image.npz')
|
76
|
-
mask = data['mask'] # Shape: (height, width, num_classes)
|
77
|
-
|
78
|
-
# Each channel is a binary mask for one class
|
79
|
-
class_0_mask = mask[:, :, 0] # Background
|
80
|
-
class_1_mask = mask[:, :, 1] # Object type 1
|
81
|
-
class_2_mask = mask[:, :, 2] # Object type 2
|
82
|
-
```
|
83
|
-
|
84
|
-
|
85
|
-
**Ideal for:**
|
86
|
-
- Semantic segmentation datasets
|
87
|
-
- Instance segmentation training
|
88
|
-
- Computer vision research
|
89
|
-
- Automated annotation pipelines
|
90
|
-
|
91
|
-
---
|
92
|
-
|
93
|
-
## 🛠️ Development
|
94
|
-
|
95
|
-
**Requirements:** Python 3.10+
|
96
|
-
**2.5GB** disk space for SAM model (auto-downloaded)
|
97
|
-
|
98
|
-
### Installation from Source
|
99
|
-
```bash
|
100
|
-
git clone https://github.com/dnzckn/LazyLabel.git
|
101
|
-
cd LazyLabel
|
102
|
-
pip install -e .
|
103
|
-
lazylabel-gui
|
104
|
-
```
|
105
|
-
|
106
|
-
### Testing & Quality
|
107
|
-
```bash
|
108
|
-
# Run full test suite
|
109
|
-
python -m pytest --cov=lazylabel --cov-report=html
|
110
|
-
|
111
|
-
# Code formatting & linting
|
112
|
-
ruff check . && ruff format .
|
113
|
-
```
|
114
|
-
|
115
|
-
### Architecture
|
116
|
-
- **Modular design** with clean component separation
|
117
|
-
- **Signal-based communication** between UI elements
|
118
|
-
- **Extensible model system** for new SAM variants
|
119
|
-
- **Comprehensive test suite** (150+ tests, 60%+ coverage)
|
120
|
-
|
121
|
-
---
|
122
|
-
|
123
|
-
## 🤝 Contributing
|
124
|
-
|
125
|
-
LazyLabel welcomes contributions! Check out:
|
126
|
-
- [Architecture Guide](src/lazylabel/ARCHITECTURE.md) for technical details
|
127
|
-
- [Hotkey System](src/lazylabel/HOTKEY_FEATURE.md) for customization
|
128
|
-
- Issues page for feature requests and bug reports
|
129
|
-
|
130
|
-
---
|
131
|
-
|
132
|
-
## 🙏 Acknowledgments
|
133
|
-
|
134
|
-
- [LabelMe](https://github.com/wkentaro/labelme)
|
135
|
-
- [Segment-Anything-UI](https://github.com/branislavhesko/segment-anything-ui)
|
136
|
-
|
137
|
-
---
|
138
|
-
|
139
|
-
**Made with ❤️ for the computer vision community**
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{lazylabel_gui-1.3.5 → lazylabel_gui-1.3.6}/src/lazylabel/ui/widgets/fft_threshold_widget.py
RENAMED
File without changes
|
{lazylabel_gui-1.3.5 → lazylabel_gui-1.3.6}/src/lazylabel/ui/widgets/fragment_threshold_widget.py
RENAMED
File without changes
|
{lazylabel_gui-1.3.5 → lazylabel_gui-1.3.6}/src/lazylabel/ui/widgets/model_selection_widget.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{lazylabel_gui-1.3.5 → lazylabel_gui-1.3.6}/src/lazylabel/ui/workers/image_discovery_worker.py
RENAMED
File without changes
|
{lazylabel_gui-1.3.5 → lazylabel_gui-1.3.6}/src/lazylabel/ui/workers/multi_view_sam_init_worker.py
RENAMED
File without changes
|
{lazylabel_gui-1.3.5 → lazylabel_gui-1.3.6}/src/lazylabel/ui/workers/multi_view_sam_update_worker.py
RENAMED
File without changes
|
File without changes
|
{lazylabel_gui-1.3.5 → lazylabel_gui-1.3.6}/src/lazylabel/ui/workers/single_view_sam_init_worker.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|