andreped commited on
Commit
dde96f8
1 Parent(s): 82a07e9

potential bug fix

Browse files
Files changed (1) hide show
  1. livermask/livermask.py +3 -3
livermask/livermask.py CHANGED
@@ -38,9 +38,9 @@ def intensity_normalization(volume, intensity_clipping_range):
38
  def post_process(pred):
39
  return pred
40
 
41
- def get_model():
42
  url = "https://drive.google.com/uc?id=12or5Q79at2BtLgQ7IaglNGPFGRlEgEHc"
43
- output = "./model.h5"
44
  md5 = "ef5a6dfb794b39bea03f5496a9a49d4d"
45
  gdown.cached_download(url, output, md5=md5) #, postprocess=gdown.extractall)
46
 
@@ -52,7 +52,7 @@ def func(path, output, cpu):
52
  name = cwd + "model.h5"
53
 
54
  # get model
55
- get_model()
56
 
57
  # load model
58
  model = load_model(name, compile=False)
 
38
  def post_process(pred):
39
  return pred
40
 
41
+ def get_model(output):
42
  url = "https://drive.google.com/uc?id=12or5Q79at2BtLgQ7IaglNGPFGRlEgEHc"
43
+ # output = "./model.h5"
44
  md5 = "ef5a6dfb794b39bea03f5496a9a49d4d"
45
  gdown.cached_download(url, output, md5=md5) #, postprocess=gdown.extractall)
46
 
 
52
  name = cwd + "model.h5"
53
 
54
  # get model
55
+ get_model(name)
56
 
57
  # load model
58
  model = load_model(name, compile=False)