ultralytics / ultralytics

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

the detection box is that passable to output over 640 height value ? #14610

Closed einsitang closed 2 months ago

einsitang commented 2 months ago

Search before asking

YOLOv8 Component

No response

Bug

hello,

I just use yolov8 model export tensorflow savedmodel , and run on kaggle , but I found that during the prediction process, it was predicted that the box would exceed 640 height (I not change the imgsz to train model)

image

kaggle : https://www.kaggle.com/code/jianbintangelement/tensorflow-with-yolov8/

Environment

No response

Minimal Reproducible Example

No response

Additional

No response

Are you willing to submit a PR?

github-actions[bot] commented 2 months ago

👋 Hello @einsitang, 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.

glenn-jocher commented 2 months ago

@einsitang yes this is normal, raw YOLO model outputs may exceed image size. PyTorch postprocessing will clip these to image size as a natural prior, but for other export formats you may need to mature your postprocess pipeline yourself with these capabilities provided you are not running TF inference with the ultralytics package but instead with some other custom prediction workflow.

einsitang commented 2 months ago

thank you

pderrenger commented 2 months ago

@einsitang you're welcome! To address the issue of detection boxes exceeding the image size, this behavior can occur with raw YOLO model outputs. In PyTorch, post-processing typically clips these boxes to the image size. If you're using TensorFlow or another framework, ensure your post-processing pipeline includes this clipping step. Please also verify if the issue persists with the latest version of the Ultralytics package. If you need further assistance, feel free to ask!