imagebaker 0.0.51__py3-none-any.whl → 0.52__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.
@@ -602,6 +602,15 @@ class AnnotableLayer(BaseLayer):
602
602
  elif self.mouse_mode == MouseMode.POLYGON:
603
603
  # If not double-click
604
604
  if not self.current_annotation:
605
+ # if this point is equal to the last point of the previous polygon, then ignore it
606
+ if len(self.annotations) > 0:
607
+ last_polygon = self.annotations[-1].polygon
608
+ if last_polygon:
609
+ last_point = last_polygon[-1]
610
+ if last_point== clamped_pos:
611
+ logger.info("Ignoring point, same as last polygon point")
612
+ return
613
+
605
614
  self.current_annotation = Annotation(
606
615
  file_path=self.file_path,
607
616
  annotation_id=len(self.annotations),
@@ -811,8 +820,6 @@ class AnnotableLayer(BaseLayer):
811
820
  self.current_annotation
812
821
  )
813
822
  self.annotationAdded.emit(self.current_annotation)
814
- self.current_annotation = None
815
- self.update()
816
823
  else:
817
824
  # Show custom label dialog
818
825
  label, ok = QInputDialog.getText(self, "Label", "Enter label name:")
@@ -827,8 +834,8 @@ class AnnotableLayer(BaseLayer):
827
834
  )
828
835
  self.annotationAdded.emit(self.current_annotation)
829
836
  self.current_annotation.annotation_id = len(self.annotations)
830
- self.current_annotation = None
831
- self.update()
837
+ self.current_annotation = None
838
+ self.update()
832
839
 
833
840
  # in update, update cursor
834
841
 
@@ -169,7 +169,9 @@ class LayerifyTab(QWidget):
169
169
  for idx, layer in enumerate(self.annotable_layers):
170
170
  layer.setVisible(False)
171
171
  # logger.info(f"Layer {idx} hidden.")
172
-
172
+ current_label = self.layer.current_label
173
+ current_color = self.layer.current_color
174
+
173
175
  if not image_entry.is_baked_result: # Regular image
174
176
  image_path = image_entry.data
175
177
  self.curr_image_idx = self.image_entries.index(image_entry)
@@ -194,6 +196,9 @@ class LayerifyTab(QWidget):
194
196
  # logger.info(f"Layer {self.curr_image_idx} made visible for baked result.")
195
197
  self.layer = baked_result_layer # Set the baked result as the current layer
196
198
 
199
+ # Set the current label and color
200
+ self.layer.current_label = current_label
201
+ self.layer.current_color = current_color
197
202
  self.annotation_list.layer = self.layer
198
203
  self.annotation_list.update_list()
199
204
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: imagebaker
3
- Version: 0.0.51
3
+ Version: 0.52
4
4
  Summary: A package for baking images.
5
5
  Home-page: https://github.com/q-viper/Image-Baker
6
6
  Author: Ramkrishna Acharya
@@ -154,3 +154,5 @@ Click on the image above to play the video on YouTube.
154
154
  Contributions are welcome!
155
155
 
156
156
  Do you find this project to be useful and are you looking for some features that are not implemented yet? Feel free to open issues or submit pull requests to improve the project.
157
+
158
+ For more please visit [CONTRIBUTING](CONTRIBUTING).
@@ -8,7 +8,7 @@ imagebaker/core/plugins/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG
8
8
  imagebaker/core/plugins/base_plugin.py,sha256=ROa1HTwV5LgGL-40CHKk_5MZYI5QAT1MzpYO7Fx-9P0,1084
9
9
  imagebaker/core/plugins/cosine_plugin.py,sha256=IXBfvaoxrvf-hytg_dT1zFmOfDbcWXBZ7NvIFPJ2tWQ,1251
10
10
  imagebaker/layers/__init__.py,sha256=q1kUDHhUXEGBOdu6CHDfqCnE2mraLHRqh0DFHYTbnRY,158
11
- imagebaker/layers/annotable_layer.py,sha256=xkV6KTXN8-N6Wu3QAj5nQDMPZ4bRr673_fu5QuRKBj8,37128
11
+ imagebaker/layers/annotable_layer.py,sha256=_jR6SX14A4BB-kzH0vnx8phgJwq7pJj_fwdpbsq7rVo,37542
12
12
  imagebaker/layers/base_layer.py,sha256=1K7Nt6OPITrILj-p4I6Jf0eaesCpdeecOXGj_8oAQb8,30650
