Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 16 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# [ShadowArt-Revisited](https://kaustubh-sadekar.github.io/ShadowArt-Revisited/)

Shadow Art Revisited: A Differentiable Rendering Based Approach

![ShadowArt Teaser](media/teaser.png)
Expand All @@ -8,51 +9,56 @@ Shadow Art Revisited: A Differentiable Rendering Based Approach

**Clone the repository**

```script
```shell
git clone https://github.com/kaustubh-sadekar/ShadowArt-Revisited.git
cd ShadowArt-Revisited
```

**Install required libraries**

```script
```shell
pip install -r requirements.txt
pip plotly
pip install plotly
curl -LO https://github.com/NVIDIA/cub/archive/1.10.0.tar.gz
tar xzf 1.10.0.tar.gz
python -c "import os; os.environ["CUB_HOME"] = os.getcwd() + "/cub-1.10.0" "
python -c "import os; os.environ["\'CUB_HOME\'"] = os.getcwd() + "\'/cub-1.10.0\'"; "
pip install 'git+https://github.com/facebookresearch/pytorch3d.git@stable'
# conda install pytorch3d # alternative method in conda env
```

We used [PyTorch3D](https://github.com/facebookresearch/pytorch3d) to create the differentiable rendering-based shadowart pipeline.
We used [PyTorch3D](https://github.com/facebookresearch/pytorch3d) to create the differentiable rendering-based shadowart pipeline.

## Examples

### Create Shadow Art Using Voxel Optimization

To create shadow art with two views with files duck.png and mikey.png use the following command.
```script
python val.py cuda:0 output1 600 0.01 -swt 10.0 -l1wt 10.0 -sdlist duck.png mikey.png

```shell
cd mesh
python val.py cuda:0 output1 600 0.01 0 -swt 10.0 -l1wt 10.0 -sdlist duck.png mikey.png
```

*For a better understanding of the input arguments type `python val.py -h`*

![Voxel Output](media/voxel_shadow_art.gif)

*Gif showing the optimization of the 3D voxel shadow art*


### Create Shadow Art Using Mesh Optimization

To create shadow art with two views with files duck.png and mikey.png use the following command.
```script

```shell
python val.py cuda:0 output1 2000 0.15 0 -swt 1.6 -l1wt 1.6 -mwt 0.0 -i2vwt 0.0 -ewt 1.6 -nwt 0.6 -lwt 1.2 -sdlist duck.png mikey.png
```

*For a better understanding of the input arguments type `python val.py -h`*

![Mesh Output](media/mesh_shadow_art.gif)

*Gif showing the optimization of the 3D shadow art mesh*


## Citation

If you would like to cite us, kindly use the following BibTeX entry.
Expand Down
4 changes: 1 addition & 3 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ numpy==1.19.2
opencv_contrib_python==4.5.1.48
Pillow==9.2.0
scikit_image==0.16.2
skimage==0.0
torch==1.8.1
torchvision==0.9.1
tqdm==4.50.2

tqdm==4.50.2