ultralytics / hub

Ultralytics HUB tutorials and support
https://hub.ultralytics.com
GNU Affero General Public License v3.0
107 stars 11 forks source link

Android APP and Load Model #648

Open togro opened 3 weeks ago

togro commented 3 weeks ago

Search before asking

Question

We generate a model , called "pavimentos" and click on preview tab and click on export en "Ultralytics HUB Android" , then generate model (24.8 MB).

When I use with my phone with other models works fine (oneplus 9) , but when select "pavimentos" (model for detect crack paviments) , app detect class used for pre-trained , but no included .

Like en screenshot below , cars , person etc .

I think that with select "pavimentos" must be detect cracks ... but no other classes from pre-traind models

I test on web Image test upload for testing and works fine the model.

What can I do so that it can detect what the model was trained for?

Additional

Here I assume that what I trained does not include the classes so I shouldn't show them, right?

image

pderrenger commented 3 weeks ago

Hello! 🌟 It sounds like you're experiencing an issue where your custom model "pavimentos" is not correctly detecting the classes it was trained on, but rather defaulting to pre-trained model classes when used within the Ultralytics HUB Android app.

Firstly, ensure that the model has been exported correctly for Android by following the export process again, making sure to select your custom model without any errors. After exporting, reinstall or update the model on your Android app to ensure it's the latest version.

Next, double-check that the model is indeed the one being loaded in the Android app. Sometimes, cache or previously loaded models might interfere, so a fresh install might help.

If the problem persists, consider whether the Android app version you're using is fully compatible with the model format exported from the HUB. Sometimes, updates in the app or the HUB could lead to compatibility issues. Make sure both your app and model are up-to-date.

If these steps don't resolve the issue, please provide more detailed information about the steps you’ve followed and any specific error messages you're receiving. This will help us help you more effectively!

