Hello all,
Is there an InceptionV3 android example which is as simplified as alexnet?
Thanks,
Nitin
Hello all,
Is there an InceptionV3 android example which is as simplified as alexnet?
Thanks,
Nitin
Opinions expressed in the content posted here are the personal opinions of the original authors, and do not necessarily reflect those of Qualcomm Incorporated or its subsidiaries (“Qualcomm”). The content is provided for informational purposes only and is not meant to be an endorsement or representation by Qualcomm or any other party. This site may also provide links or references to non-Qualcomm sites and resources. Qualcomm makes no representations, warranties, or other commitments whatsoever about any non-Qualcomm sites or third-party resources that may be referenced, accessible from, or linked to this site.
Hi,
The Android example in SNPE v1.6.0 is only for AlexNet, but you can modify the source codes by following these tips:
AlexNet uses (data, prob) as (input, output) layer names.
Inception v3 (default model w/o retraining) uses (Mul:0, softmax:0) as (input, output) layer names.
For example, you can modify (all the r, g, b have to be modified)
b = ((rgb) & 0xFF) - meanImage.get();
to
b = (((rgb) & 0xFF) - imageMean) / imageStd; // imageMean = 128, imageStd = 128.0f
Note: Inception does not use meanImage.
Thanks for the detailed insight. Let me try this.
Regards,
Nitin
it works,thanks
HI,
Can you please explain the significance of imageMean = 128, imageStd = 128.0f
Thank you that worked for me too! :) That was the hint I needed to check the image normalization steps of SSD and COCO.
I think it would help if that was mentioned in the Qualcomm sNPE SDK docs.
This is normalisation which means taking the image and removing any differences between it and the average image in the training set.
This is done during training and so if you don't do it during inference the accuracy wont be there.
The way normalisation is done is usually across each color channel the average value across the entire training set is subtracted from each image and its pixels. So that for example if bright red is over represented in the data set it doesnt learn a large bias towards images with those colours.
The model is SSD Mobilenet v1 COCO, which means it was trained on the COCO image set.
However I don't believe 128 is correct as the average for all pixel values, so I looked at some other examples: