In this paper, we propose a method based on a weight map to improve the performance of instance segmentation and demonstrate the method using a simple application. A weight map is a set of pixel-wise losses, each of which has a different value depending on whether the pixel is located on the border of the image. Importantly, the losses of pixels on the border have a relatively higher value than the other pixels so that they can impose heavy penalties in the training stage. We verified the effectiveness of our method by assessing its performance when processing clinical dental images. Because teeth have similar image features (e.g., color, shape), and as they are arranged side by side, it is appropriate to evaluate the effect of using a weight map. With reference to the weight map, Mask R-CNN, our baseline model, learns very small, narrow boundaries to distinguish different instances that were recognized as one instance before. The improvement is evident both quantitatively and qualitatively. The Average Precision and Recall were found to have increased by 4.4% and 7.3%, respectively, with weight map learning. Thus, the proposed method was demonstrated to effectively enhance the ability to detect subtle boundaries. This finding is expected to make it possible to utilize a variety of existing models to their fullest potential.