pamixsun commited on
Commit
bf81a1e
1 Parent(s): a7e5224

Update glaucoma.py

Browse files
Files changed (1) hide show
  1. glaucoma.py +4 -1
glaucoma.py CHANGED
@@ -82,7 +82,10 @@ class GlaucomaModel(object):
82
  cam = self.cam.get_cam(image, disease_idx)
83
  cam = cv2.resize(cam, image_shape[::-1])
84
  disc_cup = self.optic_disc_cup_pred(image)
85
- vcdr = simple_vcdr(disc_cup)
 
 
 
86
  _, disc_cup_image = add_mask(image, disc_cup, [0, 1, 2], [[0, 0, 0], [0, 255, 0], [255, 0, 0]], 0.2)
87
 
88
  return disease_idx, disc_cup_image, cam, vcdr
 
82
  cam = self.cam.get_cam(image, disease_idx)
83
  cam = cv2.resize(cam, image_shape[::-1])
84
  disc_cup = self.optic_disc_cup_pred(image)
85
+ try:
86
+ vcdr = simple_vcdr(disc_cup)
87
+ except:
88
+ vcdr = '[None]'
89
  _, disc_cup_image = add_mask(image, disc_cup, [0, 1, 2], [[0, 0, 0], [0, 255, 0], [255, 0, 0]], 0.2)
90
 
91
  return disease_idx, disc_cup_image, cam, vcdr