learnable segmentation or learnable edge detection Is there some learnable segmentation or learnable edge detection algorithm exist?

For example I mark N fotos by hands and than program "learns" how to do it best way and can do it on similar images.

there are some papers on this subject or source code?

Update:
I found some inforamtion supervised edge detection \ supervised segmentation
http://www.loni.ucla.edu/~ztu/Download.htm

but still looking for code.
There is a benchmark code and test and learning dataset to perform image segmentation with ground truth dataset at Berkeley website and the code in the same place.