Upload 3 files
Browse files- .gitattributes +2 -0
- README.md +96 -0
- assets/logo.png +3 -0
- assets/teaser.png +3 -0
.gitattributes
CHANGED
|
@@ -35,3 +35,5 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
| 36 |
VLM/checkpoint-7000/tokenizer.json filter=lfs diff=lfs merge=lfs -text
|
| 37 |
DIT/Qwen-Image-Edit/processor/tokenizer.json filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
| 36 |
VLM/checkpoint-7000/tokenizer.json filter=lfs diff=lfs merge=lfs -text
|
| 37 |
DIT/Qwen-Image-Edit/processor/tokenizer.json filter=lfs diff=lfs merge=lfs -text
|
| 38 |
+
assets/logo.png filter=lfs diff=lfs merge=lfs -text
|
| 39 |
+
assets/teaser.png filter=lfs diff=lfs merge=lfs -text
|
README.md
ADDED
|
@@ -0,0 +1,96 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
|
| 2 |
+
<div align=center>
|
| 3 |
+
<img src="assets/logo.png" width="150px">
|
| 4 |
+
</div>
|
| 5 |
+
<h2 align="center">
|
| 6 |
+
SmartPhotoCrafter: Unified Reasoning, Generation and Optimization for Automatic Photographic Image Editing
|
| 7 |
+
</h2>
|
| 8 |
+
|
| 9 |
+
|
| 10 |
+
<a href=""><img src='https://img.shields.io/badge/arXiv-2501.11325-red?style=flat&logo=arXiv&logoColor=red' alt='arxiv'></a>
|
| 11 |
+
<a href="https://vivocameraresearch.github.io/smartphotocrafterweb"><img src='https://img.shields.io/badge/Project-Page-Green' alt='Project'></a>
|
| 12 |
+
<a href=""><img src='https://img.shields.io/badge/π€-HuggingFace-blue' alt='HuggingFace'></a>
|
| 13 |
+
<a href=""><img src='https://img.shields.io/badge/π€-ModelScope-purple' alt='ModelScope'></a>
|
| 14 |
+
<a href="http://www.apache.org/licenses/LICENSE-2.0"><img src='https://img.shields.io/badge/License-CC BY--NC--SA--4.0-lightgreen?style=flat&logo=Lisence' alt='License'></a>
|
| 15 |
+
|
| 16 |
+
**SmartPhotoCrafter** is an end-to-end framework for automatic photographic image editing that reformulates traditional editing as a closed-loop reasoning-to-generation process. Unlike prior methods that rely on explicit user instructions, our approach autonomously identifies aesthetic deficiencies, reasons about improvement strategies, and performs targeted edits without human prompts.
|
| 17 |
+
|
| 18 |
+
|
| 19 |
+
## β¨ Highlights
|
| 20 |
+
- **Fully Automatic Editing** β No user instructions or parameters required; the model completes the closed loop of quality assessment β reasoning β editing autonomously.
|
| 21 |
+
- **Dual Capability** β Supports both **image restoration** (denoising, deblurring, low-light enhancement) and **image retouching** (color, tone, contrast enhancement).
|
| 22 |
+
- **Aesthetic Reasoning** β Explicitly generates image quality analysis and editing suggestions, improving interpretability.
|
| 23 |
+
- **High-Fidelity Generation** β Preserves original content structure while delivering photo-realistic outputs with high tonal/color semantic sensitivity.
|
| 24 |
+
- **Reinforcement Learning Optimization** β Jointly optimizes reasoning and generation modules, aligning editing trajectories with human aesthetic preferences.
|
| 25 |
+
|
| 26 |
+
## πΌοΈ Demo
|
| 27 |
+

