young98 commited on
Commit
9b0faeb
Β·
verified Β·
1 Parent(s): 295fedc

Upload 3 files

Browse files
Files changed (4) hide show
  1. .gitattributes +2 -0
  2. README.md +96 -0
  3. assets/logo.png +3 -0
  4. 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>&nbsp;
11
+ <a href="https://vivocameraresearch.github.io/smartphotocrafterweb"><img src='https://img.shields.io/badge/Project-Page-Green' alt='Project'></a>&nbsp;
12
+ <a href=""><img src='https://img.shields.io/badge/πŸ€—-HuggingFace-blue' alt='HuggingFace'></a>&nbsp;
13
+ <a href=""><img src='https://img.shields.io/badge/πŸ€–-ModelScope-purple' alt='ModelScope'></a>&nbsp;
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>&nbsp;
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
+ ![teaser](./assets/teaser.png)
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

  • SHA256: 995b4f679105b01bdf6f70f304d83ecb4e97246dd0c78a0b3f47e83ff1fba2f0
  • Pointer size: 131 Bytes
  • Size of remote file: 810 kB
assets/teaser.png ADDED

Git LFS Details

  • SHA256: 955486a7f5f36591c5f54a21203a76d67b954f62c2a2fb14ad647a285e6ce4dd
  • Pointer size: 132 Bytes
  • Size of remote file: 1.87 MB