CARVIEW |
Select Language
HTTP/2 200
date: Mon, 28 Jul 2025 06:48:49 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/"f8b15094a142c2d8f3dd7ba1041e2acd"
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=pywGgsr8VrWwxsF%2BsT5OIgRzrXUuofY%2FIxIQb1tH5lt%2F%2B%2FhNiNw725cLekbpE3%2BMlwve41AJu7DtKD2UG3JIeA%2BMzlJGMrDl%2FXJwXdcPtIe2jqShHe%2BBPu7bVKVbeFFuqm6553USNrQZO4CcMMIY2A8H9fmgj2aSIAOkGLbkjRpSY%2B9N5Hek%2FqM1OwVpShe4pa%2B%2BUQ7pPcaKQm5anOwUkId9dMNp0OFMokcaKjPKJwoXgDy73ZIl%2FpsNesXKjEiKxDjeRETyNtrSZDD%2FCRkDeA%3D%3D--I7jV9T3GplpVA1zS--RyzABB7rYpdtfmijpmXd6g%3D%3D; Path=/; HttpOnly; Secure; SameSite=Lax
set-cookie: _octo=GH1.1.490651831.1753685328; Path=/; Domain=github.com; Expires=Tue, 28 Jul 2026 06:48:48 GMT; Secure; SameSite=Lax
set-cookie: logged_in=no; Path=/; Domain=github.com; Expires=Tue, 28 Jul 2026 06:48:48 GMT; HttpOnly; Secure; SameSite=Lax
x-github-request-id: E4B4:5FFA9:15BF14F:1C6ABD4:68871D50
screen cameras lose -1 · facebookresearch/pytorch3d@bf3bc6f · GitHub
Copy file name to clipboardExpand all lines: pytorch3d/renderer/camera_conversions.py
Copy file name to clipboardExpand all lines: pytorch3d/renderer/cameras.py
Copy file name to clipboardExpand all lines: tests/test_render_meshes.py
Skip to content
Navigation Menu
{{ message }}
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit bf3bc6f
screen cameras lose -1
Summary:
All the renderers in PyTorch3D (pointclouds including pulsar, meshes, raysampling) use align_corners=False style. NDC space goes between the edges of the outer pixels. For a non square image with W>H, the vertical NDC space goes from -1 to 1 and the horizontal from -W/H to W/H.
However it was recently pointed out that functionality which deals with screen space inside the camera classes is inconsistent with this. It unintentionally uses align_corners=True. This fixes that.
This would change behaviour of the following:
- If you create a camera in screen coordinates, i.e. setting in_ndc=False, then anything you do with the camera which touches NDC space may be affected, including trying to use renderers. The transform_points_screen function will not be affected...
- If you call the function “transform_points_screen” on a camera defined in NDC space results will be different. I have illustrated in the diff how to get the old results from the new results but this probably isn’t the right long-term solution..
Reviewed By: gkioxari
Differential Revision: D32536305
fbshipit-source-id: 377325a9137282971dcb7ca11a6cba3fc700c9ce1 parent cff4876 commit bf3bc6fCopy full SHA for bf3bc6f
File tree
Expand file treeCollapse file tree
5 files changed
+34
-37
lines changedFilter options
- docs/notes
- pytorch3d/renderer
- tests
Expand file treeCollapse file tree
5 files changed
+34
-37
lines changed+9-8Lines changed: 9 additions & 8 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
16 | 16 |
| |
17 | 17 |
| |
18 | 18 |
| |
19 |
| - | |
| 19 | + | |
| 20 | + | |
20 | 21 |
| |
21 | 22 |
| |
22 |
| - | |
| 23 | + | |
23 | 24 |
| |
24 | 25 |
| |
25 | 26 |
| |
| |||
83 | 84 |
| |
84 | 85 |
| |
85 | 86 |
| |
86 |
| - | |
87 |
| - | |
| 87 | + | |
| 88 | + | |
88 | 89 |
| |
89 | 90 |
| |
90 | 91 |
| |
91 | 92 |
| |
92 | 93 |
| |
93 | 94 |
| |
94 | 95 |
| |
95 |
| - | |
96 |
| - | |
| 96 | + | |
| 97 | + | |
97 | 98 |
| |
98 |
| - | |
99 |
| - | |
| 99 | + | |
| 100 | + | |
100 | 101 |
|
pytorch3d/renderer/camera_conversions.py
Copy file name to clipboardExpand all lines: pytorch3d/renderer/camera_conversions.py+4-4Lines changed: 4 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
33 | 33 |
| |
34 | 34 |
| |
35 | 35 |
| |
36 |
| - | |
| 36 | + | |
37 | 37 |
| |
38 |
| - | |
| 38 | + | |
39 | 39 |
| |
40 | 40 |
| |
41 | 41 |
| |
| |||
75 | 75 |
| |
76 | 76 |
| |
77 | 77 |
| |
78 |
| - | |
| 78 | + | |
79 | 79 |
| |
80 |
| - | |
| 80 | + | |
81 | 81 |
| |
82 | 82 |
| |
83 | 83 |
| |
|
pytorch3d/renderer/cameras.py
Copy file name to clipboardExpand all lines: pytorch3d/renderer/cameras.py+6-5Lines changed: 6 additions & 5 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
36 | 36 |
| |
37 | 37 |
| |
38 | 38 |
| |
39 |
| - | |
40 |
| - | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
41 | 42 |
| |
42 | 43 |
| |
43 | 44 |
| |
| |||
1623 | 1624 |
| |
1624 | 1625 |
| |
1625 | 1626 |
| |
1626 |
| - | |
| 1627 | + | |
1627 | 1628 |
| |
1628 | 1629 |
| |
1629 | 1630 |
| |
1630 |
| - | |
1631 |
| - | |
| 1631 | + | |
| 1632 | + | |
1632 | 1633 |
| |
1633 | 1634 |
| |
1634 | 1635 |
| |
|
+8-8Lines changed: 8 additions & 8 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
130 | 130 |
| |
131 | 131 |
| |
132 | 132 |
| |
133 |
| - | |
| 133 | + | |
134 | 134 |
| |
135 |
| - | |
| 135 | + | |
136 | 136 |
| |
137 | 137 |
| |
138 | 138 |
| |
| |||
524 | 524 |
| |
525 | 525 |
| |
526 | 526 |
| |
527 |
| - | |
| 527 | + | |
528 | 528 |
| |
529 | 529 |
| |
530 | 530 |
| |
| |||
533 | 533 |
| |
534 | 534 |
| |
535 | 535 |
| |
536 |
| - | |
| 536 | + | |
537 | 537 |
| |
538 | 538 |
| |
539 | 539 |
| |
| |||
821 | 821 |
| |
822 | 822 |
| |
823 | 823 |
| |
824 |
| - | |
| 824 | + | |
825 | 825 |
| |
826 | 826 |
| |
827 | 827 |
| |
| |||
917 | 917 |
| |
918 | 918 |
| |
919 | 919 |
| |
920 |
| - | |
| 920 | + | |
921 | 921 |
| |
922 | 922 |
| |
923 | 923 |
| |
| |||
974 | 974 |
| |
975 | 975 |
| |
976 | 976 |
| |
977 |
| - | |
| 977 | + | |
978 | 978 |
| |
979 | 979 |
| |
980 | 980 |
| |
| |||
1026 | 1026 |
| |
1027 | 1027 |
| |
1028 | 1028 |
| |
1029 |
| - | |
| 1029 | + |
tests/test_render_meshes.py
Copy file name to clipboardExpand all lines: tests/test_render_meshes.py+7-12Lines changed: 7 additions & 12 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
250 | 250 |
| |
251 | 251 |
| |
252 | 252 |
| |
| 253 | + | |
253 | 254 |
| |
254 | 255 |
| |
255 | 256 |
| |
256 | 257 |
| |
257 | 258 |
| |
258 |
| - | |
259 |
| - | |
260 |
| - | |
261 |
| - | |
262 |
| - | |
263 |
| - | |
264 |
| - | |
265 |
| - | |
266 |
| - | |
267 |
| - | |
268 |
| - | |
269 |
| - | |
| 259 | + | |
| 260 | + | |
270 | 261 |
| |
271 | 262 |
| |
272 | 263 |
| |
| |||
285 | 276 |
| |
286 | 277 |
| |
287 | 278 |
| |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
288 | 283 |
| |
289 | 284 |
| |
290 | 285 |
| |
|
You can’t perform that action at this time.
0 commit comments