{"id":13741314,"url":"https://github.com/xcyan/nips16_PTN","last_synced_at":"2025-05-08T21:33:10.092Z","repository":{"id":50282044,"uuid":"72617619","full_name":"xcyan/nips16_PTN","owner":"xcyan","description":"Torch Implementation of NIPS'16 paper: Perspective Transformer Nets","archived":false,"fork":false,"pushed_at":"2020-11-01T06:14:01.000Z","size":67,"stargazers_count":142,"open_issues_count":4,"forks_count":31,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-02-22T14:38:06.611Z","etag":null,"topics":["3d-graphics","3d-models","deep-learning","nips-2016","shapenet","torch7"],"latest_commit_sha":null,"homepage":"","language":"Lua","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/xcyan.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}},"created_at":"2016-11-02T08:07:46.000Z","updated_at":"2024-10-27T17:35:09.000Z","dependencies_parsed_at":"2022-08-25T12:30:59.393Z","dependency_job_id":null,"html_url":"https://github.com/xcyan/nips16_PTN","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/xcyan%2Fnips16_PTN","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xcyan%2Fnips16_PTN/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xcyan%2Fnips16_PTN/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xcyan%2Fnips16_PTN/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xcyan","download_url":"https://codeload.github.com/xcyan/nips16_PTN/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253153163,"owners_count":21862318,"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":["3d-graphics","3d-models","deep-learning","nips-2016","shapenet","torch7"],"created_at":"2024-08-03T04:00:57.741Z","updated_at":"2025-05-08T21:33:09.841Z","avatar_url":"https://github.com/xcyan.png","language":"Lua","funding_links":[],"categories":["单目图像"],"sub_categories":["Project with code"],"readme":"# Perspective Transformer Nets (PTN)\n\nThis is the code for NIPS 2016 paper [Perspective Transformer Nets: Learning Single-View 3D Object Reconstruction without 3D Supervision](https://papers.nips.cc/paper/6206-perspective-transformer-nets-learning-single-view-3d-object-reconstruction-without-3d-supervision.pdf) by Xinchen Yan, Jimei Yang, Ersin Yumer, Yijie Guo and Honglak Lee\n\n\u003cimg src=\"https://b191c0a7-a-62cb3a1a-s-sites.googlegroups.com/site/skywalkeryxc/perspective_transformer_nets/website_background.png\" width=\"900px\" height=\"300px\"/\u003e\n\nPlease follow the instructions to run the code.\n\n## Requirements\nPTN requires or works with \n* Mac OS X or Linux\n* NVIDIA GPU\n\n## Installing Dependency\n* Install [Torch](http://torch.ch)\n* Install [Mattorch](https://github.com/clementfarabet/lua---mattorch)\n* Install [Perspective Transformer Layer](https://github.com/xcyan/ptnbhwd.git)\n\nThe following command installs the Perspective Transformer Layer:\n```\n./install_ptnbhwd.sh\n```\n\n## Dataset Downloading\n* Please run the command to download the pre-processed dataset (including rendered 2D views and 3D volumes):\n```\n./prepare_data.sh\n```\n* Disclaimer: Please cite the [ShapeNet paper](https://arxiv.org/pdf/1512.03012.pdf) as well.\n\n## Pre-trained Models Downloading (single-class experiment)\n\nPTN-Proj: ptn_proj.t7\n\nPTN-Comb: ptn_comb.t7\n\nCNN-Vol: cnn_vol.t7\n\n* The following command downloads the pre-trained models:\n```\n./download_models.sh\n```\n\n## Testing using Pre-trained Models (single-class experiment)\n\n* The following command evaluates the pre-trained models:\n```\n./eval_models.sh\n```\n\n## Training (single-class experiment)\n* If you want to pre-train the view-point indepedent image encoder on single-class, please run the following command.\nNote that the pre-training could take a few days on a single TITAN X GPU.\n```\n./demo_pretrain_singleclass.sh\n```\n* If you want to train PTN-Proj (unsupervised) on single-class based on pre-trained encoder, please run the command.\n```\n./demo_train_ptn_proj_singleclass.sh\n```\n* If you want to train PTN-Comb (3D supervision) on single-class based on pre-trained encoder, please run the command.\n```\n./demo_train_ptn_comb_singleclass.sh\n```\n* If you want to train CNN-Vol (3D supervision) on single-class based on pre-trained encoder, please run the command.\n```\n./demo_train_cnn_vol_singleclass.sh\n```\n\n## Using your own camera\n* In many cases, you want to implement your own camera matrix (e.g., intrinsic or extrinsic). \nPlease feel free to modify [this function](https://github.com/xcyan/nips16_PTN/blob/master/scripts/train_PTN.lua#L207).\n\n* Before start your own implementation, we recommand to go through some basic camera geometry in [this computer vision textbook](http://szeliski.org/Book/drafts/SzeliskiBook_20100903_draft.pdf) written by Richard Szeliski (see Eq 2.59 at Page 53).\n\n* Note that in our voxel ray-tracing implementation, we used the inverse camera matrix. \n\n## Third-party Implementation\n\nBesides our torch implementation, we recommend to see also the following third-party re-implementation:\n* [TensorFlow Implementation](https://github.com/tensorflow/models/tree/archive/research/ptn): This re-implementation was developed during Xinchen's Google internship; If you find a bug, please file a bug including @xcyan. \n\n## Citation\n\nIf you find this useful, please cite our work as follows:\n```\n@incollection{NIPS2016_6206,\ntitle = {Perspective Transformer Nets: Learning Single-View 3D Object Reconstruction without 3D Supervision},\nauthor = {Yan, Xinchen and Yang, Jimei and Yumer, Ersin and Guo, Yijie and Lee, Honglak},\nbooktitle = {Advances in Neural Information Processing Systems 29},\neditor = {D. D. Lee and M. Sugiyama and U. V. Luxburg and I. Guyon and R. Garnett},\npages = {1696--1704},\nyear = {2016},\npublisher = {Curran Associates, Inc.},\nurl = {http://papers.nips.cc/paper/6206-perspective-transformer-nets-learning-single-view-3d-object-reconstruction-without-3d-supervision.pdf}\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxcyan%2Fnips16_PTN","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxcyan%2Fnips16_PTN","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxcyan%2Fnips16_PTN/lists"}