The purpose of the present study is to create an automated program of live and dead sperm cells sorting and classification through vital staining by using microscopic analysis and computer programs. The eosin-Nigrosin staining was used to assess the sperm viability, and the high-resolution image was acquired and analyzed through the use of image processing. This study offers a practical and accurate alternative to traditional manual evaluation by extracting visual data related to shape, color, and interaction with the dye. Based on the results, the proposed system can accurately distinguish between live and non-live sperm, improve the quality of samples used in assisted reproductive technologies, and reduce human intervention. This article represents a positive step towards the adoption of artificial intelligence in fertility laboratories to facilitate rapid, evidence-based decision-making.