Code Monkey home page Code Monkey logo

edit-one-for-all's Introduction

✏️ Edit One for All: Interactive Batch Image Editing

arXiv - project page

Given an edit specified by users in an example image (e.g., dog pose), Our method can automatically transfer that edit to other test images (e.g., all dog same pose).

✏️ Edit One for All: Interactive Batch Image Editing (CVPR 2024)
By Thao Nguyen, Utkarsh Ojha, Yuheng Li, Haotian Liu, Yong Jae Lee
🦡 University of Wisconsin-Madison


Getting Started

This repo is heavily built upon DragGAN. Please refer to the original repo for more details about installation/download checkpoints.

#- clone this repo
git clone https://github.com/WisconsinAIVision/edit-one-for-all.git
cd edit-one-for-all

#- install packes
conda env create -f environment.yml
conda activate stylegan3
pip install -r requirements.txt

#- download checkpoints
python scripts/download_model.py

If you want to try other pretrained model, put them under ./checkpoints/ folder.

Usage

Launch the gradio demo by:

python my_gradio.py --port 7681

Then, open your browser and go to http://localhost:7681/ to interact with the demo.

Galleries

As users adjust the editing strength in the example image (top row), all test images will be automatically updated. (Red bounding boxes indicate the edit according to the drag points).

  • Interactive Dog Pose:

  • Interactive Anime Hair Length:

  • Interactive Mountain Height:

  • Interactive Human Pose:

  • Interactive Face Slimming:

  • Interactive Tiger Roar:

Related Works

Special thanks to DragGAN for making the code available!

BibTeX

@inproceedings{nguyen2024edit,
      title={Edit One for All: Interactive Batch Image Editing},
      author={Thao Nguyen and Utkarsh Ojha and Yuheng Li and Haotian Liu and Yong Jae Lee},
      year={2024},
      eprint={2401.10219},
      archivePrefix={arXiv},
      primaryClass={cs.CV}
   }

edit-one-for-all's People

Contributors

thaoshibe avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

edit-one-for-all's Issues

run

is there any one can run the gradio?

information about the url parameter about open_url()

Hello, I ran into a problem while trying to run your code.so I happen to be learning image processing and I came across this project and would like to learn more in depth, praying for your help!

Under edit-one-for-all-main\viz\renderer.py, 143, regarding open_url(), I would like to get more information about the url parameter needed for this call, is it a link to a model?

F:\anan\python.exe C:\Users\吴\PycharmProjects\edit\edit-one-for-all-main\my_gradio.py
File under cache_dir (C:\Users\吴\PycharmProjects\edit\checkpoint):
['karras2019stylegan-ffhq-1024x1024.pkl', 'stylegan2-afhqcat-512x512.pkl']
Valid checkpoint file:
{'karras2019stylegan-ffhq-1024x1024': 'C:\Users\吴\PycharmProjects\edit\checkpoint\karras2019stylegan-ffhq-1024x1024.pkl', 'stylegan2-afhqcat-512x512': 'C:\Users\吴\PycharmProjects\edit\checkpoint\stylegan2-afhqcat-512x512.pkl'}
Loading "C:\Users\吴\PycharmProjects\edit\checkpoint\stylegan2-afhqcat-512x512.pkl"... Failed!
Traceback (most recent call last):
File "C:\Users\吴\PycharmProjects\edit\edit-one-for-all-main\my_gradio.py", line 250, in
global_state = init_images(global_state)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\吴\PycharmProjects\edit\edit-one-for-all-main\my_gradio.py", line 70, in init_images
state['renderer'].init_network(
File "C:\Users\吴\PycharmProjects\edit\edit-one-for-all-main\viz\renderer.py", line 227, in init_network
G = self.get_network(pkl, 'G_ema').to(self._device)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\吴\PycharmProjects\edit\edit-one-for-all-main\viz\renderer.py", line 152, in get_network
raise data
viz.renderer.CapturedException: Traceback (most recent call last):
File "C:\Users\吴\PycharmProjects\edit\edit-one-for-all-main\viz\renderer.py", line 143, in get_network
with dnnlib.util.open_url(pkl, verbose=False) as f:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\吴\PycharmProjects\edit\edit-one-for-all-main\dnnlib\util.py", line 347, in open_url
assert is_url(url)
AssertionError

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.