ultralytics / ultralytics

NEW - YOLOv8 🚀 in PyTorch > ONNX > OpenVINO > CoreML > TFLite
https://docs.ultralytics.com
GNU Affero General Public License v3.0
27.79k stars 5.53k forks source link

Why is the mask drawn by seg normal, but the result returned less mask #14387

Open LJ4309 opened 1 month ago

LJ4309 commented 1 month ago

Search before asking

Question

Why is the mask drawn by seg normal, but the result returned less mask,The same target is disconnected, but the result returned contains less mask data, but the rectangular box is normal

Additional

No response

github-actions[bot] commented 1 month ago

👋 Hello @LJ4309, thank you for your interest in Ultralytics YOLOv8 🚀! We recommend a visit to the Docs for new users where you can find many Python and CLI usage examples and where many of the most common questions may already be answered.

If this is a 🐛 Bug Report, please provide a minimum reproducible example to help us debug it.

If this is a custom training ❓ Question, please provide as much information as possible, including dataset image examples and training logs, and verify you are following our Tips for Best Training Results.

Join the vibrant Ultralytics Discord 🎧 community for real-time conversations and collaborations. This platform offers a perfect space to inquire, showcase your work, and connect with fellow Ultralytics users.

Install

Pip install the ultralytics package including all requirements in a Python>=3.8 environment with PyTorch>=1.8.

pip install ultralytics

Environments

YOLOv8 may be run in any of the following up-to-date verified environments (with all dependencies including CUDA/CUDNN, Python and PyTorch preinstalled):

Status

Ultralytics CI

If this badge is green, all Ultralytics CI tests are currently passing. CI tests verify correct operation of all YOLOv8 Modes and Tasks on macOS, Windows, and Ubuntu every 24 hours and on every commit.

LJ4309 commented 1 month ago

1720778653109 这是预测输出的mask, 1720778712785 这是根据result中mask输出的,少左边一部分

glenn-jocher commented 1 month ago

@LJ4309 hello!

Thank you for bringing this to our attention. It looks like there might be a discrepancy between the drawn mask and the mask data returned in the results. To help us diagnose the issue more effectively, could you please provide a minimum reproducible example? This will allow us to replicate the problem on our end and investigate further. You can find guidelines on how to create a reproducible example here.

Additionally, please ensure that you are using the latest version of the Ultralytics YOLO package, as updates often include important bug fixes and improvements.

Looking forward to your response! 😊

LJ4309 commented 1 month ago

链接:https://pan.baidu.com/s/1n8D7DFeZrNQnd1Pd19tJyg 提取码:kpyd --来自百度网盘超级会员V7的分享 For convenience, I put the Baidu web disk, which contains the training model, the val script is val_seg.py

LJ4309 commented 1 month ago

https://codeload.github.com/ultralytics/ultralytics/zip/refs/heads/main,This is the download address

LJ4309 commented 1 month ago

The trained model is on Baidu's web disk,You can test the picture with this model,The test images are also on the web disk

LJ4309 commented 1 month ago

This one uses the latest package

LJ4309 commented 1 month ago

This one uses the latest package

LJ4309 commented 1 month ago

Hello, is there any new progress on this issue

LJ4309 commented 1 month ago

It's up to date, but there are still problems

LJ4309 commented 1 month ago

通过网盘中val_seg.py脚本,运行,得到的带mask的图片和根据result中mask画框,区域不一致,少一部分像素 1721626607091 这个结果在上面的回复中已经提到了,希望您看一下,谢谢

LJ4309 commented 1 month ago

val_seg.py脚本 1721699467236 yis以上为val_seg脚本,只有这点代码, 1721699537730 这是画mask脚本,使用的是最新的Ultralytics,网盘中也有对应的模型,在runs里面,如果可以的话,希望您那边可以跑一下,看一下结果

LJ4309 commented 1 month ago

是一致的,model.predict()中直接保存mask掩码的结果图片中,像素是全的,但是根据result中的result.masks 结果是少数据的

LJ4309 commented 1 month ago

是官方最新的,也没有进行修改,就是结果和图片差像素,处理也没有修改,都是官方的源码

LJ4309 commented 1 month ago

这个和数据集没有关系吧,直接输出的图片中的结果和result的mask结果不一致,和数据集应该没有关系 1721958782862 这是处理的mask,没有遗漏东西