{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/bitstream-corrupted-jpeg-images-are","title":"Bitstream-Corrupted JPEG Images are Restorable: Two-stage Compensation and Alignment Framework for Image Restoration","arxiv_id":"2304.06976","date":"2023-04-14","proceeding":"CVPR 2023 1","authors":["Wenyang Liu","Yi Wang","Kim-Hui Yap","Lap-Pui Chau"],"abstract":"In this paper, we study a real-world JPEG image restoration problem with bit errors on the encrypted bitstream. The bit errors bring unpredictable color casts and block shifts on decoded image contents, which cannot be resolved by existing image restoration methods mainly relying on pre-defined degradation models in the pixel domain. To address these challenges, we propose a robust JPEG decoder, followed by a two-stage compensation and alignment framework to restore bitstream-corrupted JPEG images. Specifically, the robust JPEG decoder adopts an error-resilient mechanism to decode the corrupted JPEG bitstream. The two-stage framework is composed of the self-compensation and alignment (SCA) stage and the guided-compensation and alignment (GCA) stage. The SCA adaptively performs block-wise image color compensation and alignment based on the estimated color and block offsets via image content similarity. The GCA leverages the extracted low-resolution thumbnail from the JPEG header to guide full-resolution pixel-wise image restoration in a coarse-to-fine manner. It is achieved by a coarse-guided pix2pix network and a refine-guided bi-directional Laplacian pyramid fusion network. We conduct experiments on three benchmarks with varying degrees of bit error rates. Experimental results and ablation studies demonstrate the superiority of our proposed method. The code will be released at https://github.com/wenyang001/Two-ACIR.","url_abs":"https://arxiv.org/abs/2304.06976v1","url_pdf":"https://arxiv.org/pdf/2304.06976v1.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[{"paper_slug":"bitstream-corrupted-jpeg-images-are","repo_url":"https://github.com/wenyang001/two-acir","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"decoder","task_name":"Decoder"},{"task_slug":"image-restoration","task_name":"Image Restoration"}],"methods":[{"method_slug":"batch-normalization","method_name":"Batch Normalization"},{"method_slug":"concatenated-skip-connection","method_name":"Concatenated Skip Connection"},{"method_slug":"convolution","method_name":"Convolution"},{"method_slug":"dropout","method_name":"Dropout"},{"method_slug":"gca","method_name":"GCA"},{"method_slug":"patchgan","method_name":"PatchGAN"},{"method_slug":"pix2pix","method_name":"Pix2Pix"},{"method_slug":"relu","method_name":"ReLU"},{"method_slug":"sca","method_name":"SCA"},{"method_slug":"sigmoid-activation","method_name":"Sigmoid Activation"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2304.06976","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2304.06976"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-24T18:15:14+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"provenance":"deterministic:regex_extraction","url":"https://github.com/wenyang001/Two-ACIR","reach":null}],"summary":{"ran":2,"ran_honours":1,"unverified":1},"by_repo_kind":{"official":{"samples":4,"ran":3,"repositories":1}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted","community":"Not in the archive's code links for this paper; a community repository Syntology harvested"},"n_pointer_only_for_licence":0,"samples":[{"code_sha256_prefix":"e4c547a7bb20185e","entry":"conv_block","repo":"wenyang001/Two-ACIR","repo_kind":"official","path":"Recovery network/models/refined_guiding.py","file_url":"https://github.com/wenyang001/Two-ACIR/blob/HEAD/Recovery%20network/models/refined_guiding.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"e4c547a7bb20185e"}},{"code_sha256_prefix":"6a4f76bd74c771cd","entry":"get_upsample_filter","repo":"wenyang001/Two-ACIR","repo_kind":"official","path":"Recovery network/models/refined_guiding.py","file_url":"https://github.com/wenyang001/Two-ACIR/blob/HEAD/Recovery%20network/models/refined_guiding.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"6a4f76bd74c771cd"}},{"code_sha256_prefix":"e741d2f06765697b","entry":"upsample_conv","repo":"wenyang001/Two-ACIR","repo_kind":"official","path":"Recovery network/models/refined_guiding.py","file_url":"https://github.com/wenyang001/Two-ACIR/blob/HEAD/Recovery%20network/models/refined_guiding.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"e741d2f06765697b"}},{"code_sha256_prefix":"df210d928b314454","entry":"refined","repo":"wenyang001/Two-ACIR","repo_kind":"official","path":"Recovery network/models/refined_guiding.py","file_url":"https://github.com/wenyang001/Two-ACIR/blob/HEAD/Recovery%20network/models/refined_guiding.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"df210d928b314454"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}