Zero-shot Edge detection code available
mickvanhulst opened this issue · 2 comments
Dear authors,
Thanks a lot for your great work thus far, it's been incredible working with this new technology! I have been experimenting with zero-shot edge detection and I was wondering whether you would be able to provide code examples for the code used in section D.2 of your paper.
Outside of this code being available, I fail to understand how I can get probability maps out of the current model such that I can apply a Gobel filter. A simple way of achieving this would be to apply a Sigmoid over the logits, but I am keen to understand if I am thinking in the right direction.
Thank you!
Hello, thanks for your interest!
We are not intending to release the full evaluation suite as part of this repo at this time. In general, for research-related issues, please reach out to the authors directly instead of using github issues.
Here a few more details that may help clarify things:
- Logits should be able to be extracted from the AMG process before thresholding. To get the probability map for a mask, we simply do element-wise sigmoid over the logits, as you say.
- For the AMG settings for edge detection, we use an NMS threshold of 0.7 and we do not do cropping (
crop_n_layers = 0
), just the 16x16 point grid.
Hi @SpencerWhitehead and @mickvanhulst,
Stumbled across this thread and thought it was interesting. I saw that the code for section D.2 isn't being released, so I gave it a shot and tried to implement it myself based on what's in the paper.
I put it up on GitHub in case it might be helpful to someone. It's nothing fancy, but if anyone wants to take a look or has any thoughts on how to improve it, feel free to check it out: https://github.com/ymgw55/segment-anything-edge-detection
Thanks for the cool discussion here!