mirror of
https://github.com/PaddlePaddle/FastDeploy.git
synced 2025-10-12 12:00:30 +08:00
Update paddleseg grpc client
This commit is contained in:
@@ -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)
|
|
||||||
|
Reference in New Issue
Block a user