General Introduction
BrushEdit is an all-in-one image repair and editing tool developed by Tencent ARC Lab. Based on the latest AI technology, the tool is able to automatically identify and repair defects in images while supporting interactive editing by users.BrushEdit combines a variety of advanced image processing algorithms to provide efficient and accurate image repair and editing functions. Whether you are a professional designer or an ordinary user, you can easily achieve perfect image repair and creative editing with BrushEdit.
Function List
- Automatic image restoration: Utilizes AI technology to automatically identify and fix flaws in images.
- Interactive editing: The user can manually select the area to be edited for refinement.
- Multiple editing modes: Supports a variety of image editing modes, including repair, fill, adjustment, and more.
- Efficient processing: Advanced algorithms are used to ensure efficient and accurate image processing.
- user-friendly interface: Simple and intuitive user interface, easy for users to get started quickly.
Using Help
Installation process
- Environmental requirements: BrushEdit requires CUDA 11.8, Pytorch 2.0.1 and Python 3.10.6.
- clone warehouse: Clone the BrushEdit repository by running the following command in a terminal:
git clone https://github.com/TencentARC/BrushEdit.git
- Creating a Virtual Environment: It is recommended to create a virtual environment using conda and install the required version of Pytorch:
conda create -n brushedit python=3.10.6 -y
conda activate brushedit
python -m pip install --upgrade pip
pip install torch==2.0.1 torchvision==0.15.2 torchaudio==2.0.2 --index-url https://download.pytorch.org/whl/cu118
- Installation of dependencies: Go to the BrushEdit directory and install the dependencies:
cd BrushEdit
pip install -r requirements.txt
Usage Process
- Start BrushEdit: Start BrushEdit by running the following command in a terminal:
python main.py
- Load Image: Load the image to be repaired or edited in the BrushEdit interface.
- Select Edit Mode: Select automatic repair or interactive editing mode as needed.
- edit: Use the tools provided by BrushEdit for image restoration or editing.
- Save results: When editing is complete, save the processed image.
Main function operation flow
🧭 Note: Currently, we support two modes: fully automatic command editing and interactive command editing.
🛠️ Fully automated command-based editing:
⭐️ 1. Select Image: Upload an image or select one from the examples.
⭐️ 2. Input ⌨️ Command: Input command (support add, delete and modify), for example remove xxx.
⭐️ 3. Run: Click the 💫 Run button to automatically edit the image.
🛠️ Interactive command-based editing:
⭐️ 1. Select Image: Upload an image or select one from the examples.
⭐️ 2. Fine Brushing: Use the brush brush to outline the area you want to edit. You can also use the eraser to recover.
⭐️ 3. Enter ⌨️ Command: Enter the command.
⭐️ 4. Run: Click the 💫 Run button to automatically edit the image.
We strongly recommend using GPT-4o for inference. After selecting the VLM model as gpt4-o, enter the API KEY and click on the Submit and Verify button. If the output is success, you can use gpt4-o normally. secondly, we recommend using the Qwen2VL model.
It is recommended to shrink the page in your browser for a better view and experience.
- Automatic image restoration::
- After loading the image, select the "Auto Repair" mode.
- BrushEdit automatically recognizes flaws in the image and fixes them.
- Users can preview the fix and fine-tune it.
- Save the restored image.
- Interactive editing::
- After loading the image, select the "Interactive Edit" mode.
- Use the brush tool to select the area to be edited.
- Select the appropriate editing tool (e.g., Fill, Adjust, etc.) to process.
- Preview the editing results and make any necessary adjustments.
- Save the edited image.
- Multiple editing modes::
- In the editing interface, users can choose different editing modes, such as repair, fill, adjust, etc.
- Depending on the selected mode, image processing is performed using the appropriate tools.
- Preview the processing results and fine-tune them.
- Saves the processed image.
BrushEdit provides rich image processing functions, users can choose different editing modes according to their needs, and easily realize image restoration and creative editing. With detailed help, users can quickly get started and take full advantage of BrushEdit's powerful features.