mirror of
https://github.com/modelscope/modelscope.git
synced 2026-09-02 20:21:46 +02:00
Revert "[to #42322933]formalize image matting"
This reverts commit de3ea0db54.
This commit is contained in:
@@ -7,7 +7,7 @@ import PIL
|
||||
|
||||
from modelscope.pipelines.base import Input
|
||||
from modelscope.preprocessors import load_image
|
||||
from modelscope.utils.constant import TF_GRAPH_FILE, Tasks
|
||||
from modelscope.utils.constant import Tasks
|
||||
from modelscope.utils.logger import get_logger
|
||||
from ..base import Pipeline
|
||||
from ..builder import PIPELINES
|
||||
@@ -24,7 +24,7 @@ class ImageMattingPipeline(Pipeline):
|
||||
import tensorflow as tf
|
||||
if tf.__version__ >= '2.0':
|
||||
tf = tf.compat.v1
|
||||
model_path = osp.join(self.model, TF_GRAPH_FILE)
|
||||
model_path = osp.join(self.model, 'matting_person.pb')
|
||||
|
||||
config = tf.ConfigProto(allow_soft_placement=True)
|
||||
config.gpu_options.allow_growth = True
|
||||
|
||||
@@ -75,12 +75,3 @@ class Hubs(object):
|
||||
# in order to avoid conflict with huggingface
|
||||
# config file we use maas_config instead
|
||||
CONFIGFILE = 'maas_config.json'
|
||||
|
||||
README_FILE = 'README.md'
|
||||
TF_SAVED_MODEL_FILE = 'saved_model.pb'
|
||||
TF_GRAPH_FILE = 'tf_graph.pb'
|
||||
TF_CHECKPOINT_FOLDER = 'tf_ckpts'
|
||||
TF_CHECKPOINT_FILE = 'checkpoint'
|
||||
TORCH_MODEL_FILE = 'pytorch_model.bin'
|
||||
TENSORFLOW = 'tensorflow'
|
||||
PYTORCH = 'pytorch'
|
||||
|
||||
Reference in New Issue
Block a user