13
13
  imagebaker/layers/canvas_layer.py,sha256=6quVe_Ieyz14zPL92xTfrinAT7X4yb9iyEl-f9SnQZU,42116
14
14
  imagebaker/list_views/__init__.py,sha256=Aa9slE6do8eYgZp77wrofpd_mlBDwxgF3adMyHYFanE,144
@@ -21,7 +21,7 @@ imagebaker/models/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU
21
21
  imagebaker/models/base_model.py,sha256=4RyS4vShqWFHhdQDwYluwTPnRPEXjpZl9UjYY_w8NL0,4203
22
22
  imagebaker/tabs/__init__.py,sha256=ijg7MA17RvcHA2AuZE4OgRJXWxjecaUAlfASKAoCQ6Q,86
23
23
  imagebaker/tabs/baker_tab.py,sha256=yFQRiNmLIua5BvgW7Ysj5FrNbTLhGxqGRTRCABxeTtw,20493
24
- imagebaker/tabs/layerify_tab.py,sha256=F3BK5XsVCteB-2zyFBKqeWyHgIif5cU3TBEMbuDH3QM,37415
24
+ imagebaker/tabs/layerify_tab.py,sha256=UEEPxC-_TK01nk-pqJ96JEnSN5h3gpK1YVxIA9lsFu4,37661
25
25
  imagebaker/utils/__init__.py,sha256=I1z5VVEf6QPOMvVkgVHDauQ9ew7tcTVguV4Kdi3Lk4Y,130
26
26
  imagebaker/utils/image.py,sha256=2-wbwD3PMwefgswge0drFM1XfXE7yQ64lqZZ5PwyCWs,3165
27
27
  imagebaker/utils/state_utils.py,sha256=Y2JVRGVfsoffwfA2lsCcqHwIxH_jOrEJAdH-oWfe2XE,3841
@@ -35,9 +35,9 @@ imagebaker/workers/__init__.py,sha256=XfXENwAYyNg9q_zR-gOsYJGjzwg_iIb_gING8ydnp9
35
35
  imagebaker/workers/baker_worker.py,sha256=_jWeyYAGoO2mfxXDn7fBm9tIA69OITewDVN0hSAt3Jc,11532
36
36
  imagebaker/workers/layerify_worker.py,sha256=EOqKvhdACtf3y5Ljy6M7MvddAjlZW5DNfBFMtNPD-us,3223
37
37
  imagebaker/workers/model_worker.py,sha256=Tlg6_D977iK-kuGCNdQY4OnGiP8QqWY7adpRNXZw4rA,1636
38
- imagebaker-0.0.51.dist-info/LICENSE,sha256=1vkysFPOnT7y4LsoFTv9YsopIrQvBc2l6vUOfv4KKLc,1082
39
- imagebaker-0.0.51.dist-info/METADATA,sha256=1DumEPL4LyKVeuV_tDwyepZ9PsreraeKSTEJBernVmw,6940
40
- imagebaker-0.0.51.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
41
- imagebaker-0.0.51.dist-info/entry_points.txt,sha256=IDjZHJCiiHpH5IUTByT2en0nMbnnnlrJZ5FPFehUvQM,61
42
- imagebaker-0.0.51.dist-info/top_level.txt,sha256=Gg-eILTlqJXwVQr0saSwsx3-H4SPdZ2agBZaufe194s,11
43
- imagebaker-0.0.51.dist-info/RECORD,,
38
+ imagebaker-0.52.dist-info/LICENSE,sha256=1vkysFPOnT7y4LsoFTv9YsopIrQvBc2l6vUOfv4KKLc,1082
39
+ imagebaker-0.52.dist-info/METADATA,sha256=TvkbuBIRmuwTIOHHcMAR6fmgB3TQs5GJ5c738antwpg,6991
40
+ imagebaker-0.52.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
41
+ imagebaker-0.52.dist-info/entry_points.txt,sha256=IDjZHJCiiHpH5IUTByT2en0nMbnnnlrJZ5FPFehUvQM,61
42
+ imagebaker-0.52.dist-info/top_level.txt,sha256=Gg-eILTlqJXwVQr0saSwsx3-H4SPdZ2agBZaufe194s,11
43
+ imagebaker-0.52.dist-info/RECORD,,