How can I increase boundaries accuracy in satellite images?

I use the following codes for this work, but they have low accuracy. I would be grateful if you could help me.

The codes are as follows

Pruning@Thinning@Closing[#, 5] &@DeleteSmallComponents[#, 500] &@
     LocalAdaptiveBinarize[#, 2] &@GaussianFilter[#, 10] &@img

ridges = ImageAdjust[RidgeFilter[imge, 7]]

bin = MorphologicalBinarize[ridges, {.1, .2}]

dist = DistanceTransform[ColorNegate@bin];
maxMarkers = MaxDetect[dist, 10];
HighlightImage[bin, maxMarkers]

watersheds = WatershedComponents[ridges, maxMarkers];
Colorize[watersheds]

Hello,

One way to improve the accuracy, in my opinion, is to train, say, Unet neural network (see how to do that here ) on some data, for example, public dataset LPIS 2016 for semantic segmentation and then use WatershedComponents similar what you did to go to instance segmentation.

Hello Erfan,

EdgeDetect[img, r] (with r = 2, 3 or 4) does a good job finding boundaries. It’s sensitive and it has a good location accuracies.

However, if you are seeking a good and consistent segmentation of all the fields and roads try ClusteringComponents[img].

Training a neural net may eventually return better results, but it takes quite some effort.
We are working on next generation foundation networks to provide you better solutions in upcoming versions.

Hello Mr. Markus, Thank you for your guidance.