diff --git a/UnMicst.py b/UnMicst.py index 0fbd7f7..d5b9fc7 100644 --- a/UnMicst.py +++ b/UnMicst.py @@ -1,9 +1,13 @@ import numpy as np from scipy import misc +import os +os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2' +import logging +logging.getLogger('tensorflow').setLevel(logging.FATAL) import tensorflow.compat.v1 as tf import shutil import scipy.io as sio -import os, fnmatch, glob +import fnmatch, glob import skimage.exposure as sk import skimage.io import argparse @@ -590,7 +594,7 @@ def singleImageInference(image, mode, pmIndex): parentFolder = os.path.dirname(os.path.dirname(imagePath)) fileName = os.path.basename(imagePath) fileNamePrefix = fileName.split(os.extsep, 1) - print(fileName) + # print(fileName) fileType = fileNamePrefix[1] if fileType=='ome.tif' or fileType == 'btf' : @@ -609,7 +613,7 @@ def singleImageInference(image, mode, pmIndex): args.classOrder = range(nClass) rawI = I - print(type(I)) + # print(type(I)) hsize = int((float(I.shape[0]) * float(dsFactor))) vsize = int((float(I.shape[1]) * float(dsFactor))) I = resize(I, (hsize, vsize)) diff --git a/UnMicst1-5.py b/UnMicst1-5.py index f30ab72..5e26a92 100644 --- a/UnMicst1-5.py +++ b/UnMicst1-5.py @@ -1,11 +1,16 @@ import numpy as np from scipy import misc +import os +os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2' +import logging +logging.getLogger('tensorflow').setLevel(logging.FATAL) + import tensorflow.compat.v1 as tf from tensorflow import keras from tensorflow.keras import layers import shutil import scipy.io as sio -import os, fnmatch, glob +import fnmatch, glob import skimage.exposure as sk import skimage.io import argparse @@ -764,7 +769,7 @@ def singleImageInference(image, mode, pmIndex): parentFolder = os.path.dirname(os.path.dirname(imagePath)) fileName = os.path.basename(imagePath) fileNamePrefix = fileName.split(os.extsep, 1) - print(fileName) + # print(fileName) fileType = fileNamePrefix[1] if fileType == 'ome.tif' or fileType == 'btf': diff --git a/UnMicst2.py b/UnMicst2.py index 5bfa4c7..b2ad454 100644 --- a/UnMicst2.py +++ b/UnMicst2.py @@ -1,11 +1,16 @@ import numpy as np from scipy import misc +import os +os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2' +import logging +logging.getLogger('tensorflow').setLevel(logging.FATAL) + import tensorflow.compat.v1 as tf from tensorflow import keras from tensorflow.keras import layers import shutil import scipy.io as sio -import os, fnmatch, glob +import fnmatch, glob import skimage.exposure as sk import skimage.io import argparse @@ -742,7 +747,7 @@ def singleImageInference(image, mode, pmIndex): parentFolder = os.path.dirname(os.path.dirname(imagePath)) fileName = os.path.basename(imagePath) fileNamePrefix = fileName.split(os.extsep, 1) - print(fileName) + # print(fileName) fileType = fileNamePrefix[1] for iChan in range(len(channel)): diff --git a/unmicstWrapper.py b/unmicstWrapper.py index 293a45b..6766f49 100644 --- a/unmicstWrapper.py +++ b/unmicstWrapper.py @@ -23,6 +23,7 @@ scriptPath =os.path.dirname(os.path.realpath(__file__)) + cmd="python " + scriptPath + os.sep channel = args.channel @@ -36,16 +37,19 @@ elif args.tool == 'UnMicst': cmd = cmd + "UnMicst.py " channel = str(channel[0]) - print("WARNING! YOU HAVE OPTED TO USE UNMICST V1, WHICH IS GETTING TIRED AND OLD. CONSIDERING USING V1.5 OR V2(IF YOU ALSO HAVE A NUCLEAR ENVELOPE STAIN") + print('') + print("WARNING! YOU HAVE OPTED TO USE UNMICST V1, WHICH IS GETTING TIRED AND OLD. CONSIDER USING V1.5 OR V2(IF YOU ALSO HAVE A NUCLEAR ENVELOPE STAIN") + print('') elif args.tool == 'UnMicstCyto2': cmd = cmd + "UnMicstCyto2.py " channel = str(channel[0]) else: cmd = cmd + "UnMicst1-5.py " channel = str(channel[0]) + print('') print( "WARNING! USING V1.5 AS DEFAULT. THIS MODEL HAS BEEN TRAINED ON MORE TISSUE TYPES. IF YOU WANT V1, USE --tool UnMicst") - + print('') cmd = cmd + " " + args.imagePath cmd = cmd + " --channel " + str(channel)