─░├žeri─če ge├ž

Ultralytics YOLO Depolar─▒ndaki Hata Raporlar─▒ i├žin Minimum Tekrarlanabilir ├ľrnek Olu┼čturma

When submitting a bug report for Ultralytics YOLO repositories, it's essential to provide a Minimum Reproducible Example (MRE). An MRE is a small, self-contained piece of code that demonstrates the problem you're experiencing. Providing an MRE helps maintainers and contributors understand the issue and work on a fix more efficiently. This guide explains how to create an MRE when submitting bug reports to Ultralytics YOLO repositories.

1. Sorunu ─░zole Edin

The first step in creating an MRE is to isolate the problem. Remove any unnecessary code or dependencies that are not directly related to the issue. Focus on the specific part of the code that is causing the problem and eliminate any irrelevant sections.

2. Kamuya A├ž─▒k Modelleri ve Veri Setlerini Kullan─▒n

When creating an MRE, use publicly available models and datasets to reproduce the issue. For example, use the yolov8n.pt model and the coco8.yaml dataset. This ensures that the maintainers and contributors can easily run your example and investigate the problem without needing access to proprietary data or custom models.

3. Gerekli T├╝m Ba─č─▒ml─▒l─▒klar─▒ Dahil Edin

Ensure all necessary dependencies are included in your MRE. If your code relies on external libraries, specify the required packages and their versions. Ideally, list the dependencies in your bug report using yolo checks if you have ultralytics installed or pip list for other tools.

4. Sorunun A├ž─▒k Bir Tan─▒m─▒n─▒ Yaz─▒n

Ya┼čad─▒─č─▒n─▒z sorunun a├ž─▒k ve ├Âz bir tan─▒m─▒n─▒ yap─▒n. Beklenen davran─▒┼č─▒ ve kar┼č─▒la┼čt─▒─č─▒n─▒z ger├žek davran─▒┼č─▒ a├ž─▒klay─▒n. Varsa, ilgili hata mesajlar─▒n─▒ veya g├╝nl├╝kleri ekleyin.

5. Kodunuzu D├╝zg├╝n Bi├žimlendirin

Format your code properly using code blocks in the issue description. This makes it easier for others to read and understand your code. In GitHub, you can create a code block by wrapping your code with triple backticks (```) and specifying the language:

# Your Python code goes here

6. MRE'nizi Test Edin

MRE'nizi g├Ândermeden ├Ânce, sorunu do─čru bir ┼čekilde yeniden ├╝retti─činden emin olmak i├žin test edin. Ba┼čkalar─▒n─▒n ├Ârne─činizi herhangi bir sorun veya de─či┼čiklik olmadan ├žal─▒┼čt─▒rabildi─činden emin olun.

MRE ├Ârne─či

─░┼čte varsay─▒msal bir hata raporu i├žin bir MRE ├Ârne─či:

Hata a├ž─▒klamas─▒:

When running inference on a 0-channel image, I get an error related to the dimensions of the input tensor.


import torch

from ultralytics import YOLO

# Load the model
model = YOLO("yolov8n.pt")

# Load a 0-channel image
image = torch.rand(1, 0, 640, 640)

# Run the model
results = model(image)

Hata mesaj─▒:

RuntimeError: Expected input[1, 0, 640, 640] to have 3 channels, but got 0 channels instead


  • torch==2.3.0
  • ultralytics==8.2.0

In this example, the MRE demonstrates the issue with a minimal amount of code, uses a public model ("yolov8n.pt"), includes all necessary dependencies, and provides a clear description of the problem along with the error message.

By following these guidelines, you'll help the maintainers and contributors of Ultralytics YOLO repositories to understand and resolve your issue more efficiently.

Created 2023-11-12, Updated 2024-06-09
Authors: IvorZhu331 (1), glenn-jocher (3)