lazylabel-gui 1.3.4__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.4/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.4 → lazylabel_gui-1.3.6}/pyproject.toml +1 -1
- lazylabel_gui-1.3.6/src/lazylabel/models/sam2_model.py +490 -0
- {lazylabel_gui-1.3.4 → lazylabel_gui-1.3.6}/src/lazylabel/ui/main_window.py +100 -530
- {lazylabel_gui-1.3.4 → lazylabel_gui-1.3.6}/src/lazylabel/ui/photo_viewer.py +35 -11
- {lazylabel_gui-1.3.4 → lazylabel_gui-1.3.6}/src/lazylabel/ui/widgets/channel_threshold_widget.py +18 -4
- lazylabel_gui-1.3.6/src/lazylabel/ui/workers/__init__.py +15 -0
- lazylabel_gui-1.3.6/src/lazylabel/ui/workers/image_discovery_worker.py +66 -0
- lazylabel_gui-1.3.6/src/lazylabel/ui/workers/multi_view_sam_init_worker.py +135 -0
- lazylabel_gui-1.3.6/src/lazylabel/ui/workers/multi_view_sam_update_worker.py +158 -0
- lazylabel_gui-1.3.6/src/lazylabel/ui/workers/sam_update_worker.py +129 -0
- lazylabel_gui-1.3.6/src/lazylabel/ui/workers/single_view_sam_init_worker.py +61 -0
- {lazylabel_gui-1.3.4 → lazylabel_gui-1.3.6/src/lazylabel_gui.egg-info}/PKG-INFO +52 -49
- {lazylabel_gui-1.3.4 → lazylabel_gui-1.3.6}/src/lazylabel_gui.egg-info/SOURCES.txt +6 -0
- lazylabel_gui-1.3.4/README.md +0 -139
- lazylabel_gui-1.3.4/src/lazylabel/models/sam2_model.py +0 -371
- {lazylabel_gui-1.3.4 → lazylabel_gui-1.3.6}/LICENSE +0 -0
- {lazylabel_gui-1.3.4 → lazylabel_gui-1.3.6}/setup.cfg +0 -0
- {lazylabel_gui-1.3.4 → lazylabel_gui-1.3.6}/src/lazylabel/__init__.py +0 -0
- {lazylabel_gui-1.3.4 → lazylabel_gui-1.3.6}/src/lazylabel/__main__.py +0 -0
- {lazylabel_gui-1.3.4 → lazylabel_gui-1.3.6}/src/lazylabel/config/__init__.py +0 -0
- {lazylabel_gui-1.3.4 → lazylabel_gui-1.3.6}/src/lazylabel/config/hotkeys.py +0 -0
- {lazylabel_gui-1.3.4 → lazylabel_gui-1.3.6}/src/lazylabel/config/paths.py +0 -0
- {lazylabel_gui-1.3.4 → lazylabel_gui-1.3.6}/src/lazylabel/config/settings.py +0 -0
- {lazylabel_gui-1.3.4 → lazylabel_gui-1.3.6}/src/lazylabel/core/__init__.py +0 -0
- {lazylabel_gui-1.3.4 → lazylabel_gui-1.3.6}/src/lazylabel/core/file_manager.py +0 -0
- {lazylabel_gui-1.3.4 → lazylabel_gui-1.3.6}/src/lazylabel/core/model_manager.py +0 -0
- {lazylabel_gui-1.3.4 → lazylabel_gui-1.3.6}/src/lazylabel/core/segment_manager.py +0 -0
- {lazylabel_gui-1.3.4 → lazylabel_gui-1.3.6}/src/lazylabel/main.py +0 -0
- {lazylabel_gui-1.3.4 → lazylabel_gui-1.3.6}/src/lazylabel/models/__init__.py +0 -0
- {lazylabel_gui-1.3.4 → lazylabel_gui-1.3.6}/src/lazylabel/models/sam_model.py +0 -0
- {lazylabel_gui-1.3.4 → lazylabel_gui-1.3.6}/src/lazylabel/ui/__init__.py +0 -0
- {lazylabel_gui-1.3.4 → lazylabel_gui-1.3.6}/src/lazylabel/ui/control_panel.py +0 -0
- {lazylabel_gui-1.3.4 → lazylabel_gui-1.3.6}/src/lazylabel/ui/editable_vertex.py +0 -0
- {lazylabel_gui-1.3.4 → lazylabel_gui-1.3.6}/src/lazylabel/ui/hotkey_dialog.py +0 -0
- {lazylabel_gui-1.3.4 → lazylabel_gui-1.3.6}/src/lazylabel/ui/hoverable_pixelmap_item.py +0 -0
- {lazylabel_gui-1.3.4 → lazylabel_gui-1.3.6}/src/lazylabel/ui/hoverable_polygon_item.py +0 -0
- {lazylabel_gui-1.3.4 → lazylabel_gui-1.3.6}/src/lazylabel/ui/modes/__init__.py +0 -0
- {lazylabel_gui-1.3.4 → lazylabel_gui-1.3.6}/src/lazylabel/ui/modes/base_mode.py +0 -0
- {lazylabel_gui-1.3.4 → lazylabel_gui-1.3.6}/src/lazylabel/ui/modes/multi_view_mode.py +0 -0
- {lazylabel_gui-1.3.4 → lazylabel_gui-1.3.6}/src/lazylabel/ui/modes/single_view_mode.py +0 -0
- {lazylabel_gui-1.3.4 → lazylabel_gui-1.3.6}/src/lazylabel/ui/numeric_table_widget_item.py +0 -0
- {lazylabel_gui-1.3.4 → lazylabel_gui-1.3.6}/src/lazylabel/ui/reorderable_class_table.py +0 -0
- {lazylabel_gui-1.3.4 → lazylabel_gui-1.3.6}/src/lazylabel/ui/right_panel.py +0 -0
- {lazylabel_gui-1.3.4 → lazylabel_gui-1.3.6}/src/lazylabel/ui/widgets/__init__.py +0 -0
- {lazylabel_gui-1.3.4 → lazylabel_gui-1.3.6}/src/lazylabel/ui/widgets/adjustments_widget.py +0 -0
- {lazylabel_gui-1.3.4 → lazylabel_gui-1.3.6}/src/lazylabel/ui/widgets/border_crop_widget.py +0 -0
- {lazylabel_gui-1.3.4 → lazylabel_gui-1.3.6}/src/lazylabel/ui/widgets/fft_threshold_widget.py +0 -0
- {lazylabel_gui-1.3.4 → lazylabel_gui-1.3.6}/src/lazylabel/ui/widgets/fragment_threshold_widget.py +0 -0
- {lazylabel_gui-1.3.4 → lazylabel_gui-1.3.6}/src/lazylabel/ui/widgets/model_selection_widget.py +0 -0
- {lazylabel_gui-1.3.4 → lazylabel_gui-1.3.6}/src/lazylabel/ui/widgets/settings_widget.py +0 -0
- {lazylabel_gui-1.3.4 → lazylabel_gui-1.3.6}/src/lazylabel/ui/widgets/status_bar.py +0 -0
- {lazylabel_gui-1.3.4 → lazylabel_gui-1.3.6}/src/lazylabel/utils/__init__.py +0 -0
- {lazylabel_gui-1.3.4 → lazylabel_gui-1.3.6}/src/lazylabel/utils/custom_file_system_model.py +0 -0
- {lazylabel_gui-1.3.4 → lazylabel_gui-1.3.6}/src/lazylabel/utils/fast_file_manager.py +0 -0
- {lazylabel_gui-1.3.4 → lazylabel_gui-1.3.6}/src/lazylabel/utils/logger.py +0 -0
- {lazylabel_gui-1.3.4 → lazylabel_gui-1.3.6}/src/lazylabel/utils/utils.py +0 -0
- {lazylabel_gui-1.3.4 → lazylabel_gui-1.3.6}/src/lazylabel_gui.egg-info/dependency_links.txt +0 -0
- {lazylabel_gui-1.3.4 → lazylabel_gui-1.3.6}/src/lazylabel_gui.egg-info/entry_points.txt +0 -0
- {lazylabel_gui-1.3.4 → lazylabel_gui-1.3.6}/src/lazylabel_gui.egg-info/requires.txt +0 -0
- {lazylabel_gui-1.3.4 → 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)
|