# HyperForensics++ Dataset Contribution Guide This guide outlines the steps to contribute to the HyperForensics++ dataset repository. --- ## 1. Clone the Repository First, clone the repository from Hugging Face to your local machine: ```bash # Make sure git-lfs is installed (https://git-lfs.com) git lfs install git clone https://huggingface.co/datasets/OtoroLin/HyperForensics-plus-plus ``` ## 2. Extract the Dataset Unzip the data.tar.gz file into a separate local directory: ```bash [to be filled] ``` ## 3. Modify or Generate Data Make changes or generate new data in the extracted directory. Ensure the data follows the required structure: ``` local_data/ |-{attacking method}/ | |-config0/ | | |-images.npy | |-config1/ | | ... | |-config4/ |-{attacking method}/ | |-config{0-4}/ |-Origin | |-images.npy HyperForensics-plus-plus/ |-data/ ``` ## 4. Zip the Directory After modifying or generating data, zip the directory into a `.tar.gz` file and place it in the repository. You can utilize the provided `zipping.sh` script. First, modify the `ROOT_DIR` variable to the `local_data` path ```bash # In zipping.sh # Defined the root directory of the whole dataset ROOT_DIR="/root/to/local_data" ``` ### 4.1 Compressing specify the method and configuration: ```bash ./zipping.sh --method --config ``` Replace with the forgery method and with the configuration index. This will automatically put the compressed `.tar.gz` file under hirarchy of the dataset repo. For instance, if I want to zip the images under `ADMM-ADAM` forgery method, `config0` configuration: ```bash ./zipping.sh --method ADMM-ADAM --config 0 ``` This will compress `/path/to/local/ADMM-ADAM/config0/*` to `HyperForensics-plus-plus/data/ADMM-ADAM/config0/config0.tar.gz`. ### 4.2 Compressing the specify direcotry ```bash ./zipping.sh --dir-path ``` Replace `` with the intended directory path. This will compress the directory and put it in the working directory. For instance, ```bash ./zipping.sh --dir-path /path/to/local/ADMM-ADAM/config0 ``` This will compress `/path/to/local/ADMM-ADAM/config0/*` to `HyperForensics-plus-plus/config0.tar.gz`. ### 4.3 Compress the entire hirarchy ```bash ./zipping.sh --all ``` This will compress the entire local data hirarchy seperately and automatically put the compressed files under hirarchy of the dataset repo. ## 5. Create a Pull Request Push your changes to create a pull request. Hugging Face uses `git push` to implement pull requests: ```bash git push origin pr/:refs/pr/ ``` Replace `` with the pull request index. ## 6. Wait for merging the Pull Request Once the pull request is created, the repository maintainer will review and merge it. --- Thank you for contributing to the HyperForensics++ dataset!