The study of material hardness is crucial for determining its quality, potential failures, and appropriate applications, as well as minimizing losses incurred during the production process. To achieve this, certain criteria must be met to ensure high quality. This process is typically performed manually or using techniques based on analyzing indentation image patterns produced through the Vickers hardness technique. However, these techniques require that the indentation pattern is not aligned with the image edges. Therefore, this paper presents a technique based on convolutional neural networks (CNNs), specifically, a YOLO v3 network connected to a Dense Darknet-53 network. This technique enables the detection of indentation corner positions, measurement of diagonals, and calculation of the Vickers hardness value of D2 steel treated thermally and coated with Titanium Niobium Nitride (TiNbN), regardless of their position within the image. By implementing this architecture, an accuracy of 92% was achieved in accurately detecting the corner positions, with an average execution time of 6 seconds. The developed technique utilizes the network to detect the regions containing the corners and subsequently accurately determines the pixel coordinates of these corners, achieving an approximate relative percentage error between 0.17% to 5.98% in the hardness results.