feat design 功能迁移
This commit is contained in:
38
app/service/design/items/bottom.py
Normal file
38
app/service/design/items/bottom.py
Normal file
@@ -0,0 +1,38 @@
|
||||
from .builder import ITEMS
|
||||
from .clothing import Clothing
|
||||
|
||||
|
||||
@ITEMS.register_module()
|
||||
class Bottom(Clothing):
|
||||
def __init__(self, pipeline, **kwargs):
|
||||
if pipeline is None:
|
||||
pipeline = [
|
||||
dict(type='LoadImageFromFile', path=kwargs['path'], color=kwargs['color'], print_dict=kwargs['print']),
|
||||
dict(type='KeypointDetection'),
|
||||
dict(type='ContourDetection'),
|
||||
dict(type='Painting', painting_flag=True),
|
||||
dict(type='PrintPainting', print_flag=True),
|
||||
dict(type='Scaling'),
|
||||
dict(type='Split'),
|
||||
# dict(type='ImageShow', key=['image', 'mask', 'pattern_image', 'print_image']),
|
||||
]
|
||||
kwargs.update(pipeline=pipeline)
|
||||
super(Bottom, self).__init__(**kwargs)
|
||||
|
||||
|
||||
@ITEMS.register_module()
|
||||
class Trousers(Bottom):
|
||||
def __init__(self, pipeline=None, **kwargs):
|
||||
super(Trousers, self).__init__(pipeline, **kwargs)
|
||||
|
||||
|
||||
@ITEMS.register_module()
|
||||
class Skirt(Bottom):
|
||||
def __init__(self, pipeline=None, **kwargs):
|
||||
super(Skirt, self).__init__(pipeline, **kwargs)
|
||||
|
||||
|
||||
@ITEMS.register_module()
|
||||
class Bottoms(Bottom):
|
||||
def __init__(self, pipeline=None, **kwargs):
|
||||
super(Bottoms, self).__init__(pipeline, **kwargs)
|
||||
Reference in New Issue
Block a user