Recent advances in radiation detectors have significantly improved the resolution and frame rate of X-ray imaging systems at the cost of large data throughputs that can be challenging to transfer, store, and process. Such is the case of the billion-pixel X-ray camera, where the estimated throughput of 10 terabytes per second (TB/s) exceeds the capabilities of current data acquisition systems (DAQs) for real-time transfer and processing. To address this, we propose a lossy, multi-stage compression scheme to reduce data at the source. This work leverages machine learning (ML) to produce sparse representations of the camera’s images, followed by quantization and entropy coding for compression. The proposed scheme achieves a 100:1 compression ratio with high PSNR and SSIM scores on X-ray source images. Finally, we implement the sparse coding neural network (NN) on an FPGA to showcase the feasibility, low power, and low latency of edge data compression.