positive666 / yolo_research

based on yolo-high-level project (detect\pose\classify\segment\):include yolov5\yolov7\yolov8\ core ,improvement research ,SwintransformV2 and Attention Series. training skills, business customization, engineering deployment C

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

有關分割部分

stphtan94117 opened this issue · comments

❔Question

作者你好
我做了一個裂縫檢測,想請問有辦法把bbox外框取消嗎,只顯示分割的內容(裂縫)
目前bbox跟分割物件,會同時顯示,覺得畫面有點雜,因此想詢問如何取消

另外想詢問,有辦法計算出分割物體的面積嗎,我知道bbox有w、h,可以計算出面積
但分割的部分,是屬於不規則的polygon,不曉得有無辦法解決,謝謝你

❔Question

作者你好 我做了一個裂縫檢測,想請問有辦法把bbox外框取消嗎,只顯示分割的內容(裂縫) 目前bbox跟分割物件,會同時顯示,覺得畫面有點雜,因此想詢問如何取消

另外想詢問,有辦法計算出分割物體的面積嗎,我知道bbox有w、h,可以計算出面積 但分割的部分,是屬於不規則的polygon,不曉得有無辦法解決,謝謝你

1.将predict.py里178行的annotator.box_label(xyxy, label, color=colors(c, True)) 注释掉就没有BOX了
2.在BOX里可以使用基本的opencv图像处理操作,比如形态学、你可以根据BOX裁剪出来,二值化后,用cv2.findContours取检测轮廓,然后用area的AIP计算面积 。你可以参考下大概是这个流程

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.