2024-05-28 15:22:11 +08:00
|
|
|
from .builder import ITEMS
|
|
|
|
|
from .clothing import Clothing
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ITEMS.register_module()
|
|
|
|
|
class Top(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'),
|
2024-07-24 15:21:06 +08:00
|
|
|
# dict(type='ContourDetection'),
|
|
|
|
|
dict(type='Segmentation'),
|
2024-05-28 15:22:11 +08:00
|
|
|
dict(type='Painting', painting_flag=True),
|
|
|
|
|
dict(type='PrintPainting', print_flag=True),
|
|
|
|
|
# dict(type='ImageShow', key=['image', 'mask', 'seg_visualize', 'pattern_image']),
|
|
|
|
|
dict(type='Scaling'),
|
|
|
|
|
dict(type='Split'),
|
|
|
|
|
]
|
|
|
|
|
kwargs.update(pipeline=pipeline)
|
|
|
|
|
super(Top, self).__init__(**kwargs)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ITEMS.register_module()
|
|
|
|
|
class Blouse(Top):
|
|
|
|
|
def __init__(self, pipeline=None, **kwargs):
|
|
|
|
|
super(Blouse, self).__init__(pipeline, **kwargs)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ITEMS.register_module()
|
|
|
|
|
class Outwear(Top):
|
|
|
|
|
def __init__(self, pipeline=None, **kwargs):
|
|
|
|
|
super(Outwear, self).__init__(pipeline, **kwargs)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ITEMS.register_module()
|
|
|
|
|
class Dress(Top):
|
|
|
|
|
def __init__(self, pipeline=None, **kwargs):
|
|
|
|
|
super(Dress, self).__init__(pipeline, **kwargs)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Men's clothing
|
|
|
|
|
@ITEMS.register_module()
|
|
|
|
|
class Tops(Top):
|
|
|
|
|
def __init__(self, pipeline=None, **kwargs):
|
|
|
|
|
super(Tops, self).__init__(pipeline, **kwargs)
|