mirror of
https://github.com/qurator-spk/eynollah.git
synced 2025-06-08 19:59:56 +02:00
apply some fixes from main
This commit is contained in:
parent
d21cc42d87
commit
58ca226f2d
1 changed files with 4 additions and 4 deletions
|
@ -20,10 +20,10 @@ import numpy as np
|
||||||
os.environ["TF_CPP_MIN_LOG_LEVEL"] = "3"
|
os.environ["TF_CPP_MIN_LOG_LEVEL"] = "3"
|
||||||
stderr = sys.stderr
|
stderr = sys.stderr
|
||||||
sys.stderr = open(os.devnull, "w")
|
sys.stderr = open(os.devnull, "w")
|
||||||
from keras import backend as K
|
|
||||||
from keras.models import load_model
|
|
||||||
sys.stderr = stderr
|
|
||||||
import tensorflow as tf
|
import tensorflow as tf
|
||||||
|
from tensorflow.python.keras import backend as K
|
||||||
|
from tensorflow.keras.models load_model
|
||||||
|
sys.stderr = stderr
|
||||||
tf.get_logger().setLevel("ERROR")
|
tf.get_logger().setLevel("ERROR")
|
||||||
warnings.filterwarnings("ignore")
|
warnings.filterwarnings("ignore")
|
||||||
from scipy.signal import find_peaks
|
from scipy.signal import find_peaks
|
||||||
|
@ -699,7 +699,7 @@ class Eynollah:
|
||||||
if img.shape[1] < img_width_model:
|
if img.shape[1] < img_width_model:
|
||||||
img = resize_image(img, img.shape[0], img_width_model)
|
img = resize_image(img, img.shape[0], img_width_model)
|
||||||
|
|
||||||
self.logger.info("Image dimensions: %sx%s", img_height_model, img_width_model)
|
self.logger.debug("Patch size: %sx%s", img_height_model, img_width_model)
|
||||||
margin = int(marginal_of_patch_percent * img_height_model)
|
margin = int(marginal_of_patch_percent * img_height_model)
|
||||||
width_mid = img_width_model - 2 * margin
|
width_mid = img_width_model - 2 * margin
|
||||||
height_mid = img_height_model - 2 * margin
|
height_mid = img_height_model - 2 * margin
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue