Skip to content
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

Loading private model issue #941

Open
1 task done
yeongnamtan opened this issue Dec 3, 2024 · 13 comments
Open
1 task done

Loading private model issue #941

yeongnamtan opened this issue Dec 3, 2024 · 13 comments
Assignees
Labels
app Related to application functionality or features bug Something isn't working HUB Ultralytics HUB issues

Comments

@yeongnamtan
Copy link

Search before asking

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

HUB Component

Models

Bug

Load model issue

Environment

Samsung android A55

Minimal Reproducible Example

The hub app tried to load my private model but it takes forever and seem to hang

Additional

No response

@yeongnamtan yeongnamtan added the bug Something isn't working label Dec 3, 2024
@UltralyticsAssistant UltralyticsAssistant added the HUB Ultralytics HUB issues label Dec 3, 2024
@UltralyticsAssistant
Copy link
Member

👋 Hello @yeongnamtan, thank you for raising an issue about Ultralytics HUB 🚀! Please visit our HUB Docs to learn more:

  • Quickstart. Start training and deploying YOLO models with HUB in seconds.
  • Datasets: Preparing and Uploading. Learn how to prepare and upload your datasets to HUB in YOLO format.
  • Projects: Creating and Managing. Group your models into projects for improved organization.
  • Models: Training and Exporting. Train YOLOv5 and YOLOv8 models on your custom datasets and export them to various formats for deployment.
  • Integrations. Explore different integration options for your trained models, such as TensorFlow, ONNX, OpenVINO, CoreML, and PaddlePaddle.
  • Ultralytics HUB App. Learn about the Ultralytics App for iOS and Android, which allows you to run models directly on your mobile device.
    • iOS. Learn about YOLO CoreML models accelerated on Apple's Neural Engine on iPhones and iPads.
    • Android. Explore TFLite acceleration on mobile devices.
  • Inference API. Understand how to use the Inference API for running your trained models in the cloud to generate predictions.

It seems like you’re experiencing a 🐛 bug related to loading your private model in the Ultralytics HUB mobile app. To help us investigate, could you please provide more details or a Minimum Reproducible Example (MRE)? This might include:

  1. Steps you followed when attempting to load the private model
  2. Any relevant screenshots or error messages (if available)
  3. Confirmation if the issue occurs consistently or only under certain conditions

An Ultralytics engineer will review your issue and provide assistance soon. Thank you for your patience and for helping us improve Ultralytics HUB! 🙏✨

@yogendrasinghx
Copy link
Member

@yeongnamtan Thank you for bringing this issue to our attention. To help us investigate and resolve the problem efficiently, could you please share the Model ID?

You can find it in the URL when accessing the model in the HUB Web, for example: https://hub.ultralytics.com/models/7wzkDSKNMcwkPTs8ZVJC.

Model ID: 7wzkDSKNMcwkPTs8ZVJC

Providing the Model ID will allow us to locate your account and gain a better understanding of the issue. We sincerely apologize for any inconvenience this has caused and appreciate your patience as we work on a resolution.

Looking forward to your response.

@yogendrasinghx yogendrasinghx added the app Related to application functionality or features label Dec 3, 2024
@yeongnamtan
Copy link
Author

@yogendrasinghx
Copy link
Member

@yeongnamtan Thank you for providing the Model ID. We have successfully located your account and informed our team to investigate and resolve the issue.

We appreciate your patience and will keep you updated on the progress.

@sjocnjfjd
Copy link

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:
Dataset '/content/datasets/lane/lane.yaml' images not found ⚠️, missing path '/content/datasets/D:python新/建文件夹 (2)/hakusenninnshiki.v2i.yolov11/lane.yaml/images/val'
Note dataset download directory is '/content/datasets'. You can update this in '/root/.config/Ultralytics/settings.json'
why does this always come up ?no matter how I chang it:
hub.login('bc75bde9b0e4c78e5b1570cbc1bccdb5a63db0bdd0')

model = YOLO('https://hub.ultralytics.com/models/Lcn7iZIH2yxgTClirLcl')
results = model.train(data='/datasets/a2O66UeTvAEqSUPPff6l/lane/lane.yaml', project='runs/train', name='exp', epochs=100)

@pderrenger
Copy link
Member

It appears you are encountering a FileNotFoundError related to your dataset path during training. This happens when the specified dataset path in your .yaml file is incorrect or the dataset is missing. Let me help you troubleshoot and resolve this issue step by step:

Possible Causes & Solutions

  1. Dataset Path Accuracy:

    • Double-check the lane.yaml file, particularly the paths to your train and val image directories. Those paths need to be valid and accessible from the current working directory.
    • Example of a valid lane.yaml structure:
      train: /content/datasets/lane/train/images
      val: /content/datasets/lane/val/images
      nc: 2
      names: ['class1', 'class2']
    • Update the paths to reflect the correct directory structure within /content/datasets.
  2. Dataset Location:

    • Ensure that the dataset folder is uploaded to the required location (/content/datasets/lane) if you are using a local path. You can verify this by listing the directory with:
      !ls /content/datasets/lane
  3. Dataset Upload via Ultralytics HUB:

    • If the dataset resides in the Ultralytics HUB, but you are trying to load it locally, download it first via the HUB Web interface or CLI. Alternatively, you can directly reference your HUB-hosted dataset by ensuring the .yaml file's URL is correct.
  4. Autodownload Enablement:

    • If your dataset isn't present and autodownload is disabled (autodownload=False by default in ultralytics), set it to True to allow the script to attempt downloading the dataset automatically:
      results = model.train(data='/datasets/a2O66UeTvAEqSUPPff6l/lane/lane.yaml', autodownload=True)

Verify Dataset Structure

If you are unsure about the dataset format for YOLO models, refer to the Dataset Preparation Guide to ensure that it adheres to YOLO requirements.

Additional Notes

  • Since you're using hub.login() with a token, ensure that login completes successfully and corresponds to your HUB account where the models or datasets reside.
  • The error message you provided mentions '/content/datasets/D:python新/建文件夹.... Please note that special characters or uncommon directory structures can sometimes cause path resolution issues. Moving your dataset to a simple directory path (e.g., /content/datasets/lane) may help.

If you've confirmed the dataset exists and the paths are correct but the issue persists, try re-validating your setup with the following:

  1. Update to the latest version:
    pip install ultralytics --upgrade
  2. Run the following for additional debug info:
    from ultralytics import YOLO
    model = YOLO('<model-url>')
    print(model.overview())

Let us know if further clarification is needed! 😊

@yeongnamtan
Copy link
Author

yeongnamtan commented Dec 9, 2024 via email

@yeongnamtan
Copy link
Author

@yeongnamtan Thank you for bringing this issue to our attention. To help us investigate and resolve the problem efficiently, could you please share the Model ID?

You can find it in the URL when accessing the model in the HUB Web, for example: https://hub.ultralytics.com/models/7wzkDSKNMcwkPTs8ZVJC.

Model ID: 7wzkDSKNMcwkPTs8ZVJC

Providing the Model ID will allow us to locate your account and gain a better understanding of the issue. We sincerely apologize for any inconvenience this has caused and appreciate your patience as we work on a resolution.

Looking forward to your response.

HI @YogendraSingh Any update on this issue ? I am doing a demo to a potential customer

On Tue, Dec 3, 2024 at 8:26 PM Yogendra Singh @.> wrote: @yeongnamtan https://github.com/yeongnamtan Thank you for providing the Model ID. We have successfully located your account and informed our team to investigate and resolve the issue. We appreciate your patience and will keep you updated on the progress. — Reply to this email directly, view it on GitHub <#941 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AZCTQZMRIINLUK43QK46VBT2DWPP5AVCNFSM6AAAAABS5PJYXCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKMJUGQZDKNJZGQ . You are receiving this because you were mentioned.Message ID: @.>

@yogendrasinghx @glenn-jocher do you have an update? I am planning to do a demo to a potential customer and was thinking of using ultralytics hub to show customer how easy it is to use

@yogendrasinghx
Copy link
Member

Hi @yeongnamtan,

Thank you for your patience. We have successfully reproduced this issue on our end and have reported it to the development team. They are actively working on a fix.

As soon as I receive an update from the development team, I will let you know. Please rest assured that this issue is a priority and will be addressed in the next release.

We appreciate your understanding and thank you for bringing this to our attention.

@yeongnamtan
Copy link
Author

thank you @yogendrasinghx Hope we can have the fix asap.

@john-rocky
Copy link

@yeongnamtan
Thank you for reporting the issue.
We have released version 0.9.30 on Google Play Store which fixes the issue where private models could not be loaded in the app.
You can use private models in this version.
Please check it out.
https://play.google.com/store/apps/details?id=com.ultralytics.ultralytics_app

@john-rocky john-rocky added the fixed Bug has been resolved label Dec 19, 2024
@yeongnamtan
Copy link
Author

@john-rocky the issue doesn't seem to be fixed. My private model predicts 2 classes : vegetables and meat but what I get is completely something else when I use my private model. I tried multiple times and it shows the same results.

@john-rocky john-rocky removed the fixed Bug has been resolved label Dec 19, 2024
@john-rocky
Copy link

@yeongnamtan
Thank you for reporting this. We will look into it again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
app Related to application functionality or features bug Something isn't working HUB Ultralytics HUB issues
Projects
None yet
Development

No branches or pull requests

7 participants