A new deep learning model, IMR-CNN, has been developed to improve the detection and segmentation of early gastric cancer in gastroscopic images. The model outperforms previous methods and has the potential to aid doctors in diagnosing this highly prevalent and deadly disease.