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]
