Skip to content

Commit

Permalink
Port softras to graphics module (#162)
Browse files Browse the repository at this point in the history
* Port softras to graphics module

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

* Port softras to graphics module

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

* Remove unnecessary import

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

* Remove unnecessary import

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

* Fix bug in camera_direction argument

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

* Fix CI errors

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

* Create tensors on-device

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

* Fix CI bugs

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

* Fix CI bugs

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

* Address review comments

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

* Address review issues

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

* Fix docstrings

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

* Fix docstrings

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

* Fix typo in docstrcing

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

* Address review comments

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

* Update flake8 config

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

* Remove unwanted files, fix formatting

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

* Remove mutable defaults for kwargs

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

* Add defaults for projection mode

Signed-off-by: Krishna Murthy <krrish94@gmail.com>
  • Loading branch information
krrish94 committed Feb 27, 2020
1 parent cbd057c commit 1530b35
Show file tree
Hide file tree
Showing 32 changed files with 439 additions and 2,370 deletions.
7 changes: 5 additions & 2 deletions .flake8
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,11 @@ exclude = .git, tests/, build/,
kaolin/cuda,
kaolin/datasets,
kaolin/engine,
kaolin/graphics,
kaolin/helpers.py
kaolin/graphics/dib_renderer,
kaolin/graphics/DIBRenderer.py,
kaolin/graphics/NeuralMeshRenderer.py,
kaolin/graphics/nmr,
kaolin/helpers.py,
kaolin/mathutils,
kaolin/metrics,
kaolin/models,
Expand Down
458 changes: 302 additions & 156 deletions kaolin/graphics/SoftRenderer.py

Large diffs are not rendered by default.

72 changes: 0 additions & 72 deletions kaolin/graphics/Transformations.py

This file was deleted.

6 changes: 3 additions & 3 deletions kaolin/graphics/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import kaolin.graphics.Lighting
import kaolin.graphics.Transformations
import kaolin.graphics.nmr
from .Lighting import *
from .nmr import *
from .softras import *

from .DifferentiableRenderer import DifferentiableRenderer
from .NeuralMeshRenderer import NeuralMeshRenderer
Expand Down
34 changes: 0 additions & 34 deletions kaolin/graphics/softras/__init__.py
Original file line number Diff line number Diff line change
@@ -1,34 +0,0 @@
# Soft Rasterizer (SoftRas)
#
# Copyright (c) 2017 Hiroharu Kato
# Copyright (c) 2018 Nikos Kolotouros
# Copyright (c) 2019 Shichen Liu
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.

from . import functional
from .mesh import Mesh
from .renderer import Renderer, SoftRenderer
from .transform import Projection, LookAt, Look, Transform
from .lighting import AmbientLighting, DirectionalLighting, Lighting
from .rasterizer import SoftRasterizer
from .losses import LaplacianLoss, FlattenLoss


__version__ = '1.0.0'
58 changes: 0 additions & 58 deletions kaolin/graphics/softras/cuda/create_texture_image_cuda.cpp

This file was deleted.

200 changes: 0 additions & 200 deletions kaolin/graphics/softras/cuda/create_texture_image_cuda_kernel.cu

This file was deleted.

0 comments on commit 1530b35

Please sign in to comment.