import tensorflow as tf from tensorflow.python.framework import ops import math import time import matplotlib.pyplot as plt from generate_input import load_STONE_data # Load training data, cropped and resized from MATLAB tic1 = time.time() # Folder with images dir_train = "/home/chongduan/Documents/Automap-MRI/Datasett" n_cases = (0,3) # load 70 cases X_train, Y_train = load_STONE_data( # Load images for training dir_train, n_cases, normalize=True, imrotate=True, motion=True) toc1 = time.time() print('Time to load data = ', (toc1 - tic1)) print('X_train.shape at input = ', X_train.shape) print('Y_train.shape at input = ', Y_train.shape) def create_placeholders(n_H0, n_W0): """ Creates placeholders for x and y for tf.session :param n_H0: image height :param n_W0: image width :return: x and y - tf placeholders """
#n_cases = (0,1) # load image data from 0 to 2 #X_dev, Y_dev = load_images_from_folder( # Load images for training # dir_dev, # n_cases, # normalize=False, # imrotate=False) #print('X_dev.shape at input = ', X_dev.shape) #print('Y_dev.shape at input = ', Y_dev.shape) # Load training data, cropped and resized from MATLAB # Folder with images dir_train = "/home/chongduan/Documents/11_AUTOMAP/Dataset" n_cases = 3 # load 3 cases X_dev, Y_dev = load_STONE_data( # Load images for training dir_train, n_cases, normalize=False, imrotate=False) print('X_train.shape at input = ', X_dev.shape) print('Y_train.shape at input = ', Y_dev.shape) def create_placeholders(n_H0, n_W0): """ Creates placeholders for x and y for tf.session :param n_H0: image height :param n_W0: image width :return: x and y - tf placeholders """ x = tf.placeholder(tf.float32, shape=[None, n_H0, n_W0, 2], name='x') y = tf.placeholder(tf.float32, shape=[None, n_H0, n_W0], name='y')
import numpy as np import tensorflow as tf from tensorflow.python.framework import ops import math import time import matplotlib.pyplot as plt from generate_input import load_STONE_data # Load training data, cropped and resized from MATLAB tic1 = time.time() dir_train = "/home/chongduan/Documents/Automap-MRI/Dataset" n_cases = (0,1) X_train, Y_train = load_STONE_data( dir_train, n_cases, normalize=False, imrotate=False, motion=True) toc1 = time.time() print('Time to load data = ', (toc1 - tic1)) print('X_train.shape at input = ', X_train.shape) print('Y_train.shape at input = ', Y_train.shape) def create_placeholders(n_H0, n_W0): """ Creates placeholders for x and y for tf.session :param n_H0: image height :param n_W0: image width :return: x and y - tf placeholders """