The code for ImageBind and CLIP needed which is obtained from their GitHub repository and added in these supplement.
https://github.com/facebookresearch/ImageBind
https://github.com/openai/CLIP

You also need to install both of the requirements. Please note that all requirements are similar as mentioned for ImageBind and CLIP in their github repository.

Then, run the codes. I provided example runs. You can change some comment-outs and see the output accordingly.

Also, I added a few folders, if possible, with example images. But if any problem occurs, that folder needs a few image examples from that dataset. 


Installations
conda create --name imagebind python=3.8 -y
pip install open_clip_torch
conda install -c anaconda scikit-learn
conda install -c conda-forge matplotlib
pip install transformers
conda install -c conda-forge einops
conda install -c conda-forge iopath

Example run for generating embedding-aligned images with our procedure:
python test1.py --current_image_path "./path/to/current_image.jpeg" \
                      --target_image_path "./path/to/target_image.jpeg" \
                      --learning_rate 0.09\
                      --l2_dist_threshold 4 \
                      --cosine_sim_threshold 0.98 \
                      --output_path "./path/to/output_image"
  
  
  
 python test2.py --learning_rate 0.09 --input_dir "./path/to/input_images" --output_dir "./path/to/output_images" --l2_dist_threshold 4 --cosine_sim_threshold 0.98
