CARVIEW |
Select Language
HTTP/2 200
date: Mon, 28 Jul 2025 02:08:26 GMT
content-type: text/html; charset=utf-8
vary: X-PJAX, X-PJAX-Container, Turbo-Visit, Turbo-Frame, X-Requested-With,Accept-Encoding, Accept, X-Requested-With
x-repository-download: git clone https://github.com/facebookresearch/pytorch3d.git
etag: W/"9e651e19fa43ae7fd353bb112b1433e5"
cache-control: max-age=0, private, must-revalidate
strict-transport-security: max-age=31536000; includeSubdomains; preload
x-frame-options: deny
x-content-type-options: nosniff
x-xss-protection: 0
referrer-policy: no-referrer-when-downgrade
content-security-policy: default-src 'none'; base-uri 'self'; child-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/; connect-src 'self' uploads.github.com www.githubstatus.com collector.github.com raw.githubusercontent.com api.github.com github-cloud.s3.amazonaws.com github-production-repository-file-5c1aeb.s3.amazonaws.com github-production-upload-manifest-file-7fdce7.s3.amazonaws.com github-production-user-asset-6210df.s3.amazonaws.com *.rel.tunnels.api.visualstudio.com wss://*.rel.tunnels.api.visualstudio.com objects-origin.githubusercontent.com copilot-proxy.githubusercontent.com proxy.individual.githubcopilot.com proxy.business.githubcopilot.com proxy.enterprise.githubcopilot.com *.actions.githubusercontent.com wss://*.actions.githubusercontent.com productionresultssa0.blob.core.windows.net/ productionresultssa1.blob.core.windows.net/ productionresultssa2.blob.core.windows.net/ productionresultssa3.blob.core.windows.net/ productionresultssa4.blob.core.windows.net/ productionresultssa5.blob.core.windows.net/ productionresultssa6.blob.core.windows.net/ productionresultssa7.blob.core.windows.net/ productionresultssa8.blob.core.windows.net/ productionresultssa9.blob.core.windows.net/ productionresultssa10.blob.core.windows.net/ productionresultssa11.blob.core.windows.net/ productionresultssa12.blob.core.windows.net/ productionresultssa13.blob.core.windows.net/ productionresultssa14.blob.core.windows.net/ productionresultssa15.blob.core.windows.net/ productionresultssa16.blob.core.windows.net/ productionresultssa17.blob.core.windows.net/ productionresultssa18.blob.core.windows.net/ productionresultssa19.blob.core.windows.net/ github-production-repository-image-32fea6.s3.amazonaws.com github-production-release-asset-2e65be.s3.amazonaws.com insights.github.com wss://alive.github.com api.githubcopilot.com api.individual.githubcopilot.com api.business.githubcopilot.com api.enterprise.githubcopilot.com; font-src github.githubassets.com; form-action 'self' github.com gist.github.com copilot-workspace.githubnext.com objects-origin.githubusercontent.com; frame-ancestors 'none'; frame-src viewscreen.githubusercontent.com notebooks.githubusercontent.com; img-src 'self' data: blob: github.githubassets.com media.githubusercontent.com camo.githubusercontent.com identicons.github.com avatars.githubusercontent.com private-avatars.githubusercontent.com github-cloud.s3.amazonaws.com objects.githubusercontent.com release-assets.githubusercontent.com secured-user-images.githubusercontent.com/ user-images.githubusercontent.com/ private-user-images.githubusercontent.com opengraph.githubassets.com copilotprodattachments.blob.core.windows.net/github-production-copilot-attachments/ github-production-user-asset-6210df.s3.amazonaws.com customer-stories-feed.github.com spotlights-feed.github.com objects-origin.githubusercontent.com *.githubusercontent.com; manifest-src 'self'; media-src github.com user-images.githubusercontent.com/ secured-user-images.githubusercontent.com/ private-user-images.githubusercontent.com github-production-user-asset-6210df.s3.amazonaws.com gist.github.com; script-src github.githubassets.com; style-src 'unsafe-inline' github.githubassets.com; upgrade-insecure-requests; worker-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/
server: github.com
content-encoding: gzip
accept-ranges: bytes
set-cookie: _gh_sess=7xNgg3bEihHiDOu1gsml%2BW32Tel6llDZeRYlCtpGbmhdoodriK2eX25HkCbUiiXsdu%2BxoNkB%2BgtHg2%2Bm5Kb5cqo48anYdzRjQ6K7iEVzyvLGemQtfuL%2B6wEPb6bv3rD%2FsifgQxiDu4hKfSdmJKeDEWYDb6PkRxq1fSfAIWvhiXi1FWkx2MaJTrkboNpg91OFtoVTE%2BOZUjuY5ZycMyql6%2FehFYxQ66qUar5Vgvo%2Bd3alyS5N83PDGmUaOyS3D8swX%2BdwS3Te10G7S1Pfoz2Pbg%3D%3D--9ZRDJ0knPHGAPNSH--ng727W9dmrdeGioZk%2FB%2BhA%3D%3D; Path=/; HttpOnly; Secure; SameSite=Lax
set-cookie: _octo=GH1.1.1085899113.1753668505; Path=/; Domain=github.com; Expires=Tue, 28 Jul 2026 02:08:25 GMT; Secure; SameSite=Lax
set-cookie: logged_in=no; Path=/; Domain=github.com; Expires=Tue, 28 Jul 2026 02:08:25 GMT; HttpOnly; Secure; SameSite=Lax
x-github-request-id: AA36:3240E6:12A1FE2:18C08E4:6886DB99
shader: add SoftDepthShader and HardDepthShader for rendering depth m… · facebookresearch/pytorch3d@7e0146e · GitHub
Copy file name to clipboardExpand all lines: pytorch3d/renderer/mesh/shader.py
Skip to content
Navigation Menu
{{ message }}
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit 7e0146e
shader: add SoftDepthShader and HardDepthShader for rendering depth maps (#36)
Summary:
X-link: fairinternal/pytorch3d#36
This adds two shaders for rendering depth maps for meshes. This is useful for structure from motion applications that learn depths based off of camera pair disparities.
There's two shaders, one hard which just returns the distances and then a second that does a cumsum on the probabilities of the points with a weighted sum. Areas that don't have any z faces are set to the zfar distance.
Output from this renderer is `[N, H, W]` since it's just depth no need for channels.
I haven't tested this in an ML model yet just in a notebook.
hard:

soft:

Pull Request resolved: #1208
Reviewed By: bottler
Differential Revision: D36682194
Pulled By: d4l3k
fbshipit-source-id: 5d4e10c6fb0fff5427be4ddd3bd76305a7ccc1e21 parent 0e4c53c commit 7e0146eCopy full SHA for 7e0146e
File tree
Expand file treeCollapse file tree
2 files changed
+72
-0
lines changedFilter options
- pytorch3d/renderer/mesh
- tests
Expand file treeCollapse file tree
2 files changed
+72
-0
lines changedpytorch3d/renderer/mesh/shader.py
Copy file name to clipboardExpand all lines: pytorch3d/renderer/mesh/shader.py+68Lines changed: 68 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
353 | 353 |
| |
354 | 354 |
| |
355 | 355 |
| |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + |
+4Lines changed: 4 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
10 | 10 |
| |
11 | 11 |
| |
12 | 12 |
| |
| 13 | + | |
13 | 14 |
| |
14 | 15 |
| |
15 | 16 |
| |
| 17 | + | |
16 | 18 |
| |
17 | 19 |
| |
18 | 20 |
| |
| |||
24 | 26 |
| |
25 | 27 |
| |
26 | 28 |
| |
| 29 | + | |
27 | 30 |
| |
28 | 31 |
| |
29 | 32 |
| |
| 33 | + | |
30 | 34 |
| |
31 | 35 |
| |
32 | 36 |
| |
|
You can’t perform that action at this time.
0 commit comments