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

How to process images in real time #53

Open
peiyunju opened this issue Nov 2, 2022 · 5 comments
Open

How to process images in real time #53

peiyunju opened this issue Nov 2, 2022 · 5 comments

Comments

@peiyunju
Copy link

peiyunju commented Nov 2, 2022

Hello, I would like to ask, for this algorithm, can I process some of my own pictures in real time, and from which aspects to improve it

@xwjabc
Copy link
Owner

xwjabc commented Nov 2, 2022

Yes, it is possible. You may need to modify the test function (see: https://github.com/xwjabc/hed/blob/master/hed.py#L257) and use your own image as input.

@peiyunju
Copy link
Author

peiyunju commented Nov 4, 2022

Excuse me, if I use the canny edge processing algorithm, how do I get ODS and OIS? Because I want to use ODS and OIS to compare canny and HED algorithms to compare their gaps in processing at the edge.

@peiyunju peiyunju closed this as completed Nov 4, 2022
@peiyunju peiyunju reopened this Nov 4, 2022
@xwjabc
Copy link
Owner

xwjabc commented Nov 4, 2022

The current edge evaluation process in HED is:
(1) Generate probabilistic edge maps w/ HED network (i.e., .mat files in mat folder and png images in png folder) -> (2) NMS process to convert the probabilistic edge maps to thinned edge maps (i.e., png images in the nms folder) -> (3) Evaluate the thinned edge maps.

For Canny edge detection algorithm, I think the outputted edge maps are already processed after NMS. Thus, you may directly evaluate such edge maps using step (3). You can refer to this part for the evaluation of the thinned edge maps.

@peiyunju
Copy link
Author

peiyunju commented Nov 6, 2022

After taking a look at your test code, I would like to know how to generate a MATAT file from a PNG image of Canny

@peiyunju peiyunju closed this as completed Nov 6, 2022
@peiyunju peiyunju reopened this Nov 6, 2022
@xwjabc
Copy link
Owner

xwjabc commented Nov 6, 2022

I think you do no need to generate MAT file for the step (3) since its input format is png. You can directly feed the generated png files from Canny edge detector into the evaluation step.

If you still need to save images as MAT files, you can use savemat() function in scipy.io. See this line for an example.

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

2 participants