由於影像編輯工具和基於深度學習的偽造生成應用的普及,人們可 以輕易地修改影像和視訊並將其散播至社交媒體網路。竄改的影像及偽 造的視訊不僅混淆視聽,對於個人名譽或身分隱私更可能造成無法挽回 的損害。近年多種影像竄改內容定位技術和相關深偽視訊偵測方法相繼 被提出,現有方法通常針對目標竄改手法畫面進行訓練而產生針對性的 偵測機制。然而偽造技術與時俱進,竄改內容的方法可能是未知的,且竄 改影像及視訊在網路上傳播時又可能經過壓縮編碼等處理致使竄改痕跡 消失,讓現有方法的偵測結果無法令人信服。 本研究提出使用區塊一致性的深度學習偽造偵測方法,針對壓縮影 像和編碼視訊中偽影減少問題,透過評估畫面中區塊內容的相似性來判 斷影像或視訊是否受到竄改。所提出的方法不針對各式竄改操作的資料 進行訓練,僅使用一般的影像資料訓練深度學習模型以實現相關的偵測 辨別,降低模型泛化能力不足的疑慮。我們透過卷積神經網路,設計能夠 分辨來源影像的通用特徵提取器,並利用孿生網路進行影像壓縮程度分 類。對於影像竄改偵測,我們使用熱力圖轉換和前景提取技術定位竄改區 域。而對於視訊偽造偵測,我們針對人臉周圍區域,透過比對前後幀的相 似程度來判斷該視訊的真實性。本研究方法在公開的資料集上進行驗證 和測試以證明其可行性,這些資料集包含各式竄改影像及深偽視訊模型 之輸出,代表不同類型的影像和視訊,藉此顯示此區塊壓縮特徵一致性方 法有助於影像竄改偵測與深偽視訊識別。;With the growing accessibility of image editing tools and deep learning-based forgery applications, individuals can easily alter images and videos, disseminating them across social media networks. Such tampered images and forged videos not only create confusion but can also cause irreversible damage to personal reputation and privacy. In response, numerous detection methods for forged images and deepfake videos have been developed in recent years. These methods often rely on training with datasets containing specific tampering techniques to create targeted detection mechanisms. However, as forgery technologies advance, new and unknown tampering methods may emerge. Additionally, tampered images and videos may undergo compression or encoding during dissemination, which can obscure tampering traces, diminishing the effectiveness of current detection methods. This study introduces a deep learning-based forgery detection method that utilizes block consistency to address the challenge of diminished tampering traces in compressed images and encoded videos. By evaluating the similarity of block content within the images or videos, this method determines whether tampering has occurred. Unlike existing approaches that train on the datasets with target tampering operations, our method uses general image data to train the deep learning model, thereby enhancing the model’s generalization capability. The proposed scheme was formed by first developing a feature extractor using convolutional neural networks to identify the source of the images and then employing a Siamese network to classify image compression levels. For image tampering detection, heatmap transformations and foreground extraction were used to pinpoint tampered areas. In deepfake video detection, we concentrated on facial regions, assessing the similarity between consecutive frames to verify the video’s authenticity. The effectiveness of this method was validated and tested using publicly available datasets, which include a range of tampered images and outputs from deepfake video models. The strong performance of the proposed block consistency method underscores its potential in enhancing image tampering detection and deepfake video identification.