ailia Tech BLOG

MMFashion : A Machine Learning Model for Fashion Segmentation

This is an introduction to「MMFashion」, a machine learning model that can be used with ailia SDK. You can easily use this model to create AI applications using ailia SDK as well as many other ready-to-use ailia MODELS.


Overview

MMFashion is an open source toolbox for fashion analysis, which includes models for segmentation and landmark detection. In this article, we will introduce segmentation.

Source:https://arxiv.org/pdf/2005.08847.pdf

MMFashion: An Open-Source Toolbox for Visual Fashion AnalysisWe present MMFashion, a comprehensive, flexible and user-friendly open-source visual fashion analysis toolbox based on…arxiv.org

open-mmlab/mmfashionTechnical Report] MMFashion is an open source visual fashion analysis toolbox based on PyTorch. It is a part of the…github.com

Fashion segmentation using MMFashion

MMFashion uses MMDetection as backend, and more specifically MaskRCNN included in MMDetection to perform segmentation on the input image.

At the time of writing it is able to detect the following categories.

CATEGORY = (  
    'top', 'skirt', 'leggings', 'dress', 'outer', 'pants', 'bag',  
    'neckwear', 'headwear', 'eyeglass', 'belt', 'footwear', 'hair',  
    'skin', 'face'  
)

Source:https://github.com/open-mmlab/mmfashion/blob/master/demo/imgs/01_4_full.jpg

Export to ONNX

The procedure of exporting a model using MMDetection to ONNX is a bit complicated and it is described in the following article.

Exporting MMDetection models to ONNX formatMMDetection is an open-source object detection toolbox based on PyTorch. This article explains how to export…medium.com

How to use MMFashion with ailia SDK

To use MMFashion with the ailia SDK, use the following command to perform segmentation on the input of the webcam.

python3 mmfashion.py -v 0

ailia-ai/ailia-models(Image from https://github.com/open-mmlab/mmfashion/blob/master/demo/imgs/01_4_full.jpg) Shape : (1, 3, height, width)…github.com


ailia Inc. has developed ailia SDK, which enables cross-platform, GPU-based rapid inference.

ailia Inc. provides a wide range of services from consulting and model creation, to the development of AI-based applications and SDKs. Feel free to contact us for any inquiry.