From 2b8e8f0554779f64932954a106b50fa6d38ca619 Mon Sep 17 00:00:00 2001 From: Colombo Date: Sat, 20 Jun 2020 22:05:30 +0400 Subject: [PATCH 1/3] . --- core/interact/interact.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/interact/interact.py b/core/interact/interact.py index 916da67..284078c 100644 --- a/core/interact/interact.py +++ b/core/interact/interact.py @@ -269,7 +269,7 @@ class InteractBase(object): s += " (" if valid_range is not None: - s += f" {valid_range[0]}-{valid_range[1]} " + s += f" {valid_range[0]}-{valid_range[1]}" if add_info is not None: s += f" {add_info}" From 27f219fec7f33125e616f910abf550e56807650d Mon Sep 17 00:00:00 2001 From: Colombo Date: Sun, 21 Jun 2020 00:56:25 +0400 Subject: [PATCH 2/3] XSegEditor: fixed incorrect count of labeled images. --- XSegEditor/XSegEditor.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/XSegEditor/XSegEditor.py b/XSegEditor/XSegEditor.py index abfac46..f3787b1 100644 --- a/XSegEditor/XSegEditor.py +++ b/XSegEditor/XSegEditor.py @@ -1294,10 +1294,16 @@ class MainWindow(QXMainWindow): ie_polys = dflimg.get_seg_ie_polys() new_ie_polys = self.canvas.op.get_ie_polys() - if not new_ie_polys.identical(ie_polys): - new_has_ie_polys = new_ie_polys.has_polys() - self.set_has_ie_polys_count ( self.get_has_ie_polys_count() + (1 if new_has_ie_polys else -1) ) - self.image_paths_has_ie_polys[image_path] = new_has_ie_polys + if not new_ie_polys.identical(ie_polys): + prev_has_polys = self.image_paths_has_ie_polys[image_path] + self.image_paths_has_ie_polys[image_path] = new_ie_polys.has_polys() + new_has_polys = self.image_paths_has_ie_polys[image_path] + + if not prev_has_polys and new_has_polys: + self.set_has_ie_polys_count ( self.get_has_ie_polys_count() +1) + elif prev_has_polys and not new_has_polys: + self.set_has_ie_polys_count ( self.get_has_ie_polys_count() -1) + dflimg.set_seg_ie_polys( new_ie_polys ) dflimg.save() From f90723c9f903414b9df22f152faaed76833ed34b Mon Sep 17 00:00:00 2001 From: Colombo Date: Sun, 21 Jun 2020 00:57:48 +0400 Subject: [PATCH 3/3] =?UTF-8?q?SAEHD:=20=E2=80=98uniform=5Fyaw=E2=80=99=20?= =?UTF-8?q?now=20always=20enabled=20in=20pretrain=20mode.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- models/Model_SAEHD/Model.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/models/Model_SAEHD/Model.py b/models/Model_SAEHD/Model.py index 69a7172..0915603 100644 --- a/models/Model_SAEHD/Model.py +++ b/models/Model_SAEHD/Model.py @@ -575,7 +575,7 @@ Examples: df, liae, df-d, df-ud, liae-ud, ... {'sample_type': SampleProcessor.SampleType.FACE_IMAGE,'warp':False , 'transform':True, 'channel_type' : SampleProcessor.ChannelType.BGR, 'ct_mode': ct_mode, 'face_type':self.face_type, 'data_format':nn.data_format, 'resolution': resolution}, {'sample_type': SampleProcessor.SampleType.FACE_MASK, 'warp':False , 'transform':True, 'channel_type' : SampleProcessor.ChannelType.G, 'face_mask_type' : SampleProcessor.FaceMaskType.FULL_FACE_EYES, 'face_type':self.face_type, 'data_format':nn.data_format, 'resolution': resolution}, ], - uniform_yaw_distribution=self.options['uniform_yaw'], + uniform_yaw_distribution=self.options['uniform_yaw'] or self.pretrain, generators_count=src_generators_count ), SampleGeneratorFace(training_data_dst_path, debug=self.is_debug(), batch_size=self.get_batch_size(), @@ -584,7 +584,7 @@ Examples: df, liae, df-d, df-ud, liae-ud, ... {'sample_type': SampleProcessor.SampleType.FACE_IMAGE,'warp':False , 'transform':True, 'channel_type' : SampleProcessor.ChannelType.BGR, 'face_type':self.face_type, 'data_format':nn.data_format, 'resolution': resolution}, {'sample_type': SampleProcessor.SampleType.FACE_MASK, 'warp':False , 'transform':True, 'channel_type' : SampleProcessor.ChannelType.G, 'face_mask_type' : SampleProcessor.FaceMaskType.FULL_FACE_EYES, 'face_type':self.face_type, 'data_format':nn.data_format, 'resolution': resolution}, ], - uniform_yaw_distribution=self.options['uniform_yaw'], + uniform_yaw_distribution=self.options['uniform_yaw'] or self.pretrain, generators_count=dst_generators_count ) ])