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

I write test model code, but the model output is not mask

shakey-cuimiao opened this issue · comments

I write test model code, but the model output is not mask, there is no result as shown in the picture below, can you tell me how to get
image

---- coding:utf-8 ----

Deeplab Demo

import os
import numpy as np
from PIL import Image
import tempfile
from six.moves import urllib

import tensorflow as tf
import cv2
import time

class DeepLabModel(object):
"""
加载 DeepLab 模型;
推断 Inference.
"""
INPUT_TENSOR_NAME = 'Input:0'
OUTPUT_TENSOR_NAME = 'Output:0'
INPUT_SIZE = 513
FROZEN_GRAPH_NAME = 'frozen_inference_graph'

def __init__(self, tarball_path):
    """
    Creates deeplab model.
    """
    self.graph = tf.Graph()