lazylabel-gui 1.3.5__py3-none-any.whl → 1.3.6__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.
@@ -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
- self.dragStarted.emit
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.5
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
- # <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;" />
56
+ # LazyLabel
57
57
 
58
- **AI-Assisted Image Segmentation Made Simple**
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
- 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.
63
+ **AI-Assisted Image Segmentation for Machine Learning Applications**
61
64
 
62
- ![LazyLabel Screenshot](https://raw.githubusercontent.com/dnzckn/LazyLabel/main/src/lazylabel/demo_pictures/gui.PNG)
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
- ## 🚀 Quick Start
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-2 Support
75
- For advanced SAM-2 models, install manually:
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
- *Note: SAM-2 is optional - LazyLabel works with SAM 1.0 models by default*
86
+ **Note:** SAM 2.1 is optional - LazyLabel downloads SAM 1.0 models by default.
80
87
 
81
88
  ### Usage
82
- 1. **Open Folder** Select your image directory
83
- 2. **Click on image** AI generates instant masks
84
- 3. **Fine-tune** Edit polygons, merge segments
85
- 4. **Export** Clean `.npz` files ready for ML training
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
- ## Key Features
96
+ ## Key Features
90
97
 
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
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
- ## ⌨️ Essential Hotkeys
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
- 💡 **All hotkeys customizable** - Click "Hotkeys" button to personalize
125
+ **Note:** All hotkeys are fully customizable - Click "Hotkeys" button to personalize your workflow.
119
126
 
120
127
  ---
121
128
 
122
- ## 📦 Output Format
129
+ ## Output Format
123
130
 
124
- Perfect for ML training - clean, structured data:
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
- ## 🛠️ Development
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 full test suite
164
- python -m pytest --cov=lazylabel --cov-report=html
169
+ # Run test suite (272 tests)
170
+ pytest --tb=short
165
171
 
166
- # Code formatting & linting
167
- ruff check . && ruff format .
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 new SAM variants
174
- - **Comprehensive test suite** (150+ tests, 60%+ coverage)
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
- ## 🤝 Contributing
185
+ ## Contributing
179
186
 
180
- LazyLabel welcomes contributions! Check out:
181
- - [Architecture Guide](src/lazylabel/ARCHITECTURE.md) for technical details
182
- - [Hotkey System](src/lazylabel/HOTKEY_FEATURE.md) for customization
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
- ## 🙏 Acknowledgments
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**
@@ -30,7 +30,7 @@ lazylabel/ui/modes/single_view_mode.py,sha256=khGUXVQ_lv9cCXkOAewQN8iH7R_CPyIVtQ
30
30
  lazylabel/ui/widgets/__init__.py,sha256=6VDoMnanqVm3yjOovxie3WggPODuhUsIO75RtxOhQhI,688
31
31
  lazylabel/ui/widgets/adjustments_widget.py,sha256=5xldhdEArX3H2P7EmHPjURdwpV-Wa2WULFfspp0gxns,12750
32
32
  lazylabel/ui/widgets/border_crop_widget.py,sha256=8NTkHrk_L5_T1psVuXMspVVZRPTTeJyIEYBfVxdGeQA,7529
33
- lazylabel/ui/widgets/channel_threshold_widget.py,sha256=9KoUK0TytGuSmSU_lO6m8j1zNHx_m9NufgogG0gLYLM,20656
33
+ lazylabel/ui/widgets/channel_threshold_widget.py,sha256=DSYDOUTMXo02Fn5P4cjh2OqDawA2Hm_ChYecVGwzwk8,21297
34
34
  lazylabel/ui/widgets/fft_threshold_widget.py,sha256=mcbkNoP0aj-Pe57sgIWBnmg4JiEbTikrwG67Vgygnio,20859
35
35
  lazylabel/ui/widgets/fragment_threshold_widget.py,sha256=YtToua1eAUtEuJ3EwdCMvI-39TRrFnshkty4tnR4OMU,3492
36
36
  lazylabel/ui/widgets/model_selection_widget.py,sha256=k4zyhWszi_7e-0TPa0Go1LLPZpTNGtrYSb-yT7uGiVU,8420
@@ -47,9 +47,9 @@ lazylabel/utils/custom_file_system_model.py,sha256=-3EimlybvevH6bvqBE0qdFnLADVta
47
47
  lazylabel/utils/fast_file_manager.py,sha256=kzbWz_xKufG5bP6sjyZV1fmOKRWPPNeL-xLYZEu_8wE,44697
48
48
  lazylabel/utils/logger.py,sha256=R7z6ifgA-NY-9ZbLlNH0i19zzwXndJ_gkG2J1zpVEhg,1306
49
49
  lazylabel/utils/utils.py,sha256=sYSCoXL27OaLgOZaUkCAhgmKZ7YfhR3Cc5F8nDIa3Ig,414
50
- lazylabel_gui-1.3.5.dist-info/licenses/LICENSE,sha256=kSDEIgrWAPd1u2UFGGpC9X71dhzrlzBFs8hbDlENnGE,1092
51
- lazylabel_gui-1.3.5.dist-info/METADATA,sha256=Xl-DVZB27XNOLgZyZ2hGBdD8m7NnEzqU6-leSKDbx50,6898
52
- lazylabel_gui-1.3.5.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
53
- lazylabel_gui-1.3.5.dist-info/entry_points.txt,sha256=Hd0WwEG9OPTa_ziYjiD0aRh7R6Fupt-wdQ3sspdc1mM,54
54
- lazylabel_gui-1.3.5.dist-info/top_level.txt,sha256=YN4uIyrpDBq1wiJaBuZLDipIzyZY0jqJOmmXiPIOUkU,10
55
- lazylabel_gui-1.3.5.dist-info/RECORD,,
50
+ lazylabel_gui-1.3.6.dist-info/licenses/LICENSE,sha256=kSDEIgrWAPd1u2UFGGpC9X71dhzrlzBFs8hbDlENnGE,1092
51
+ lazylabel_gui-1.3.6.dist-info/METADATA,sha256=wU3SVog5c0CafMdOiUD82IFoQwZ-LUdOTGxbLQWW7WU,7156
52
+ lazylabel_gui-1.3.6.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
53
+ lazylabel_gui-1.3.6.dist-info/entry_points.txt,sha256=Hd0WwEG9OPTa_ziYjiD0aRh7R6Fupt-wdQ3sspdc1mM,54
54
+ lazylabel_gui-1.3.6.dist-info/top_level.txt,sha256=YN4uIyrpDBq1wiJaBuZLDipIzyZY0jqJOmmXiPIOUkU,10
55
+ lazylabel_gui-1.3.6.dist-info/RECORD,,