Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

实例分割mask结果如何转ploygon轮廓点 #3572

Open
flysssss opened this issue Mar 10, 2025 · 1 comment
Open

实例分割mask结果如何转ploygon轮廓点 #3572

flysssss opened this issue Mar 10, 2025 · 1 comment
Assignees

Comments

@flysssss
Copy link

目前
output = pipeline.predict(img_path)
输出json如下:
删除mask数据,太多点了
{
"input_path": "./test1/details (1).png",
"boxes": [
{
"cls_id": 1,
"label": "shrimp",
"score": 0.946608304977417,
"coordinate": [
997.77294921875,
611.4778442382812,
1181.9566650390625,
1079.7166748046875
]
}
],
"masks": [
[
[
],
[
],
]
}
如何将mask点转换成cv2 的contour数据?有示例吗?

@zhangyubo0722
Copy link
Collaborator

可以使用cv2.findContours来获取mask轮廓

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants