这是一个通用商品的分割模型,输入一个商品宣传图,输出分割结果
模型结构基于F3Net,同时优化了Loss的方式
在ModelScope框架上,提供商品图片,得到分割的结果
from modelscope.outputs import OutputKeys
from modelscope.pipelines import pipeline
from modelscope.utils.constant import Tasks
product_segmentation = pipeline(Tasks.product_segmentation, model='damo/cv_F3Net_product-segmentation')
result_status = product_segmentation({'input_path': 'data/test/images/product_segmentation.jpg'})
result = result_status[OutputKeys.MASKS]
input_path为输入图片的路径,result为numpy格式的mask
训练数据来自互联网搜索的图片
@inproceedings{F3Net,
title = {F3Net: Fusion, Feedback and Focus for Salient Object Detection},
author = {Jun Wei, Shuhui Wang, Qingming Huang},
booktitle = {AAAI Conference on Artificial Intelligence (AAAI)},
year = {2020}
}