arXiv:2611.13029v1 Announce Type: new Abstract: In this paper, we consider the problem of recompression of images from JPEG to JPEG AI format. We show that direct recompression from JPEG to JPEG~AI trained on uncompressed images is accompanied by the preservation of the JPEG image artifacts in the resulting JPEG~AI image. In order to avoid it, we evaluate an approach where an artifacts removal neural network is first applied to the input JPEG image as an external pre-filter. However, in this case, the processing time is increased by 29 times. Therefore, we propose an artifact-compensated training for JPEG AI and show that it is able to combine pre-filtering against target distortions with efficient compression without increase in the processing time.