osuossu8 / kaggle_hubmap_2023

1 stars 0 forks source link

cv2.dilate の post process 再度試す #12

Open osuossu8 opened 1 year ago

osuossu8 commented 1 year ago

うまくいかなかったやつ

det_mask = cv2.dilate(det_mask, np.ones((3, 3), dtype=np.uint8), iterations=2)

https://www.kaggle.com/code/kaerunantoka/hubmap-infer-mmdet-exp006-dilation-pp?scriptVersionId=133985837

追記 : ds1 のみで学習したものだった

osuossu8 commented 1 year ago

keroppi-sensei のコード

def dilate_predict_mask(out_mask):
    for i in range(len(out_mask)):
        kernel = np.ones(shape=(3, 3), dtype=np.uint8)
        out_mask[i] = cv2.dilate(out_mask[i], kernel, 3)
    return out_mask

from https://www.kaggle.com/code/hengck23/lb4-09-baseline-yolov7

osuossu8 commented 1 year ago
osuossu8 commented 1 year ago

(exp 021) 0.449 → 0.409

一旦 close

osuossu8 commented 1 year ago
osuossu8 commented 1 year ago

dilation は iterations を変えて試す

https://www.kaggle.com/competitions/hubmap-hacking-the-human-vasculature/discussion/416901#2322028

osuossu8 commented 1 year ago

ds1 only で erosion もいいかも https://scikit-image.org/docs/stable/api/skimage.morphology.html#skimage.morphology.binary_erosion

osuossu8 commented 1 year ago

ds1 と ds2 の shuffle で成功!

0.318 → 0.451

https://www.kaggle.com/code/kaerunantoka/hubmap-infer-exp034-dilate-iter3?scriptVersionId=135495448

osuossu8 commented 1 year ago

mmdet 2.0系の推論 notebook で kaeru の weight でサブしてみる https://www.kaggle.com/code/harshitsheoran/hubmap-mmdet-2-26-public-inference?scriptVersionId=137179547

config を mmdet2.x 用に convert する parser が必要