Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
htylab committed Jun 20, 2024
1 parent c695569 commit 4fd0399
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions tigerhx/hx.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,11 +120,11 @@ def run_args(args):
else:
return result_list

def predict(data, model='cine4d_v0003_xy_mms12acdc.onnx', GPU=False):
def predict(data, model='cine4d_v0003_xy_mms12acdc.onnx', GPU=False, th=50):
# for single call from python package
model_name = lib_tool.get_model(model)
mask_pred = lib_hx.run(model_name, data, GPU=GPU)
mask_pred = lib_hx.post(mask_pred)
mask_pred = lib_hx.post(mask_pred, th=50)

return mask_pred

Expand Down
4 changes: 2 additions & 2 deletions tigerhx/lib_hx.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ def get_mode(model_ff):
return seg_mode, version, model_str


def post(mask, th):
def post(mask, th=50):

def getLarea(input_mask, th):
def getLarea(input_mask, th=50):
from scipy import ndimage
labeled_mask, cc_num = ndimage.label(input_mask)

Expand Down

0 comments on commit 4fd0399

Please sign in to comment.