You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks to zhixuhao for the keras implementation of unets
Have improved upon that to run with image generators in keras dynamically and augment while training
Dependencies
Keras 2.1.5
Numpy 1.14.2
OpenCV 2.4.9.1
Just using it to write and resize images
You may replace with PIL if you prefer
Things to note
While running ensure that the xrays and images are in separate folders and have the same labels
Follow similar folder hierarchy in data/ to your work easier ;)
Running Unets
# Initialize the Unetu1=Unet()
# Round one of trainingu1.train(lr=1e-4,num_epochs=20)
# Improve upon existing modelu1.continue_training(lr=1e-4,num_epochs=20)
# Visualize image and output side by sideu1.generate_output(save=True,mode='side_by_side',output_folder='data/outputs/side_by_side/')
# Crop images based on output mask and return the masku1.generate_output(save=True,mode='cropped',output_folder='data/outputs/cropped/')
# Get just the masksu1.generate_output(save=True,mode='mask_only',output_folder='data/outputs/masks_only/')