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

Can you provide the code for Visualizing Model Results? #12

Closed
lizhyuxi opened this issue Jul 30, 2023 · 3 comments
Closed

Can you provide the code for Visualizing Model Results? #12

lizhyuxi opened this issue Jul 30, 2023 · 3 comments

Comments

@lizhyuxi
Copy link

Thank a lot for your response to my previous question about evaluation result.
I was wondering if you have any code available for the visualization?
If so, could you kindly point me in the right direction or provide a link to the repository?
It will be helpful for my research.
Thanks in advance.

@lizhyuxi lizhyuxi closed this as not planned Won't fix, can't repro, duplicate, stale Aug 11, 2023
@henghuiding
Copy link
Owner

A simple example is as follows:

from vis import vis_mask
import numpy as np
from PIL import Image
import cv2

frm = np.array(img) - float(img.min())
frm = (frm / frm.max() * 255).astype(np.uint8)
frm = frm.transpose(1, 2, 0)
frm = cv2.cvtColor(frm, cv2.COLOR_RGB2BGR)
mask = mask.numpy()
img_c = vis_mask(frm, mask, alpha=0.3)
img_c = cv2.cvtColor(img_c, cv2.COLOR_RGB2BGR)
Image.fromarray(img_c)

@Yeemkt
Copy link

Yeemkt commented Dec 20, 2023

A simple example is as follows:

from vis import vis_mask
import numpy as np
from PIL import Image
import cv2

frm = np.array(img) - float(img.min())
frm = (frm / frm.max() * 255).astype(np.uint8)
frm = frm.transpose(1, 2, 0)
frm = cv2.cvtColor(frm, cv2.COLOR_RGB2BGR)
mask = mask.numpy()
img_c = vis_mask(frm, mask, alpha=0.3)
img_c = cv2.cvtColor(img_c, cv2.COLOR_RGB2BGR)
Image.fromarray(img_c)

sorry i can't find the mask in the result folder
could u tell me ,thanks

@lcl-git-3d
Copy link

Hello,have you solved this problem?Can you provide the detailed code for visualizing model results? @henghuiding

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

4 participants