Skip to content

Commit

Permalink
Establish softras parity with original impl (#236)
Browse files Browse the repository at this point in the history
* Bring softras impl to parity with original

Signed-off-by: Krishna Murthy <krrish94@gmail.com>

* Add softras test

Signed-off-by: Krishna Murthy <krrish94@gmail.com>

* Fix flake8 errors

Signed-off-by: Krishna Murthy <krrish94@gmail.com>

* Add simple render example

Signed-off-by: Krishna Murthy <krrish94@gmail.com>

* Make paths generic

Signed-off-by: Krishna Murthy <krrish94@gmail.com>

* Add softras vertex optimization example

Signed-off-by: Krishna Murthy <krrish94@gmail.com>

* Add softras texture optimization example

Signed-off-by: Krishna Murthy <krrish94@gmail.com>

* Add assets for softras examples

Signed-off-by: Krishna Murthy <krrish94@gmail.com>

* Minor bugfix

Signed-off-by: Krishna Murthy <krrish94@gmail.com>

* Add assets for examples

Signed-off-by: Krishna Murthy <krrish94@gmail.com>

* Add instructions for running softras examples

Signed-off-by: Krishna Murthy <krrish94@gmail.com>

* Update copyright year

Signed-off-by: Krishna Murthy <krrish94@gmail.com>

* Fix bug from CI test

Signed-off-by: Krishna Murthy <krrish94@gmail.com>

* Run vertex opt for more iterations

Signed-off-by: Krishna Murthy <krrish94@gmail.com>

* Address review comments; move examples inside softras dir

Signed-off-by: Krishna Murthy <krrish94@gmail.com>

* Remove old SoftRas dir

Signed-off-by: Krishna Murthy <krrish94@gmail.com>

* Remove output gifs

Signed-off-by: Krishna Murthy <krrish94@gmail.com>

* Add assets for README

Signed-off-by: Krishna Murthy <krrish94@gmail.com>

* Address review comment

Signed-off-by: Krishna Murthy <krrish94@gmail.com>

* Add argparse support

Signed-off-by: Krishna Murthy <krrish94@gmail.com>

* Add CI test for examples

Signed-off-by: Krishna Murthy <krrish94@gmail.com>

* Add command to execute softras examples

Signed-off-by: Krishna Murthy <krrish94@gmail.com>

* Fix file permission

Signed-off-by: Krishna Murthy <krrish94@gmail.com>

* Fix typo

Signed-off-by: Krishna Murthy <krrish94@gmail.com>
  • Loading branch information
krrish94 committed May 4, 2020
1 parent be02fa3 commit 110deee
Show file tree
Hide file tree
Showing 58 changed files with 80,883 additions and 4,391 deletions.
1 change: 1 addition & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,4 @@ full test:
- pytest --cov=kaolin/ tests/
- ./tests/examples/run/test_classification.sh
- ./tests/examples/run/test_nmr.sh
- ./tests/examples/run/test_softras_examples.sh
24 changes: 3 additions & 21 deletions examples/renderers/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,26 +39,8 @@ DIB-Renderer
}
```

## Building
# SoftRasterizer

Before running the examples in the `test` directory, ensure that you step into the `DIB-R`, the `NMR`, and the `SoftRas` directories respectively, and install the renderers following the steps outlined in their respective `README` files.
This popular renderer is based on the 2019 ICCV paper by Schichen Liu, Tianye Li, Weikai Chen, and Hao Li. Softras is a differentiable _rasterization-based_ renderer that can provide gradient with respect to the vertex positions and texture (color) of a Mesh. The following examples demonstrate a typical use cases, and can be repurposed to suit your needs.


## Testing

Then, navigate into the `test` directory, and run any of the tests. For example, test Neural Mesh Renderer by running

```
python test_nmr.py
```

or, for SoftRasterizer

```
python test_softras.py
```

or, for DIB-Renderer
```
python test_dibr.py
```
Refer to our [examples](softras) for details on how to use this differentiable rendering module for inverse graphics tasks.
108 changes: 0 additions & 108 deletions examples/renderers/SoftRas/.gitignore

This file was deleted.

23 changes: 0 additions & 23 deletions examples/renderers/SoftRas/LICENSE

This file was deleted.

95 changes: 0 additions & 95 deletions examples/renderers/SoftRas/README.md

This file was deleted.

133 changes: 0 additions & 133 deletions examples/renderers/SoftRas/examples/demo_deform.py

This file was deleted.

0 comments on commit 110deee

Please sign in to comment.