{"id":33174771,"url":"https://shubhtuls.github.io/volumetricPrimitives/","last_synced_at":"2025-11-20T20:01:42.495Z","repository":{"id":82927000,"uuid":"85500417","full_name":"shubhtuls/volumetricPrimitives","owner":"shubhtuls","description":"Code release for \"Learning Shape Abstractions by Assembling Volumetric Primitives \" (CVPR 2017)","archived":false,"fork":false,"pushed_at":"2019-01-04T16:19:29.000Z","size":7411,"stargazers_count":147,"open_issues_count":5,"forks_count":34,"subscribers_count":9,"default_branch":"master","last_synced_at":"2024-03-18T04:44:26.509Z","etag":null,"topics":["3d-representation","abstraction","deep-learning","unsupervised-learning"],"latest_commit_sha":null,"homepage":null,"language":"Lua","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/shubhtuls.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2017-03-19T18:52:04.000Z","updated_at":"2024-03-10T08:20:51.000Z","dependencies_parsed_at":null,"dependency_job_id":"be2cfe51-32b0-41d1-84a0-f173bb988402","html_url":"https://github.com/shubhtuls/volumetricPrimitives","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/shubhtuls/volumetricPrimitives","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shubhtuls%2FvolumetricPrimitives","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shubhtuls%2FvolumetricPrimitives/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shubhtuls%2FvolumetricPrimitives/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shubhtuls%2FvolumetricPrimitives/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shubhtuls","download_url":"https://codeload.github.com/shubhtuls/volumetricPrimitives/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shubhtuls%2FvolumetricPrimitives/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":285503668,"owners_count":27182913,"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","status":"online","status_checked_at":"2025-11-20T02:00:05.334Z","response_time":54,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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-representation","abstraction","deep-learning","unsupervised-learning"],"created_at":"2025-11-16T02:00:33.688Z","updated_at":"2025-11-20T20:01:42.488Z","avatar_url":"https://github.com/shubhtuls.png","language":"Lua","funding_links":[],"categories":["References"],"sub_categories":["Papers - Object level"],"readme":"#  Learning Shape Abstractions by Assembling Volumetric Primitives\nShubham Tulsiani, Hao Su, Leonidas J. Guibas, Alexei A. Efros, Jitendra Malik. In CVPR, 2017.\n[Project Page](https://shubhtuls.github.io/volumetricPrimitives/)\n\n![Teaser Image](https://shubhtuls.github.io/volumetricPrimitives/resources/images/teaser.png)\n\n### 1) Demo\nPlease check out the [interactive notebook](demo/demo.ipynb) which shows how to compute the primitive based representation for an input shape. You'll need to - \n- Install a working implementation of torch and itorch.\n- Edit the path to the blender executable in the demo script.\n\n### 2) Training\nWe provide code to train the abstraction models on ShapeNet categories.\n\n#### a) Preprocessing\nWe'll first need to preprocess the ShapeNet models to compute voxelizations required as inputs as well as data required to implement the loss functions.\n- Install [gptoolbox](https://github.com/alecjacobson/gptoolbox) in external/gptoolbox. You'll need to compile the mex file for ```point_mesh_sqaured_distance```. You can first try [this precompiled version](https://people.eecs.berkeley.edu/~shubhtuls/cachedir/primitives/point_mesh_squared_distance.mexa64). If that does not work, you will have to compile it yourself - some helpful steps as required on my machine are pointed out [here](external/gptInstall.sh).\n- Modify the path to ShapeNet dataset (v1) in the [startup file](preprocess/shapenet/startup.m)\n- Specify the synsets of interest in the [preprocessing script](preprocess/shapenet/precomputeShapeData.m) and then run it.\n\n#### b) Learning\nThe training takes place in two stages. In the first we use all cuboids while biasing them to be small and then allow the network to choose to use fewer cuboids. Sample scripts for the synset corresponding to chairs are below.\n```\n# Stage 1\ncd experiments;\ndisp=0 gpu=1 nParts=20 nullReward=0 probLrDecay=0.0001 shapeLrDecay=0.01 synset=3001627 usePretrain=0 numTrainIter=20000 name=chairChamferSurf_null_small_init_prob0pt0001_shape0pt01 th cadAutoEncCuboids/primSelTsdfChamfer.lua\n```\n\nAfter the first network is trained, we allow the learning of primitive existence probabilities.\n```\n# Stage 2\ncd experiments;\npretrainNet=chairChamferSurf_null_small_init_prob0pt0001_shape0pt01 pretrainIter=20000 disp=0 gpu=1 nParts=20 nullReward=8e-5 shapeLrDecay=0.5   synset=3001627 probLrDecay=0.2 usePretrain=1  numTrainIter=30000 name=chairChamferSurf_null_small_ft_prob0pt2_shape0pt5_null8em5 th cadAutoEncCuboids/primSelTsdfChamfer.lua\n```\n### Citation\nIf you use this code for your research, please consider citing:\n```\n@inProceedings{abstractionTulsiani17,\n  title={Learning Shape Abstractions by Assembling Volumetric Primitives},\n  author = {Shubham Tulsiani\n  and Hao Su\n  and Leonidas J. Guibas\n  and Alexei A. Efros\n  and Jitendra Malik},\n  booktitle={Computer Vision and Pattern Regognition (CVPR)},\n  year={2017}\n}\n```\n\n### Other Implementations\n[Pytorch](https://github.com/nileshkulkarni/volumetricPrimitivesPytorch) (by Nilesh Kulkarni)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/shubhtuls.github.io%2FvolumetricPrimitives%2F","html_url":"https://awesome.ecosyste.ms/projects/shubhtuls.github.io%2FvolumetricPrimitives%2F","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/shubhtuls.github.io%2FvolumetricPrimitives%2F/lists"}