vietanhdev / anylabeling

Effortless AI-assisted data labeling with AI support from YOLO, Segment Anything, MobileSAM!!
https://anylabeling.nrl.ai
GNU General Public License v3.0
2.04k stars 222 forks source link

Support fine-tuning the corner points of automatically annotated polygons #90

Open aiyou9 opened 1 year ago

aiyou9 commented 1 year ago

When annotating objects with unclear edges, the corner points of the polygons may not align well with the object's edges, requiring fine adjustments. Currently, I suggest implementing a refinement feature. Add a button in the left sidebar for this purpose. When the user clicks on the first corner point that doesn't align with the object's edge, it indicates that it should be removed, and the user can start re-annotating. Utilize OpenCV's watershed algorithm or other edge detection methods, similar to Photoshop's lasso tool. As the mouse moves along the object's edge, the refined corner points can be added. When the mouse reaches the correct corner point from the automatic annotation, releasing the left mouse button will complete the refinement. Alternatively, the user can also perform this operation by right-clicking with the mouse after clicking the refinement button in the left sidebar.

当标注一些边缘不清晰的目标,多边形的角点并不能很好的贴合目标边缘,需要进行精细调整,目前,个人建议一个精修功能,左侧边栏给一个功能按钮,然后鼠标点击不贴合目标边缘的起始第一个角点,表示取出,开始重新标注,然后使用opencv的分水岭或其他边缘检测方法,像Photoshop的剪切工具那样,当鼠标轨迹沿着目标边缘移动时,添加修正的角点,当鼠标移动到自动标注正确的角点,松开鼠标左键,即完成修正,当然也可以在点击左侧边栏修正功能按钮,使用鼠标右键执行此操作。

aiyou9 commented 1 year ago

here is an example
https://github.com/Angelo-scut/Labelme-improved and Automatic tracing in this project: https://github.com/Slava/label-tool