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

Some questions about the implementation #9

Open
palatos opened this issue Nov 2, 2020 · 0 comments
Open

Some questions about the implementation #9

palatos opened this issue Nov 2, 2020 · 0 comments

Comments

@palatos
Copy link

palatos commented Nov 2, 2020

Thank you for this great and straight forward implementation of this technique!
I was going through the code to understand a bit more of how it works, and I'm curious about some parts:

There seem to be two blurred images:

blurred_img1 = cv2.GaussianBlur(img, (11, 11), 5)
blurred_img2 = np.float32(cv2.medianBlur(original_img, 11))/255
blurred_img_numpy = (blurred_img1 + blurred_img2) / 2

Futher ahead only blurred_img2 is used for training the mask:

img = preprocess_image(img)
blurred_img = preprocess_image(blurred_img2)
mask = numpy_to_torch(mask_init)

But for heatmap generation we use the average of the two blurs:
save(upsampled_mask, original_img, blurred_img_numpy)

I was a bit confused by this. Is there a reason why it is done in this way?

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

1 participant