Accurate diagnosis of lithium-ion battery (LIB) degradation is critical for safe and reliable operation in real-world applications. In recent years, data-driven approaches powered by Machine Learning algorithms emerged as a promising solution, among which Deep Learning methods were proven to be effective for various tasks such as State of Charge and State of Health estimation and Remaining Useful Life prediction, however, their application for knee point estimation is still at an early stage. While experimental techniques, were demonstrated to be successful for detecting knees, current methods focus on tracking individual cycles rather than analyzing the overall trajectory of degradation, which could potentially offer better performance. In this paper, we introduce ICFormer, a novel Deep Learning model based on a Transformer encoder that leverages self-attention on the evolution of incremental capacity curves to accurately identify relevant changes in LIB degradation trajectories. The proposed model not only detects knees, but also anticipates them while also outperforming state-of-the-art approaches in diagnosing degradation modes. The effectiveness of the model is validated using both synthetic and experimental data. We demonstrate that the method can provide valuable knowledge on the factors contributing to capacity loss and offer advanced insights for battery management and predictive maintenance strategies.