Automatic pattern recognition using deep learning techniques has become increasingly important. Unfortunately, due to limited system memory, general preprocessing methods for high-resolution images in the spatial domain can lose important data information such as high-frequency information and the region of interest. To overcome these limitations, we propose an image segmentation approach in the compressed domain based on principal component analysis (PCA) and discrete wavelet transform (DWT). After inference for each tile using neural networks, a whole prediction image was reconstructed by wavelet weighted ensemble (WWE) based on inverse discrete wavelet transform (IDWT). The training and validation were performed using 351 colorectal biopsy specimens, which were pathologically confirmed by two pathologists. For 39 test datasets, the average Dice score was 0.852 ± 0.086 and the pixel accuracy was 0.962 ± 0.027. We can train the networks for the high-resolution image (magnification x20) compared to the result in the spatial domain (magnification x10) in same the region of interest (6.25 × 10^2 um^2). The average Dice score and pixel accuracy are significantly increased by 6.4 % and 1.6 %, respectively. We believe that our approach has great potential for accurate diagnosis in pathology.