|
| 28 |
+
|
| 29 |
+
## π£ News
|
| 30 |
+
- **`2026/04/07`**: We open-source the inference scripts and pretrained weights.
|
| 31 |
+
|
| 32 |
+
## β
To-Do List for SmartPhotoCrafter Release
|
| 33 |
+
- β
Release the inference code of SmartPhotoCrafter
|
| 34 |
+
- [ ] Release the SmartPhotoCrafter pretrained weights
|
| 35 |
+
|
| 36 |
+
|
| 37 |
+
|
| 38 |
+
|
| 39 |
+
## Requirements and Installation
|
| 40 |
+
|
| 41 |
+
### Prepare Environment
|
| 42 |
+
Create a conda environment & install requirements
|
| 43 |
+
```shell
|
| 44 |
+
# python==3.10.0 cuda==12.4 torch==2.5
|
| 45 |
+
conda create -n smartphotocrafter python==3.10.0
|
| 46 |
+
conda activate smartphotocrafter
|
| 47 |
+
pip install -r requirements.txt
|
| 48 |
+
```
|
| 49 |
+
|
| 50 |
+
### π¦ Pretrained Model Weights
|
| 51 |
+
| Models | Download | Features |
|
| 52 |
+
|------------------|---------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------|
|
| 53 |
+
| SmartPhotoCrafter | π€ [Huggingface]() π€ [ModelScope]() |
|
| 54 |
+
Qwen-Image-Edit-2509 | π€ [Huggingface](https://huggingface.co/Qwen/Qwen-Image-Edit-2509) π€ [ModelScope](https://www.modelscope.cn/models/Qwen/Qwen-Image-Edit-2509) | Base Model |
|
| 55 |
+
|
| 56 |
+
|
| 57 |
+
## π Demo Inference
|
| 58 |
+
We provide scripts for both automatic and manual editing. Automatic editing only requires inputting one image, while manual editing requires adding a prompt.
|
| 59 |
+
|
| 60 |
+
Automatically edit reasoning scripts
|
| 61 |
+
```PowerShell
|
| 62 |
+
bash scripts/inference/automatic-edit.sh
|
| 63 |
+
```
|
| 64 |
+
|
| 65 |
+
Manual edit reasoning scripts
|
| 66 |
+
```PowerShell
|
| 67 |
+
bash scripts/inference/manual-eidt.sh
|
| 68 |
+
```
|
| 69 |
+
|
| 70 |
+
Script example
|
| 71 |
+
```PowerShell
|
| 72 |
+
CUDA_VISIBLE_DEVICES=0 python infer.py \
|
| 73 |
+
--model_path "ckpt/Qwen-Image-Edit-2509" \
|
| 74 |
+
--dit_path "ckpt/DiT.safetensors" \
|
| 75 |
+
--vlm_path "ckpt/text_encoder" \
|
| 76 |
+
--image_path "example/841012.png" \
|
| 77 |
+
--output_folder "example/output/automatic" \
|
| 78 |
+
--seed 42 \
|
| 79 |
+
```
|
| 80 |
+
|
| 81 |
+
|
| 82 |
+
## π Training
|
| 83 |
+
Coming Soon ...
|
| 84 |
+
|
| 85 |
+
## β Acknowledgement
|
| 86 |
+
Our code is modified based on [Edit-R1](https://github.com/PKU-YuanGroup/Edit-R1). We adopt [Qwen-Image-Edit-2509](https://github.com/QwenLM/Qwen-Image) as the base model.
|
| 87 |
+
|
| 88 |
+
## π License
|
| 89 |
+
All the materials, including code, checkpoints, and demos, are made available under the [Creative Commons BY-NC-SA 4.0](https://creativecommons.org/licenses/by-nc-sa/4.0/) license. You are free to copy, redistribute, remix, transform, and build upon the project for non-commercial purposes, as long as you give appropriate credit and distribute your contributions under the same license.
|
| 90 |
+
|
| 91 |
+
|
| 92 |
+
## π Citation
|
| 93 |
+
|
| 94 |
+
```bibtex
|
| 95 |
+
|
| 96 |
+
```
|
assets/logo.png
ADDED
|
Git LFS Details
|
assets/teaser.png
ADDED
|
Git LFS Details
|