Feel free to consult the Ultralytics HUB Docs (https://docs.ultralytics.com/hub) for additional guidance on exporting and using models. Thank you for reaching out, and we hope to get your model working on your Android device soon!

togro commented 3 weeks ago

I try to export again but not see button for that... 

How can export again? 

El jue, abr 18, 2024, 09:28 p. m. Paula Derrenger @.***> escribió:

Hello! 🌟 It sounds like you're experiencing an issue where your custom model "pavimentos" is not correctly detecting the classes it was trained on, but rather defaulting to pre-trained model classes when used within the Ultralytics HUB Android app. Firstly, ensure that the model has been exported correctly for Android by following the export process again, making sure to select your custom model without any errors. After exporting, reinstall or update the model on your Android app to ensure it's the latest version. Next, double-check that the model is indeed the one being loaded in the Android app. Sometimes, cache or previously loaded models might interfere, so a fresh install might help. If the problem persists, consider whether the Android app version you're using is fully compatible with the model format exported from the HUB. Sometimes, updates in the app or the HUB could lead to compatibility issues. Make sure both your app and model are up-to-date. If these steps don't resolve the issue, please provide more detailed information about the steps you’ve followed and any specific error messages you're receiving. This will help us help you more effectively! Feel free to consult the Ultralytics HUB Docs (https://docs.ultralytics.com/hub) for additional guidance on exporting and using models. Thank you for reaching out, and we hope to get your model working on your Android device soon! —Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.> [ { @.": "http://schema.org", @.": "EmailMessage", "potentialAction": { @.": "ViewAction", "target": "https://github.com/ultralytics/hub/issues/648#issuecomment-2065584478", "url": "https://github.com/ultralytics/hub/issues/648#issuecomment-2065584478", "name": "View Issue" }, "description": "View this Issue on GitHub", "publisher": { @.***": "Organization", "name": "GitHub", "url": "https://github.com" } } ]

pderrenger commented 3 weeks ago

Hello! If you're not seeing the export button, it might be due to a UI issue or possibly a step that was missed in the process. To export your model again, please make sure you are on the model's specific page within the Ultralytics HUB. From there, navigate to the "Export" section where you should see options to export your model, including for the Ultralytics HUB Android format.

If the export option is still not visible, try refreshing the page or clearing your browser's cache as sometimes this can resolve display issues. Don't forget to ensure that you are logged in and have the necessary permissions to export models.

If after these steps you still face issues, please do not hesitate to reach out again with any error messages or screenshots of what you are seeing. Our aim is to help you get back on track as smoothly as possible. 🚀

togro commented 3 weeks ago

Ok, Ok, I will do the export on this page:I do, donwload model , but that I think not works for wath see app android .I was talking about this page (to clarify):

      On abr. 20 2024, at 2:14 am, Paula Derrenger ***@***.***> wrote:

Hello! If you're not seeing the export button, it might be due to a UI issue or possibly a step that was missed in the process. To export your model again, please make sure you are on the model's specific page within the Ultralytics HUB. From there, navigate to the "Export" section where you should see options to export your model, including for the Ultralytics HUB Android format. If the export option is still not visible, try refreshing the page or clearing your browser's cache as sometimes this can resolve display issues. Don't forget to ensure that you are logged in and have the necessary permissions to export models. If after these steps you still face issues, please do not hesitate to reach out again with any error messages or screenshots of what you are seeing. Our aim is to help you get back on track as smoothly as possible. 🚀

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>

pderrenger commented 3 weeks ago

@togro glad to hear you've managed to download your model! 🎉 If the app isn't showing the expected results, it could be an issue with the model integration in the Android app. Please ensure you've replaced the old model file with the new one you just exported, sometimes an old model file might mistakenly remain in use.

After updating the model in your app, remember to also restart the app or clear its cache to ensure it's using the newly integrated model.

If challenges persist, it might help to verify the model's functionality on your desktop using a sample prediction script to confirm it behaves as expected before integrating into the Android app again.

Should you need further assistance, feel free to share additional details or error logs. We're here to help!

togro commented 3 weeks ago

HiI's not working , I erase data and login again .The same ...Now is showing 0B en model and 4 (???) models :ANDROID:WEB :I have Oneplus 9 + android 14 .

      On abr. 20 2024, at 11:06 pm, Paula Derrenger ***@***.***> wrote:

@togro glad to hear you've managed to download your model! 🎉 If the app isn't showing the expected results, it could be an issue with the model integration in the Android app. Please ensure you've replaced the old model file with the new one you just exported, sometimes an old model file might mistakenly remain in use. After updating the model in your app, remember to also restart the app or clear its cache to ensure it's using the newly integrated model. If challenges persist, it might help to verify the model's functionality on your desktop using a sample prediction script to confirm it behaves as expected before integrating into the Android app again. Should you need further assistance, feel free to share additional details or error logs. We're here to help!

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>

pderrenger commented 3 weeks ago

Hi there! It sounds like you're encountering some issues with model visibility and recognition within the app. If your model is showing as 0B and you're seeing unexpected models listed, this typically points to a syncing or fetching problem within the app itself or a possible issue with the model file.

A quick suggestion would be to completely uninstall and then reinstall the Android app on your device to ensure a fresh environment, which might resolve any corrupt cache issues. Also, double-check that the model you're trying to use hasn’t been corrupted during download or export. You can verify its integrity by loading it in a desktop environment first, if possible.

If the problem persists after these steps, there may be a deeper issue at play that could require a closer look at the app's compatibility with Android 14 on your OnePlus 9 or potentially an update/patch from our end to address this specific issue.

Please keep us posted on how it goes after trying the reinstall, and we'll do our best to further assist you! 🚀

togro commented 2 weeks ago

Hi,Is'nt working , I try remove data , uninstall , etc .I think that your app android have a problem with android backup .Is very strange , all times erasing all , when I re-install all works fine without login again .This tell me that some backup on automatically is happening .Best Regards

      On abr. 21 2024, at 5:46 pm, Paula Derrenger ***@***.***> wrote:

Hi there! It sounds like you're encountering some issues with model visibility and recognition within the app. If your model is showing as 0B and you're seeing unexpected models listed, this typically points to a syncing or fetching problem within the app itself or a possible issue with the model file. A quick suggestion would be to completely uninstall and then reinstall the Android app on your device to ensure a fresh environment, which might resolve any corrupt cache issues. Also, double-check that the model you're trying to use hasn’t been corrupted during download or export. You can verify its integrity by loading it in a desktop environment first, if possible. If the problem persists after these steps, there may be a deeper issue at play that could require a closer look at the app's compatibility with Android 14 on your OnePlus 9 or potentially an update/patch from our end to address this specific issue. Please keep us posted on how it goes after trying the reinstall, and we'll do our best to further assist you! 🚀

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>

pderrenger commented 2 weeks ago

Hi there,

Thanks for the update and your effort in troubleshooting. It sounds like the issue might indeed be related to Android's automatic backup and restore feature, which can restore app data upon reinstallation, leading to the same issues persisting.

A workaround could involve disabling Google's backup feature temporarily before uninstalling and reinstalling the app. You can usually find this option in your phone's settings, often under "System" -> "Backup", where you can turn off the "Back up to Google Drive" option. After doing this, try uninstalling the app, ensure that the backup feature is still turned off, and then reinstall the app.

If this resolves the issue, it might be a good idea to provide feedback on the Android app's handling of settings and data during backups, so we can look into improving this aspect.

Please let us know how it goes, and if the problem persists, we'll explore further steps to assist you. 🌟

togro commented 2 weeks ago

Ok, that install a fresh app with that hint and I can login again.Finally I realized that I didn't understand what you were telling me about the download button.Now that I installed again, the download buttons momentarily appeared in a horizontal bar.But after a while they disappeared and the bar became vertical, if you look closely, "pavements" appears, but there is no download button and the search menus do not give the option either (although when installing again they did appear)I attached the screenshots of the appBest Regards

      On abr. 25 2024, at 6:17 pm, Paula Derrenger ***@***.***> wrote:

Hi there, Thanks for the update and your effort in troubleshooting. It sounds like the issue might indeed be related to Android's automatic backup and restore feature, which can restore app data upon reinstallation, leading to the same issues persisting. A workaround could involve disabling Google's backup feature temporarily before uninstalling and reinstalling the app. You can usually find this option in your phone's settings, often under "System" -> "Backup", where you can turn off the "Back up to Google Drive" option. After doing this, try uninstalling the app, ensure that the backup feature is still turned off, and then reinstall the app. If this resolves the issue, it might be a good idea to provide feedback on the Android app's handling of settings and data during backups, so we can look into improving this aspect. Please let us know how it goes, and if the problem persists, we'll explore further steps to assist you. 🌟

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>

pderrenger commented 2 weeks ago

Hi there!

Glad to hear the fresh install helped you log in again! 🎉 Regarding the download button issue, it sounds like a UI glitch might be causing the buttons to disappear or change orientation unexpectedly.

A quick tip for when items in the UI don't appear as expected: try refreshing the app or, if feasible, force stop and restart the app. This can often resolve temporary UI glitches. If the download buttons appeared initially but then disappeared, it might also help to clear the app's cache (no need to uninstall this time), as this can sometimes fix display issues without removing your data.

If after these steps the problem still exists, it could be helpful to know the specific device orientation (portrait or landscape) in which the issue occurs, as it might be related to how the app's UI responds to changes in orientation.

We appreciate your patience and are here to help get this sorted!

Best regards.

togro commented 2 weeks ago

HiGlad to hear the fresh install helped you log in again! 🎉 Regarding the download button issue, it sounds like a UI glitch might be causing the buttons to disappear or change orientation unexpectedly.A quick tip for when items in the UI don't appear as expected: try refreshing the app or, if feasible, force stop and restart the app. This can often resolve temporary UI glitches. If the download buttons appeared initially but then disappeared, it might also help to clear the app's cache (no need to uninstall this time), as this can sometimes fix display issues without removing your data.I do this , the same ...If after these steps the problem still exists, it could be helpful to know the specific device orientation (portrait or landscape) in which the issue occurs, as it might be related to how the app's UI responds to changes in orientation.I can't put app on landscape , may be not support landscape , other apps works fine changing from portrait to landscape .I have un oneplus 9R , updated to android 14 .Best Regards We appreciate your patience and are here to help get this sorted!Best regards.—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>

pderrenger commented 2 weeks ago

Hi there!

Thank you for the update and for trying out those steps. 🙏 If refreshing the app, restarting, and clearing the cache did not resolve the issue, and given your OnePlus 9R doesn't switch the app to landscape mode (indicating the app may not support landscape orientation), it sounds like we're dealing with a device-specific or OS-level compatibility issue with Android 14.

At this moment, I recommend checking if all system updates are applied to your device and if there are any app updates available that might not have been automatically downloaded yet. Sometimes, these updates include fixes for compatibility issues that have been identified after the release of new Android versions.

If the problem persists even after ensuring everything is up-to-date, it would be immensely helpful for our development team if you could share a bug report. While we work on a patch or a more permanent solution, keeping your app in portrait mode and possibly using the web version for critical tasks could be a temporary workaround.

Your patience and support in helping us improve are greatly appreciated! Stay tuned for updates, and don't hesitate to reach out for further assistance.

Best regards.

hncvj commented 5 days ago

I'm having the same issue on my android device. Please sort this out asap.

pderrenger commented 5 days ago

@hncvj hi there!

Sorry to hear you're experiencing this issue. We're investigating it! Meanwhile, could you confirm your device model and Android version? This info will help us troubleshoot faster. Thanks for your patience! 🌟