Skip to main content

A part-level learning strategy for JPEG image recompression detection


Recompression is a prevalent form of multimedia content manipulation. Different approaches have been developed to detect this kind of alteration for digital images of well-known JPEG format. However, they are either limited in performance or complex. These problems may arise from different quality level options of JPEG compression standard and their combinations after recompression. Inspired from semantic and perceptual analyses, in this paper, we suggest a part-level middle-out learning strategy to detect double compression via an architecturally efficient classifier. We first demonstrate that singly and doubly compressed data with different JPEG coder settings lie in a feature space representation as a limited number of coherent clusters, called parts. To show this, we visualize behavior of a set of prominent Benford-based features. Then, by leveraging such discovered knowledge, we model the issue of double JPEG compression detection in the family of feature engineering-based approaches as a part-level classification problem to cover all possible JPEG quality level combinations. The proposed strategy exhibits low complexity and yet comparable performance in comparison to related methods in that family. For reproducibility, our codes are available upon request to fellows.

This is a preview of subscription content, access via your institution.

Fig. 1
Fig. 2
Fig. 3
Fig. 4


  1. 1.

    Alipour N, Behrad A (2020) Semantic segmentation of JPEG blocks using a deep CNN for non-aligned JPEG forgery detection and localization. Multimed Tools Appl, pp 1–17

  2. 2.

    Bianchi T, Piva A (2012) Image forgery localization via block-grained analysis of JPEG artifacts. IEEE Trans Inf Forensics Security 7(3):1003–1017

    Article  Google Scholar 

  3. 3.

    Chang CC, Lin CJ (2011) LIBSVM: A library for support vector machines. ACM T Intel Syst Tec 2(3), article 27

  4. 4.

    Cheng H, Liu Z, Yang L, Chen X (2013) Sparse representation and learning in visual recognition: Theory and applications. Signal Process 93 (6):1408–1425

    Article  Google Scholar 

  5. 5.

    Dalal N, Triggs B (2005) Histograms of oriented gradients for human detection. IEEE CVPR 1:886–893

    Google Scholar 

  6. 6.

    Dong L, Kong X, Wang B, You X (2011) Double compression detection based on Markov model of the first digits of DCT coefficients. In: IEEE ICIG, pp 234–237

  7. 7.

    Farid H (2009) Image forgery detection. IEEE Signal Process Mag 26(2):16–25

    Article  Google Scholar 

  8. 8.

    Felzenszwalb P F, Girshick R B, McAllester D, Ramanan D (2010) Object detection with discriminatively trained part-based models. IEEE Trans Pattern Anal Mach Intell 32(9):1627–1645

    Article  Google Scholar 

  9. 9.

    Fridrich J (2009) Digital image forensics. IEEE Signal Process Mag 26(2):26–37

    Article  Google Scholar 

  10. 10.

    Galvan F, Puglisi G, Bruna A, Battiato S (2014) First quantization matrix estimation from double compressed JPEG images. IEEE Trans Inf Forensics Security 9(8):1299–1310

    Article  Google Scholar 

  11. 11.

    Hsu C W, Lin C J (2002) A comparison of methods for multiclass support vector machines. IEEE Trans Neural Netw 13(2):415–425

    Article  Google Scholar 

  12. 12.

    Huang X, Wang S, Liu G (2018) Detecting double JPEG compression with same quantization matrix based on dense CNN feature. In: IEEE ICIP, pp 3813–3817

  13. 13.

    Li B, Shi YQ, Huang J (2008) Detecting doubly compressed JPEG images by using mode based first digit features. In: IEEE MMSP, pp 730–735

  14. 14.

    Li B, Zhang H, Luo H, Tan S (2019) Detecting double JPEG compression and its related anti-forensic operations with CNN. Multimed Tools Appl 78(7):8577–8601

    Article  Google Scholar 

  15. 15.

    Liu J, Ji S, Ye J (2011) SLEP: Sparse learning with efficient projections. Arizona State University

  16. 16.

    Liu Q, Sung A H, Qiao M (2011) A method to detect JPEG-based double compression. In: ICANN, Lect. Notes Comput. Sc., Part II, pp 466–476

  17. 17.

    Liu Q, Sung A H, Qiao M (2011) Neighboring joint density-based JPEG steganalysis. ACM T Intel Syst Tec 2(2), article 16

  18. 18.

    Lukáš J, Fridrich J (2003) Estimation of primary quantization matrix in double compressed JPEG images. In: DFRWS

  19. 19.

    van der Maaten L, Hinton G (2008) Visualizing data using t-SNE. J Mach Learn Res 9:2579–2605

    MATH  Google Scholar 

  20. 20.

    Milani S, Tagliasacchi M, Tubaro S (2014) Discriminating multiple JPEG compressions using first digit features. APSIPA Trans Signal Inf Process 3

  21. 21.

    Olmos A, Kingdom F A A (2004) A biologically inspired algorithm for the recovery of shading and reflectance images. Perception 33(12):1463–1473

    Article  Google Scholar 

  22. 22.

    Piva A (2013) An overview on image forensics. ISRN Signal Process Article ID 496701

  23. 23.

    Popescu AC, Farid H (2004) Statistical tools for digital forensics. In: IWIH, pp 128–147

  24. 24.

    Richtsfeld A, Mörwald T, Prankl J, Zillich M, Vincze M (2014) Learning of perceptual grouping for object segmentation on RGB-D data. J Vis Commun Image R 25(1):64–73

    Article  Google Scholar 

  25. 25.

    Taimori A, Razzazi F, Behrad A, Ahmadi A, Babaie-Zadeh M (2016) Quantization-unaware double JPEG compression detection. J Math Imaging Vis 54(3):269–286

    MathSciNet  Article  MATH  Google Scholar 

  26. 26.

    Taimori A, Razzazi F, Behrad A, Ahmadi A, Babaie-Zadeh M (2017) A novel forensic image analysis tool for discovering double JPEG compression clues. Multimed Tools Appl 76(6):7749–7783

    Article  Google Scholar 

  27. 27.

    Yang J, Xie J, Zhu G, Kwong S, Shi Y Q (2014) An effective method for detecting double JPEG compression with the same quantization matrix. IEEE Trans Inf Forensics Security 9(11):1933–1942

    Article  Google Scholar 

  28. 28.

    Zhang C, Cheng J, Liu J, Pang J, Liang C, Huang Q, Tian Q (2014) Object categorization in sub-semantic space. Neurocomputing 142:248–255

    Article  Google Scholar 

Download references

Author information



Corresponding author

Correspondence to Ali Taimori.

Additional information

Publisher’s note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Rights and permissions

Reprints and Permissions

About this article

Verify currency and authenticity via CrossMark

Cite this article

Taimori, A., Razzazi, F., Behrad, A. et al. A part-level learning strategy for JPEG image recompression detection. Multimed Tools Appl 80, 12235–12247 (2021).

Download citation


  • Double JPEG compression
  • Information visualization
  • Middle-out process
  • Part-based detection
  • Quality level
  • Sparse coding