Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PaddleSeg (OCRNet and PPliteSeg) output is not correct #2489

Closed
universea opened this issue Jul 10, 2024 · 2 comments
Closed

PaddleSeg (OCRNet and PPliteSeg) output is not correct #2489

universea opened this issue Jul 10, 2024 · 2 comments
Assignees

Comments

@universea
Copy link

universea commented Jul 10, 2024

Environment

FastDeploy version:1.0.7
OS Platform: e.g. Linux x64
Hardware: e.g. Nvidia GPU 4090 CUDA 12.4 CUDNN 8.3
Program Language: e.g. Python 3.10

Problem description

I have try different options:

"option.use_gpu()
option.use_paddle_backend() # Paddle Inference
option.use_trt_backend() # TensorRT
option.use_openvino_backend() # OpenVINO
option.use_ort_backend() # ONNX Runtime"

All the output is zero.

1720575196977
@priyankavgalagali
Copy link

have you tried with other images and also can you tell which kind of images is that? if possible?

@universea
Copy link
Author

universea commented Jul 12, 2024

have you tried with other images and also can you tell which kind of images is that? if possible?

Thanks for your reply, I have tried to use the result to draw the mask by using matplotlib, it is ok now.

But this api vis_im = fd.vision.vis_segmentation(im, result, weight=0.5) not work.

import matplotlib.pyplot as plt

shape = result.shape # 例如 [544, 656]
label_map = result.label_map # 例如 [0, 0, 0, ..., 0]

label_map_np = np.array(label_map)

label_map_np = label_map_np.reshape(shape)

print("Label Map Shape:", label_map_np.shape)

original_image = im

masked_image = original_image.copy()
masked_image[label_map_np > 0] = [255, 0, 0] # 用红色显示掩码部分

plt.figure(figsize=(12, 6))
plt.subplot(1, 2, 1)
plt.title("Original Image")
plt.imshow(cv2.cvtColor(original_image, cv2.COLOR_BGR2RGB))

plt.subplot(1, 2, 2)
plt.title("Masked Image")
plt.imshow(cv2.cvtColor(masked_image, cv2.COLOR_BGR2RGB))

plt.show()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants