The free-electron laser process extracts energy from a relativistic electron beam to create high-power, coherent x-ray radiation. The energy loss leaves an imprint of the radiation on the longitudinal energy-time phase-space of the electron beam. At the Linac Coherent Light Source, the X-band transverse deflecting mode cavity measures the longitudinal phase-space, and an x-ray temporal power profile is predicted according to time slices difference between lasing-off and lasing-on measurements. However, the algorithm cannot include physical effects such as slippage in deep saturation and introduces errors from mismatches between the lasing-off and lasing-on measurements. Instead, considering the two-dimensional phase-space as a spatial image, we use a computer vision algorithm to predict the power profile. We simulate thousands of pairs of electron beams and x-ray power profiles to train convolutional neural networks, and test models on both simulated and experimental data. We demonstrate significant improvement compared with the traditional algorithm for a range of conditions.