This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np, os, cv2 | |
from keras.utils import to_categorical | |
from keras.models import load_model | |
#reads images from folder (images must be labeled 0.png, 1.png, etc...) | |
def read_from_folder(folder, pattern, image_number, stop): | |
images = [] | |
while image_number < stop: | |
path = folder + pattern + '/casc (' + str(image_number)+ ').png' | |
import os; img_path = path; assert os.path.exists(img_path), img_path |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np, os, cv2 | |
from keras.utils import to_categorical | |
from keras.models import load_model | |
#reads images from folder (images must be labeled 0.png, 1.png, etc...) | |
def read_from_folder(folder, pattern, image_number, stop): | |
images = [] | |
while image_number < stop: | |
path = folder + pattern + '/casc (' + str(image_number-119)+ ').png' | |
img = cv2.imread(path, 0) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |