Added faceset resize tool via

4.2) data_src util faceset resize.bat
5.2) data_dst util faceset resize.bat

Resize faceset to match model resolution to reduce CPU load during training.

Don’t forget to keep original faceset.
This commit is contained in:
iperov 2021-03-23 16:01:24 +04:00
commit f387179cba
2 changed files with 17 additions and 1 deletions

View file

@ -77,6 +77,8 @@ class SegIEPoly():
self.pts = np.array(pts)
self.n_max = self.n = len(pts)
def mult_points(self, val):
self.pts *= val
@ -136,7 +138,11 @@ class SegIEPolys():
def dump(self):
return {'polys' : [ poly.dump() for poly in self.polys ] }
def mult_points(self, val):
for poly in self.polys:
poly.mult_points(val)
@staticmethod
def load(data=None):
ie_polys = SegIEPolys()