Image segmentation is an important preprocessing operation in image recognition and computer vision. This paper proposes an adaptive K-means image segmentation method, which generates accurate segmentation results with simple operation and avoids the interactive input of K value. This method transforms the color space of images into LAB color space firstly. And the value of luminance components is set to a particular value, in order to reduce the effect of light on image segmentation. Then, the equivalent relation between K values and the number of connected domains after setting threshold is used to segment the image adaptively. After morphological processing, maximum connected domain extraction and matching with the original image, the final segmentation results are obtained. Experiments proof that the method proposed in this paper is not only simple but also accurate and effective.
Text-based person search aims at retrieving target person in an image gallery using a descriptive sentence of that person. It is very challenging since modality gap makes effectively extracting discriminative features more difficult. Moreover, the inter-class variance of both pedestrian images and descriptions is small. Hence, comprehensive information is needed to align visual and textual clues across all scales. Most existing methods merely consider the local alignment between images and texts within a single scale (e.g. only global scale or only partial scale) or simply construct alignment at each scale separately. To address this problem, we propose a method that is able to adaptively align image and textual features across all scales, called NAFS (i.e. Non-local Alignment over Full-Scale representations). Firstly, a novel staircase network structure is proposed to extract full-scale image features with better locality. Secondly, a BERT with localityconstrained attention is proposed to obtain representations of descriptions at different scales. Then, instead of separately aligning features at each scale, a novel contextual non-local attention mechanism is applied to simultaneously discover latent alignments across all scales. The experimental results show that our method outperforms the stateof-the-art methods by 5.53% in terms of top-1 and 5.35% in terms of top-5 on text-based person search dataset. The code is available at https : / / github . com / TencentYoutuResearch/PersonReID-NAFS
scite is a Brooklyn-based organization that helps researchers better discover and understand research articles through Smart Citations–citations that display the context of the citation and describe whether the article provides supporting or contrasting evidence. scite is used by students and researchers from around the world and is funded in part by the National Science Foundation and the National Institute on Drug Abuse of the National Institutes of Health.