nolanliou / mobile-deeplab-v3-plus

Deeplab-V3+ model with MobilenetV2/MobilenetV3 on TensorFlow for mobile deployment.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Can i know how to prediction with python

zoster0828 opened this issue · comments

image

I try to run with python.
python 3.6 / tf 1.15

but i can't get well result.
Input:0
Output:0
input image is convert to np array,
and output decode with decode_labels function.

any wrong steps i have?

please have a try with python 2.7/tf 1.12

commented

You have to normalize the image input for mobilenet. So given an input image as a numpy array, you would need to do something like:

mean = np.array([0.485, 0.456, 0.406], dtype=np.float32)
std = np.array([0.229, 0.224, 0.225], dtype=np.float32)
img = img / 255. - mean
img = img / std

How do you predict with this model?