feng-x commited on
Commit
68c293c
·
verified ·
1 Parent(s): bb290be

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. src/edge_refinement.py +5 -1
src/edge_refinement.py CHANGED
@@ -294,7 +294,11 @@ def extract_ring_zone_roi(
294
  half_height = zone_length * 0.25 # 0.25x / 2
295
  else:
296
  half_height = zone_length * 0.25 # 0.5x / 2
297
- half_width = zone_length * 0.6 # 1.5x / 2
 
 
 
 
298
 
299
  x_min = int(np.clip(center[0] - half_width, 0, w - 1))
300
  x_max = int(np.clip(center[0] + half_width, 0, w - 1))
 
294
  half_height = zone_length * 0.25 # 0.25x / 2
295
  else:
296
  half_height = zone_length * 0.25 # 0.5x / 2
297
+ # ROI width = 1.6x zone_length. zone_length = |DIP-PIP| can be close to
298
+ # finger width on chubby/short proximal phalanxes; 1.2x left almost no
299
+ # margin and the SAM mask hit the ROI wall on slightly off-axis fingers,
300
+ # which the right_mask_boundary == max_col guard then rejected as bleed.
301
+ half_width = zone_length * 0.8
302
 
303
  x_min = int(np.clip(center[0] - half_width, 0, w - 1))
304
  x_max = int(np.clip(center[0] + half_width, 0, w - 1))