roboflow / roboflow/roboflow-python

Incorrect Data Path in YOLOv8 Dataset Configuration

Offen
#240 5 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Vorherrschende Sprache
Python
Sterne
629
Forks
140
Ø Merge
2 T. 2 Std.
Gemergte PRs (30 T.)
5

Beschreibung

Bug Report: Incorrect Data Path in YOLOv8 Dataset Configuration

Description

While using the Roboflow Python client to download a YOLOv8 dataset for a tennis ball tracking project, I encountered an issue with the generated data.yaml file. The file's paths were incorrectly set, leading to a RuntimeError when attempting to train the YOLO model.

Steps to Reproduce

Download the dataset using the Roboflow Python client:

from roboflow import Roboflow
rf = Roboflow(api_key="YOUR_API_KEY")
project = rf.workspace("denica-tran").project("tennisballtracker")
version = project.version(9)
dataset = version.download("yolov8")

from ultralytics import YOLO
model = YOLO('yolov8n.pt')

dataset_path ="TennisBallTracker-9/data.yaml"
model.train(data=dataset_path, epochs=5)

Observe the downloaded TennisBallTracker-9 folder with the standard YOLOv8 dataset structure.
Check the data.yaml file, which incorrectly references paths for training, validation, and test images.
Expected Behavior
The data.yaml file should correctly point to the respective image directories within the dataset folder.

Actual Behavior

The data.yaml file contains incorrect paths, leading to a RuntimeError when the YOLO model attempts to access the image directories:

RuntimeError: Dataset 'TennisBallTracker-9/data.yaml' error ❌ 
Dataset 'TennisBallTracker-9/data.yaml' images not found ⚠️, missing path '/.../android_figurine/datasets/TennisBallTracker-9/TennisBallTracker-9/valid/images'
Note dataset download directory is '/..../android_figurine/datasets'. You can update this in '/..../Ultralytics/settings.yaml'

TL;DR

The issue might be related to residual settings from a previous project (android_figurine) that seems to interfere with the current dataset configuration. It's unclear why the old dataset path is being referenced.

Temporary Solution

I modified the data.yaml file manually to correct the paths, which allowed the training to proceed successfully:

names:

ankle
court
elbow
eye
hand
head
hip
knee
net
nose
person
player
shoulder
tennis ball
tennis racket
nc: 15
path: /..../TennisBallTracker-9/
test: test/images
train: train/images
val: valid/images

Environment

Python version: 3.12



Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Rechercherichtung

Reproduziere den Download mit dem Roboflow Python client und dem bereitgestellten YOLOv8-Beispiel und untersuche anschließend die generierte TennisBallTracker-9/data.yaml sowie deren train-, Validierungs- und Testpfade. Vergleiche diese Pfade mit der heruntergeladenen Verzeichnisstruktur und dem gemeldeten Ultralytics-Einstellungspfad; als erledigt gilt die Aufgabe, wenn ein frisch heruntergeladener Datensatz trainiert werden kann, ohne data.yaml manuell zu bearbeiten.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
python
Bereich
computer-vision, machine-learning
Issue-Typ
Bug
Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
42/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.