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

Android APP and Load Model #648

Open
1 task done
togro opened this issue Apr 18, 2024 · 15 comments
Open
1 task done

Android APP and Load Model #648

togro opened this issue Apr 18, 2024 · 15 comments
Labels
question A HUB question that does not involve a bug

Comments

@togro
Copy link

togro commented Apr 18, 2024

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

@togro togro added the question A HUB question that does not involve a bug label Apr 18, 2024
@pderrenger
Copy link
Member

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
Copy link
Author

togro commented Apr 19, 2024 via email

@pderrenger
Copy link
Member

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
Copy link
Author

togro commented Apr 20, 2024 via email

@pderrenger
Copy link
Member

@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
Copy link
Author

togro commented Apr 21, 2024 via email

@pderrenger
Copy link
Member

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
Copy link
Author

togro commented Apr 25, 2024 via email

@pderrenger
Copy link
Member

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
Copy link
Author

togro commented Apr 26, 2024 via email

@pderrenger
Copy link
Member

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
Copy link
Author

togro commented Apr 26, 2024 via email

@pderrenger
Copy link
Member

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
Copy link

hncvj commented May 10, 2024

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

@pderrenger
Copy link
Member

@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! 🌟

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question A HUB question that does not involve a bug
Projects
None yet
Development

No branches or pull requests

3 participants