--- language: - en license: apache-2.0 size_categories: - 100K The framework of the proposed RamDG:
## Notes ⚠️ - If you want to import the CAP data into your own dataset, please refer to [this](https://github.com/shen8424/CAP). - If you want to run RamDG on datasets other than SAMM and use CNCL to incorporate external knowledge, please ensure to configure ```idx_cap_texts``` and ```idx_cap_images``` in the dataset jsons. - We have upgraded the SAMM JSON files. The latest versions (SAMM with CAP or without CAP) are available on July 24, 2025. Please download the newest version. ## Dataset Statistics
## Annotations ``` { "text": "Lachrymose Terri Butler, whose letter prompted Peter Dutton to cancel Troy Newman's visa, was clearly upset.", "fake_cls": "attribute_manipulation", "image": "emotion_jpg/65039.jpg", "id": 13, "fake_image_box": [ 665, 249, 999, 671 ], "cap_texts": { "Terri Butler": "Terri Butler Gender: Female, Occupation: Politician, Birth year: 1977, Main achievement: Member of Australian Parliament.", "Peter Dutton": "Peter Dutton Gender: Male, Occupation: Politician, Birth year: 1970, Main achievement: Australian Minister for Defence." }, "cap_images": { "Terri Butler": "Terri Butler", "Peter Dutton": "Peter Dutton" }, "idx_cap_texts": [ 1, 0 ], "idx_cap_images": [ 1, 0 ], "fake_text_pos": [ 0, 11, 13, 14, 15 ] } ``` - `image`: The relative path to the original or manipulated image. - `text`: The original or manipulated text caption. - `fake_cls`: Indicates the type of manipulation (e.g., forgery, editing). - `fake_image_box`: The bounding box coordinates of the manipulated region in the image. - `fake_text_pos`: A list of indices specifying the positions of manipulated tokens within the `text` string. - `cap_texts`: Textual information extracted from CAP (Contextual Auxiliary Prompt) annotations. - `cap_images`: Relative paths to visual information from CAP annotations. - `idx_cap_texts`: A binary array where the i-th element indicates whether the i-th celebrity in `cap_texts` is tampered (1 = tampered, 0 = not tampered). - `idx_cap_images`: A binary array where the i-th element indicates whether the i-th celebrity in `cap_images` is tampered (1 = tampered, 0 = not tampered). ## Sample Usage (Training and Testing RamDG) The following snippets are taken from the official GitHub repository to demonstrate how to train and test the RamDG framework using this dataset. ### Dependencies and Installation ```bash mkdir code cd code git clone https://github.com/shen8424/SAMM-RamDG-CAP.git cd SAMM-RamDG-CAP conda create -n RamDG python=3.8 conda activate RamDG conda install --yes -c pytorch pytorch=1.10.0 torchvision==0.11.1 cudatoolkit=11.3 pip install -r requirements.txt conda install -c conda-forge ruamel_yaml ``` ### Prepare Checkpoint Download the pre-trained model through this link: [ALBEF_4M.pth](https://storage.googleapis.com/sfr-pcl-data-research/ALBEF/ALBEF_4M.pth) and [pytorch_model.bin](https://drive.google.com/file/d/15qfsTHPB-CkEVreOyf-056JWDAVjWK3w/view?usp=sharing)[GoogleDrive]. Then put the `ALBEF_4M.pth` and `pytorch_model.bin` into `./code/SAMM-RamDG-CAP/`. ``` ./ ├── code └── SAMM-RamDG-CAP (this github repo) ├── configs │ └──... ├── dataset │ └──... ├── models │ └──... ... └── ALBEF_4M.pth └── pytorch_model.bin ``` ### Prepare Data We provide two versions: SAMM with CAP information and SAMM without CAP information. If you choose SAMM with CAP information, download `people_imgs1` and `people_imgs2`, then move the data from both folders to `./code/SAMM-RamDG-CAP/SAMM_datasets/people_imgs`. Then place the `train.json`, `val.json`, `test.json` into `./code/SAMM-RamDG-CAP/SAMM_datasets/jsons` and place `emotion_jpg`, `orig_output`, `swap_jpg` into `./code/SAMM-RamDG-CAP/SAMM_datasets`. ``` ./ ├── code └── SAMM-RamDG-CAP (this github repo) ├── configs │ └──... ├── dataset │ └──... ├── models │ └──... ... └── SAMM_datasets │ ├── jsons │ │ ├──train.json │ │ │ │ │ ├──test.json │ │ │ │ │ └──val.json │ ├── people_imgs │ │ ├──Messi (from people_imgs1) │ │ ├──Trump (from people_imgs2) │ │ └──... │ │ │ ├── emotion_jpg │ │ │ ├── orig_output │ │ │ ├── swap_jpg ├── models │ └── pytorch_model.bin ``` ### Training RamDG To train RamDG on the SAMM dataset, please modify `train.sh` and then run the following commands: ```bash bash train.sh ``` ### Testing RamDG To test RamDG on the SAMM dataset, please modify `test.sh` and then run the following commands: ```bash bash test.sh ``` ## Citation If you find this work useful for your research, please kindly cite our paper: ```bibtex @inproceedings{shen2025beyond, title={Beyond Artificial Misalignment: Detecting and Grounding Semantic-Coordinated Multimodal Manipulations}, author={Shen, Jinjie and Wang, Yaxiong and Chen, Lechao and Nan, Pu and Zhong, Zhun}, booktitle={ACM Multimedia}, year={2025} } ```