CARVIEW |
Select Language
HTTP/2 200
date: Wed, 30 Jul 2025 22:27:25 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/"306c76b5c6a4149181fda9c75dc54c2a"
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 wss://alive-staging.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=7Fw1E%2B%2Bgnpi8Lu5C%2FawPKUxDfjvKg%2FTiDrmzn0%2FNEYZWKguDbC45Zr4Dn%2ByQd8GPXy1AZbG2ivbGDk056dxYHhhlDQKukCvo8cHpvXPFq%2BqcaBcTCGEqtKNlgv0eM%2BlHvuLZDM7fqwq21Y0u%2BnJO2a46AI3ex%2BQsQSxEYkYj6YdvQNxPxzA6AgSvwUFv7HTHyFqTQ%2F73%2BOTqKIjt%2F87O6E9tmdQbpKsysuDXuKiSqhWITnHPoMCPV%2F%2FdLm7yoh1aJB3f1xLysY7JOcJZOy%2Bpeg%3D%3D--W19bWePwgD9uXw2f--VNmvYnSMm%2FFRRGuxcbu%2FiA%3D%3D; Path=/; HttpOnly; Secure; SameSite=Lax
set-cookie: _octo=GH1.1.1426056718.1753914445; Path=/; Domain=github.com; Expires=Thu, 30 Jul 2026 22:27:25 GMT; Secure; SameSite=Lax
set-cookie: logged_in=no; Path=/; Domain=github.com; Expires=Thu, 30 Jul 2026 22:27:25 GMT; HttpOnly; Secure; SameSite=Lax
x-github-request-id: BBF4:36DC87:89B8C:C8C75:688A9C4D
Fix camera conversion between opencv and pytorch3d · facebookresearch/pytorch3d@8fa438c · GitHub
Copy file name to clipboardExpand all lines: pytorch3d/renderer/camera_conversions.py
Copy file name to clipboardExpand all lines: tests/test_camera_conversions.py
Skip to content
Navigation Menu
{{ message }}
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit 8fa438c
Fix camera conversion between opencv and pytorch3d
Summary:
For non square image, the NDC space in pytorch3d is not square [-1, 1]. Instead, it is [-1, 1] for the smallest side, and [-u, u] for the largest side, where u > 1. This behavior is followed by the pytorch3d renderer.
See the function `get_ndc_to_screen_transform` for a example.
Without this fix, the rendering result is not correct using the converted pytorch3d-camera from a opencv-camera on non square images.
This fix also helps the `transform_points_screen` function delivers consistent results with opencv projection for the converted pytorch3d-camera.
Reviewed By: classner
Differential Revision: D31366775
fbshipit-source-id: 8858ae7b5cf5c0a4af5a2af40a1358b2fe4cf74b1 parent 815a93c commit 8fa438cCopy full SHA for 8fa438c
File tree
Expand file treeCollapse file tree
2 files changed
+24
-22
lines changedFilter options
- pytorch3d/renderer
- tests
Expand file treeCollapse file tree
2 files changed
+24
-22
lines changedpytorch3d/renderer/camera_conversions.py
Copy file name to clipboardExpand all lines: pytorch3d/renderer/camera_conversions.py+19-4Lines changed: 19 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
28 | 28 |
| |
29 | 29 |
| |
30 | 30 |
| |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
31 | 40 |
| |
32 |
| - | |
33 |
| - | |
| 41 | + | |
| 42 | + | |
34 | 43 |
| |
35 | 44 |
| |
36 | 45 |
| |
| |||
45 | 54 |
| |
46 | 55 |
| |
47 | 56 |
| |
| 57 | + | |
48 | 58 |
| |
49 | 59 |
| |
50 | 60 |
| |
| |||
64 | 74 |
| |
65 | 75 |
| |
66 | 76 |
| |
67 |
| - | |
68 |
| - | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
69 | 84 |
| |
70 | 85 |
| |
71 | 86 |
| |
|
tests/test_camera_conversions.py
Copy file name to clipboardExpand all lines: tests/test_camera_conversions.py+5-18Lines changed: 5 additions & 18 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
24 | 24 |
| |
25 | 25 |
| |
26 | 26 |
| |
27 |
| - | |
28 |
| - | |
29 |
| - | |
30 |
| - | |
31 |
| - | |
32 |
| - | |
33 |
| - | |
34 |
| - | |
35 | 27 |
| |
36 | 28 |
| |
37 | 29 |
| |
| |||
145 | 137 |
| |
146 | 138 |
| |
147 | 139 |
| |
148 |
| - | |
149 |
| - | |
150 |
| - | |
151 |
| - | |
152 |
| - | |
153 |
| - | |
154 |
| - | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
155 | 144 |
| |
156 | 145 |
| |
157 |
| - | |
158 |
| - | |
159 |
| - | |
| 146 | + | |
160 | 147 |
| |
161 | 148 |
| |
162 | 149 |
| |
|
You can’t perform that action at this time.
0 commit comments