In inertial confinement fusion, the grooves of the fuel ice layer of a capsule can lead to hydrodynamic instability growth during implosion. X-ray phase contrast (XPC) imaging is widely employed in the diagnosis of fuel layers. However, effective quantitative evaluation for grooves based on in-situ XPC imaging remains limited. This study presents a quantitative evaluation method for grooves based on deep learning and phase retrieval. The XPC images of a capsule were first processed by phase retrieval, and the angular distribution of the inner interface of the ice layer was extracted. Next, a one-dimensional convolutional neural network, combined with the priori information on the scale of the grooves and the volume of the fuel ice layer, was employed to process the interface data to determine the K evaluation index of the capsule. We numerically generated XPC images of the capsules with grooves to verify the proposed interface extraction method based on phase retrieval. The results showed that the proposed method accurately recognized the grooves and achieved a lower groove measurement error compared with the traditional intensity-based method. The root-mean-square error of the proposed K-estimation method was calculated to be 0.32 μm, and the false negative and positive rates were relatively 11.8% and 3.2%, respectively. The K-estimation accuracy positively correlated with the view number. In-situ XPC imaging was conducted before implosion experiment, and the proposed method was applied to the experimental images of two capsules. Their K values were estimated at 2.18 and 0.59 μm. The study findings provide guidelines for capsule selection in ICF experiments.