mirror of
https://github.com/iperov/DeepFaceLab.git
synced 2025-08-22 06:23:20 -07:00
Do not save unfinished polygons
This commit is contained in:
parent
8e9e346c9d
commit
5345c56459
1 changed files with 5 additions and 0 deletions
|
@ -1206,6 +1206,11 @@ class MainWindow(QXMainWindow):
|
||||||
ie_polys = dflimg.get_seg_ie_polys()
|
ie_polys = dflimg.get_seg_ie_polys()
|
||||||
new_ie_polys = self.canvas.op.get_ie_polys()
|
new_ie_polys = self.canvas.op.get_ie_polys()
|
||||||
|
|
||||||
|
# Remove unfinished polys
|
||||||
|
for new_ie_poly in new_ie_polys:
|
||||||
|
if new_ie_poly.get_pts_count() < 3:
|
||||||
|
new_ie_polys.remove_poly(new_ie_poly)
|
||||||
|
|
||||||
if not new_ie_polys.identical(ie_polys):
|
if not new_ie_polys.identical(ie_polys):
|
||||||
self.image_paths_has_ie_polys[image_path] = new_ie_polys.has_polys()
|
self.image_paths_has_ie_polys[image_path] = new_ie_polys.has_polys()
|
||||||
dflimg.set_seg_ie_polys( new_ie_polys )
|
dflimg.set_seg_ie_polys( new_ie_polys )
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue