1
12 Comments

Anyone here experienced with tensorflow?

I'm thinking of some image recognition with tensorflow on mobile. Now the question is how performant will it be on older devices? Do I run on mobile with lite or do I run on server so I can support most devices or a hybrid of both? Anyone experienced this and how did you approach your decision?

on February 17, 2021
  1. 1

    I suggest move to ONNX if you can, opens up a wider range of deployment / device options.

    1. 1

      How do I run ONNX on a mobile device?

      1. 1

        ONNX Runtime is the most mature framework that has the most bindings/compute engines for different platforms (including mobile).

        But there are also other options check https://onnx.ai for all supporters

        1. 1

          I don't see the link for mobile. Where's the link for android/ios / hybrid? What's your experience with it and performance on older devices?

          1. 1

            For iOS and Android they are still in preview so you would have to check the ONNXRuntime github page, as there is no distribution package for that one yet.

            1. 1

              Yeah, I looked into it a bit more. I'm going to pass and stick to tensorflow. The only thing else I saw that looked a bit interesting for running on older devices is ncnn.

              1. 1

                Sure that's perfectly fine if you don't mind being stuck in the google ecosystem. In my experience at least last time I tried ncnn was pretty crappy in terms of model support. But then again no idea what type of models you are trying to run. Also I would be very very careful with model pruning, looks good on paper but in reality it cuts off the long tail.

                1. 1

                  Thanks for all the suggests. I'm still learning. This is my first go round with it. I can always switch to a different frame work down the line. I'm afraid of being stuck in google ecosystem, which is what ONNX looks like it would be great for.

  2. 1

    even old devices can run quite a few models, in the end it all comes to your model size. to calculate precisely please elaborate what you plan on doing exactly.

    1. 1

      Do you have experience running on mobile? What was the spec of the old device you ran on? Did you run lite or js?

      1. 1

        not too old, I ran mediapipe (js) on mobile but again it all depends on how many parameters you run

        1. 1

          I'll like to support as many devices as possible. Training for image recognition. I tried the js, not bad on a modern device, horrible on older devices. Looks like I'm going to go native.