mirror of
https://github.com/iperov/DeepFaceLab.git
synced 2025-07-16 10:03:41 -07:00
minor fix
This commit is contained in:
parent
d3eadbf5f3
commit
029cabea3d
3 changed files with 6 additions and 6 deletions
|
@ -84,10 +84,10 @@ class ConvertSubprocessor(Subprocessor):
|
|||
#therefore forcing active_DeviceConfig to CPU only
|
||||
nnlib.active_DeviceConfig = nnlib.DeviceConfig (cpu_only=True)
|
||||
|
||||
def sharpen_func (img, sharpen_mode=0, radius=0.003, amount=150):
|
||||
h,w,c = img.shape
|
||||
radius = max(1, round(w * radius))
|
||||
kernel_size = int((radius * 2) + 1)
|
||||
def sharpen_func (img, sharpen_mode=0, kernel_size=3, amount=150):
|
||||
if kernel_size % 2 == 0:
|
||||
kernel_size += 1
|
||||
|
||||
if sharpen_mode == 1: #box
|
||||
kernel = np.zeros( (kernel_size, kernel_size), dtype=np.float32)
|
||||
kernel[ kernel_size//2, kernel_size//2] = 1.0
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue