Can i use the pretrained model without the GUI?
humzaahmad906 opened this issue · comments
Can i use the pretrained model without the GUI?
Yes, checkout Evaluation section of readme and jupyter notebook for details.
Yes but if i'm passing custom images here like
clicks_list, ious_arr, pred = evaluate_sample(cv2.imread("example.jpg"), cv2.imread("1.jpg", cv2.IMREAD_GRAYSCALE), predictor,
pred_thr=MODEL_THRESH,
max_iou_thr=TARGET_IOU, max_clicks=EVAL_MAX_CLICKS)
Do i need to change something? Also can i use the evaluation process without giving it a mask?
There are two options:
- If you want to get NoC metric value you have to pass gt mask to
evaluate_sample
as in this mode user clicks are generated automatically with a certain strategy (refer to the paper for details). - If you want to get a predicted mask for the image with custom clicks you have to pass user clicks to a predictor (see lines 28 - 57 for an example). GUI is used here to ease the choosing of the next click, but this can be done manually without interface.
In both options image should be normalized before passing it to the network.
It helped alot. Thanks