<jupyter_start><jupyter_text>Nuclei Segmentation by GAN model<jupyter_code>import os
import tensorflow.compat.v1 as tf
tf.disable_v2_behavior() 
import cv2
import utils as utilsx
from PIL import Image
import numpy as np
#import scipy.io as sio
import h5py
FLAGS = tf.flags.FLAGS
tf.flags.DEFINE_string('gpu_index', '0', 'gpu index, default: 0')
#os.environ['CUDA_VISIBLE_DEVICES'] = FLAGS.gpu_index        
run_config = tf.ConfigProto()
run_config.gpu_options.allow_growth = True
sess = tf.Session(config=run_config)
flags = FLAGS
model = utilsx.net_arch(sess, flags, (2000,2000))
saver = tf.train.Saver()
sess.run(tf.global_variables_initializer())
model_out_dir = "model"
if utilsx.load_model(sess, saver, model_out_dir):
    best_auc_sum = sess.run(model.best_auc_sum)
    print('====================================================')
    print(' Best auc_sum: {:.3}'.format(best_auc_sum))
    print('=============================================')    
    print(' [*] Load Success!\n')
names = utilsx.all_files_under('/scratch/users/crb138/BMS/histoqc_tiles/mat_tiles/','.mat')<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.20882088208820881, 'fraction_numerical': 0.016201620162016202, 'mean_word_length': 6.220779220779221, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '407223', 'license': 'MIT', 'n_tokens_mistral': 415, 'n_tokens_neox': 395, 'n_words': 75, 'path': 'nucleiseg_main.ipynb', 'repo_name': 'maberyick/nucleiSegmentationHEDL', 'size': '1111'}