{"id":14959019,"url":"https://github.com/ndrplz/differentiable-renderer","last_synced_at":"2025-05-02T12:32:00.562Z","repository":{"id":97237340,"uuid":"147653041","full_name":"ndrplz/differentiable-renderer","owner":"ndrplz","description":"Rastering algorithm to approximate the rendering of a 3D model silhouette in a fully differentiable way.","archived":false,"fork":false,"pushed_at":"2018-12-22T09:34:51.000Z","size":7466,"stargazers_count":82,"open_issues_count":0,"forks_count":12,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-07T02:07:15.963Z","etag":null,"topics":["differentiable-rendering","eccv-2018","python","pytorch","rendering","rendering-engine","tensorflow","tensorflow-models"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ndrplz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-09-06T09:50:21.000Z","updated_at":"2025-03-25T05:18:47.000Z","dependencies_parsed_at":null,"dependency_job_id":"ddc6f5ff-fab3-4e54-8471-529fe5caacc9","html_url":"https://github.com/ndrplz/differentiable-renderer","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ndrplz%2Fdifferentiable-renderer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ndrplz%2Fdifferentiable-renderer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ndrplz%2Fdifferentiable-renderer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ndrplz%2Fdifferentiable-renderer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ndrplz","download_url":"https://codeload.github.com/ndrplz/differentiable-renderer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252038224,"owners_count":21684655,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["differentiable-rendering","eccv-2018","python","pytorch","rendering","rendering-engine","tensorflow","tensorflow-models"],"created_at":"2024-09-24T13:18:42.323Z","updated_at":"2025-05-02T12:31:55.551Z","avatar_url":"https://github.com/ndrplz.png","language":"Python","readme":"# Differentiable mesh renderer [Tensorflow]\nRastering algorithm to approximate the rendering of a 3D model silhouette in a fully differentiable way.\n\n**:arrow_right: PyTorch implementation now available in the [`pytorch branch`](https://github.com/ndrplz/tensorflow-mesh-renderer/tree/pytorch)!**\n\n---\n\nThis code accompanies the **[paper](https://iris.unimore.it/retrieve/handle/11380/1167726/205862/palazzi_eccvw.pdf)**:\n\u003e \"End-to-end 6-DoF Object Pose Estimation through Differentiable Rasterization\"\n\n\u003e Andrea Palazzi, Luca Bergamini, Simone Calderara, Rita Cucchiara\n\nappeared in \"*Second Workshop on 3D Reconstruction Meets Semantics (3DRMS)*\" at ECCVW 2018.\n\n\n\u003ctable style=\"width:100%\"\u003e\n    \u003ctr\u003e\n        \u003cth\u003e\n            \u003cp align=\"center\"\u003e\n            \u003cimg src=\"./img/rot_y.gif\" alt=\"Rotation on Y axis\" width=\"50%\" height=\"50%\"\u003e\n            \u003cbr\u003eRendering while rotating the camera around Y axis.\n            \u003c/p\u003e\n        \u003c/th\u003e\n        \u003cth\u003e\n            \u003cp align=\"center\"\u003e\n            \u003cimg src=\"./img/rot_z.gif\" alt=\"Rotation on Z axis\" width=\"50%\" height=\"50%\"\u003e\n            \u003cbr\u003eRendering while rotating the camera around Z axis.\n            \u003c/p\u003e\n        \u003c/th\u003e\n     \u003c/tr\u003e\n \u003c/table\u003e\n\n---\n\n## Docs\n\n#### Input meshes\nThe input meshes are expected to be `np.ndarray` of shape (n_triangles, 3, 3). Each mesh can be composed of a variable number of triangles. Five meshes of car 3D models are already in [data/](./data/) directory to test the Rasterer.\n\n#### Hello World\nA short snippet to test the Rasterer is available in [`main.py`](./main.py). Just run it.\n\nThree 3D models are randomly sampled from the dummy dataset and rendered in a batch. In this snippet the position of the camera is kept fixed for all three (but it may be changed).\n\nIf everything went fine, you should see the rendering output for the 3D models sampled. Something like this:\n\n\u003cp align=\"center\"\u003e\n \u003cimg src=\"./img/output.png\" alt=\"render_output\" width=\"33%\" height=\"33%\"\u003e\n \u003cbr\u003eOutput with resolution=(128, 128)\n\u003c/p\u003e\n\n#### Moving the camera in the 3D world\n\nThere is a class [`RotoTranslation`](./rastering/rototranslation.py) which encapsulates the camera matrix, providing an easy way to change the camera location while always mantaining a geometrically consistent pose.\n\nThe initial camera pose is set as:\n```\ncamera_pose = RotoTranslation(rotation=Vector(x=90., y=0., z=0.),\n                              translation=Vector(x=0., y=-8., z=0.),\n                              angle_unit='degrees')\n```\nTo change its position, simply use its setters:\n* `alpha_x`, `alpha_y`, `alpha_z` to change the rotation angle around respective axes\n* `t_x`, `t_y`, `t_z` to change the translation along respective axes\n\n## License\n\nThis code is released under MIT license. In case you use this code in your academic work, please cite the following paper:\n```\n@inproceedings{palazzi2018end,\n  title={End-to-end 6-DoF Object Pose Estimation through Differentiable Rasterization},\n  author={Palazzi, Andrea and Bergamini, Luca and Calderara, Simone and Cucchiara, Rita},\n  booktitle={Second Workshop on 3D Reconstruction Meets Semantics (3DRMS)},\n  year={2018}\n}\n```\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fndrplz%2Fdifferentiable-renderer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fndrplz%2Fdifferentiable-renderer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fndrplz%2Fdifferentiable-renderer/lists"}