-
-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
deploy quesion #944
Comments
👋 Hello @sjocnjfjd, thank you for raising this issue about the Ultralytics HUB 🚀! Your feedback is greatly appreciated. Please visit our HUB Docs for in-depth information and guidance:
🐛 Bug ReportIt seems you're encountering a
You can refer to minimum reproducible example for guidance on creating one. Additional SuggestionsBased on the error, it looks like the dataset path This is an automated response to acknowledge your issue submission. An Ultralytics engineer will review your report shortly and provide further assistance. Thank you for your patience! 😊 |
hub.login('bc75bde9b0e4c78e5b1570cbc1bccdb5a63db0bdd0') model = YOLO('https://hub.ultralytics.com/models/Lcn7iZIH2yxgTClirLcl') |
and this site is shoeing that I have uploaded the data set correctly |
why donot you write back |
Hello, thanks for reaching out! From your earlier messages, it seems like your training process is raising a Here are the steps you can follow to troubleshoot and resolve the issue: 1. Verify Dataset Paths in the
|
the fact is only I use the datas what I have uploaded ultralytics hub ,and the problem happens,but I use the datas from ultralytics hub ,nothing happens
…---Original---
From: "Paula ***@***.***>
Date: Sat, Dec 7, 2024 10:18 AM
To: ***@***.***>;
Cc: ***@***.******@***.***>;
Subject: Re: [ultralytics/hub] deploy quesion (Issue #944)
Hello, thanks for reaching out!
From your earlier messages, it seems like your training process is raising a FileNotFoundError because the dataset specified in your lane.yaml file is not being correctly located during model training. While you're seeing the dataset uploaded correctly in Ultralytics HUB, there may be an issue with the file paths used in your local lane.yaml configuration or how you're referencing the dataset in the code.
Here are the steps you can follow to troubleshoot and resolve the issue:
1. Verify Dataset Paths in the lane.yaml
Check the train, val, and other relevant paths inside your lane.yaml file. Based on the error provided, YOLO is expecting the validation images at:
/content/datasets/D:python新/建文件夹 (2)/hakusenninnshiki.v2i.yolov11/lane.yaml/images/val.
This file path seems mismatched. If this dataset was uploaded through HUB, it is recommended to use the dataset directly from HUB by referencing its unique ID. This ensures seamless integration when training models.
2. Update Your hub.login and Dataset Call
HUB handles dataset pathing automatically, so you may need to adjust your workflow by linking the dataset in HUB explicitly instead of using a local filepath. For example, try:
# Log in to HUB and retrieve the correct dataset from ultralytics import hub, YOLO hub.login("your_hub_api_key") model = YOLO('https://hub.ultralytics.com/models/Lcn7iZIH2yxgTClirLcl') # Use HUB dataset ID directly results = model.train(data='https://hub.ultralytics.com/datasets/your_dataset_id', project='runs/train', name='exp', epochs=100)
Replace your_dataset_id with the unique dataset ID provided in your Ultralytics HUB console.
3. Test Using Local Paths
If you intend to use datasets stored locally, ensure that you adjust to absolute paths and confirm the folder structure matches the expectations in your lane.yaml. As an example:
train: /content/datasets/lane/images/train # Adjust to absolute path val: /content/datasets/lane/images/val nc: 2 # Number of classes names: ['class1', 'class2']
Run again with these paths properly set.
4. Final Suggestions for Troubleshooting
If none of these methods resolve the issue:
Update to the latest Ultralytics YOLO version to ensure any potential bugs are fixed.
Double-check the dataset structure in your HUB workspace under Datasets.
Reference the step-by-step dataset preparation guide here: Ultralytics HUB Datasets.
If you still encounter issues, feel free to share additional information such as your lane.yaml file configuration (excluding sensitive content) or screenshots of your dataset setup in HUB. We're happy to assist further!
Let us know how it goes! 😊
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
100 epochs completed in 0.151 hours. Validating runs/detect/train/weights/best.pt... 6 frames FileNotFoundError: |
Thank you for your detailed feedback! It looks like the issue is related to how the dataset paths are being referenced when training your model using your uploaded dataset in the Ultralytics HUB. The fact that the training works fine with existing sample datasets from the HUB but fails with custom datasets suggests a potential misconfiguration in how your dataset is structured or linked. Here’s how you can troubleshoot and resolve this: 1. Double-Check Dataset Structure in HUBSince you are using a dataset uploaded to HUB, ensure the dataset is structured properly in your YAML file (e.g., # Example YAML file structure:
names: ['class1', 'class2'] # Specify class names
nc: 2 # Number of classes
train: images/train # Automatically managed by HUB
val: images/val When working with datasets from HUB, these paths are handled internally by HUB. Ensure you reference the dataset correctly through its ID in your script rather than using local paths. 2. Use Dataset ID from HUBWhen your dataset is uploaded and available in the HUB, your workflow should avoid hardcoding local paths. Instead, use the dataset's unique HUB ID for seamless integration. For instance: from ultralytics import hub, YOLO
# Authenticate with your HUB API key
hub.login('your_hub_api_key')
# Load the model and dataset from HUB
model = YOLO('https://hub.ultralytics.com/models/CakR19gXMlXaHJwZM1PX')
results = model.train(data='https://hub.ultralytics.com/datasets/YOUR_DATASET_ID',
project='runs/train',
name='exp',
epochs=100)
3. Verify Dataset Setup in HUBGo to your HUB workspace and ensure:
If the dataset does not display correctly in HUB, re-upload the dataset as outlined in the Ultralytics HUB Datasets Guide. 4. Debug Dataset Path IssuesIf you continue to encounter # Example of local download for verification
dataset = hub.download_dataset('YOUR_DATASET_ID') # Replace with your dataset ID
print(f"Dataset downloaded to: {dataset}") Once the dataset is downloaded, check if:
5. Update YOLO Library to the Latest VersionIf an issue persists, confirm that you are using the latest Ultralytics library, as updates often fix bugs or compatibility issues. Upgrade as follows: pip install ultralytics --upgrade Summary
If you've confirmed the dataset is correct and the issue persists, let us know more details (like the exact dataset ID or screenshots of the dataset structure in HUB if possible). We’ll gladly assist further! 😊 |
Search before asking
HUB Component
No response
Bug
100 epochs completed in 0.142 hours.
Optimizer stripped from runs/detect/train/weights/last.pt, 5.5MB
Optimizer stripped from runs/detect/train/weights/best.pt, 5.5MB
Validating runs/detect/train/weights/best.pt...
Ultralytics 8.3.44 🚀 Python-3.10.12 torch-2.5.1+cu121 CUDA:0 (Tesla T4, 15102MiB)
YOLO11n summary (fused): 238 layers, 2,582,347 parameters, 0 gradients, 6.3 GFLOPs
FileNotFoundError Traceback (most recent call last)
in <cell line: 4>()
2
3 model = YOLO('https://hub.ultralytics.com/models/Lcn7iZIH2yxgTClirLcl')
----> 4 results = model.train(data='/datasets/a2O66UeTvAEqSUPPff6l/lane/lane.yaml', project='runs/train', name='exp', epochs=100)
6 frames
/usr/local/lib/python3.10/dist-packages/ultralytics/data/utils.py in check_det_dataset(dataset, autodownload)
327 else:
328 m += f"\nNote dataset download directory is '{DATASETS_DIR}'. You can update this in '{SETTINGS_FILE}'"
--> 329 raise FileNotFoundError(m)
330 t = time.time()
331 r = None # success
FileNotFoundError:⚠️ , missing path '/content/datasets/D:python新/建文件夹 (2)/hakusenninnshiki.v2i.yolov11/lane.yaml/images/val'
Dataset '/content/datasets/lane/lane.yaml' images not found
Note dataset download directory is '/content/datasets'. You can update this in '/root/.config/Ultralytics/settings.json'
why does this always come up
Environment
computer window :https://hub.ultralytics.com/models/Lcn7iZIH2yxgTClirLcl?tab=deploy
Minimal Reproducible Example
no
Additional
no
The text was updated successfully, but these errors were encountered: