A non-transitory computer-readable storage medium storing an image processing program executable by a first computer to execute image processing comprising:
- acquiring a lumen direction that is a direction in which an endoscope is inserted, from an image obtained by imaging a tubular organ via a camera provided in the endoscope, in accordance with a trained model obtained through machine learning based on a positional relationship between a plurality of division regions obtained by dividing the image and a lumen corresponding region included in the image;
- and
- outputting lumen direction information that is information indicating the lumen direction.