Improve model card: Add paper, project page, code, pipeline tag, and usage examples
Browse filesThis PR significantly improves the model card for **ShadowDraw: From Any Object to Shadow–Drawing Compositional Art** by:
* Adding the `pipeline_tag: text-to-image` to enhance discoverability on the Hugging Face Hub for generative image tasks.
* Including a direct link to the paper: [ShadowDraw: From Any Object to Shadow-Drawing Compositional Art](https://huggingface.co/papers/2512.05110).
* Adding links to the official project page: https://red-fairy.github.io/ShadowDraw/.
* Providing a link to the GitHub repository: https://github.com/Red-Fairy/ShadowDraw.
* Incorporating detailed "Installation" and "Generate Your Own Shadow-Drawing Art" sections directly from the GitHub README, including code snippets for easy replication.
* Retaining the existing `license: cc-by-2.0`.
This update makes the model card comprehensive and immediately useful for users interested in the ShadowDraw framework.
|
@@ -1,3 +1,77 @@
|
|
| 1 |
-
---
|
| 2 |
-
license: cc-by-2.0
|
| 3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: cc-by-2.0
|
| 3 |
+
pipeline_tag: text-to-image
|
| 4 |
+
---
|
| 5 |
+
|
| 6 |
+
# ShadowDraw: From Any Object to Shadow–Drawing Compositional Art
|
| 7 |
+
|
| 8 |
+
This repository contains the models and code for **ShadowDraw**, a framework that transforms ordinary 3D objects into shadow-drawing compositional art. Given a 3D object, the system predicts scene parameters, including object pose and lighting, together with a partial line drawing, such that the cast shadow completes the drawing into a recognizable image.
|
| 9 |
+
|
| 10 |
+
- **Paper**: [ShadowDraw: From Any Object to Shadow-Drawing Compositional Art](https://huggingface.co/papers/2512.05110)
|
| 11 |
+
- **Project Page**: https://red-fairy.github.io/ShadowDraw/
|
| 12 |
+
- **Code**: https://github.com/Red-Fairy/ShadowDraw
|
| 13 |
+
|
| 14 |
+
<div align="center">
|
| 15 |
+
<img src="https://github.com/Red-Fairy/ShadowDraw/raw/main/assets/teaser.gif" alt="ShadowDraw Teaser" width="600"/>
|
| 16 |
+
</div>
|
| 17 |
+
|
| 18 |
+
## 🔧 Installation
|
| 19 |
+
|
| 20 |
+
First, create a conda environment and install the dependencies:
|
| 21 |
+
|
| 22 |
+
```bash
|
| 23 |
+
git clone https://github.com/red-fairy/ShadowDraw.git
|
| 24 |
+
cd ShadowDraw
|
| 25 |
+
conda env create -f environment.yml
|
| 26 |
+
```
|
| 27 |
+
|
| 28 |
+
Then, install Blender 4.3.2 following the instructions [here](https://download.blender.org/release/Blender4.3/), unzip it, and specify the path to the Blender executable in the `blender_path` argument of the `main.py` script.
|
| 29 |
+
|
| 30 |
+
## 🎨 Generate Your Own Shadow-Drawing Art
|
| 31 |
+
|
| 32 |
+
### Shadow-Drawing Art from a Single Object
|
| 33 |
+
|
| 34 |
+
First, download the LoRA weights for the line drawing generation model from HuggingFace:
|
| 35 |
+
```bash
|
| 36 |
+
huggingface-cli download RedFairy/Flux-ShadowDraw-LoRA --local-dir ./checkpoints
|
| 37 |
+
```
|
| 38 |
+
|
| 39 |
+
Then, prepare your 3D object file in `.obj`, `.glb`, or `.ply` format, and run the following command:
|
| 40 |
+
|
| 41 |
+
```bash
|
| 42 |
+
python scripts/launch.py --object_filepaths PATH_TO_OBJECT_FILE \
|
| 43 |
+
--save_name SAVE_NAME \
|
| 44 |
+
--output_root OUTPUT_ROOT \
|
| 45 |
+
--optimize_object_params
|
| 46 |
+
```
|
| 47 |
+
|
| 48 |
+
To accelerate the generation process, you can remove `--optimize_object_params` and instead add `--sample_distribution`. This will fix the azimuths and fit a distribution of object internal rotations with respect to fractal dimension and sample internal rotations accordingly.
|
| 49 |
+
|
| 50 |
+
To add gravity to the object, add `--use_gravity`. If specified, the object will be first animated by gravity to find a stable pose and then rendered.
|
| 51 |
+
|
| 52 |
+
### Shadow-Drawing Art from Multiple Objects
|
| 53 |
+
|
| 54 |
+
For multi-object compositions, you can use the following command:
|
| 55 |
+
|
| 56 |
+
```bash
|
| 57 |
+
python scripts/launch.py --object_filepaths PATH_TO_OBJECT_FILES \
|
| 58 |
+
--save_name SAVE_NAME \
|
| 59 |
+
--output_root OUTPUT_ROOT \
|
| 60 |
+
--sample_distribution
|
| 61 |
+
```
|
| 62 |
+
|
| 63 |
+
Here, `PATH_TO_OBJECT_FILES` should be a space-separated list of `.obj`, `.glb`, or `.ply` files.
|
| 64 |
+
|
| 65 |
+
For user-specified subject, add `--user_character CHARACTER_NAME` and `--system_prompt_path system_prompts/prompt_proposal_user.txt`.
|
| 66 |
+
|
| 67 |
+
## 📊 Citation
|
| 68 |
+
If you find this work useful, please consider citing:
|
| 69 |
+
|
| 70 |
+
```bibtex
|
| 71 |
+
@article{luo2025shadowdraw,
|
| 72 |
+
title={ShadowDraw: From Any Object to Shadow–Drawing Compositional Art},
|
| 73 |
+
author={Luo, Rundong and Snavely, Noah and Ma, Wei-Chiu},
|
| 74 |
+
journal={arXiv preprint arXiv:2512.05110},
|
| 75 |
+
year={2025}
|
| 76 |
+
}
|
| 77 |
+
```
|