mirror of
https://github.com/iperov/DeepFaceLab.git
synced 2025-07-05 20:42:11 -07:00
XSegEditor: fixed incorrect count of labeled images.
This commit is contained in:
parent
2b8e8f0554
commit
27f219fec7
1 changed files with 10 additions and 4 deletions
|
@ -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()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue