Forum Discussion
Ellieio
Aug 24, 2026Copper Contributor
How do you remove an unwanted person from a photo?
Hi everyone, Got a few otherwise great photos, but there are random people in the background that I'd like to remove. Cropping isn't really an option because it would cut out important parts of the ...
Syamter
Aug 24, 2026Iron Contributor
Here is a step-by-step guide on how to remove a person from a photo via DORS. This is a complex, research-level tool designed for dense scenes with multiple similar objects .
1. Prepare Your Inputs: You need two files:
- Image: The source image containing the person.
- Mask: A binary mask image where the person to be removed is filled with white (255) and the rest of the image is black (0) . The image and mask must be the same dimensions and perfectly aligned.
2. Configure the Script: Open the run_inference .py file in the DORS folder and edit the following lines to point to your image and mask files:
python
IMAGE_PATH = "/path/to/your_image .png"
MASK_PATH = "/path/to/your_mask .png"
3. Execute the Script: Run the inference script from your terminal. The process will begin denoising and generate the output image with the person removed.
bash
python run_inference .py
What to Keep in Mind if Learn How to Remove a Person from a photo:
- Designed for Dense Scenes: DORS excels at removing a person from a photo when there are other similar people or objects nearby that might confuse other removal methods .
- Resource Intensive: According to the paper, the full DORS process requires approximately 10.50GB of VRAM and takes about 4.85 seconds per image on a capable GPU .
- Plug-and-Play: DORS is designed to be used without any training or fine-tuning. It works by modifying the attention mechanism during the image generation process .
- Research Tool: This is a project from an academic paper . It is intended for research and development purposes, and its interface is technical rather than user-friendly.