diff --git a/modelscope/outputs.py b/modelscope/outputs.py index 30860f29..0937e441 100644 --- a/modelscope/outputs.py +++ b/modelscope/outputs.py @@ -159,10 +159,17 @@ TASK_OUTPUTS = { # } Tasks.action_recognition: [OutputKeys.LABELS], + # live category recognition result for single video + # { + # "scores": [0.885272, 0.014790631, 0.014558001], + # 'labels': ['修身型棉衣', '高腰牛仔裤', '休闲连体裤'] + # } + Tasks.live_category: [OutputKeys.SCORES, OutputKeys.LABELS], + # video category recognition result for single video # { - # "scores": [0.7716429233551025] - # "labels": ['生活>>好物推荐'], + # "scores": [0.7716429233551025], + # "labels": ['生活>>好物推荐'] # } Tasks.video_category: [OutputKeys.SCORES, OutputKeys.LABELS], diff --git a/modelscope/pipelines/cv/live_category_pipeline.py b/modelscope/pipelines/cv/live_category_pipeline.py index b7f3202e..c16ba6ba 100644 --- a/modelscope/pipelines/cv/live_category_pipeline.py +++ b/modelscope/pipelines/cv/live_category_pipeline.py @@ -85,7 +85,7 @@ class LiveCategoryPipeline(Pipeline): for label_key in label_keys: if label_info[label_key] not in label_str: label_str.append(label_info[label_key]) - labels.append('>>'.join(label_str)) + labels.append(label_str[-1]) return {OutputKeys.SCORES: list(scores), OutputKeys.LABELS: labels} def postprocess(self, inputs: Dict[str, Any]) -> Dict[str, Any]: diff --git a/modelscope/utils/constant.py b/modelscope/utils/constant.py index ef3c4f4f..4d4ad9e9 100644 --- a/modelscope/utils/constant.py +++ b/modelscope/utils/constant.py @@ -61,7 +61,6 @@ class CVTasks(object): video_category = 'video-category' video_embedding = 'video-embedding' - virtual_try_on = 'virtual-try-on'