Browse Source

[to #42322933] modify img_embedding type for image_reid_person

modify img_embedding type for image_reid_person
        Link: https://code.alibaba-inc.com/Ali-MaaS/MaaS-lib/codereview/10477972
master
lee.lcy yingda.chen 3 years ago
parent
commit
0bc9660fcc
1 changed files with 1 additions and 0 deletions
  1. +1
    -0
      modelscope/pipelines/cv/image_reid_person_pipeline.py

+ 1
- 0
modelscope/pipelines/cv/image_reid_person_pipeline.py View File

@@ -53,6 +53,7 @@ class ImageReidPersonPipeline(Pipeline):
def forward(self, input: Dict[str, Any]) -> Dict[str, Any]: def forward(self, input: Dict[str, Any]) -> Dict[str, Any]:
img = input['img'] img = input['img']
img_embedding = self.model(img) img_embedding = self.model(img)
img_embedding = img_embedding.detach().cpu().numpy()
return {OutputKeys.IMG_EMBEDDING: img_embedding} return {OutputKeys.IMG_EMBEDDING: img_embedding}


def postprocess(self, inputs: Dict[str, Any]) -> Dict[str, Any]: def postprocess(self, inputs: Dict[str, Any]) -> Dict[str, Any]:


Loading…
Cancel
Save