Link to home
Start Free TrialLog in
Avatar of Bytech India
Bytech India

asked on

How to run Python code with ML technology on Android ?

I want to develop an application with objection detection technology using Python and integrate this into android application (android native- java code).
please help me out
Avatar of gelonida
gelonida
Flag of France image

Integrating python in Android is not that easy.

What  works best for some cases is to install QPython, write a python server, that listens on localhost and let the Android application communicate with it via  http / requests or to write a python web server, that you control with a web browser on your android device.

However you cannot install all available python modules on android devices. I assume you need something like OpenCV and others for
image processing. opencv will probably not work on android.

If this is not real time object detection, can't you at least for a start run a server doing the ML in the cloud and let your android app just send requests to it?
Why do you want to do this? Why not simply have a python server somewhere and communicate with it from Android via HTTP?
@girionis
I guess this depends on the exact contents of the problem
Real time object detection might require quite some data to be pushed around.
Without more context from the original poster it is not clear whether this is an option.


However I agree:
If possible this is definitely the easiest option.
This question needs an answer!
Become an EE member today
7 DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform.
View membership options
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.