Update paddleseg grpc client

This commit is contained in:
felixhjh
2023-01-19 06:26:04 +00:00
parent 9d30be35a4
commit 7d145b5be3

View File

@@ -106,11 +106,7 @@ if __name__ == "__main__":
# values is batch # values is batch
for value in values: for value in values:
value = json.loads(value) value = json.loads(value)
#print(value) print(
import fastdeploy as fd "Only print the first 20 labels in label_map of SEG_RESULT")
result = fd.C.vision.SegmentationResult() value["label_map"] = value["label_map"][:20]
result.label_map = value["label_map"] print(value)
result.shape = value["shape"]
im = cv2.imread("cityscapes_demo.png")
vis_im = fd.vision.vis_segmentation(im, result, 0.5)
cv2.imwrite("seg.png", vis_im)