The application discloses a target distance adaptive
image compression method and an
image decompression method, wherein the
image compression method comprises a training process and an
inference process; the training process further comprises depth
information extraction, data preprocessing and model training; the depth
information extraction takes an image containing a close-range target as input, uses a depth
estimation network to extract a depth value corresponding to each pixel from the image, and outputs a single-channel
depth map containing the depth value, the resolution of the
depth map being the same as that of the input image; the data preprocessing randomly divides images used for training into smaller image blocks, and divides a
depth map obtained through the depth
information extraction process into small blocks corresponding to the images; the model training performs training on an
image compression network, takes the
cut image blocks as input, processes the image blocks through a neural network, and outputs corresponding reconstructed image blocks; and the
inference process performs image compression.