Skip to content

Wrong validation image viewing path in YOLOv8 object detection training notebook #293

@ukicomputers

Description

@ukicomputers

Search before asking

  • I have searched the Roboflow Notebooks issues and found no similar bug report.

Notebook name

train-yolov8-object-detection-on-custom-dataset.ipynb

Bug

In following section (in the notebook):

Inference with Custom Model

...
NOTE: Let's take a look at few results.

import glob
from IPython.display import Image, display

for image_path in glob.glob(f'{HOME}/runs/detect/predict3/*.jpg')[:3]:
     display(Image(filename=image_path, width=600))
     print("\n")

In noted Python code, directory set in glob is set to predict3 (someone got it wrong because they ran train/detection multiple times, and by default, every new train/detection directory in that dir is set by index, so they set to latest "index"). It should be just predict, the default index (see below).

import glob
from IPython.display import Image, display

for image_path in glob.glob(f'{HOME}/runs/detect/predict/*.jpg')[:3]:
      display(Image(filename=image_path, width=600))
      print("\n")

Environment

  • Google Colab

Minimal Reproducible Example

No response

Additional

No response

Are you willing to submit a PR?

  • Yes I'd like to help by submitting a PR!

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions