TensorFlowAndroidMNIST | Tensorflow MNIST demo on Android | Learning library
kandi X-RAY | TensorFlowAndroidMNIST Summary
kandi X-RAY | TensorFlowAndroidMNIST Summary
This is a demo app for Android with Tensorflow to detect handwritten digits. This Android demo is based on Tensorflow tutorial. MNIST For ML Beginners Deep MNIST for Experts
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of TensorFlowAndroidMNIST
TensorFlowAndroidMNIST Key Features
TensorFlowAndroidMNIST Examples and Code Snippets
Community Discussions
Trending Discussions on TensorFlowAndroidMNIST
QUESTION
I am creating a deep learning based android app. I have a Canvas
where I am allowing the user to draw something. Then I will pass the bitmap of the Canvas
to my model for classification. I am using Tensorflow MNIST project as the base for my project. My problem is, in the MNIST example user are allowed to draw on a 28x28
size Canvas
. But I don't want to do that because drawing on that Canvas
is pixelating the drawing. I am drawing on a full size Canvas
but while sending the Bitmap
of the canvas to the Tensorflow
model I want to resize it to 28x28
for classification (else I am getting ArrayIndexOutOfBoundException
).
How can I resize the bitmap to 28x28
without loosing information ? or any other possible solution for this ?
Here is the image of the MNIST canvas:
This is the image of my application canvas. I tried resizing it to 28x28 but I am loosing the image information:
...ANSWER
Answered 2017-Nov-15 at 01:34Let's say you have an input of 100 x 100 image and you want to resize it to 28 x 28.
100 x 100 pixels -> 10000 features
28 x 28 pixels -> 784 features
It is mathematically impossible not to lose input information while resizing.
However there are other ways to work around.
- Get rid of white areas around drawing. It will already filter most of the unnecessary pixels. Then you can apply resizing.
- Try a different interpolation method. During the resizing operation, we are using different kinds of interpolations (bilinear, bicubic etc.).
- Try to make the input images bigger for your network (resize 28 x 28 MNIST to 56 x 56 for example) and train with bigger size. Then, you will be losing less information for inference in cost of speed as it will be slightly slower to classify larger image.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install TensorFlowAndroidMNIST
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page